aws_sdk_schemas/operation/update_schema/
_update_schema_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateSchemaInput {
6 pub client_token_id: ::std::option::Option<::std::string::String>,
8 pub content: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub registry_name: ::std::option::Option<::std::string::String>,
14 pub schema_name: ::std::option::Option<::std::string::String>,
16 pub r#type: ::std::option::Option<crate::types::Type>,
18}
19impl UpdateSchemaInput {
20 pub fn client_token_id(&self) -> ::std::option::Option<&str> {
22 self.client_token_id.as_deref()
23 }
24 pub fn content(&self) -> ::std::option::Option<&str> {
26 self.content.as_deref()
27 }
28 pub fn description(&self) -> ::std::option::Option<&str> {
30 self.description.as_deref()
31 }
32 pub fn registry_name(&self) -> ::std::option::Option<&str> {
34 self.registry_name.as_deref()
35 }
36 pub fn schema_name(&self) -> ::std::option::Option<&str> {
38 self.schema_name.as_deref()
39 }
40 pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
42 self.r#type.as_ref()
43 }
44}
45impl UpdateSchemaInput {
46 pub fn builder() -> crate::operation::update_schema::builders::UpdateSchemaInputBuilder {
48 crate::operation::update_schema::builders::UpdateSchemaInputBuilder::default()
49 }
50}
51
52#[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 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 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 pub fn get_client_token_id(&self) -> &::std::option::Option<::std::string::String> {
76 &self.client_token_id
77 }
78 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 pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85 self.content = input;
86 self
87 }
88 pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
90 &self.content
91 }
92 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.description = input;
100 self
101 }
102 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
104 &self.description
105 }
106 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 pub fn set_registry_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114 self.registry_name = input;
115 self
116 }
117 pub fn get_registry_name(&self) -> &::std::option::Option<::std::string::String> {
119 &self.registry_name
120 }
121 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 pub fn set_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.schema_name = input;
130 self
131 }
132 pub fn get_schema_name(&self) -> &::std::option::Option<::std::string::String> {
134 &self.schema_name
135 }
136 pub fn r#type(mut self, input: crate::types::Type) -> Self {
138 self.r#type = ::std::option::Option::Some(input);
139 self
140 }
141 pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
143 self.r#type = input;
144 self
145 }
146 pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
148 &self.r#type
149 }
150 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}