aws_sdk_glue/operation/update_schema/
_update_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 UpdateSchemaInput {
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. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p></li>
10    /// <li>
11    /// <p>SchemaId$SchemaName: The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p></li>
12    /// </ul>
13    pub schema_id: ::std::option::Option<crate::types::SchemaId>,
14    /// <p>Version number required for check pointing. One of <code>VersionNumber</code> or <code>Compatibility</code> has to be provided.</p>
15    pub schema_version_number: ::std::option::Option<crate::types::SchemaVersionNumber>,
16    /// <p>The new compatibility setting for the schema.</p>
17    pub compatibility: ::std::option::Option<crate::types::Compatibility>,
18    /// <p>The new description for the schema.</p>
19    pub description: ::std::option::Option<::std::string::String>,
20}
21impl UpdateSchemaInput {
22    /// <p>This is a wrapper structure to contain schema identity fields. The structure contains:</p>
23    /// <ul>
24    /// <li>
25    /// <p>SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p></li>
26    /// <li>
27    /// <p>SchemaId$SchemaName: The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p></li>
28    /// </ul>
29    pub fn schema_id(&self) -> ::std::option::Option<&crate::types::SchemaId> {
30        self.schema_id.as_ref()
31    }
32    /// <p>Version number required for check pointing. One of <code>VersionNumber</code> or <code>Compatibility</code> has to be provided.</p>
33    pub fn schema_version_number(&self) -> ::std::option::Option<&crate::types::SchemaVersionNumber> {
34        self.schema_version_number.as_ref()
35    }
36    /// <p>The new compatibility setting for the schema.</p>
37    pub fn compatibility(&self) -> ::std::option::Option<&crate::types::Compatibility> {
38        self.compatibility.as_ref()
39    }
40    /// <p>The new description for the schema.</p>
41    pub fn description(&self) -> ::std::option::Option<&str> {
42        self.description.as_deref()
43    }
44}
45impl UpdateSchemaInput {
46    /// Creates a new builder-style object to manufacture [`UpdateSchemaInput`](crate::operation::update_schema::UpdateSchemaInput).
47    pub fn builder() -> crate::operation::update_schema::builders::UpdateSchemaInputBuilder {
48        crate::operation::update_schema::builders::UpdateSchemaInputBuilder::default()
49    }
50}
51
52/// A builder for [`UpdateSchemaInput`](crate::operation::update_schema::UpdateSchemaInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct UpdateSchemaInputBuilder {
56    pub(crate) schema_id: ::std::option::Option<crate::types::SchemaId>,
57    pub(crate) schema_version_number: ::std::option::Option<crate::types::SchemaVersionNumber>,
58    pub(crate) compatibility: ::std::option::Option<crate::types::Compatibility>,
59    pub(crate) description: ::std::option::Option<::std::string::String>,
60}
61impl UpdateSchemaInputBuilder {
62    /// <p>This is a wrapper structure to contain schema identity fields. The structure contains:</p>
63    /// <ul>
64    /// <li>
65    /// <p>SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p></li>
66    /// <li>
67    /// <p>SchemaId$SchemaName: The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p></li>
68    /// </ul>
69    /// This field is required.
70    pub fn schema_id(mut self, input: crate::types::SchemaId) -> Self {
71        self.schema_id = ::std::option::Option::Some(input);
72        self
73    }
74    /// <p>This is a wrapper structure to contain schema identity fields. The structure contains:</p>
75    /// <ul>
76    /// <li>
77    /// <p>SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p></li>
78    /// <li>
79    /// <p>SchemaId$SchemaName: The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p></li>
80    /// </ul>
81    pub fn set_schema_id(mut self, input: ::std::option::Option<crate::types::SchemaId>) -> Self {
82        self.schema_id = input;
83        self
84    }
85    /// <p>This is a wrapper structure to contain schema identity fields. The structure contains:</p>
86    /// <ul>
87    /// <li>
88    /// <p>SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p></li>
89    /// <li>
90    /// <p>SchemaId$SchemaName: The name of the schema. One of <code>SchemaArn</code> or <code>SchemaName</code> has to be provided.</p></li>
91    /// </ul>
92    pub fn get_schema_id(&self) -> &::std::option::Option<crate::types::SchemaId> {
93        &self.schema_id
94    }
95    /// <p>Version number required for check pointing. One of <code>VersionNumber</code> or <code>Compatibility</code> has to be provided.</p>
96    pub fn schema_version_number(mut self, input: crate::types::SchemaVersionNumber) -> Self {
97        self.schema_version_number = ::std::option::Option::Some(input);
98        self
99    }
100    /// <p>Version number required for check pointing. One of <code>VersionNumber</code> or <code>Compatibility</code> has to be provided.</p>
101    pub fn set_schema_version_number(mut self, input: ::std::option::Option<crate::types::SchemaVersionNumber>) -> Self {
102        self.schema_version_number = input;
103        self
104    }
105    /// <p>Version number required for check pointing. One of <code>VersionNumber</code> or <code>Compatibility</code> has to be provided.</p>
106    pub fn get_schema_version_number(&self) -> &::std::option::Option<crate::types::SchemaVersionNumber> {
107        &self.schema_version_number
108    }
109    /// <p>The new compatibility setting for the schema.</p>
110    pub fn compatibility(mut self, input: crate::types::Compatibility) -> Self {
111        self.compatibility = ::std::option::Option::Some(input);
112        self
113    }
114    /// <p>The new compatibility setting for the schema.</p>
115    pub fn set_compatibility(mut self, input: ::std::option::Option<crate::types::Compatibility>) -> Self {
116        self.compatibility = input;
117        self
118    }
119    /// <p>The new compatibility setting for the schema.</p>
120    pub fn get_compatibility(&self) -> &::std::option::Option<crate::types::Compatibility> {
121        &self.compatibility
122    }
123    /// <p>The new description for the schema.</p>
124    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.description = ::std::option::Option::Some(input.into());
126        self
127    }
128    /// <p>The new description for the schema.</p>
129    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.description = input;
131        self
132    }
133    /// <p>The new description for the schema.</p>
134    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
135        &self.description
136    }
137    /// Consumes the builder and constructs a [`UpdateSchemaInput`](crate::operation::update_schema::UpdateSchemaInput).
138    pub fn build(
139        self,
140    ) -> ::std::result::Result<crate::operation::update_schema::UpdateSchemaInput, ::aws_smithy_types::error::operation::BuildError> {
141        ::std::result::Result::Ok(crate::operation::update_schema::UpdateSchemaInput {
142            schema_id: self.schema_id,
143            schema_version_number: self.schema_version_number,
144            compatibility: self.compatibility,
145            description: self.description,
146        })
147    }
148}