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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// 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 UpdateEndpointInput {
    /// <p>The Amazon Resource Number (ARN) of the endpoint being updated.</p>
    pub endpoint_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the new model to use when updating an existing endpoint.</p>
    pub desired_model_arn: ::std::option::Option<::std::string::String>,
    /// <p> The desired number of inference units to be used by the model using this endpoint. Each inference unit represents of a throughput of 100 characters per second.</p>
    pub desired_inference_units: ::std::option::Option<i32>,
    /// <p>Data access role ARN to use in case the new model is encrypted with a customer CMK.</p>
    pub desired_data_access_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Number (ARN) of the flywheel</p>
    pub flywheel_arn: ::std::option::Option<::std::string::String>,
}
impl UpdateEndpointInput {
    /// <p>The Amazon Resource Number (ARN) of the endpoint being updated.</p>
    pub fn endpoint_arn(&self) -> ::std::option::Option<&str> {
        self.endpoint_arn.as_deref()
    }
    /// <p>The ARN of the new model to use when updating an existing endpoint.</p>
    pub fn desired_model_arn(&self) -> ::std::option::Option<&str> {
        self.desired_model_arn.as_deref()
    }
    /// <p> The desired number of inference units to be used by the model using this endpoint. Each inference unit represents of a throughput of 100 characters per second.</p>
    pub fn desired_inference_units(&self) -> ::std::option::Option<i32> {
        self.desired_inference_units
    }
    /// <p>Data access role ARN to use in case the new model is encrypted with a customer CMK.</p>
    pub fn desired_data_access_role_arn(&self) -> ::std::option::Option<&str> {
        self.desired_data_access_role_arn.as_deref()
    }
    /// <p>The Amazon Resource Number (ARN) of the flywheel</p>
    pub fn flywheel_arn(&self) -> ::std::option::Option<&str> {
        self.flywheel_arn.as_deref()
    }
}
impl UpdateEndpointInput {
    /// Creates a new builder-style object to manufacture [`UpdateEndpointInput`](crate::operation::update_endpoint::UpdateEndpointInput).
    pub fn builder() -> crate::operation::update_endpoint::builders::UpdateEndpointInputBuilder {
        crate::operation::update_endpoint::builders::UpdateEndpointInputBuilder::default()
    }
}

/// A builder for [`UpdateEndpointInput`](crate::operation::update_endpoint::UpdateEndpointInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateEndpointInputBuilder {
    pub(crate) endpoint_arn: ::std::option::Option<::std::string::String>,
    pub(crate) desired_model_arn: ::std::option::Option<::std::string::String>,
    pub(crate) desired_inference_units: ::std::option::Option<i32>,
    pub(crate) desired_data_access_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) flywheel_arn: ::std::option::Option<::std::string::String>,
}
impl UpdateEndpointInputBuilder {
    /// <p>The Amazon Resource Number (ARN) of the endpoint being updated.</p>
    pub fn endpoint_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.endpoint_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Number (ARN) of the endpoint being updated.</p>
    pub fn set_endpoint_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.endpoint_arn = input;
        self
    }
    /// <p>The Amazon Resource Number (ARN) of the endpoint being updated.</p>
    pub fn get_endpoint_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.endpoint_arn
    }
    /// <p>The ARN of the new model to use when updating an existing endpoint.</p>
    pub fn desired_model_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.desired_model_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the new model to use when updating an existing endpoint.</p>
    pub fn set_desired_model_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.desired_model_arn = input;
        self
    }
    /// <p>The ARN of the new model to use when updating an existing endpoint.</p>
    pub fn get_desired_model_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.desired_model_arn
    }
    /// <p> The desired number of inference units to be used by the model using this endpoint. Each inference unit represents of a throughput of 100 characters per second.</p>
    pub fn desired_inference_units(mut self, input: i32) -> Self {
        self.desired_inference_units = ::std::option::Option::Some(input);
        self
    }
    /// <p> The desired number of inference units to be used by the model using this endpoint. Each inference unit represents of a throughput of 100 characters per second.</p>
    pub fn set_desired_inference_units(mut self, input: ::std::option::Option<i32>) -> Self {
        self.desired_inference_units = input;
        self
    }
    /// <p> The desired number of inference units to be used by the model using this endpoint. Each inference unit represents of a throughput of 100 characters per second.</p>
    pub fn get_desired_inference_units(&self) -> &::std::option::Option<i32> {
        &self.desired_inference_units
    }
    /// <p>Data access role ARN to use in case the new model is encrypted with a customer CMK.</p>
    pub fn desired_data_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.desired_data_access_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Data access role ARN to use in case the new model is encrypted with a customer CMK.</p>
    pub fn set_desired_data_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.desired_data_access_role_arn = input;
        self
    }
    /// <p>Data access role ARN to use in case the new model is encrypted with a customer CMK.</p>
    pub fn get_desired_data_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.desired_data_access_role_arn
    }
    /// <p>The Amazon Resource Number (ARN) of the flywheel</p>
    pub fn flywheel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.flywheel_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Number (ARN) of the flywheel</p>
    pub fn set_flywheel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.flywheel_arn = input;
        self
    }
    /// <p>The Amazon Resource Number (ARN) of the flywheel</p>
    pub fn get_flywheel_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.flywheel_arn
    }
    /// Consumes the builder and constructs a [`UpdateEndpointInput`](crate::operation::update_endpoint::UpdateEndpointInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_endpoint::UpdateEndpointInput, ::aws_smithy_http::operation::error::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_endpoint::UpdateEndpointInput {
            endpoint_arn: self.endpoint_arn,
            desired_model_arn: self.desired_model_arn,
            desired_inference_units: self.desired_inference_units,
            desired_data_access_role_arn: self.desired_data_access_role_arn,
            flywheel_arn: self.flywheel_arn,
        })
    }
}