aws_sdk_schemas/operation/update_schema/
_update_schema_output.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 UpdateSchemaOutput {
6    /// <p>The description of the schema.</p>
7    pub description: ::std::option::Option<::std::string::String>,
8    /// <p>The date and time that schema was modified.</p>
9    pub last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
10    /// <p>The ARN of the schema.</p>
11    pub schema_arn: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the schema.</p>
13    pub schema_name: ::std::option::Option<::std::string::String>,
14    /// <p>The version number of the schema</p>
15    pub schema_version: ::std::option::Option<::std::string::String>,
16    /// <p>Key-value pairs associated with a resource.</p>
17    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18    /// <p>The type of the schema.</p>
19    pub r#type: ::std::option::Option<::std::string::String>,
20    /// <p>The date the schema version was created.</p>
21    pub version_created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
22    _request_id: Option<String>,
23}
24impl UpdateSchemaOutput {
25    /// <p>The description of the schema.</p>
26    pub fn description(&self) -> ::std::option::Option<&str> {
27        self.description.as_deref()
28    }
29    /// <p>The date and time that schema was modified.</p>
30    pub fn last_modified(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31        self.last_modified.as_ref()
32    }
33    /// <p>The ARN of the schema.</p>
34    pub fn schema_arn(&self) -> ::std::option::Option<&str> {
35        self.schema_arn.as_deref()
36    }
37    /// <p>The name of the schema.</p>
38    pub fn schema_name(&self) -> ::std::option::Option<&str> {
39        self.schema_name.as_deref()
40    }
41    /// <p>The version number of the schema</p>
42    pub fn schema_version(&self) -> ::std::option::Option<&str> {
43        self.schema_version.as_deref()
44    }
45    /// <p>Key-value pairs associated with a resource.</p>
46    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
47        self.tags.as_ref()
48    }
49    /// <p>The type of the schema.</p>
50    pub fn r#type(&self) -> ::std::option::Option<&str> {
51        self.r#type.as_deref()
52    }
53    /// <p>The date the schema version was created.</p>
54    pub fn version_created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
55        self.version_created_date.as_ref()
56    }
57}
58impl ::aws_types::request_id::RequestId for UpdateSchemaOutput {
59    fn request_id(&self) -> Option<&str> {
60        self._request_id.as_deref()
61    }
62}
63impl UpdateSchemaOutput {
64    /// Creates a new builder-style object to manufacture [`UpdateSchemaOutput`](crate::operation::update_schema::UpdateSchemaOutput).
65    pub fn builder() -> crate::operation::update_schema::builders::UpdateSchemaOutputBuilder {
66        crate::operation::update_schema::builders::UpdateSchemaOutputBuilder::default()
67    }
68}
69
70/// A builder for [`UpdateSchemaOutput`](crate::operation::update_schema::UpdateSchemaOutput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct UpdateSchemaOutputBuilder {
74    pub(crate) description: ::std::option::Option<::std::string::String>,
75    pub(crate) last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
76    pub(crate) schema_arn: ::std::option::Option<::std::string::String>,
77    pub(crate) schema_name: ::std::option::Option<::std::string::String>,
78    pub(crate) schema_version: ::std::option::Option<::std::string::String>,
79    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
80    pub(crate) r#type: ::std::option::Option<::std::string::String>,
81    pub(crate) version_created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
82    _request_id: Option<String>,
83}
84impl UpdateSchemaOutputBuilder {
85    /// <p>The description of the schema.</p>
86    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.description = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The description of the schema.</p>
91    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.description = input;
93        self
94    }
95    /// <p>The description of the schema.</p>
96    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
97        &self.description
98    }
99    /// <p>The date and time that schema was modified.</p>
100    pub fn last_modified(mut self, input: ::aws_smithy_types::DateTime) -> Self {
101        self.last_modified = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>The date and time that schema was modified.</p>
105    pub fn set_last_modified(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
106        self.last_modified = input;
107        self
108    }
109    /// <p>The date and time that schema was modified.</p>
110    pub fn get_last_modified(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
111        &self.last_modified
112    }
113    /// <p>The ARN of the schema.</p>
114    pub fn schema_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.schema_arn = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The ARN of the schema.</p>
119    pub fn set_schema_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.schema_arn = input;
121        self
122    }
123    /// <p>The ARN of the schema.</p>
124    pub fn get_schema_arn(&self) -> &::std::option::Option<::std::string::String> {
125        &self.schema_arn
126    }
127    /// <p>The name of the schema.</p>
128    pub fn schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.schema_name = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The name of the schema.</p>
133    pub fn set_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.schema_name = input;
135        self
136    }
137    /// <p>The name of the schema.</p>
138    pub fn get_schema_name(&self) -> &::std::option::Option<::std::string::String> {
139        &self.schema_name
140    }
141    /// <p>The version number of the schema</p>
142    pub fn schema_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.schema_version = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The version number of the schema</p>
147    pub fn set_schema_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.schema_version = input;
149        self
150    }
151    /// <p>The version number of the schema</p>
152    pub fn get_schema_version(&self) -> &::std::option::Option<::std::string::String> {
153        &self.schema_version
154    }
155    /// Adds a key-value pair to `tags`.
156    ///
157    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
158    ///
159    /// <p>Key-value pairs associated with a resource.</p>
160    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
161        let mut hash_map = self.tags.unwrap_or_default();
162        hash_map.insert(k.into(), v.into());
163        self.tags = ::std::option::Option::Some(hash_map);
164        self
165    }
166    /// <p>Key-value pairs associated with a resource.</p>
167    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
168        self.tags = input;
169        self
170    }
171    /// <p>Key-value pairs associated with a resource.</p>
172    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
173        &self.tags
174    }
175    /// <p>The type of the schema.</p>
176    pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177        self.r#type = ::std::option::Option::Some(input.into());
178        self
179    }
180    /// <p>The type of the schema.</p>
181    pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182        self.r#type = input;
183        self
184    }
185    /// <p>The type of the schema.</p>
186    pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
187        &self.r#type
188    }
189    /// <p>The date the schema version was created.</p>
190    pub fn version_created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
191        self.version_created_date = ::std::option::Option::Some(input);
192        self
193    }
194    /// <p>The date the schema version was created.</p>
195    pub fn set_version_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
196        self.version_created_date = input;
197        self
198    }
199    /// <p>The date the schema version was created.</p>
200    pub fn get_version_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
201        &self.version_created_date
202    }
203    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
204        self._request_id = Some(request_id.into());
205        self
206    }
207
208    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
209        self._request_id = request_id;
210        self
211    }
212    /// Consumes the builder and constructs a [`UpdateSchemaOutput`](crate::operation::update_schema::UpdateSchemaOutput).
213    pub fn build(self) -> crate::operation::update_schema::UpdateSchemaOutput {
214        crate::operation::update_schema::UpdateSchemaOutput {
215            description: self.description,
216            last_modified: self.last_modified,
217            schema_arn: self.schema_arn,
218            schema_name: self.schema_name,
219            schema_version: self.schema_version,
220            tags: self.tags,
221            r#type: self.r#type,
222            version_created_date: self.version_created_date,
223            _request_id: self._request_id,
224        }
225    }
226}