aws_sdk_schemas/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>The ID of the client token.</p>
7    pub client_token_id: ::std::option::Option<::std::string::String>,
8    /// <p>The source of the schema definition.</p>
9    pub content: ::std::option::Option<::std::string::String>,
10    /// <p>The description of the schema.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the registry.</p>
13    pub registry_name: ::std::option::Option<::std::string::String>,
14    /// <p>The name of the schema.</p>
15    pub schema_name: ::std::option::Option<::std::string::String>,
16    /// <p>The schema type for the events schema.</p>
17    pub r#type: ::std::option::Option<crate::types::Type>,
18}
19impl UpdateSchemaInput {
20    /// <p>The ID of the client token.</p>
21    pub fn client_token_id(&self) -> ::std::option::Option<&str> {
22        self.client_token_id.as_deref()
23    }
24    /// <p>The source of the schema definition.</p>
25    pub fn content(&self) -> ::std::option::Option<&str> {
26        self.content.as_deref()
27    }
28    /// <p>The description of the schema.</p>
29    pub fn description(&self) -> ::std::option::Option<&str> {
30        self.description.as_deref()
31    }
32    /// <p>The name of the registry.</p>
33    pub fn registry_name(&self) -> ::std::option::Option<&str> {
34        self.registry_name.as_deref()
35    }
36    /// <p>The name of the schema.</p>
37    pub fn schema_name(&self) -> ::std::option::Option<&str> {
38        self.schema_name.as_deref()
39    }
40    /// <p>The schema type for the events schema.</p>
41    pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
42        self.r#type.as_ref()
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) client_token_id: ::std::option::Option<::std::string::String>,
57    pub(crate) content: ::std::option::Option<::std::string::String>,
58    pub(crate) description: ::std::option::Option<::std::string::String>,
59    pub(crate) registry_name: ::std::option::Option<::std::string::String>,
60    pub(crate) schema_name: ::std::option::Option<::std::string::String>,
61    pub(crate) r#type: ::std::option::Option<crate::types::Type>,
62}
63impl UpdateSchemaInputBuilder {
64    /// <p>The ID of the client token.</p>
65    pub fn client_token_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.client_token_id = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The ID of the client token.</p>
70    pub fn set_client_token_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.client_token_id = input;
72        self
73    }
74    /// <p>The ID of the client token.</p>
75    pub fn get_client_token_id(&self) -> &::std::option::Option<::std::string::String> {
76        &self.client_token_id
77    }
78    /// <p>The source of the schema definition.</p>
79    pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.content = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The source of the schema definition.</p>
84    pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.content = input;
86        self
87    }
88    /// <p>The source of the schema definition.</p>
89    pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
90        &self.content
91    }
92    /// <p>The description of the schema.</p>
93    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.description = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The description of the schema.</p>
98    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.description = input;
100        self
101    }
102    /// <p>The description of the schema.</p>
103    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
104        &self.description
105    }
106    /// <p>The name of the registry.</p>
107    /// This field is required.
108    pub fn registry_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.registry_name = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>The name of the registry.</p>
113    pub fn set_registry_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114        self.registry_name = input;
115        self
116    }
117    /// <p>The name of the registry.</p>
118    pub fn get_registry_name(&self) -> &::std::option::Option<::std::string::String> {
119        &self.registry_name
120    }
121    /// <p>The name of the schema.</p>
122    /// This field is required.
123    pub fn schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.schema_name = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>The name of the schema.</p>
128    pub fn set_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.schema_name = input;
130        self
131    }
132    /// <p>The name of the schema.</p>
133    pub fn get_schema_name(&self) -> &::std::option::Option<::std::string::String> {
134        &self.schema_name
135    }
136    /// <p>The schema type for the events schema.</p>
137    pub fn r#type(mut self, input: crate::types::Type) -> Self {
138        self.r#type = ::std::option::Option::Some(input);
139        self
140    }
141    /// <p>The schema type for the events schema.</p>
142    pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
143        self.r#type = input;
144        self
145    }
146    /// <p>The schema type for the events schema.</p>
147    pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
148        &self.r#type
149    }
150    /// Consumes the builder and constructs a [`UpdateSchemaInput`](crate::operation::update_schema::UpdateSchemaInput).
151    pub fn build(
152        self,
153    ) -> ::std::result::Result<crate::operation::update_schema::UpdateSchemaInput, ::aws_smithy_types::error::operation::BuildError> {
154        ::std::result::Result::Ok(crate::operation::update_schema::UpdateSchemaInput {
155            client_token_id: self.client_token_id,
156            content: self.content,
157            description: self.description,
158            registry_name: self.registry_name,
159            schema_name: self.schema_name,
160            r#type: self.r#type,
161        })
162    }
163}