aws_sdk_customerprofiles/operation/detect_profile_object_type/
_detect_profile_object_type_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct DetectProfileObjectTypeInput {
6 pub objects: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8 pub domain_name: ::std::option::Option<::std::string::String>,
10}
11impl DetectProfileObjectTypeInput {
12 pub fn objects(&self) -> &[::std::string::String] {
16 self.objects.as_deref().unwrap_or_default()
17 }
18 pub fn domain_name(&self) -> ::std::option::Option<&str> {
20 self.domain_name.as_deref()
21 }
22}
23impl ::std::fmt::Debug for DetectProfileObjectTypeInput {
24 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25 let mut formatter = f.debug_struct("DetectProfileObjectTypeInput");
26 formatter.field("objects", &"*** Sensitive Data Redacted ***");
27 formatter.field("domain_name", &self.domain_name);
28 formatter.finish()
29 }
30}
31impl DetectProfileObjectTypeInput {
32 pub fn builder() -> crate::operation::detect_profile_object_type::builders::DetectProfileObjectTypeInputBuilder {
34 crate::operation::detect_profile_object_type::builders::DetectProfileObjectTypeInputBuilder::default()
35 }
36}
37
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
40#[non_exhaustive]
41pub struct DetectProfileObjectTypeInputBuilder {
42 pub(crate) objects: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
43 pub(crate) domain_name: ::std::option::Option<::std::string::String>,
44}
45impl DetectProfileObjectTypeInputBuilder {
46 pub fn objects(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52 let mut v = self.objects.unwrap_or_default();
53 v.push(input.into());
54 self.objects = ::std::option::Option::Some(v);
55 self
56 }
57 pub fn set_objects(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
59 self.objects = input;
60 self
61 }
62 pub fn get_objects(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
64 &self.objects
65 }
66 pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.domain_name = ::std::option::Option::Some(input.into());
70 self
71 }
72 pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.domain_name = input;
75 self
76 }
77 pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
79 &self.domain_name
80 }
81 pub fn build(
83 self,
84 ) -> ::std::result::Result<
85 crate::operation::detect_profile_object_type::DetectProfileObjectTypeInput,
86 ::aws_smithy_types::error::operation::BuildError,
87 > {
88 ::std::result::Result::Ok(crate::operation::detect_profile_object_type::DetectProfileObjectTypeInput {
89 objects: self.objects,
90 domain_name: self.domain_name,
91 })
92 }
93}
94impl ::std::fmt::Debug for DetectProfileObjectTypeInputBuilder {
95 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
96 let mut formatter = f.debug_struct("DetectProfileObjectTypeInputBuilder");
97 formatter.field("objects", &"*** Sensitive Data Redacted ***");
98 formatter.field("domain_name", &self.domain_name);
99 formatter.finish()
100 }
101}