aws_sdk_iotmanagedintegrations/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 delivery_destination_arn: ::std::option::Option<::std::string::String>,
10 pub delivery_destination_type: ::std::option::Option<crate::types::DeliveryDestinationType>,
12 pub role_arn: ::std::option::Option<::std::string::String>,
14 pub description: ::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 delivery_destination_arn(&self) -> ::std::option::Option<&str> {
24 self.delivery_destination_arn.as_deref()
25 }
26 pub fn delivery_destination_type(&self) -> ::std::option::Option<&crate::types::DeliveryDestinationType> {
28 self.delivery_destination_type.as_ref()
29 }
30 pub fn role_arn(&self) -> ::std::option::Option<&str> {
32 self.role_arn.as_deref()
33 }
34 pub fn description(&self) -> ::std::option::Option<&str> {
36 self.description.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) 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 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 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 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 pub fn get_delivery_destination_arn(&self) -> &::std::option::Option<::std::string::String> {
84 &self.delivery_destination_arn
85 }
86 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 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 pub fn get_delivery_destination_type(&self) -> &::std::option::Option<crate::types::DeliveryDestinationType> {
98 &self.delivery_destination_type
99 }
100 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 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.role_arn = input;
108 self
109 }
110 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
112 &self.role_arn
113 }
114 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.description = input;
122 self
123 }
124 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
126 &self.description
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 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}