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, ::std::fmt::Debug)]
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 CreateSiteInput {
52    /// Creates a new builder-style object to manufacture [`CreateSiteInput`](crate::operation::create_site::CreateSiteInput).
53    pub fn builder() -> crate::operation::create_site::builders::CreateSiteInputBuilder {
54        crate::operation::create_site::builders::CreateSiteInputBuilder::default()
55    }
56}
57
58/// A builder for [`CreateSiteInput`](crate::operation::create_site::CreateSiteInput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct CreateSiteInputBuilder {
62    pub(crate) name: ::std::option::Option<::std::string::String>,
63    pub(crate) description: ::std::option::Option<::std::string::String>,
64    pub(crate) notes: ::std::option::Option<::std::string::String>,
65    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
66    pub(crate) operating_address: ::std::option::Option<crate::types::Address>,
67    pub(crate) shipping_address: ::std::option::Option<crate::types::Address>,
68    pub(crate) rack_physical_properties: ::std::option::Option<crate::types::RackPhysicalProperties>,
69}
70impl CreateSiteInputBuilder {
71    /// <p>The name of the site.</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 site.</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 site.</p>
83    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.name
85    }
86    /// <p>The description of the site.</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 site.</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 site.</p>
97    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
98        &self.description
99    }
100    /// <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>
101    pub fn notes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.notes = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <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>
106    pub fn set_notes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.notes = input;
108        self
109    }
110    /// <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>
111    pub fn get_notes(&self) -> &::std::option::Option<::std::string::String> {
112        &self.notes
113    }
114    /// Adds a key-value pair to `tags`.
115    ///
116    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
117    ///
118    /// <p>The tags to apply to a site.</p>
119    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
120        let mut hash_map = self.tags.unwrap_or_default();
121        hash_map.insert(k.into(), v.into());
122        self.tags = ::std::option::Option::Some(hash_map);
123        self
124    }
125    /// <p>The tags to apply to a site.</p>
126    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
127        self.tags = input;
128        self
129    }
130    /// <p>The tags to apply to a site.</p>
131    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
132        &self.tags
133    }
134    /// <p>The location to install and power on the hardware. This address might be different from the shipping address.</p>
135    pub fn operating_address(mut self, input: crate::types::Address) -> Self {
136        self.operating_address = ::std::option::Option::Some(input);
137        self
138    }
139    /// <p>The location to install and power on the hardware. This address might be different from the shipping address.</p>
140    pub fn set_operating_address(mut self, input: ::std::option::Option<crate::types::Address>) -> Self {
141        self.operating_address = input;
142        self
143    }
144    /// <p>The location to install and power on the hardware. This address might be different from the shipping address.</p>
145    pub fn get_operating_address(&self) -> &::std::option::Option<crate::types::Address> {
146        &self.operating_address
147    }
148    /// <p>The location to ship the hardware. This address might be different from the operating address.</p>
149    pub fn shipping_address(mut self, input: crate::types::Address) -> Self {
150        self.shipping_address = ::std::option::Option::Some(input);
151        self
152    }
153    /// <p>The location to ship the hardware. This address might be different from the operating address.</p>
154    pub fn set_shipping_address(mut self, input: ::std::option::Option<crate::types::Address>) -> Self {
155        self.shipping_address = input;
156        self
157    }
158    /// <p>The location to ship the hardware. This address might be different from the operating address.</p>
159    pub fn get_shipping_address(&self) -> &::std::option::Option<crate::types::Address> {
160        &self.shipping_address
161    }
162    /// <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>
163    pub fn rack_physical_properties(mut self, input: crate::types::RackPhysicalProperties) -> Self {
164        self.rack_physical_properties = ::std::option::Option::Some(input);
165        self
166    }
167    /// <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>
168    pub fn set_rack_physical_properties(mut self, input: ::std::option::Option<crate::types::RackPhysicalProperties>) -> Self {
169        self.rack_physical_properties = input;
170        self
171    }
172    /// <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>
173    pub fn get_rack_physical_properties(&self) -> &::std::option::Option<crate::types::RackPhysicalProperties> {
174        &self.rack_physical_properties
175    }
176    /// Consumes the builder and constructs a [`CreateSiteInput`](crate::operation::create_site::CreateSiteInput).
177    pub fn build(self) -> ::std::result::Result<crate::operation::create_site::CreateSiteInput, ::aws_smithy_types::error::operation::BuildError> {
178        ::std::result::Result::Ok(crate::operation::create_site::CreateSiteInput {
179            name: self.name,
180            description: self.description,
181            notes: self.notes,
182            tags: self.tags,
183            operating_address: self.operating_address,
184            shipping_address: self.shipping_address,
185            rack_physical_properties: self.rack_physical_properties,
186        })
187    }
188}