aws_sdk_glue/operation/create_schema/
_create_schema_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateSchemaOutput {
6 pub registry_name: ::std::option::Option<::std::string::String>,
8 pub registry_arn: ::std::option::Option<::std::string::String>,
10 pub schema_name: ::std::option::Option<::std::string::String>,
12 pub schema_arn: ::std::option::Option<::std::string::String>,
14 pub description: ::std::option::Option<::std::string::String>,
16 pub data_format: ::std::option::Option<crate::types::DataFormat>,
18 pub compatibility: ::std::option::Option<crate::types::Compatibility>,
20 pub schema_checkpoint: ::std::option::Option<i64>,
22 pub latest_schema_version: ::std::option::Option<i64>,
24 pub next_schema_version: ::std::option::Option<i64>,
26 pub schema_status: ::std::option::Option<crate::types::SchemaStatus>,
28 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
30 pub schema_version_id: ::std::option::Option<::std::string::String>,
32 pub schema_version_status: ::std::option::Option<crate::types::SchemaVersionStatus>,
34 _request_id: Option<String>,
35}
36impl CreateSchemaOutput {
37 pub fn registry_name(&self) -> ::std::option::Option<&str> {
39 self.registry_name.as_deref()
40 }
41 pub fn registry_arn(&self) -> ::std::option::Option<&str> {
43 self.registry_arn.as_deref()
44 }
45 pub fn schema_name(&self) -> ::std::option::Option<&str> {
47 self.schema_name.as_deref()
48 }
49 pub fn schema_arn(&self) -> ::std::option::Option<&str> {
51 self.schema_arn.as_deref()
52 }
53 pub fn description(&self) -> ::std::option::Option<&str> {
55 self.description.as_deref()
56 }
57 pub fn data_format(&self) -> ::std::option::Option<&crate::types::DataFormat> {
59 self.data_format.as_ref()
60 }
61 pub fn compatibility(&self) -> ::std::option::Option<&crate::types::Compatibility> {
63 self.compatibility.as_ref()
64 }
65 pub fn schema_checkpoint(&self) -> ::std::option::Option<i64> {
67 self.schema_checkpoint
68 }
69 pub fn latest_schema_version(&self) -> ::std::option::Option<i64> {
71 self.latest_schema_version
72 }
73 pub fn next_schema_version(&self) -> ::std::option::Option<i64> {
75 self.next_schema_version
76 }
77 pub fn schema_status(&self) -> ::std::option::Option<&crate::types::SchemaStatus> {
79 self.schema_status.as_ref()
80 }
81 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
83 self.tags.as_ref()
84 }
85 pub fn schema_version_id(&self) -> ::std::option::Option<&str> {
87 self.schema_version_id.as_deref()
88 }
89 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 pub fn builder() -> crate::operation::create_schema::builders::CreateSchemaOutputBuilder {
102 crate::operation::create_schema::builders::CreateSchemaOutputBuilder::default()
103 }
104}
105
106#[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 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 pub fn set_registry_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.registry_name = input;
135 self
136 }
137 pub fn get_registry_name(&self) -> &::std::option::Option<::std::string::String> {
139 &self.registry_name
140 }
141 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 pub fn set_registry_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148 self.registry_arn = input;
149 self
150 }
151 pub fn get_registry_arn(&self) -> &::std::option::Option<::std::string::String> {
153 &self.registry_arn
154 }
155 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 pub fn set_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162 self.schema_name = input;
163 self
164 }
165 pub fn get_schema_name(&self) -> &::std::option::Option<::std::string::String> {
167 &self.schema_name
168 }
169 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 pub fn set_schema_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176 self.schema_arn = input;
177 self
178 }
179 pub fn get_schema_arn(&self) -> &::std::option::Option<::std::string::String> {
181 &self.schema_arn
182 }
183 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190 self.description = input;
191 self
192 }
193 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
195 &self.description
196 }
197 pub fn data_format(mut self, input: crate::types::DataFormat) -> Self {
199 self.data_format = ::std::option::Option::Some(input);
200 self
201 }
202 pub fn set_data_format(mut self, input: ::std::option::Option<crate::types::DataFormat>) -> Self {
204 self.data_format = input;
205 self
206 }
207 pub fn get_data_format(&self) -> &::std::option::Option<crate::types::DataFormat> {
209 &self.data_format
210 }
211 pub fn compatibility(mut self, input: crate::types::Compatibility) -> Self {
213 self.compatibility = ::std::option::Option::Some(input);
214 self
215 }
216 pub fn set_compatibility(mut self, input: ::std::option::Option<crate::types::Compatibility>) -> Self {
218 self.compatibility = input;
219 self
220 }
221 pub fn get_compatibility(&self) -> &::std::option::Option<crate::types::Compatibility> {
223 &self.compatibility
224 }
225 pub fn schema_checkpoint(mut self, input: i64) -> Self {
227 self.schema_checkpoint = ::std::option::Option::Some(input);
228 self
229 }
230 pub fn set_schema_checkpoint(mut self, input: ::std::option::Option<i64>) -> Self {
232 self.schema_checkpoint = input;
233 self
234 }
235 pub fn get_schema_checkpoint(&self) -> &::std::option::Option<i64> {
237 &self.schema_checkpoint
238 }
239 pub fn latest_schema_version(mut self, input: i64) -> Self {
241 self.latest_schema_version = ::std::option::Option::Some(input);
242 self
243 }
244 pub fn set_latest_schema_version(mut self, input: ::std::option::Option<i64>) -> Self {
246 self.latest_schema_version = input;
247 self
248 }
249 pub fn get_latest_schema_version(&self) -> &::std::option::Option<i64> {
251 &self.latest_schema_version
252 }
253 pub fn next_schema_version(mut self, input: i64) -> Self {
255 self.next_schema_version = ::std::option::Option::Some(input);
256 self
257 }
258 pub fn set_next_schema_version(mut self, input: ::std::option::Option<i64>) -> Self {
260 self.next_schema_version = input;
261 self
262 }
263 pub fn get_next_schema_version(&self) -> &::std::option::Option<i64> {
265 &self.next_schema_version
266 }
267 pub fn schema_status(mut self, input: crate::types::SchemaStatus) -> Self {
269 self.schema_status = ::std::option::Option::Some(input);
270 self
271 }
272 pub fn set_schema_status(mut self, input: ::std::option::Option<crate::types::SchemaStatus>) -> Self {
274 self.schema_status = input;
275 self
276 }
277 pub fn get_schema_status(&self) -> &::std::option::Option<crate::types::SchemaStatus> {
279 &self.schema_status
280 }
281 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 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 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
299 &self.tags
300 }
301 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 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 pub fn get_schema_version_id(&self) -> &::std::option::Option<::std::string::String> {
313 &self.schema_version_id
314 }
315 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 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 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 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}