aws_sdk_iotwireless/operation/update_destination/
_update_destination_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 UpdateDestinationInput {
6    /// <p>The new name of the resource.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The type of value in <code>Expression</code>.</p>
9    pub expression_type: ::std::option::Option<crate::types::ExpressionType>,
10    /// <p>The new rule name or topic rule to send messages to.</p>
11    pub expression: ::std::option::Option<::std::string::String>,
12    /// <p>A new description of the resource.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The ARN of the IAM Role that authorizes the destination.</p>
15    pub role_arn: ::std::option::Option<::std::string::String>,
16}
17impl UpdateDestinationInput {
18    /// <p>The new name of the resource.</p>
19    pub fn name(&self) -> ::std::option::Option<&str> {
20        self.name.as_deref()
21    }
22    /// <p>The type of value in <code>Expression</code>.</p>
23    pub fn expression_type(&self) -> ::std::option::Option<&crate::types::ExpressionType> {
24        self.expression_type.as_ref()
25    }
26    /// <p>The new rule name or topic rule to send messages to.</p>
27    pub fn expression(&self) -> ::std::option::Option<&str> {
28        self.expression.as_deref()
29    }
30    /// <p>A new description of the resource.</p>
31    pub fn description(&self) -> ::std::option::Option<&str> {
32        self.description.as_deref()
33    }
34    /// <p>The ARN of the IAM Role that authorizes the destination.</p>
35    pub fn role_arn(&self) -> ::std::option::Option<&str> {
36        self.role_arn.as_deref()
37    }
38}
39impl UpdateDestinationInput {
40    /// Creates a new builder-style object to manufacture [`UpdateDestinationInput`](crate::operation::update_destination::UpdateDestinationInput).
41    pub fn builder() -> crate::operation::update_destination::builders::UpdateDestinationInputBuilder {
42        crate::operation::update_destination::builders::UpdateDestinationInputBuilder::default()
43    }
44}
45
46/// A builder for [`UpdateDestinationInput`](crate::operation::update_destination::UpdateDestinationInput).
47#[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    /// <p>The new name of the resource.</p>
58    /// This field is required.
59    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    /// <p>The new name of the resource.</p>
64    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.name = input;
66        self
67    }
68    /// <p>The new name of the resource.</p>
69    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
70        &self.name
71    }
72    /// <p>The type of value in <code>Expression</code>.</p>
73    pub fn expression_type(mut self, input: crate::types::ExpressionType) -> Self {
74        self.expression_type = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>The type of value in <code>Expression</code>.</p>
78    pub fn set_expression_type(mut self, input: ::std::option::Option<crate::types::ExpressionType>) -> Self {
79        self.expression_type = input;
80        self
81    }
82    /// <p>The type of value in <code>Expression</code>.</p>
83    pub fn get_expression_type(&self) -> &::std::option::Option<crate::types::ExpressionType> {
84        &self.expression_type
85    }
86    /// <p>The new rule name or topic rule to send messages to.</p>
87    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    /// <p>The new rule name or topic rule to send messages to.</p>
92    pub fn set_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.expression = input;
94        self
95    }
96    /// <p>The new rule name or topic rule to send messages to.</p>
97    pub fn get_expression(&self) -> &::std::option::Option<::std::string::String> {
98        &self.expression
99    }
100    /// <p>A new description of the resource.</p>
101    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    /// <p>A new description of the resource.</p>
106    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.description = input;
108        self
109    }
110    /// <p>A new description of the resource.</p>
111    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
112        &self.description
113    }
114    /// <p>The ARN of the IAM Role that authorizes the destination.</p>
115    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    /// <p>The ARN of the IAM Role that authorizes the destination.</p>
120    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.role_arn = input;
122        self
123    }
124    /// <p>The ARN of the IAM Role that authorizes the destination.</p>
125    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
126        &self.role_arn
127    }
128    /// Consumes the builder and constructs a [`UpdateDestinationInput`](crate::operation::update_destination::UpdateDestinationInput).
129    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}