aws_sdk_schemas/operation/describe_schema/
_describe_schema_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeSchemaOutput {
6 pub content: ::std::option::Option<::std::string::String>,
8 pub description: ::std::option::Option<::std::string::String>,
10 pub last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
12 pub schema_arn: ::std::option::Option<::std::string::String>,
14 pub schema_name: ::std::option::Option<::std::string::String>,
16 pub schema_version: ::std::option::Option<::std::string::String>,
18 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20 pub r#type: ::std::option::Option<::std::string::String>,
22 pub version_created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
24 _request_id: Option<String>,
25}
26impl DescribeSchemaOutput {
27 pub fn content(&self) -> ::std::option::Option<&str> {
29 self.content.as_deref()
30 }
31 pub fn description(&self) -> ::std::option::Option<&str> {
33 self.description.as_deref()
34 }
35 pub fn last_modified(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
37 self.last_modified.as_ref()
38 }
39 pub fn schema_arn(&self) -> ::std::option::Option<&str> {
41 self.schema_arn.as_deref()
42 }
43 pub fn schema_name(&self) -> ::std::option::Option<&str> {
45 self.schema_name.as_deref()
46 }
47 pub fn schema_version(&self) -> ::std::option::Option<&str> {
49 self.schema_version.as_deref()
50 }
51 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
53 self.tags.as_ref()
54 }
55 pub fn r#type(&self) -> ::std::option::Option<&str> {
57 self.r#type.as_deref()
58 }
59 pub fn version_created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61 self.version_created_date.as_ref()
62 }
63}
64impl ::aws_types::request_id::RequestId for DescribeSchemaOutput {
65 fn request_id(&self) -> Option<&str> {
66 self._request_id.as_deref()
67 }
68}
69impl DescribeSchemaOutput {
70 pub fn builder() -> crate::operation::describe_schema::builders::DescribeSchemaOutputBuilder {
72 crate::operation::describe_schema::builders::DescribeSchemaOutputBuilder::default()
73 }
74}
75
76#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
78#[non_exhaustive]
79pub struct DescribeSchemaOutputBuilder {
80 pub(crate) content: ::std::option::Option<::std::string::String>,
81 pub(crate) description: ::std::option::Option<::std::string::String>,
82 pub(crate) last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
83 pub(crate) schema_arn: ::std::option::Option<::std::string::String>,
84 pub(crate) schema_name: ::std::option::Option<::std::string::String>,
85 pub(crate) schema_version: ::std::option::Option<::std::string::String>,
86 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
87 pub(crate) r#type: ::std::option::Option<::std::string::String>,
88 pub(crate) version_created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
89 _request_id: Option<String>,
90}
91impl DescribeSchemaOutputBuilder {
92 pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.content = ::std::option::Option::Some(input.into());
95 self
96 }
97 pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.content = input;
100 self
101 }
102 pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
104 &self.content
105 }
106 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 self.description = ::std::option::Option::Some(input.into());
109 self
110 }
111 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.description = input;
114 self
115 }
116 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
118 &self.description
119 }
120 pub fn last_modified(mut self, input: ::aws_smithy_types::DateTime) -> Self {
122 self.last_modified = ::std::option::Option::Some(input);
123 self
124 }
125 pub fn set_last_modified(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
127 self.last_modified = input;
128 self
129 }
130 pub fn get_last_modified(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
132 &self.last_modified
133 }
134 pub fn schema_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136 self.schema_arn = ::std::option::Option::Some(input.into());
137 self
138 }
139 pub fn set_schema_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.schema_arn = input;
142 self
143 }
144 pub fn get_schema_arn(&self) -> &::std::option::Option<::std::string::String> {
146 &self.schema_arn
147 }
148 pub fn schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.schema_name = ::std::option::Option::Some(input.into());
151 self
152 }
153 pub fn set_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.schema_name = input;
156 self
157 }
158 pub fn get_schema_name(&self) -> &::std::option::Option<::std::string::String> {
160 &self.schema_name
161 }
162 pub fn schema_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164 self.schema_version = ::std::option::Option::Some(input.into());
165 self
166 }
167 pub fn set_schema_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169 self.schema_version = input;
170 self
171 }
172 pub fn get_schema_version(&self) -> &::std::option::Option<::std::string::String> {
174 &self.schema_version
175 }
176 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
182 let mut hash_map = self.tags.unwrap_or_default();
183 hash_map.insert(k.into(), v.into());
184 self.tags = ::std::option::Option::Some(hash_map);
185 self
186 }
187 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
189 self.tags = input;
190 self
191 }
192 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
194 &self.tags
195 }
196 pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
198 self.r#type = ::std::option::Option::Some(input.into());
199 self
200 }
201 pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
203 self.r#type = input;
204 self
205 }
206 pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
208 &self.r#type
209 }
210 pub fn version_created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
212 self.version_created_date = ::std::option::Option::Some(input);
213 self
214 }
215 pub fn set_version_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
217 self.version_created_date = input;
218 self
219 }
220 pub fn get_version_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
222 &self.version_created_date
223 }
224 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
225 self._request_id = Some(request_id.into());
226 self
227 }
228
229 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
230 self._request_id = request_id;
231 self
232 }
233 pub fn build(self) -> crate::operation::describe_schema::DescribeSchemaOutput {
235 crate::operation::describe_schema::DescribeSchemaOutput {
236 content: self.content,
237 description: self.description,
238 last_modified: self.last_modified,
239 schema_arn: self.schema_arn,
240 schema_name: self.schema_name,
241 schema_version: self.schema_version,
242 tags: self.tags,
243 r#type: self.r#type,
244 version_created_date: self.version_created_date,
245 _request_id: self._request_id,
246 }
247 }
248}