aws_sdk_iotwireless/operation/update_destination/
_update_destination_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateDestinationInput {
6 pub name: ::std::option::Option<::std::string::String>,
8 pub expression_type: ::std::option::Option<crate::types::ExpressionType>,
10 pub expression: ::std::option::Option<::std::string::String>,
12 pub description: ::std::option::Option<::std::string::String>,
14 pub role_arn: ::std::option::Option<::std::string::String>,
16}
17impl UpdateDestinationInput {
18 pub fn name(&self) -> ::std::option::Option<&str> {
20 self.name.as_deref()
21 }
22 pub fn expression_type(&self) -> ::std::option::Option<&crate::types::ExpressionType> {
24 self.expression_type.as_ref()
25 }
26 pub fn expression(&self) -> ::std::option::Option<&str> {
28 self.expression.as_deref()
29 }
30 pub fn description(&self) -> ::std::option::Option<&str> {
32 self.description.as_deref()
33 }
34 pub fn role_arn(&self) -> ::std::option::Option<&str> {
36 self.role_arn.as_deref()
37 }
38}
39impl UpdateDestinationInput {
40 pub fn builder() -> crate::operation::update_destination::builders::UpdateDestinationInputBuilder {
42 crate::operation::update_destination::builders::UpdateDestinationInputBuilder::default()
43 }
44}
45
46#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct UpdateDestinationInputBuilder {
50 pub(crate) name: ::std::option::Option<::std::string::String>,
51 pub(crate) expression_type: ::std::option::Option<crate::types::ExpressionType>,
52 pub(crate) expression: ::std::option::Option<::std::string::String>,
53 pub(crate) description: ::std::option::Option<::std::string::String>,
54 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
55}
56impl UpdateDestinationInputBuilder {
57 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.name = ::std::option::Option::Some(input.into());
61 self
62 }
63 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.name = input;
66 self
67 }
68 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
70 &self.name
71 }
72 pub fn expression_type(mut self, input: crate::types::ExpressionType) -> Self {
74 self.expression_type = ::std::option::Option::Some(input);
75 self
76 }
77 pub fn set_expression_type(mut self, input: ::std::option::Option<crate::types::ExpressionType>) -> Self {
79 self.expression_type = input;
80 self
81 }
82 pub fn get_expression_type(&self) -> &::std::option::Option<crate::types::ExpressionType> {
84 &self.expression_type
85 }
86 pub fn expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.expression = ::std::option::Option::Some(input.into());
89 self
90 }
91 pub fn set_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.expression = input;
94 self
95 }
96 pub fn get_expression(&self) -> &::std::option::Option<::std::string::String> {
98 &self.expression
99 }
100 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102 self.description = ::std::option::Option::Some(input.into());
103 self
104 }
105 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.description = input;
108 self
109 }
110 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
112 &self.description
113 }
114 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.role_arn = ::std::option::Option::Some(input.into());
117 self
118 }
119 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.role_arn = input;
122 self
123 }
124 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
126 &self.role_arn
127 }
128 pub fn build(
130 self,
131 ) -> ::std::result::Result<crate::operation::update_destination::UpdateDestinationInput, ::aws_smithy_types::error::operation::BuildError> {
132 ::std::result::Result::Ok(crate::operation::update_destination::UpdateDestinationInput {
133 name: self.name,
134 expression_type: self.expression_type,
135 expression: self.expression,
136 description: self.description,
137 role_arn: self.role_arn,
138 })
139 }
140}