aws_sdk_outposts/operation/update_outpost/
_update_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 UpdateOutpostInput {
6    /// <p>The ID or ARN of the Outpost.</p>
7    pub outpost_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the Outpost.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the Outpost.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The type of hardware for this Outpost.</p>
13    pub supported_hardware_type: ::std::option::Option<crate::types::SupportedHardwareType>,
14}
15impl UpdateOutpostInput {
16    /// <p>The ID or ARN of the Outpost.</p>
17    pub fn outpost_id(&self) -> ::std::option::Option<&str> {
18        self.outpost_id.as_deref()
19    }
20    /// <p>The name of the Outpost.</p>
21    pub fn name(&self) -> ::std::option::Option<&str> {
22        self.name.as_deref()
23    }
24    /// <p>The description of the Outpost.</p>
25    pub fn description(&self) -> ::std::option::Option<&str> {
26        self.description.as_deref()
27    }
28    /// <p>The type of hardware for this Outpost.</p>
29    pub fn supported_hardware_type(&self) -> ::std::option::Option<&crate::types::SupportedHardwareType> {
30        self.supported_hardware_type.as_ref()
31    }
32}
33impl UpdateOutpostInput {
34    /// Creates a new builder-style object to manufacture [`UpdateOutpostInput`](crate::operation::update_outpost::UpdateOutpostInput).
35    pub fn builder() -> crate::operation::update_outpost::builders::UpdateOutpostInputBuilder {
36        crate::operation::update_outpost::builders::UpdateOutpostInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateOutpostInput`](crate::operation::update_outpost::UpdateOutpostInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateOutpostInputBuilder {
44    pub(crate) outpost_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) supported_hardware_type: ::std::option::Option<crate::types::SupportedHardwareType>,
48}
49impl UpdateOutpostInputBuilder {
50    /// <p>The ID or ARN of the Outpost.</p>
51    /// This field is required.
52    pub fn outpost_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.outpost_id = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The ID or ARN of the Outpost.</p>
57    pub fn set_outpost_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.outpost_id = input;
59        self
60    }
61    /// <p>The ID or ARN of the Outpost.</p>
62    pub fn get_outpost_id(&self) -> &::std::option::Option<::std::string::String> {
63        &self.outpost_id
64    }
65    /// <p>The name of the Outpost.</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 Outpost.</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 Outpost.</p>
76    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.name
78    }
79    /// <p>The description of the Outpost.</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 Outpost.</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 Outpost.</p>
90    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
91        &self.description
92    }
93    /// <p>The type of hardware for this Outpost.</p>
94    pub fn supported_hardware_type(mut self, input: crate::types::SupportedHardwareType) -> Self {
95        self.supported_hardware_type = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>The type of hardware for this Outpost.</p>
99    pub fn set_supported_hardware_type(mut self, input: ::std::option::Option<crate::types::SupportedHardwareType>) -> Self {
100        self.supported_hardware_type = input;
101        self
102    }
103    /// <p>The type of hardware for this Outpost.</p>
104    pub fn get_supported_hardware_type(&self) -> &::std::option::Option<crate::types::SupportedHardwareType> {
105        &self.supported_hardware_type
106    }
107    /// Consumes the builder and constructs a [`UpdateOutpostInput`](crate::operation::update_outpost::UpdateOutpostInput).
108    pub fn build(
109        self,
110    ) -> ::std::result::Result<crate::operation::update_outpost::UpdateOutpostInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::update_outpost::UpdateOutpostInput {
112            outpost_id: self.outpost_id,
113            name: self.name,
114            description: self.description,
115            supported_hardware_type: self.supported_hardware_type,
116        })
117    }
118}