aws_sdk_datazone/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)]
5pub struct UpdateConnectionInput {
6    /// <p>The ID of the domain where a connection is to be updated.</p>
7    pub domain_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the connection to be updated.</p>
9    pub identifier: ::std::option::Option<::std::string::String>,
10    /// <p>The description of a connection.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The location where a connection is to be updated.</p>
13    pub aws_location: ::std::option::Option<crate::types::AwsLocation>,
14    /// <p>The connection props.</p>
15    pub props: ::std::option::Option<crate::types::ConnectionPropertiesPatch>,
16}
17impl UpdateConnectionInput {
18    /// <p>The ID of the domain where a connection is to be updated.</p>
19    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
20        self.domain_identifier.as_deref()
21    }
22    /// <p>The ID of the connection to be updated.</p>
23    pub fn identifier(&self) -> ::std::option::Option<&str> {
24        self.identifier.as_deref()
25    }
26    /// <p>The description of a connection.</p>
27    pub fn description(&self) -> ::std::option::Option<&str> {
28        self.description.as_deref()
29    }
30    /// <p>The location where a connection is to be updated.</p>
31    pub fn aws_location(&self) -> ::std::option::Option<&crate::types::AwsLocation> {
32        self.aws_location.as_ref()
33    }
34    /// <p>The connection props.</p>
35    pub fn props(&self) -> ::std::option::Option<&crate::types::ConnectionPropertiesPatch> {
36        self.props.as_ref()
37    }
38}
39impl ::std::fmt::Debug for UpdateConnectionInput {
40    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
41        let mut formatter = f.debug_struct("UpdateConnectionInput");
42        formatter.field("domain_identifier", &self.domain_identifier);
43        formatter.field("identifier", &self.identifier);
44        formatter.field("description", &"*** Sensitive Data Redacted ***");
45        formatter.field("aws_location", &self.aws_location);
46        formatter.field("props", &self.props);
47        formatter.finish()
48    }
49}
50impl UpdateConnectionInput {
51    /// Creates a new builder-style object to manufacture [`UpdateConnectionInput`](crate::operation::update_connection::UpdateConnectionInput).
52    pub fn builder() -> crate::operation::update_connection::builders::UpdateConnectionInputBuilder {
53        crate::operation::update_connection::builders::UpdateConnectionInputBuilder::default()
54    }
55}
56
57/// A builder for [`UpdateConnectionInput`](crate::operation::update_connection::UpdateConnectionInput).
58#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
59#[non_exhaustive]
60pub struct UpdateConnectionInputBuilder {
61    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
62    pub(crate) identifier: ::std::option::Option<::std::string::String>,
63    pub(crate) description: ::std::option::Option<::std::string::String>,
64    pub(crate) aws_location: ::std::option::Option<crate::types::AwsLocation>,
65    pub(crate) props: ::std::option::Option<crate::types::ConnectionPropertiesPatch>,
66}
67impl UpdateConnectionInputBuilder {
68    /// <p>The ID of the domain where a connection is to be updated.</p>
69    /// This field is required.
70    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71        self.domain_identifier = ::std::option::Option::Some(input.into());
72        self
73    }
74    /// <p>The ID of the domain where a connection is to be updated.</p>
75    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76        self.domain_identifier = input;
77        self
78    }
79    /// <p>The ID of the domain where a connection is to be updated.</p>
80    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
81        &self.domain_identifier
82    }
83    /// <p>The ID of the connection to be updated.</p>
84    /// This field is required.
85    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86        self.identifier = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>The ID of the connection to be updated.</p>
90    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91        self.identifier = input;
92        self
93    }
94    /// <p>The ID of the connection to be updated.</p>
95    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
96        &self.identifier
97    }
98    /// <p>The description of a connection.</p>
99    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100        self.description = ::std::option::Option::Some(input.into());
101        self
102    }
103    /// <p>The description of a connection.</p>
104    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105        self.description = input;
106        self
107    }
108    /// <p>The description of a connection.</p>
109    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
110        &self.description
111    }
112    /// <p>The location where a connection is to be updated.</p>
113    pub fn aws_location(mut self, input: crate::types::AwsLocation) -> Self {
114        self.aws_location = ::std::option::Option::Some(input);
115        self
116    }
117    /// <p>The location where a connection is to be updated.</p>
118    pub fn set_aws_location(mut self, input: ::std::option::Option<crate::types::AwsLocation>) -> Self {
119        self.aws_location = input;
120        self
121    }
122    /// <p>The location where a connection is to be updated.</p>
123    pub fn get_aws_location(&self) -> &::std::option::Option<crate::types::AwsLocation> {
124        &self.aws_location
125    }
126    /// <p>The connection props.</p>
127    pub fn props(mut self, input: crate::types::ConnectionPropertiesPatch) -> Self {
128        self.props = ::std::option::Option::Some(input);
129        self
130    }
131    /// <p>The connection props.</p>
132    pub fn set_props(mut self, input: ::std::option::Option<crate::types::ConnectionPropertiesPatch>) -> Self {
133        self.props = input;
134        self
135    }
136    /// <p>The connection props.</p>
137    pub fn get_props(&self) -> &::std::option::Option<crate::types::ConnectionPropertiesPatch> {
138        &self.props
139    }
140    /// Consumes the builder and constructs a [`UpdateConnectionInput`](crate::operation::update_connection::UpdateConnectionInput).
141    pub fn build(
142        self,
143    ) -> ::std::result::Result<crate::operation::update_connection::UpdateConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
144        ::std::result::Result::Ok(crate::operation::update_connection::UpdateConnectionInput {
145            domain_identifier: self.domain_identifier,
146            identifier: self.identifier,
147            description: self.description,
148            aws_location: self.aws_location,
149            props: self.props,
150        })
151    }
152}
153impl ::std::fmt::Debug for UpdateConnectionInputBuilder {
154    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
155        let mut formatter = f.debug_struct("UpdateConnectionInputBuilder");
156        formatter.field("domain_identifier", &self.domain_identifier);
157        formatter.field("identifier", &self.identifier);
158        formatter.field("description", &"*** Sensitive Data Redacted ***");
159        formatter.field("aws_location", &self.aws_location);
160        formatter.field("props", &self.props);
161        formatter.finish()
162    }
163}