aws_sdk_outposts/operation/create_outpost/
_create_outpost_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 CreateOutpostInput {
6    /// <p>The name of the Outpost.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The description of the Outpost.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The ID or the Amazon Resource Name (ARN) of the site.</p>
11    pub site_id: ::std::option::Option<::std::string::String>,
12    /// <p>The Availability Zone.</p>
13    pub availability_zone: ::std::option::Option<::std::string::String>,
14    /// <p>The ID of the Availability Zone.</p>
15    pub availability_zone_id: ::std::option::Option<::std::string::String>,
16    /// <p>The tags to apply to the Outpost.</p>
17    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18    /// <p>The type of hardware for this Outpost.</p>
19    pub supported_hardware_type: ::std::option::Option<crate::types::SupportedHardwareType>,
20}
21impl CreateOutpostInput {
22    /// <p>The name of the Outpost.</p>
23    pub fn name(&self) -> ::std::option::Option<&str> {
24        self.name.as_deref()
25    }
26    /// <p>The description of the Outpost.</p>
27    pub fn description(&self) -> ::std::option::Option<&str> {
28        self.description.as_deref()
29    }
30    /// <p>The ID or the Amazon Resource Name (ARN) of the site.</p>
31    pub fn site_id(&self) -> ::std::option::Option<&str> {
32        self.site_id.as_deref()
33    }
34    /// <p>The Availability Zone.</p>
35    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
36        self.availability_zone.as_deref()
37    }
38    /// <p>The ID of the Availability Zone.</p>
39    pub fn availability_zone_id(&self) -> ::std::option::Option<&str> {
40        self.availability_zone_id.as_deref()
41    }
42    /// <p>The tags to apply to the Outpost.</p>
43    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
44        self.tags.as_ref()
45    }
46    /// <p>The type of hardware for this Outpost.</p>
47    pub fn supported_hardware_type(&self) -> ::std::option::Option<&crate::types::SupportedHardwareType> {
48        self.supported_hardware_type.as_ref()
49    }
50}
51impl CreateOutpostInput {
52    /// Creates a new builder-style object to manufacture [`CreateOutpostInput`](crate::operation::create_outpost::CreateOutpostInput).
53    pub fn builder() -> crate::operation::create_outpost::builders::CreateOutpostInputBuilder {
54        crate::operation::create_outpost::builders::CreateOutpostInputBuilder::default()
55    }
56}
57
58/// A builder for [`CreateOutpostInput`](crate::operation::create_outpost::CreateOutpostInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct CreateOutpostInputBuilder {
62    pub(crate) name: ::std::option::Option<::std::string::String>,
63    pub(crate) description: ::std::option::Option<::std::string::String>,
64    pub(crate) site_id: ::std::option::Option<::std::string::String>,
65    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
66    pub(crate) availability_zone_id: ::std::option::Option<::std::string::String>,
67    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
68    pub(crate) supported_hardware_type: ::std::option::Option<crate::types::SupportedHardwareType>,
69}
70impl CreateOutpostInputBuilder {
71    /// <p>The name of the Outpost.</p>
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    /// <p>The name of the Outpost.</p>
78    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.name = input;
80        self
81    }
82    /// <p>The name of the Outpost.</p>
83    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.name
85    }
86    /// <p>The description of the Outpost.</p>
87    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.description = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The description of the Outpost.</p>
92    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.description = input;
94        self
95    }
96    /// <p>The description of the Outpost.</p>
97    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
98        &self.description
99    }
100    /// <p>The ID or the Amazon Resource Name (ARN) of the site.</p>
101    /// This field is required.
102    pub fn site_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.site_id = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The ID or the Amazon Resource Name (ARN) of the site.</p>
107    pub fn set_site_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.site_id = input;
109        self
110    }
111    /// <p>The ID or the Amazon Resource Name (ARN) of the site.</p>
112    pub fn get_site_id(&self) -> &::std::option::Option<::std::string::String> {
113        &self.site_id
114    }
115    /// <p>The Availability Zone.</p>
116    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.availability_zone = ::std::option::Option::Some(input.into());
118        self
119    }
120    /// <p>The Availability Zone.</p>
121    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.availability_zone = input;
123        self
124    }
125    /// <p>The Availability Zone.</p>
126    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
127        &self.availability_zone
128    }
129    /// <p>The ID of the Availability Zone.</p>
130    pub fn availability_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.availability_zone_id = ::std::option::Option::Some(input.into());
132        self
133    }
134    /// <p>The ID of the Availability Zone.</p>
135    pub fn set_availability_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.availability_zone_id = input;
137        self
138    }
139    /// <p>The ID of the Availability Zone.</p>
140    pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
141        &self.availability_zone_id
142    }
143    /// Adds a key-value pair to `tags`.
144    ///
145    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
146    ///
147    /// <p>The tags to apply to the Outpost.</p>
148    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
149        let mut hash_map = self.tags.unwrap_or_default();
150        hash_map.insert(k.into(), v.into());
151        self.tags = ::std::option::Option::Some(hash_map);
152        self
153    }
154    /// <p>The tags to apply to the Outpost.</p>
155    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
156        self.tags = input;
157        self
158    }
159    /// <p>The tags to apply to the Outpost.</p>
160    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
161        &self.tags
162    }
163    /// <p>The type of hardware for this Outpost.</p>
164    pub fn supported_hardware_type(mut self, input: crate::types::SupportedHardwareType) -> Self {
165        self.supported_hardware_type = ::std::option::Option::Some(input);
166        self
167    }
168    /// <p>The type of hardware for this Outpost.</p>
169    pub fn set_supported_hardware_type(mut self, input: ::std::option::Option<crate::types::SupportedHardwareType>) -> Self {
170        self.supported_hardware_type = input;
171        self
172    }
173    /// <p>The type of hardware for this Outpost.</p>
174    pub fn get_supported_hardware_type(&self) -> &::std::option::Option<crate::types::SupportedHardwareType> {
175        &self.supported_hardware_type
176    }
177    /// Consumes the builder and constructs a [`CreateOutpostInput`](crate::operation::create_outpost::CreateOutpostInput).
178    pub fn build(
179        self,
180    ) -> ::std::result::Result<crate::operation::create_outpost::CreateOutpostInput, ::aws_smithy_types::error::operation::BuildError> {
181        ::std::result::Result::Ok(crate::operation::create_outpost::CreateOutpostInput {
182            name: self.name,
183            description: self.description,
184            site_id: self.site_id,
185            availability_zone: self.availability_zone,
186            availability_zone_id: self.availability_zone_id,
187            tags: self.tags,
188            supported_hardware_type: self.supported_hardware_type,
189        })
190    }
191}