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