aws_sdk_entityresolution/operation/update_schema_mapping/
_update_schema_mapping_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateSchemaMappingOutput {
6 pub schema_name: ::std::string::String,
8 pub schema_arn: ::std::string::String,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub mapped_input_fields: ::std::vec::Vec<crate::types::SchemaInputAttribute>,
14 _request_id: Option<String>,
15}
16impl UpdateSchemaMappingOutput {
17 pub fn schema_name(&self) -> &str {
19 use std::ops::Deref;
20 self.schema_name.deref()
21 }
22 pub fn schema_arn(&self) -> &str {
24 use std::ops::Deref;
25 self.schema_arn.deref()
26 }
27 pub fn description(&self) -> ::std::option::Option<&str> {
29 self.description.as_deref()
30 }
31 pub fn mapped_input_fields(&self) -> &[crate::types::SchemaInputAttribute] {
33 use std::ops::Deref;
34 self.mapped_input_fields.deref()
35 }
36}
37impl ::aws_types::request_id::RequestId for UpdateSchemaMappingOutput {
38 fn request_id(&self) -> Option<&str> {
39 self._request_id.as_deref()
40 }
41}
42impl UpdateSchemaMappingOutput {
43 pub fn builder() -> crate::operation::update_schema_mapping::builders::UpdateSchemaMappingOutputBuilder {
45 crate::operation::update_schema_mapping::builders::UpdateSchemaMappingOutputBuilder::default()
46 }
47}
48
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
51#[non_exhaustive]
52pub struct UpdateSchemaMappingOutputBuilder {
53 pub(crate) schema_name: ::std::option::Option<::std::string::String>,
54 pub(crate) schema_arn: ::std::option::Option<::std::string::String>,
55 pub(crate) description: ::std::option::Option<::std::string::String>,
56 pub(crate) mapped_input_fields: ::std::option::Option<::std::vec::Vec<crate::types::SchemaInputAttribute>>,
57 _request_id: Option<String>,
58}
59impl UpdateSchemaMappingOutputBuilder {
60 pub fn schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63 self.schema_name = ::std::option::Option::Some(input.into());
64 self
65 }
66 pub fn set_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68 self.schema_name = input;
69 self
70 }
71 pub fn get_schema_name(&self) -> &::std::option::Option<::std::string::String> {
73 &self.schema_name
74 }
75 pub fn schema_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78 self.schema_arn = ::std::option::Option::Some(input.into());
79 self
80 }
81 pub fn set_schema_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83 self.schema_arn = input;
84 self
85 }
86 pub fn get_schema_arn(&self) -> &::std::option::Option<::std::string::String> {
88 &self.schema_arn
89 }
90 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92 self.description = ::std::option::Option::Some(input.into());
93 self
94 }
95 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97 self.description = input;
98 self
99 }
100 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
102 &self.description
103 }
104 pub fn mapped_input_fields(mut self, input: crate::types::SchemaInputAttribute) -> Self {
110 let mut v = self.mapped_input_fields.unwrap_or_default();
111 v.push(input);
112 self.mapped_input_fields = ::std::option::Option::Some(v);
113 self
114 }
115 pub fn set_mapped_input_fields(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SchemaInputAttribute>>) -> Self {
117 self.mapped_input_fields = input;
118 self
119 }
120 pub fn get_mapped_input_fields(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SchemaInputAttribute>> {
122 &self.mapped_input_fields
123 }
124 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
125 self._request_id = Some(request_id.into());
126 self
127 }
128
129 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
130 self._request_id = request_id;
131 self
132 }
133 pub fn build(
139 self,
140 ) -> ::std::result::Result<crate::operation::update_schema_mapping::UpdateSchemaMappingOutput, ::aws_smithy_types::error::operation::BuildError>
141 {
142 ::std::result::Result::Ok(crate::operation::update_schema_mapping::UpdateSchemaMappingOutput {
143 schema_name: self.schema_name.ok_or_else(|| {
144 ::aws_smithy_types::error::operation::BuildError::missing_field(
145 "schema_name",
146 "schema_name was not specified but it is required when building UpdateSchemaMappingOutput",
147 )
148 })?,
149 schema_arn: self.schema_arn.ok_or_else(|| {
150 ::aws_smithy_types::error::operation::BuildError::missing_field(
151 "schema_arn",
152 "schema_arn was not specified but it is required when building UpdateSchemaMappingOutput",
153 )
154 })?,
155 description: self.description,
156 mapped_input_fields: self.mapped_input_fields.ok_or_else(|| {
157 ::aws_smithy_types::error::operation::BuildError::missing_field(
158 "mapped_input_fields",
159 "mapped_input_fields was not specified but it is required when building UpdateSchemaMappingOutput",
160 )
161 })?,
162 _request_id: self._request_id,
163 })
164 }
165}