aws_sdk_comprehend/operation/update_endpoint/
_update_endpoint_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateEndpointInput {
6    /// <p>The Amazon Resource Number (ARN) of the endpoint being updated.</p>
7    pub endpoint_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the new model to use when updating an existing endpoint.</p>
9    pub desired_model_arn: ::std::option::Option<::std::string::String>,
10    /// <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>
11    pub desired_inference_units: ::std::option::Option<i32>,
12    /// <p>Data access role ARN to use in case the new model is encrypted with a customer CMK.</p>
13    pub desired_data_access_role_arn: ::std::option::Option<::std::string::String>,
14    /// <p>The Amazon Resource Number (ARN) of the flywheel</p>
15    pub flywheel_arn: ::std::option::Option<::std::string::String>,
16}
17impl UpdateEndpointInput {
18    /// <p>The Amazon Resource Number (ARN) of the endpoint being updated.</p>
19    pub fn endpoint_arn(&self) -> ::std::option::Option<&str> {
20        self.endpoint_arn.as_deref()
21    }
22    /// <p>The ARN of the new model to use when updating an existing endpoint.</p>
23    pub fn desired_model_arn(&self) -> ::std::option::Option<&str> {
24        self.desired_model_arn.as_deref()
25    }
26    /// <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>
27    pub fn desired_inference_units(&self) -> ::std::option::Option<i32> {
28        self.desired_inference_units
29    }
30    /// <p>Data access role ARN to use in case the new model is encrypted with a customer CMK.</p>
31    pub fn desired_data_access_role_arn(&self) -> ::std::option::Option<&str> {
32        self.desired_data_access_role_arn.as_deref()
33    }
34    /// <p>The Amazon Resource Number (ARN) of the flywheel</p>
35    pub fn flywheel_arn(&self) -> ::std::option::Option<&str> {
36        self.flywheel_arn.as_deref()
37    }
38}
39impl UpdateEndpointInput {
40    /// Creates a new builder-style object to manufacture [`UpdateEndpointInput`](crate::operation::update_endpoint::UpdateEndpointInput).
41    pub fn builder() -> crate::operation::update_endpoint::builders::UpdateEndpointInputBuilder {
42        crate::operation::update_endpoint::builders::UpdateEndpointInputBuilder::default()
43    }
44}
45
46/// A builder for [`UpdateEndpointInput`](crate::operation::update_endpoint::UpdateEndpointInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct UpdateEndpointInputBuilder {
50    pub(crate) endpoint_arn: ::std::option::Option<::std::string::String>,
51    pub(crate) desired_model_arn: ::std::option::Option<::std::string::String>,
52    pub(crate) desired_inference_units: ::std::option::Option<i32>,
53    pub(crate) desired_data_access_role_arn: ::std::option::Option<::std::string::String>,
54    pub(crate) flywheel_arn: ::std::option::Option<::std::string::String>,
55}
56impl UpdateEndpointInputBuilder {
57    /// <p>The Amazon Resource Number (ARN) of the endpoint being updated.</p>
58    /// This field is required.
59    pub fn endpoint_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.endpoint_arn = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The Amazon Resource Number (ARN) of the endpoint being updated.</p>
64    pub fn set_endpoint_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.endpoint_arn = input;
66        self
67    }
68    /// <p>The Amazon Resource Number (ARN) of the endpoint being updated.</p>
69    pub fn get_endpoint_arn(&self) -> &::std::option::Option<::std::string::String> {
70        &self.endpoint_arn
71    }
72    /// <p>The ARN of the new model to use when updating an existing endpoint.</p>
73    pub fn desired_model_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.desired_model_arn = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The ARN of the new model to use when updating an existing endpoint.</p>
78    pub fn set_desired_model_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.desired_model_arn = input;
80        self
81    }
82    /// <p>The ARN of the new model to use when updating an existing endpoint.</p>
83    pub fn get_desired_model_arn(&self) -> &::std::option::Option<::std::string::String> {
84        &self.desired_model_arn
85    }
86    /// <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>
87    pub fn desired_inference_units(mut self, input: i32) -> Self {
88        self.desired_inference_units = ::std::option::Option::Some(input);
89        self
90    }
91    /// <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>
92    pub fn set_desired_inference_units(mut self, input: ::std::option::Option<i32>) -> Self {
93        self.desired_inference_units = input;
94        self
95    }
96    /// <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>
97    pub fn get_desired_inference_units(&self) -> &::std::option::Option<i32> {
98        &self.desired_inference_units
99    }
100    /// <p>Data access role ARN to use in case the new model is encrypted with a customer CMK.</p>
101    pub fn desired_data_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.desired_data_access_role_arn = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>Data access role ARN to use in case the new model is encrypted with a customer CMK.</p>
106    pub fn set_desired_data_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.desired_data_access_role_arn = input;
108        self
109    }
110    /// <p>Data access role ARN to use in case the new model is encrypted with a customer CMK.</p>
111    pub fn get_desired_data_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
112        &self.desired_data_access_role_arn
113    }
114    /// <p>The Amazon Resource Number (ARN) of the flywheel</p>
115    pub fn flywheel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.flywheel_arn = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The Amazon Resource Number (ARN) of the flywheel</p>
120    pub fn set_flywheel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.flywheel_arn = input;
122        self
123    }
124    /// <p>The Amazon Resource Number (ARN) of the flywheel</p>
125    pub fn get_flywheel_arn(&self) -> &::std::option::Option<::std::string::String> {
126        &self.flywheel_arn
127    }
128    /// Consumes the builder and constructs a [`UpdateEndpointInput`](crate::operation::update_endpoint::UpdateEndpointInput).
129    pub fn build(
130        self,
131    ) -> ::std::result::Result<crate::operation::update_endpoint::UpdateEndpointInput, ::aws_smithy_types::error::operation::BuildError> {
132        ::std::result::Result::Ok(crate::operation::update_endpoint::UpdateEndpointInput {
133            endpoint_arn: self.endpoint_arn,
134            desired_model_arn: self.desired_model_arn,
135            desired_inference_units: self.desired_inference_units,
136            desired_data_access_role_arn: self.desired_data_access_role_arn,
137            flywheel_arn: self.flywheel_arn,
138        })
139    }
140}