1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The details of the automatically generated business metadata that is rejected.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RejectChoice {
    /// <p>Specifies the target (for example, a column name) where a prediction can be rejected.</p>
    pub prediction_target: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the the automatically generated business metadata that can be rejected.</p>
    pub prediction_choices: ::std::option::Option<::std::vec::Vec<i32>>,
}
impl RejectChoice {
    /// <p>Specifies the target (for example, a column name) where a prediction can be rejected.</p>
    pub fn prediction_target(&self) -> ::std::option::Option<&str> {
        self.prediction_target.as_deref()
    }
    /// <p>Specifies the the automatically generated business metadata that can be rejected.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.prediction_choices.is_none()`.
    pub fn prediction_choices(&self) -> &[i32] {
        self.prediction_choices.as_deref().unwrap_or_default()
    }
}
impl RejectChoice {
    /// Creates a new builder-style object to manufacture [`RejectChoice`](crate::types::RejectChoice).
    pub fn builder() -> crate::types::builders::RejectChoiceBuilder {
        crate::types::builders::RejectChoiceBuilder::default()
    }
}

/// A builder for [`RejectChoice`](crate::types::RejectChoice).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RejectChoiceBuilder {
    pub(crate) prediction_target: ::std::option::Option<::std::string::String>,
    pub(crate) prediction_choices: ::std::option::Option<::std::vec::Vec<i32>>,
}
impl RejectChoiceBuilder {
    /// <p>Specifies the target (for example, a column name) where a prediction can be rejected.</p>
    pub fn prediction_target(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.prediction_target = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the target (for example, a column name) where a prediction can be rejected.</p>
    pub fn set_prediction_target(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.prediction_target = input;
        self
    }
    /// <p>Specifies the target (for example, a column name) where a prediction can be rejected.</p>
    pub fn get_prediction_target(&self) -> &::std::option::Option<::std::string::String> {
        &self.prediction_target
    }
    /// Appends an item to `prediction_choices`.
    ///
    /// To override the contents of this collection use [`set_prediction_choices`](Self::set_prediction_choices).
    ///
    /// <p>Specifies the the automatically generated business metadata that can be rejected.</p>
    pub fn prediction_choices(mut self, input: i32) -> Self {
        let mut v = self.prediction_choices.unwrap_or_default();
        v.push(input);
        self.prediction_choices = ::std::option::Option::Some(v);
        self
    }
    /// <p>Specifies the the automatically generated business metadata that can be rejected.</p>
    pub fn set_prediction_choices(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
        self.prediction_choices = input;
        self
    }
    /// <p>Specifies the the automatically generated business metadata that can be rejected.</p>
    pub fn get_prediction_choices(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
        &self.prediction_choices
    }
    /// Consumes the builder and constructs a [`RejectChoice`](crate::types::RejectChoice).
    pub fn build(self) -> crate::types::RejectChoice {
        crate::types::RejectChoice {
            prediction_target: self.prediction_target,
            prediction_choices: self.prediction_choices,
        }
    }
}