aws_sdk_customerprofiles/operation/get_profile_object_type_template/
_get_profile_object_type_template_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetProfileObjectTypeTemplateOutput {
6 pub template_id: ::std::option::Option<::std::string::String>,
8 pub source_name: ::std::option::Option<::std::string::String>,
10 pub source_object: ::std::option::Option<::std::string::String>,
12 pub allow_profile_creation: bool,
14 pub source_last_updated_timestamp_format: ::std::option::Option<::std::string::String>,
16 pub fields: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>>,
18 pub keys: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>>,
20 _request_id: Option<String>,
21}
22impl GetProfileObjectTypeTemplateOutput {
23 pub fn template_id(&self) -> ::std::option::Option<&str> {
25 self.template_id.as_deref()
26 }
27 pub fn source_name(&self) -> ::std::option::Option<&str> {
29 self.source_name.as_deref()
30 }
31 pub fn source_object(&self) -> ::std::option::Option<&str> {
33 self.source_object.as_deref()
34 }
35 pub fn allow_profile_creation(&self) -> bool {
37 self.allow_profile_creation
38 }
39 pub fn source_last_updated_timestamp_format(&self) -> ::std::option::Option<&str> {
41 self.source_last_updated_timestamp_format.as_deref()
42 }
43 pub fn fields(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>> {
45 self.fields.as_ref()
46 }
47 pub fn keys(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>> {
49 self.keys.as_ref()
50 }
51}
52impl ::std::fmt::Debug for GetProfileObjectTypeTemplateOutput {
53 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
54 let mut formatter = f.debug_struct("GetProfileObjectTypeTemplateOutput");
55 formatter.field("template_id", &self.template_id);
56 formatter.field("source_name", &self.source_name);
57 formatter.field("source_object", &self.source_object);
58 formatter.field("allow_profile_creation", &self.allow_profile_creation);
59 formatter.field("source_last_updated_timestamp_format", &self.source_last_updated_timestamp_format);
60 formatter.field("fields", &"*** Sensitive Data Redacted ***");
61 formatter.field("keys", &"*** Sensitive Data Redacted ***");
62 formatter.field("_request_id", &self._request_id);
63 formatter.finish()
64 }
65}
66impl ::aws_types::request_id::RequestId for GetProfileObjectTypeTemplateOutput {
67 fn request_id(&self) -> Option<&str> {
68 self._request_id.as_deref()
69 }
70}
71impl GetProfileObjectTypeTemplateOutput {
72 pub fn builder() -> crate::operation::get_profile_object_type_template::builders::GetProfileObjectTypeTemplateOutputBuilder {
74 crate::operation::get_profile_object_type_template::builders::GetProfileObjectTypeTemplateOutputBuilder::default()
75 }
76}
77
78#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
80#[non_exhaustive]
81pub struct GetProfileObjectTypeTemplateOutputBuilder {
82 pub(crate) template_id: ::std::option::Option<::std::string::String>,
83 pub(crate) source_name: ::std::option::Option<::std::string::String>,
84 pub(crate) source_object: ::std::option::Option<::std::string::String>,
85 pub(crate) allow_profile_creation: ::std::option::Option<bool>,
86 pub(crate) source_last_updated_timestamp_format: ::std::option::Option<::std::string::String>,
87 pub(crate) fields: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>>,
88 pub(crate) keys: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>>,
89 _request_id: Option<String>,
90}
91impl GetProfileObjectTypeTemplateOutputBuilder {
92 pub fn template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.template_id = ::std::option::Option::Some(input.into());
95 self
96 }
97 pub fn set_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.template_id = input;
100 self
101 }
102 pub fn get_template_id(&self) -> &::std::option::Option<::std::string::String> {
104 &self.template_id
105 }
106 pub fn source_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 self.source_name = ::std::option::Option::Some(input.into());
109 self
110 }
111 pub fn set_source_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.source_name = input;
114 self
115 }
116 pub fn get_source_name(&self) -> &::std::option::Option<::std::string::String> {
118 &self.source_name
119 }
120 pub fn source_object(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.source_object = ::std::option::Option::Some(input.into());
123 self
124 }
125 pub fn set_source_object(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.source_object = input;
128 self
129 }
130 pub fn get_source_object(&self) -> &::std::option::Option<::std::string::String> {
132 &self.source_object
133 }
134 pub fn allow_profile_creation(mut self, input: bool) -> Self {
136 self.allow_profile_creation = ::std::option::Option::Some(input);
137 self
138 }
139 pub fn set_allow_profile_creation(mut self, input: ::std::option::Option<bool>) -> Self {
141 self.allow_profile_creation = input;
142 self
143 }
144 pub fn get_allow_profile_creation(&self) -> &::std::option::Option<bool> {
146 &self.allow_profile_creation
147 }
148 pub fn source_last_updated_timestamp_format(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.source_last_updated_timestamp_format = ::std::option::Option::Some(input.into());
151 self
152 }
153 pub fn set_source_last_updated_timestamp_format(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.source_last_updated_timestamp_format = input;
156 self
157 }
158 pub fn get_source_last_updated_timestamp_format(&self) -> &::std::option::Option<::std::string::String> {
160 &self.source_last_updated_timestamp_format
161 }
162 pub fn fields(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ObjectTypeField) -> Self {
168 let mut hash_map = self.fields.unwrap_or_default();
169 hash_map.insert(k.into(), v);
170 self.fields = ::std::option::Option::Some(hash_map);
171 self
172 }
173 pub fn set_fields(
175 mut self,
176 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>>,
177 ) -> Self {
178 self.fields = input;
179 self
180 }
181 pub fn get_fields(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>> {
183 &self.fields
184 }
185 pub fn keys(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<crate::types::ObjectTypeKey>) -> Self {
191 let mut hash_map = self.keys.unwrap_or_default();
192 hash_map.insert(k.into(), v);
193 self.keys = ::std::option::Option::Some(hash_map);
194 self
195 }
196 pub fn set_keys(
198 mut self,
199 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>>,
200 ) -> Self {
201 self.keys = input;
202 self
203 }
204 pub fn get_keys(
206 &self,
207 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>> {
208 &self.keys
209 }
210 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
211 self._request_id = Some(request_id.into());
212 self
213 }
214
215 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
216 self._request_id = request_id;
217 self
218 }
219 pub fn build(self) -> crate::operation::get_profile_object_type_template::GetProfileObjectTypeTemplateOutput {
221 crate::operation::get_profile_object_type_template::GetProfileObjectTypeTemplateOutput {
222 template_id: self.template_id,
223 source_name: self.source_name,
224 source_object: self.source_object,
225 allow_profile_creation: self.allow_profile_creation.unwrap_or_default(),
226 source_last_updated_timestamp_format: self.source_last_updated_timestamp_format,
227 fields: self.fields,
228 keys: self.keys,
229 _request_id: self._request_id,
230 }
231 }
232}
233impl ::std::fmt::Debug for GetProfileObjectTypeTemplateOutputBuilder {
234 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
235 let mut formatter = f.debug_struct("GetProfileObjectTypeTemplateOutputBuilder");
236 formatter.field("template_id", &self.template_id);
237 formatter.field("source_name", &self.source_name);
238 formatter.field("source_object", &self.source_object);
239 formatter.field("allow_profile_creation", &self.allow_profile_creation);
240 formatter.field("source_last_updated_timestamp_format", &self.source_last_updated_timestamp_format);
241 formatter.field("fields", &"*** Sensitive Data Redacted ***");
242 formatter.field("keys", &"*** Sensitive Data Redacted ***");
243 formatter.field("_request_id", &self._request_id);
244 formatter.finish()
245 }
246}