aws_sdk_glue/operation/create_schema/
_create_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 CreateSchemaOutput {
6    /// <p>The name of the registry.</p>
7    pub registry_name: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Name (ARN) of the registry.</p>
9    pub registry_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the schema.</p>
11    pub schema_name: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Resource Name (ARN) of the schema.</p>
13    pub schema_arn: ::std::option::Option<::std::string::String>,
14    /// <p>A description of the schema if specified when created.</p>
15    pub description: ::std::option::Option<::std::string::String>,
16    /// <p>The data format of the schema definition. Currently <code>AVRO</code>, <code>JSON</code> and <code>PROTOBUF</code> are supported.</p>
17    pub data_format: ::std::option::Option<crate::types::DataFormat>,
18    /// <p>The schema compatibility mode.</p>
19    pub compatibility: ::std::option::Option<crate::types::Compatibility>,
20    /// <p>The version number of the checkpoint (the last time the compatibility mode was changed).</p>
21    pub schema_checkpoint: ::std::option::Option<i64>,
22    /// <p>The latest version of the schema associated with the returned schema definition.</p>
23    pub latest_schema_version: ::std::option::Option<i64>,
24    /// <p>The next version of the schema associated with the returned schema definition.</p>
25    pub next_schema_version: ::std::option::Option<i64>,
26    /// <p>The status of the schema.</p>
27    pub schema_status: ::std::option::Option<crate::types::SchemaStatus>,
28    /// <p>The tags for the schema.</p>
29    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
30    /// <p>The unique identifier of the first schema version.</p>
31    pub schema_version_id: ::std::option::Option<::std::string::String>,
32    /// <p>The status of the first schema version created.</p>
33    pub schema_version_status: ::std::option::Option<crate::types::SchemaVersionStatus>,
34    _request_id: Option<String>,
35}
36impl CreateSchemaOutput {
37    /// <p>The name of the registry.</p>
38    pub fn registry_name(&self) -> ::std::option::Option<&str> {
39        self.registry_name.as_deref()
40    }
41    /// <p>The Amazon Resource Name (ARN) of the registry.</p>
42    pub fn registry_arn(&self) -> ::std::option::Option<&str> {
43        self.registry_arn.as_deref()
44    }
45    /// <p>The name of the schema.</p>
46    pub fn schema_name(&self) -> ::std::option::Option<&str> {
47        self.schema_name.as_deref()
48    }
49    /// <p>The Amazon Resource Name (ARN) of the schema.</p>
50    pub fn schema_arn(&self) -> ::std::option::Option<&str> {
51        self.schema_arn.as_deref()
52    }
53    /// <p>A description of the schema if specified when created.</p>
54    pub fn description(&self) -> ::std::option::Option<&str> {
55        self.description.as_deref()
56    }
57    /// <p>The data format of the schema definition. Currently <code>AVRO</code>, <code>JSON</code> and <code>PROTOBUF</code> are supported.</p>
58    pub fn data_format(&self) -> ::std::option::Option<&crate::types::DataFormat> {
59        self.data_format.as_ref()
60    }
61    /// <p>The schema compatibility mode.</p>
62    pub fn compatibility(&self) -> ::std::option::Option<&crate::types::Compatibility> {
63        self.compatibility.as_ref()
64    }
65    /// <p>The version number of the checkpoint (the last time the compatibility mode was changed).</p>
66    pub fn schema_checkpoint(&self) -> ::std::option::Option<i64> {
67        self.schema_checkpoint
68    }
69    /// <p>The latest version of the schema associated with the returned schema definition.</p>
70    pub fn latest_schema_version(&self) -> ::std::option::Option<i64> {
71        self.latest_schema_version
72    }
73    /// <p>The next version of the schema associated with the returned schema definition.</p>
74    pub fn next_schema_version(&self) -> ::std::option::Option<i64> {
75        self.next_schema_version
76    }
77    /// <p>The status of the schema.</p>
78    pub fn schema_status(&self) -> ::std::option::Option<&crate::types::SchemaStatus> {
79        self.schema_status.as_ref()
80    }
81    /// <p>The tags for the schema.</p>
82    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
83        self.tags.as_ref()
84    }
85    /// <p>The unique identifier of the first schema version.</p>
86    pub fn schema_version_id(&self) -> ::std::option::Option<&str> {
87        self.schema_version_id.as_deref()
88    }
89    /// <p>The status of the first schema version created.</p>
90    pub fn schema_version_status(&self) -> ::std::option::Option<&crate::types::SchemaVersionStatus> {
91        self.schema_version_status.as_ref()
92    }
93}
94impl ::aws_types::request_id::RequestId for CreateSchemaOutput {
95    fn request_id(&self) -> Option<&str> {
96        self._request_id.as_deref()
97    }
98}
99impl CreateSchemaOutput {
100    /// Creates a new builder-style object to manufacture [`CreateSchemaOutput`](crate::operation::create_schema::CreateSchemaOutput).
101    pub fn builder() -> crate::operation::create_schema::builders::CreateSchemaOutputBuilder {
102        crate::operation::create_schema::builders::CreateSchemaOutputBuilder::default()
103    }
104}
105
106/// A builder for [`CreateSchemaOutput`](crate::operation::create_schema::CreateSchemaOutput).
107#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
108#[non_exhaustive]
109pub struct CreateSchemaOutputBuilder {
110    pub(crate) registry_name: ::std::option::Option<::std::string::String>,
111    pub(crate) registry_arn: ::std::option::Option<::std::string::String>,
112    pub(crate) schema_name: ::std::option::Option<::std::string::String>,
113    pub(crate) schema_arn: ::std::option::Option<::std::string::String>,
114    pub(crate) description: ::std::option::Option<::std::string::String>,
115    pub(crate) data_format: ::std::option::Option<crate::types::DataFormat>,
116    pub(crate) compatibility: ::std::option::Option<crate::types::Compatibility>,
117    pub(crate) schema_checkpoint: ::std::option::Option<i64>,
118    pub(crate) latest_schema_version: ::std::option::Option<i64>,
119    pub(crate) next_schema_version: ::std::option::Option<i64>,
120    pub(crate) schema_status: ::std::option::Option<crate::types::SchemaStatus>,
121    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
122    pub(crate) schema_version_id: ::std::option::Option<::std::string::String>,
123    pub(crate) schema_version_status: ::std::option::Option<crate::types::SchemaVersionStatus>,
124    _request_id: Option<String>,
125}
126impl CreateSchemaOutputBuilder {
127    /// <p>The name of the registry.</p>
128    pub fn registry_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.registry_name = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The name of the registry.</p>
133    pub fn set_registry_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.registry_name = input;
135        self
136    }
137    /// <p>The name of the registry.</p>
138    pub fn get_registry_name(&self) -> &::std::option::Option<::std::string::String> {
139        &self.registry_name
140    }
141    /// <p>The Amazon Resource Name (ARN) of the registry.</p>
142    pub fn registry_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.registry_arn = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The Amazon Resource Name (ARN) of the registry.</p>
147    pub fn set_registry_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.registry_arn = input;
149        self
150    }
151    /// <p>The Amazon Resource Name (ARN) of the registry.</p>
152    pub fn get_registry_arn(&self) -> &::std::option::Option<::std::string::String> {
153        &self.registry_arn
154    }
155    /// <p>The name of the schema.</p>
156    pub fn schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157        self.schema_name = ::std::option::Option::Some(input.into());
158        self
159    }
160    /// <p>The name of the schema.</p>
161    pub fn set_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.schema_name = input;
163        self
164    }
165    /// <p>The name of the schema.</p>
166    pub fn get_schema_name(&self) -> &::std::option::Option<::std::string::String> {
167        &self.schema_name
168    }
169    /// <p>The Amazon Resource Name (ARN) of the schema.</p>
170    pub fn schema_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171        self.schema_arn = ::std::option::Option::Some(input.into());
172        self
173    }
174    /// <p>The Amazon Resource Name (ARN) of the schema.</p>
175    pub fn set_schema_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.schema_arn = input;
177        self
178    }
179    /// <p>The Amazon Resource Name (ARN) of the schema.</p>
180    pub fn get_schema_arn(&self) -> &::std::option::Option<::std::string::String> {
181        &self.schema_arn
182    }
183    /// <p>A description of the schema if specified when created.</p>
184    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.description = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <p>A description of the schema if specified when created.</p>
189    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.description = input;
191        self
192    }
193    /// <p>A description of the schema if specified when created.</p>
194    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
195        &self.description
196    }
197    /// <p>The data format of the schema definition. Currently <code>AVRO</code>, <code>JSON</code> and <code>PROTOBUF</code> are supported.</p>
198    pub fn data_format(mut self, input: crate::types::DataFormat) -> Self {
199        self.data_format = ::std::option::Option::Some(input);
200        self
201    }
202    /// <p>The data format of the schema definition. Currently <code>AVRO</code>, <code>JSON</code> and <code>PROTOBUF</code> are supported.</p>
203    pub fn set_data_format(mut self, input: ::std::option::Option<crate::types::DataFormat>) -> Self {
204        self.data_format = input;
205        self
206    }
207    /// <p>The data format of the schema definition. Currently <code>AVRO</code>, <code>JSON</code> and <code>PROTOBUF</code> are supported.</p>
208    pub fn get_data_format(&self) -> &::std::option::Option<crate::types::DataFormat> {
209        &self.data_format
210    }
211    /// <p>The schema compatibility mode.</p>
212    pub fn compatibility(mut self, input: crate::types::Compatibility) -> Self {
213        self.compatibility = ::std::option::Option::Some(input);
214        self
215    }
216    /// <p>The schema compatibility mode.</p>
217    pub fn set_compatibility(mut self, input: ::std::option::Option<crate::types::Compatibility>) -> Self {
218        self.compatibility = input;
219        self
220    }
221    /// <p>The schema compatibility mode.</p>
222    pub fn get_compatibility(&self) -> &::std::option::Option<crate::types::Compatibility> {
223        &self.compatibility
224    }
225    /// <p>The version number of the checkpoint (the last time the compatibility mode was changed).</p>
226    pub fn schema_checkpoint(mut self, input: i64) -> Self {
227        self.schema_checkpoint = ::std::option::Option::Some(input);
228        self
229    }
230    /// <p>The version number of the checkpoint (the last time the compatibility mode was changed).</p>
231    pub fn set_schema_checkpoint(mut self, input: ::std::option::Option<i64>) -> Self {
232        self.schema_checkpoint = input;
233        self
234    }
235    /// <p>The version number of the checkpoint (the last time the compatibility mode was changed).</p>
236    pub fn get_schema_checkpoint(&self) -> &::std::option::Option<i64> {
237        &self.schema_checkpoint
238    }
239    /// <p>The latest version of the schema associated with the returned schema definition.</p>
240    pub fn latest_schema_version(mut self, input: i64) -> Self {
241        self.latest_schema_version = ::std::option::Option::Some(input);
242        self
243    }
244    /// <p>The latest version of the schema associated with the returned schema definition.</p>
245    pub fn set_latest_schema_version(mut self, input: ::std::option::Option<i64>) -> Self {
246        self.latest_schema_version = input;
247        self
248    }
249    /// <p>The latest version of the schema associated with the returned schema definition.</p>
250    pub fn get_latest_schema_version(&self) -> &::std::option::Option<i64> {
251        &self.latest_schema_version
252    }
253    /// <p>The next version of the schema associated with the returned schema definition.</p>
254    pub fn next_schema_version(mut self, input: i64) -> Self {
255        self.next_schema_version = ::std::option::Option::Some(input);
256        self
257    }
258    /// <p>The next version of the schema associated with the returned schema definition.</p>
259    pub fn set_next_schema_version(mut self, input: ::std::option::Option<i64>) -> Self {
260        self.next_schema_version = input;
261        self
262    }
263    /// <p>The next version of the schema associated with the returned schema definition.</p>
264    pub fn get_next_schema_version(&self) -> &::std::option::Option<i64> {
265        &self.next_schema_version
266    }
267    /// <p>The status of the schema.</p>
268    pub fn schema_status(mut self, input: crate::types::SchemaStatus) -> Self {
269        self.schema_status = ::std::option::Option::Some(input);
270        self
271    }
272    /// <p>The status of the schema.</p>
273    pub fn set_schema_status(mut self, input: ::std::option::Option<crate::types::SchemaStatus>) -> Self {
274        self.schema_status = input;
275        self
276    }
277    /// <p>The status of the schema.</p>
278    pub fn get_schema_status(&self) -> &::std::option::Option<crate::types::SchemaStatus> {
279        &self.schema_status
280    }
281    /// Adds a key-value pair to `tags`.
282    ///
283    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
284    ///
285    /// <p>The tags for the schema.</p>
286    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
287        let mut hash_map = self.tags.unwrap_or_default();
288        hash_map.insert(k.into(), v.into());
289        self.tags = ::std::option::Option::Some(hash_map);
290        self
291    }
292    /// <p>The tags for the schema.</p>
293    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
294        self.tags = input;
295        self
296    }
297    /// <p>The tags for the schema.</p>
298    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
299        &self.tags
300    }
301    /// <p>The unique identifier of the first schema version.</p>
302    pub fn schema_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
303        self.schema_version_id = ::std::option::Option::Some(input.into());
304        self
305    }
306    /// <p>The unique identifier of the first schema version.</p>
307    pub fn set_schema_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
308        self.schema_version_id = input;
309        self
310    }
311    /// <p>The unique identifier of the first schema version.</p>
312    pub fn get_schema_version_id(&self) -> &::std::option::Option<::std::string::String> {
313        &self.schema_version_id
314    }
315    /// <p>The status of the first schema version created.</p>
316    pub fn schema_version_status(mut self, input: crate::types::SchemaVersionStatus) -> Self {
317        self.schema_version_status = ::std::option::Option::Some(input);
318        self
319    }
320    /// <p>The status of the first schema version created.</p>
321    pub fn set_schema_version_status(mut self, input: ::std::option::Option<crate::types::SchemaVersionStatus>) -> Self {
322        self.schema_version_status = input;
323        self
324    }
325    /// <p>The status of the first schema version created.</p>
326    pub fn get_schema_version_status(&self) -> &::std::option::Option<crate::types::SchemaVersionStatus> {
327        &self.schema_version_status
328    }
329    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
330        self._request_id = Some(request_id.into());
331        self
332    }
333
334    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
335        self._request_id = request_id;
336        self
337    }
338    /// Consumes the builder and constructs a [`CreateSchemaOutput`](crate::operation::create_schema::CreateSchemaOutput).
339    pub fn build(self) -> crate::operation::create_schema::CreateSchemaOutput {
340        crate::operation::create_schema::CreateSchemaOutput {
341            registry_name: self.registry_name,
342            registry_arn: self.registry_arn,
343            schema_name: self.schema_name,
344            schema_arn: self.schema_arn,
345            description: self.description,
346            data_format: self.data_format,
347            compatibility: self.compatibility,
348            schema_checkpoint: self.schema_checkpoint,
349            latest_schema_version: self.latest_schema_version,
350            next_schema_version: self.next_schema_version,
351            schema_status: self.schema_status,
352            tags: self.tags,
353            schema_version_id: self.schema_version_id,
354            schema_version_status: self.schema_version_status,
355            _request_id: self._request_id,
356        }
357    }
358}