aws_sdk_iotmanagedintegrations/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 name of the customer-managed destination.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
9    pub delivery_destination_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The destination type for the customer-managed destination.</p>
11    pub delivery_destination_type: ::std::option::Option<crate::types::DeliveryDestinationType>,
12    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
13    pub role_arn: ::std::option::Option<::std::string::String>,
14    /// <p>The description of the customer-managed destination.</p>
15    pub description: ::std::option::Option<::std::string::String>,
16}
17impl UpdateDestinationInput {
18    /// <p>The name of the customer-managed destination.</p>
19    pub fn name(&self) -> ::std::option::Option<&str> {
20        self.name.as_deref()
21    }
22    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
23    pub fn delivery_destination_arn(&self) -> ::std::option::Option<&str> {
24        self.delivery_destination_arn.as_deref()
25    }
26    /// <p>The destination type for the customer-managed destination.</p>
27    pub fn delivery_destination_type(&self) -> ::std::option::Option<&crate::types::DeliveryDestinationType> {
28        self.delivery_destination_type.as_ref()
29    }
30    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
31    pub fn role_arn(&self) -> ::std::option::Option<&str> {
32        self.role_arn.as_deref()
33    }
34    /// <p>The description of the customer-managed destination.</p>
35    pub fn description(&self) -> ::std::option::Option<&str> {
36        self.description.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) delivery_destination_arn: ::std::option::Option<::std::string::String>,
52    pub(crate) delivery_destination_type: ::std::option::Option<crate::types::DeliveryDestinationType>,
53    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
54    pub(crate) description: ::std::option::Option<::std::string::String>,
55}
56impl UpdateDestinationInputBuilder {
57    /// <p>The name of the customer-managed destination.</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 name of the customer-managed destination.</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 name of the customer-managed destination.</p>
69    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
70        &self.name
71    }
72    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
73    pub fn delivery_destination_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.delivery_destination_arn = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
78    pub fn set_delivery_destination_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.delivery_destination_arn = input;
80        self
81    }
82    /// <p>The Amazon Resource Name (ARN) of the customer-managed destination.</p>
83    pub fn get_delivery_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
84        &self.delivery_destination_arn
85    }
86    /// <p>The destination type for the customer-managed destination.</p>
87    pub fn delivery_destination_type(mut self, input: crate::types::DeliveryDestinationType) -> Self {
88        self.delivery_destination_type = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>The destination type for the customer-managed destination.</p>
92    pub fn set_delivery_destination_type(mut self, input: ::std::option::Option<crate::types::DeliveryDestinationType>) -> Self {
93        self.delivery_destination_type = input;
94        self
95    }
96    /// <p>The destination type for the customer-managed destination.</p>
97    pub fn get_delivery_destination_type(&self) -> &::std::option::Option<crate::types::DeliveryDestinationType> {
98        &self.delivery_destination_type
99    }
100    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
101    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.role_arn = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
106    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.role_arn = input;
108        self
109    }
110    /// <p>The Amazon Resource Name (ARN) of the delivery destination role.</p>
111    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
112        &self.role_arn
113    }
114    /// <p>The description of the customer-managed destination.</p>
115    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.description = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The description of the customer-managed destination.</p>
120    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.description = input;
122        self
123    }
124    /// <p>The description of the customer-managed destination.</p>
125    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
126        &self.description
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            delivery_destination_arn: self.delivery_destination_arn,
135            delivery_destination_type: self.delivery_destination_type,
136            role_arn: self.role_arn,
137            description: self.description,
138        })
139    }
140}