aws_sdk_outposts/operation/update_site/
_update_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 UpdateSiteInput {
6    /// <p>The ID or the Amazon Resource Name (ARN) of the site.</p>
7    pub site_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the site.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the site.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>Notes about a site.</p>
13    pub notes: ::std::option::Option<::std::string::String>,
14}
15impl UpdateSiteInput {
16    /// <p>The ID or the Amazon Resource Name (ARN) of the site.</p>
17    pub fn site_id(&self) -> ::std::option::Option<&str> {
18        self.site_id.as_deref()
19    }
20    /// <p>The name of the site.</p>
21    pub fn name(&self) -> ::std::option::Option<&str> {
22        self.name.as_deref()
23    }
24    /// <p>The description of the site.</p>
25    pub fn description(&self) -> ::std::option::Option<&str> {
26        self.description.as_deref()
27    }
28    /// <p>Notes about a site.</p>
29    pub fn notes(&self) -> ::std::option::Option<&str> {
30        self.notes.as_deref()
31    }
32}
33impl UpdateSiteInput {
34    /// Creates a new builder-style object to manufacture [`UpdateSiteInput`](crate::operation::update_site::UpdateSiteInput).
35    pub fn builder() -> crate::operation::update_site::builders::UpdateSiteInputBuilder {
36        crate::operation::update_site::builders::UpdateSiteInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateSiteInput`](crate::operation::update_site::UpdateSiteInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateSiteInputBuilder {
44    pub(crate) site_id: ::std::option::Option<::std::string::String>,
45    pub(crate) name: ::std::option::Option<::std::string::String>,
46    pub(crate) description: ::std::option::Option<::std::string::String>,
47    pub(crate) notes: ::std::option::Option<::std::string::String>,
48}
49impl UpdateSiteInputBuilder {
50    /// <p>The ID or the Amazon Resource Name (ARN) of the site.</p>
51    /// This field is required.
52    pub fn site_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.site_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The ID or the Amazon Resource Name (ARN) of the site.</p>
57    pub fn set_site_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.site_id = input;
59        self
60    }
61    /// <p>The ID or the Amazon Resource Name (ARN) of the site.</p>
62    pub fn get_site_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.site_id
64    }
65    /// <p>The name of the site.</p>
66    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the site.</p>
71    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.name = input;
73        self
74    }
75    /// <p>The name of the site.</p>
76    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.name
78    }
79    /// <p>The description of the site.</p>
80    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.description = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The description of the site.</p>
85    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.description = input;
87        self
88    }
89    /// <p>The description of the site.</p>
90    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
91        &self.description
92    }
93    /// <p>Notes about a site.</p>
94    pub fn notes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.notes = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>Notes about a site.</p>
99    pub fn set_notes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.notes = input;
101        self
102    }
103    /// <p>Notes about a site.</p>
104    pub fn get_notes(&self) -> &::std::option::Option<::std::string::String> {
105        &self.notes
106    }
107    /// Consumes the builder and constructs a [`UpdateSiteInput`](crate::operation::update_site::UpdateSiteInput).
108    pub fn build(self) -> ::std::result::Result<crate::operation::update_site::UpdateSiteInput, ::aws_smithy_types::error::operation::BuildError> {
109        ::std::result::Result::Ok(crate::operation::update_site::UpdateSiteInput {
110            site_id: self.site_id,
111            name: self.name,
112            description: self.description,
113            notes: self.notes,
114        })
115    }
116}