aws_sdk_glue/operation/get_schema/_get_schema_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, ::std::fmt::Debug)]
5pub struct GetSchemaInput {
6 /// <p>This is a wrapper structure to contain schema identity fields. The structure contains:</p>
7 /// <ul>
8 /// <li>
9 /// <p>SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. Either <code>SchemaArn</code> or <code>SchemaName</code> and <code>RegistryName</code> has to be provided.</p></li>
10 /// <li>
11 /// <p>SchemaId$SchemaName: The name of the schema. Either <code>SchemaArn</code> or <code>SchemaName</code> and <code>RegistryName</code> has to be provided.</p></li>
12 /// </ul>
13 pub schema_id: ::std::option::Option<crate::types::SchemaId>,
14}
15impl GetSchemaInput {
16 /// <p>This is a wrapper structure to contain schema identity fields. The structure contains:</p>
17 /// <ul>
18 /// <li>
19 /// <p>SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. Either <code>SchemaArn</code> or <code>SchemaName</code> and <code>RegistryName</code> has to be provided.</p></li>
20 /// <li>
21 /// <p>SchemaId$SchemaName: The name of the schema. Either <code>SchemaArn</code> or <code>SchemaName</code> and <code>RegistryName</code> has to be provided.</p></li>
22 /// </ul>
23 pub fn schema_id(&self) -> ::std::option::Option<&crate::types::SchemaId> {
24 self.schema_id.as_ref()
25 }
26}
27impl GetSchemaInput {
28 /// Creates a new builder-style object to manufacture [`GetSchemaInput`](crate::operation::get_schema::GetSchemaInput).
29 pub fn builder() -> crate::operation::get_schema::builders::GetSchemaInputBuilder {
30 crate::operation::get_schema::builders::GetSchemaInputBuilder::default()
31 }
32}
33
34/// A builder for [`GetSchemaInput`](crate::operation::get_schema::GetSchemaInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetSchemaInputBuilder {
38 pub(crate) schema_id: ::std::option::Option<crate::types::SchemaId>,
39}
40impl GetSchemaInputBuilder {
41 /// <p>This is a wrapper structure to contain schema identity fields. The structure contains:</p>
42 /// <ul>
43 /// <li>
44 /// <p>SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. Either <code>SchemaArn</code> or <code>SchemaName</code> and <code>RegistryName</code> has to be provided.</p></li>
45 /// <li>
46 /// <p>SchemaId$SchemaName: The name of the schema. Either <code>SchemaArn</code> or <code>SchemaName</code> and <code>RegistryName</code> has to be provided.</p></li>
47 /// </ul>
48 /// This field is required.
49 pub fn schema_id(mut self, input: crate::types::SchemaId) -> Self {
50 self.schema_id = ::std::option::Option::Some(input);
51 self
52 }
53 /// <p>This is a wrapper structure to contain schema identity fields. The structure contains:</p>
54 /// <ul>
55 /// <li>
56 /// <p>SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. Either <code>SchemaArn</code> or <code>SchemaName</code> and <code>RegistryName</code> has to be provided.</p></li>
57 /// <li>
58 /// <p>SchemaId$SchemaName: The name of the schema. Either <code>SchemaArn</code> or <code>SchemaName</code> and <code>RegistryName</code> has to be provided.</p></li>
59 /// </ul>
60 pub fn set_schema_id(mut self, input: ::std::option::Option<crate::types::SchemaId>) -> Self {
61 self.schema_id = input;
62 self
63 }
64 /// <p>This is a wrapper structure to contain schema identity fields. The structure contains:</p>
65 /// <ul>
66 /// <li>
67 /// <p>SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. Either <code>SchemaArn</code> or <code>SchemaName</code> and <code>RegistryName</code> has to be provided.</p></li>
68 /// <li>
69 /// <p>SchemaId$SchemaName: The name of the schema. Either <code>SchemaArn</code> or <code>SchemaName</code> and <code>RegistryName</code> has to be provided.</p></li>
70 /// </ul>
71 pub fn get_schema_id(&self) -> &::std::option::Option<crate::types::SchemaId> {
72 &self.schema_id
73 }
74 /// Consumes the builder and constructs a [`GetSchemaInput`](crate::operation::get_schema::GetSchemaInput).
75 pub fn build(self) -> ::std::result::Result<crate::operation::get_schema::GetSchemaInput, ::aws_smithy_types::error::operation::BuildError> {
76 ::std::result::Result::Ok(crate::operation::get_schema::GetSchemaInput { schema_id: self.schema_id })
77 }
78}