aws_sdk_outposts/operation/create_outpost/
_create_outpost_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateOutpostInput {
6 pub name: ::std::option::Option<::std::string::String>,
8 pub description: ::std::option::Option<::std::string::String>,
10 pub site_id: ::std::option::Option<::std::string::String>,
12 pub availability_zone: ::std::option::Option<::std::string::String>,
14 pub availability_zone_id: ::std::option::Option<::std::string::String>,
16 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18 pub supported_hardware_type: ::std::option::Option<crate::types::SupportedHardwareType>,
20}
21impl CreateOutpostInput {
22 pub fn name(&self) -> ::std::option::Option<&str> {
24 self.name.as_deref()
25 }
26 pub fn description(&self) -> ::std::option::Option<&str> {
28 self.description.as_deref()
29 }
30 pub fn site_id(&self) -> ::std::option::Option<&str> {
32 self.site_id.as_deref()
33 }
34 pub fn availability_zone(&self) -> ::std::option::Option<&str> {
36 self.availability_zone.as_deref()
37 }
38 pub fn availability_zone_id(&self) -> ::std::option::Option<&str> {
40 self.availability_zone_id.as_deref()
41 }
42 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
44 self.tags.as_ref()
45 }
46 pub fn supported_hardware_type(&self) -> ::std::option::Option<&crate::types::SupportedHardwareType> {
48 self.supported_hardware_type.as_ref()
49 }
50}
51impl CreateOutpostInput {
52 pub fn builder() -> crate::operation::create_outpost::builders::CreateOutpostInputBuilder {
54 crate::operation::create_outpost::builders::CreateOutpostInputBuilder::default()
55 }
56}
57
58#[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 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.name = input;
80 self
81 }
82 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
84 &self.name
85 }
86 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.description = input;
94 self
95 }
96 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
98 &self.description
99 }
100 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 pub fn set_site_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108 self.site_id = input;
109 self
110 }
111 pub fn get_site_id(&self) -> &::std::option::Option<::std::string::String> {
113 &self.site_id
114 }
115 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 pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.availability_zone = input;
123 self
124 }
125 pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
127 &self.availability_zone
128 }
129 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 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 pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
141 &self.availability_zone_id
142 }
143 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 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 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
161 &self.tags
162 }
163 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 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 pub fn get_supported_hardware_type(&self) -> &::std::option::Option<crate::types::SupportedHardwareType> {
175 &self.supported_hardware_type
176 }
177 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}