aws_sdk_iotroborunner/operation/create_destination/
_create_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 CreateDestinationInput {
6    /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times.
7    pub client_token: ::std::option::Option<::std::string::String>,
8    /// Human friendly name of the resource.
9    pub name: ::std::option::Option<::std::string::String>,
10    /// Site ARN.
11    pub site: ::std::option::Option<::std::string::String>,
12    /// The state of the destination. Default used if not specified.
13    pub state: ::std::option::Option<crate::types::DestinationState>,
14    /// JSON document containing additional fixed properties regarding the destination
15    pub additional_fixed_properties: ::std::option::Option<::std::string::String>,
16}
17impl CreateDestinationInput {
18    /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times.
19    pub fn client_token(&self) -> ::std::option::Option<&str> {
20        self.client_token.as_deref()
21    }
22    /// Human friendly name of the resource.
23    pub fn name(&self) -> ::std::option::Option<&str> {
24        self.name.as_deref()
25    }
26    /// Site ARN.
27    pub fn site(&self) -> ::std::option::Option<&str> {
28        self.site.as_deref()
29    }
30    /// The state of the destination. Default used if not specified.
31    pub fn state(&self) -> ::std::option::Option<&crate::types::DestinationState> {
32        self.state.as_ref()
33    }
34    /// JSON document containing additional fixed properties regarding the destination
35    pub fn additional_fixed_properties(&self) -> ::std::option::Option<&str> {
36        self.additional_fixed_properties.as_deref()
37    }
38}
39impl CreateDestinationInput {
40    /// Creates a new builder-style object to manufacture [`CreateDestinationInput`](crate::operation::create_destination::CreateDestinationInput).
41    pub fn builder() -> crate::operation::create_destination::builders::CreateDestinationInputBuilder {
42        crate::operation::create_destination::builders::CreateDestinationInputBuilder::default()
43    }
44}
45
46/// A builder for [`CreateDestinationInput`](crate::operation::create_destination::CreateDestinationInput).
47#[non_exhaustive]
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49pub struct CreateDestinationInputBuilder {
50    pub(crate) client_token: ::std::option::Option<::std::string::String>,
51    pub(crate) name: ::std::option::Option<::std::string::String>,
52    pub(crate) site: ::std::option::Option<::std::string::String>,
53    pub(crate) state: ::std::option::Option<crate::types::DestinationState>,
54    pub(crate) additional_fixed_properties: ::std::option::Option<::std::string::String>,
55}
56impl CreateDestinationInputBuilder {
57    /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times.
58    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.client_token = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times.
63    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.client_token = input;
65        self
66    }
67    /// Token used for detecting replayed requests. Replayed requests will not be performed multiple times.
68    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
69        &self.client_token
70    }
71    /// Human friendly name of the resource.
72    /// This field is required.
73    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.name = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// Human friendly name of the resource.
78    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.name = input;
80        self
81    }
82    /// Human friendly name of the resource.
83    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.name
85    }
86    /// Site ARN.
87    /// This field is required.
88    pub fn site(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.site = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// Site ARN.
93    pub fn set_site(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.site = input;
95        self
96    }
97    /// Site ARN.
98    pub fn get_site(&self) -> &::std::option::Option<::std::string::String> {
99        &self.site
100    }
101    /// The state of the destination. Default used if not specified.
102    pub fn state(mut self, input: crate::types::DestinationState) -> Self {
103        self.state = ::std::option::Option::Some(input);
104        self
105    }
106    /// The state of the destination. Default used if not specified.
107    pub fn set_state(mut self, input: ::std::option::Option<crate::types::DestinationState>) -> Self {
108        self.state = input;
109        self
110    }
111    /// The state of the destination. Default used if not specified.
112    pub fn get_state(&self) -> &::std::option::Option<crate::types::DestinationState> {
113        &self.state
114    }
115    /// JSON document containing additional fixed properties regarding the destination
116    pub fn additional_fixed_properties(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.additional_fixed_properties = ::std::option::Option::Some(input.into());
118        self
119    }
120    /// JSON document containing additional fixed properties regarding the destination
121    pub fn set_additional_fixed_properties(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.additional_fixed_properties = input;
123        self
124    }
125    /// JSON document containing additional fixed properties regarding the destination
126    pub fn get_additional_fixed_properties(&self) -> &::std::option::Option<::std::string::String> {
127        &self.additional_fixed_properties
128    }
129    /// Consumes the builder and constructs a [`CreateDestinationInput`](crate::operation::create_destination::CreateDestinationInput).
130    pub fn build(
131        self,
132    ) -> ::std::result::Result<crate::operation::create_destination::CreateDestinationInput, ::aws_smithy_types::error::operation::BuildError> {
133        ::std::result::Result::Ok(crate::operation::create_destination::CreateDestinationInput {
134            client_token: self.client_token,
135            name: self.name,
136            site: self.site,
137            state: self.state,
138            additional_fixed_properties: self.additional_fixed_properties,
139        })
140    }
141}