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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PredictInput {
    /// <p>A unique identifier of the <code>MLModel</code>.</p>
    pub ml_model_id: ::std::option::Option<::std::string::String>,
    /// <p>A map of variable name-value pairs that represent an observation.</p>
    pub record: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    #[allow(missing_docs)] // documentation missing in model
    pub predict_endpoint: ::std::option::Option<::std::string::String>,
}
impl PredictInput {
    /// <p>A unique identifier of the <code>MLModel</code>.</p>
    pub fn ml_model_id(&self) -> ::std::option::Option<&str> {
        self.ml_model_id.as_deref()
    }
    /// <p>A map of variable name-value pairs that represent an observation.</p>
    pub fn record(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.record.as_ref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn predict_endpoint(&self) -> ::std::option::Option<&str> {
        self.predict_endpoint.as_deref()
    }
}
impl PredictInput {
    /// Creates a new builder-style object to manufacture [`PredictInput`](crate::operation::predict::PredictInput).
    pub fn builder() -> crate::operation::predict::builders::PredictInputBuilder {
        crate::operation::predict::builders::PredictInputBuilder::default()
    }
}

/// A builder for [`PredictInput`](crate::operation::predict::PredictInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PredictInputBuilder {
    pub(crate) ml_model_id: ::std::option::Option<::std::string::String>,
    pub(crate) record: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) predict_endpoint: ::std::option::Option<::std::string::String>,
}
impl PredictInputBuilder {
    /// <p>A unique identifier of the <code>MLModel</code>.</p>
    /// This field is required.
    pub fn ml_model_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ml_model_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier of the <code>MLModel</code>.</p>
    pub fn set_ml_model_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ml_model_id = input;
        self
    }
    /// <p>A unique identifier of the <code>MLModel</code>.</p>
    pub fn get_ml_model_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.ml_model_id
    }
    /// Adds a key-value pair to `record`.
    ///
    /// To override the contents of this collection use [`set_record`](Self::set_record).
    ///
    /// <p>A map of variable name-value pairs that represent an observation.</p>
    pub fn record(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.record.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.record = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A map of variable name-value pairs that represent an observation.</p>
    pub fn set_record(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.record = input;
        self
    }
    /// <p>A map of variable name-value pairs that represent an observation.</p>
    pub fn get_record(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.record
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn predict_endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.predict_endpoint = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_predict_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.predict_endpoint = input;
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_predict_endpoint(&self) -> &::std::option::Option<::std::string::String> {
        &self.predict_endpoint
    }
    /// Consumes the builder and constructs a [`PredictInput`](crate::operation::predict::PredictInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::predict::PredictInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::predict::PredictInput {
            ml_model_id: self.ml_model_id,
            record: self.record,
            predict_endpoint: self.predict_endpoint,
        })
    }
}