Skip to main content

aws_sdk_outposts/operation/create_site/
_create_site_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)]
5pub struct CreateSiteInput {
6    /// <p>The name of the site.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The description of the site.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>Additional information that you provide about site access requirements, electrician scheduling, personal protective equipment, or regulation of equipment materials that could affect your installation process.</p>
11    pub notes: ::std::option::Option<::std::string::String>,
12    /// <p>The tags to apply to a site.</p>
13    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
14    /// <p>The location to install and power on the hardware. This address might be different from the shipping address.</p>
15    pub operating_address: ::std::option::Option<crate::types::Address>,
16    /// <p>The location to ship the hardware. This address might be different from the operating address.</p>
17    pub shipping_address: ::std::option::Option<crate::types::Address>,
18    /// <p>Information about the physical and logistical details for the rack at this site. For more information about hardware requirements for racks, see <a href="https://docs.aws.amazon.com/outposts/latest/userguide/outposts-requirements.html#checklist">Network readiness checklist</a> in the Amazon Web Services Outposts User Guide.</p>
19    pub rack_physical_properties: ::std::option::Option<crate::types::RackPhysicalProperties>,
20}
21impl CreateSiteInput {
22    /// <p>The name of the site.</p>
23    pub fn name(&self) -> ::std::option::Option<&str> {
24        self.name.as_deref()
25    }
26    /// <p>The description of the site.</p>
27    pub fn description(&self) -> ::std::option::Option<&str> {
28        self.description.as_deref()
29    }
30    /// <p>Additional information that you provide about site access requirements, electrician scheduling, personal protective equipment, or regulation of equipment materials that could affect your installation process.</p>
31    pub fn notes(&self) -> ::std::option::Option<&str> {
32        self.notes.as_deref()
33    }
34    /// <p>The tags to apply to a site.</p>
35    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
36        self.tags.as_ref()
37    }
38    /// <p>The location to install and power on the hardware. This address might be different from the shipping address.</p>
39    pub fn operating_address(&self) -> ::std::option::Option<&crate::types::Address> {
40        self.operating_address.as_ref()
41    }
42    /// <p>The location to ship the hardware. This address might be different from the operating address.</p>
43    pub fn shipping_address(&self) -> ::std::option::Option<&crate::types::Address> {
44        self.shipping_address.as_ref()
45    }
46    /// <p>Information about the physical and logistical details for the rack at this site. For more information about hardware requirements for racks, see <a href="https://docs.aws.amazon.com/outposts/latest/userguide/outposts-requirements.html#checklist">Network readiness checklist</a> in the Amazon Web Services Outposts User Guide.</p>
47    pub fn rack_physical_properties(&self) -> ::std::option::Option<&crate::types::RackPhysicalProperties> {
48        self.rack_physical_properties.as_ref()
49    }
50}
51impl ::std::fmt::Debug for CreateSiteInput {
52    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
53        let mut formatter = f.debug_struct("CreateSiteInput");
54        formatter.field("name", &self.name);
55        formatter.field("description", &self.description);
56        formatter.field("notes", &self.notes);
57        formatter.field("tags", &self.tags);
58        formatter.field("operating_address", &"*** Sensitive Data Redacted ***");
59        formatter.field("shipping_address", &"*** Sensitive Data Redacted ***");
60        formatter.field("rack_physical_properties", &self.rack_physical_properties);
61        formatter.finish()
62    }
63}
64impl CreateSiteInput {
65    /// Creates a new builder-style object to manufacture [`CreateSiteInput`](crate::operation::create_site::CreateSiteInput).
66    pub fn builder() -> crate::operation::create_site::builders::CreateSiteInputBuilder {
67        crate::operation::create_site::builders::CreateSiteInputBuilder::default()
68    }
69}
70
71/// A builder for [`CreateSiteInput`](crate::operation::create_site::CreateSiteInput).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
73#[non_exhaustive]
74pub struct CreateSiteInputBuilder {
75    pub(crate) name: ::std::option::Option<::std::string::String>,
76    pub(crate) description: ::std::option::Option<::std::string::String>,
77    pub(crate) notes: ::std::option::Option<::std::string::String>,
78    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
79    pub(crate) operating_address: ::std::option::Option<crate::types::Address>,
80    pub(crate) shipping_address: ::std::option::Option<crate::types::Address>,
81    pub(crate) rack_physical_properties: ::std::option::Option<crate::types::RackPhysicalProperties>,
82}
83impl CreateSiteInputBuilder {
84    /// <p>The name of the site.</p>
85    /// This field is required.
86    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.name = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The name of the site.</p>
91    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.name = input;
93        self
94    }
95    /// <p>The name of the site.</p>
96    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
97        &self.name
98    }
99    /// <p>The description of the site.</p>
100    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.description = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>The description of the site.</p>
105    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.description = input;
107        self
108    }
109    /// <p>The description of the site.</p>
110    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
111        &self.description
112    }
113    /// <p>Additional information that you provide about site access requirements, electrician scheduling, personal protective equipment, or regulation of equipment materials that could affect your installation process.</p>
114    pub fn notes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.notes = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>Additional information that you provide about site access requirements, electrician scheduling, personal protective equipment, or regulation of equipment materials that could affect your installation process.</p>
119    pub fn set_notes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.notes = input;
121        self
122    }
123    /// <p>Additional information that you provide about site access requirements, electrician scheduling, personal protective equipment, or regulation of equipment materials that could affect your installation process.</p>
124    pub fn get_notes(&self) -> &::std::option::Option<::std::string::String> {
125        &self.notes
126    }
127    /// Adds a key-value pair to `tags`.
128    ///
129    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
130    ///
131    /// <p>The tags to apply to a site.</p>
132    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
133        let mut hash_map = self.tags.unwrap_or_default();
134        hash_map.insert(k.into(), v.into());
135        self.tags = ::std::option::Option::Some(hash_map);
136        self
137    }
138    /// <p>The tags to apply to a site.</p>
139    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
140        self.tags = input;
141        self
142    }
143    /// <p>The tags to apply to a site.</p>
144    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
145        &self.tags
146    }
147    /// <p>The location to install and power on the hardware. This address might be different from the shipping address.</p>
148    pub fn operating_address(mut self, input: crate::types::Address) -> Self {
149        self.operating_address = ::std::option::Option::Some(input);
150        self
151    }
152    /// <p>The location to install and power on the hardware. This address might be different from the shipping address.</p>
153    pub fn set_operating_address(mut self, input: ::std::option::Option<crate::types::Address>) -> Self {
154        self.operating_address = input;
155        self
156    }
157    /// <p>The location to install and power on the hardware. This address might be different from the shipping address.</p>
158    pub fn get_operating_address(&self) -> &::std::option::Option<crate::types::Address> {
159        &self.operating_address
160    }
161    /// <p>The location to ship the hardware. This address might be different from the operating address.</p>
162    pub fn shipping_address(mut self, input: crate::types::Address) -> Self {
163        self.shipping_address = ::std::option::Option::Some(input);
164        self
165    }
166    /// <p>The location to ship the hardware. This address might be different from the operating address.</p>
167    pub fn set_shipping_address(mut self, input: ::std::option::Option<crate::types::Address>) -> Self {
168        self.shipping_address = input;
169        self
170    }
171    /// <p>The location to ship the hardware. This address might be different from the operating address.</p>
172    pub fn get_shipping_address(&self) -> &::std::option::Option<crate::types::Address> {
173        &self.shipping_address
174    }
175    /// <p>Information about the physical and logistical details for the rack at this site. For more information about hardware requirements for racks, see <a href="https://docs.aws.amazon.com/outposts/latest/userguide/outposts-requirements.html#checklist">Network readiness checklist</a> in the Amazon Web Services Outposts User Guide.</p>
176    pub fn rack_physical_properties(mut self, input: crate::types::RackPhysicalProperties) -> Self {
177        self.rack_physical_properties = ::std::option::Option::Some(input);
178        self
179    }
180    /// <p>Information about the physical and logistical details for the rack at this site. For more information about hardware requirements for racks, see <a href="https://docs.aws.amazon.com/outposts/latest/userguide/outposts-requirements.html#checklist">Network readiness checklist</a> in the Amazon Web Services Outposts User Guide.</p>
181    pub fn set_rack_physical_properties(mut self, input: ::std::option::Option<crate::types::RackPhysicalProperties>) -> Self {
182        self.rack_physical_properties = input;
183        self
184    }
185    /// <p>Information about the physical and logistical details for the rack at this site. For more information about hardware requirements for racks, see <a href="https://docs.aws.amazon.com/outposts/latest/userguide/outposts-requirements.html#checklist">Network readiness checklist</a> in the Amazon Web Services Outposts User Guide.</p>
186    pub fn get_rack_physical_properties(&self) -> &::std::option::Option<crate::types::RackPhysicalProperties> {
187        &self.rack_physical_properties
188    }
189    /// Consumes the builder and constructs a [`CreateSiteInput`](crate::operation::create_site::CreateSiteInput).
190    pub fn build(self) -> ::std::result::Result<crate::operation::create_site::CreateSiteInput, ::aws_smithy_types::error::operation::BuildError> {
191        ::std::result::Result::Ok(crate::operation::create_site::CreateSiteInput {
192            name: self.name,
193            description: self.description,
194            notes: self.notes,
195            tags: self.tags,
196            operating_address: self.operating_address,
197            shipping_address: self.shipping_address,
198            rack_physical_properties: self.rack_physical_properties,
199        })
200    }
201}
202impl ::std::fmt::Debug for CreateSiteInputBuilder {
203    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
204        let mut formatter = f.debug_struct("CreateSiteInputBuilder");
205        formatter.field("name", &self.name);
206        formatter.field("description", &self.description);
207        formatter.field("notes", &self.notes);
208        formatter.field("tags", &self.tags);
209        formatter.field("operating_address", &"*** Sensitive Data Redacted ***");
210        formatter.field("shipping_address", &"*** Sensitive Data Redacted ***");
211        formatter.field("rack_physical_properties", &self.rack_physical_properties);
212        formatter.finish()
213    }
214}