Skip to main content

aws_sdk_interconnect/operation/update_connection/
_update_connection_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 UpdateConnectionInput {
6    /// <p>The identifier of the <code>Connection</code> that should be updated.</p>
7    pub identifier: ::std::option::Option<::std::string::String>,
8    /// <p>An updated description to apply to the <code>Connection</code></p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>Request a new bandwidth size on the given <code>Connection</code>.</p>
11    /// <p>Note that changes to the size may be subject to additional policy, and does require the remote partner provider to acknowledge and permit this new bandwidth size.</p>
12    pub bandwidth: ::std::option::Option<::std::string::String>,
13    /// <p>Idempotency token used for the request.</p>
14    pub client_token: ::std::option::Option<::std::string::String>,
15}
16impl UpdateConnectionInput {
17    /// <p>The identifier of the <code>Connection</code> that should be updated.</p>
18    pub fn identifier(&self) -> ::std::option::Option<&str> {
19        self.identifier.as_deref()
20    }
21    /// <p>An updated description to apply to the <code>Connection</code></p>
22    pub fn description(&self) -> ::std::option::Option<&str> {
23        self.description.as_deref()
24    }
25    /// <p>Request a new bandwidth size on the given <code>Connection</code>.</p>
26    /// <p>Note that changes to the size may be subject to additional policy, and does require the remote partner provider to acknowledge and permit this new bandwidth size.</p>
27    pub fn bandwidth(&self) -> ::std::option::Option<&str> {
28        self.bandwidth.as_deref()
29    }
30    /// <p>Idempotency token used for the request.</p>
31    pub fn client_token(&self) -> ::std::option::Option<&str> {
32        self.client_token.as_deref()
33    }
34}
35impl UpdateConnectionInput {
36    /// Creates a new builder-style object to manufacture [`UpdateConnectionInput`](crate::operation::update_connection::UpdateConnectionInput).
37    pub fn builder() -> crate::operation::update_connection::builders::UpdateConnectionInputBuilder {
38        crate::operation::update_connection::builders::UpdateConnectionInputBuilder::default()
39    }
40}
41
42/// A builder for [`UpdateConnectionInput`](crate::operation::update_connection::UpdateConnectionInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct UpdateConnectionInputBuilder {
46    pub(crate) identifier: ::std::option::Option<::std::string::String>,
47    pub(crate) description: ::std::option::Option<::std::string::String>,
48    pub(crate) bandwidth: ::std::option::Option<::std::string::String>,
49    pub(crate) client_token: ::std::option::Option<::std::string::String>,
50}
51impl UpdateConnectionInputBuilder {
52    /// <p>The identifier of the <code>Connection</code> that should be updated.</p>
53    /// This field is required.
54    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.identifier = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The identifier of the <code>Connection</code> that should be updated.</p>
59    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.identifier = input;
61        self
62    }
63    /// <p>The identifier of the <code>Connection</code> that should be updated.</p>
64    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
65        &self.identifier
66    }
67    /// <p>An updated description to apply to the <code>Connection</code></p>
68    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.description = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>An updated description to apply to the <code>Connection</code></p>
73    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.description = input;
75        self
76    }
77    /// <p>An updated description to apply to the <code>Connection</code></p>
78    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
79        &self.description
80    }
81    /// <p>Request a new bandwidth size on the given <code>Connection</code>.</p>
82    /// <p>Note that changes to the size may be subject to additional policy, and does require the remote partner provider to acknowledge and permit this new bandwidth size.</p>
83    pub fn bandwidth(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.bandwidth = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>Request a new bandwidth size on the given <code>Connection</code>.</p>
88    /// <p>Note that changes to the size may be subject to additional policy, and does require the remote partner provider to acknowledge and permit this new bandwidth size.</p>
89    pub fn set_bandwidth(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.bandwidth = input;
91        self
92    }
93    /// <p>Request a new bandwidth size on the given <code>Connection</code>.</p>
94    /// <p>Note that changes to the size may be subject to additional policy, and does require the remote partner provider to acknowledge and permit this new bandwidth size.</p>
95    pub fn get_bandwidth(&self) -> &::std::option::Option<::std::string::String> {
96        &self.bandwidth
97    }
98    /// <p>Idempotency token used for the request.</p>
99    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100        self.client_token = ::std::option::Option::Some(input.into());
101        self
102    }
103    /// <p>Idempotency token used for the request.</p>
104    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105        self.client_token = input;
106        self
107    }
108    /// <p>Idempotency token used for the request.</p>
109    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
110        &self.client_token
111    }
112    /// Consumes the builder and constructs a [`UpdateConnectionInput`](crate::operation::update_connection::UpdateConnectionInput).
113    pub fn build(
114        self,
115    ) -> ::std::result::Result<crate::operation::update_connection::UpdateConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
116        ::std::result::Result::Ok(crate::operation::update_connection::UpdateConnectionInput {
117            identifier: self.identifier,
118            description: self.description,
119            bandwidth: self.bandwidth,
120            client_token: self.client_token,
121        })
122    }
123}