aws_sdk_comprehend/operation/update_endpoint/
_update_endpoint_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateEndpointInput {
6 pub endpoint_arn: ::std::option::Option<::std::string::String>,
8 pub desired_model_arn: ::std::option::Option<::std::string::String>,
10 pub desired_inference_units: ::std::option::Option<i32>,
12 pub desired_data_access_role_arn: ::std::option::Option<::std::string::String>,
14 pub flywheel_arn: ::std::option::Option<::std::string::String>,
16}
17impl UpdateEndpointInput {
18 pub fn endpoint_arn(&self) -> ::std::option::Option<&str> {
20 self.endpoint_arn.as_deref()
21 }
22 pub fn desired_model_arn(&self) -> ::std::option::Option<&str> {
24 self.desired_model_arn.as_deref()
25 }
26 pub fn desired_inference_units(&self) -> ::std::option::Option<i32> {
28 self.desired_inference_units
29 }
30 pub fn desired_data_access_role_arn(&self) -> ::std::option::Option<&str> {
32 self.desired_data_access_role_arn.as_deref()
33 }
34 pub fn flywheel_arn(&self) -> ::std::option::Option<&str> {
36 self.flywheel_arn.as_deref()
37 }
38}
39impl UpdateEndpointInput {
40 pub fn builder() -> crate::operation::update_endpoint::builders::UpdateEndpointInputBuilder {
42 crate::operation::update_endpoint::builders::UpdateEndpointInputBuilder::default()
43 }
44}
45
46#[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 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 pub fn set_endpoint_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.endpoint_arn = input;
66 self
67 }
68 pub fn get_endpoint_arn(&self) -> &::std::option::Option<::std::string::String> {
70 &self.endpoint_arn
71 }
72 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 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 pub fn get_desired_model_arn(&self) -> &::std::option::Option<::std::string::String> {
84 &self.desired_model_arn
85 }
86 pub fn desired_inference_units(mut self, input: i32) -> Self {
88 self.desired_inference_units = ::std::option::Option::Some(input);
89 self
90 }
91 pub fn set_desired_inference_units(mut self, input: ::std::option::Option<i32>) -> Self {
93 self.desired_inference_units = input;
94 self
95 }
96 pub fn get_desired_inference_units(&self) -> &::std::option::Option<i32> {
98 &self.desired_inference_units
99 }
100 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 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 pub fn get_desired_data_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
112 &self.desired_data_access_role_arn
113 }
114 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 pub fn set_flywheel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.flywheel_arn = input;
122 self
123 }
124 pub fn get_flywheel_arn(&self) -> &::std::option::Option<::std::string::String> {
126 &self.flywheel_arn
127 }
128 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}