aws_sdk_iotwireless/operation/get_destination/
_get_destination_output.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 GetDestinationOutput {
6    /// <p>The Amazon Resource Name of the resource.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the resource.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The rule name or topic rule to send messages to.</p>
11    pub expression: ::std::option::Option<::std::string::String>,
12    /// <p>The type of value in <code>Expression</code>.</p>
13    pub expression_type: ::std::option::Option<crate::types::ExpressionType>,
14    /// <p>The description of the resource.</p>
15    pub description: ::std::option::Option<::std::string::String>,
16    /// <p>The ARN of the IAM Role that authorizes the destination.</p>
17    pub role_arn: ::std::option::Option<::std::string::String>,
18    _request_id: Option<String>,
19}
20impl GetDestinationOutput {
21    /// <p>The Amazon Resource Name of the resource.</p>
22    pub fn arn(&self) -> ::std::option::Option<&str> {
23        self.arn.as_deref()
24    }
25    /// <p>The name of the resource.</p>
26    pub fn name(&self) -> ::std::option::Option<&str> {
27        self.name.as_deref()
28    }
29    /// <p>The rule name or topic rule to send messages to.</p>
30    pub fn expression(&self) -> ::std::option::Option<&str> {
31        self.expression.as_deref()
32    }
33    /// <p>The type of value in <code>Expression</code>.</p>
34    pub fn expression_type(&self) -> ::std::option::Option<&crate::types::ExpressionType> {
35        self.expression_type.as_ref()
36    }
37    /// <p>The description of the resource.</p>
38    pub fn description(&self) -> ::std::option::Option<&str> {
39        self.description.as_deref()
40    }
41    /// <p>The ARN of the IAM Role that authorizes the destination.</p>
42    pub fn role_arn(&self) -> ::std::option::Option<&str> {
43        self.role_arn.as_deref()
44    }
45}
46impl ::aws_types::request_id::RequestId for GetDestinationOutput {
47    fn request_id(&self) -> Option<&str> {
48        self._request_id.as_deref()
49    }
50}
51impl GetDestinationOutput {
52    /// Creates a new builder-style object to manufacture [`GetDestinationOutput`](crate::operation::get_destination::GetDestinationOutput).
53    pub fn builder() -> crate::operation::get_destination::builders::GetDestinationOutputBuilder {
54        crate::operation::get_destination::builders::GetDestinationOutputBuilder::default()
55    }
56}
57
58/// A builder for [`GetDestinationOutput`](crate::operation::get_destination::GetDestinationOutput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct GetDestinationOutputBuilder {
62    pub(crate) arn: ::std::option::Option<::std::string::String>,
63    pub(crate) name: ::std::option::Option<::std::string::String>,
64    pub(crate) expression: ::std::option::Option<::std::string::String>,
65    pub(crate) expression_type: ::std::option::Option<crate::types::ExpressionType>,
66    pub(crate) description: ::std::option::Option<::std::string::String>,
67    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
68    _request_id: Option<String>,
69}
70impl GetDestinationOutputBuilder {
71    /// <p>The Amazon Resource Name of the resource.</p>
72    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.arn = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The Amazon Resource Name of the resource.</p>
77    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.arn = input;
79        self
80    }
81    /// <p>The Amazon Resource Name of the resource.</p>
82    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
83        &self.arn
84    }
85    /// <p>The name of the resource.</p>
86    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.name = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The name of the resource.</p>
91    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.name = input;
93        self
94    }
95    /// <p>The name of the resource.</p>
96    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
97        &self.name
98    }
99    /// <p>The rule name or topic rule to send messages to.</p>
100    pub fn expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.expression = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>The rule name or topic rule to send messages to.</p>
105    pub fn set_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.expression = input;
107        self
108    }
109    /// <p>The rule name or topic rule to send messages to.</p>
110    pub fn get_expression(&self) -> &::std::option::Option<::std::string::String> {
111        &self.expression
112    }
113    /// <p>The type of value in <code>Expression</code>.</p>
114    pub fn expression_type(mut self, input: crate::types::ExpressionType) -> Self {
115        self.expression_type = ::std::option::Option::Some(input);
116        self
117    }
118    /// <p>The type of value in <code>Expression</code>.</p>
119    pub fn set_expression_type(mut self, input: ::std::option::Option<crate::types::ExpressionType>) -> Self {
120        self.expression_type = input;
121        self
122    }
123    /// <p>The type of value in <code>Expression</code>.</p>
124    pub fn get_expression_type(&self) -> &::std::option::Option<crate::types::ExpressionType> {
125        &self.expression_type
126    }
127    /// <p>The description of the resource.</p>
128    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.description = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The description of the resource.</p>
133    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.description = input;
135        self
136    }
137    /// <p>The description of the resource.</p>
138    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
139        &self.description
140    }
141    /// <p>The ARN of the IAM Role that authorizes the destination.</p>
142    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.role_arn = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The ARN of the IAM Role that authorizes the destination.</p>
147    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.role_arn = input;
149        self
150    }
151    /// <p>The ARN of the IAM Role that authorizes the destination.</p>
152    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
153        &self.role_arn
154    }
155    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
156        self._request_id = Some(request_id.into());
157        self
158    }
159
160    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
161        self._request_id = request_id;
162        self
163    }
164    /// Consumes the builder and constructs a [`GetDestinationOutput`](crate::operation::get_destination::GetDestinationOutput).
165    pub fn build(self) -> crate::operation::get_destination::GetDestinationOutput {
166        crate::operation::get_destination::GetDestinationOutput {
167            arn: self.arn,
168            name: self.name,
169            expression: self.expression,
170            expression_type: self.expression_type,
171            description: self.description,
172            role_arn: self.role_arn,
173            _request_id: self._request_id,
174        }
175    }
176}