1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains <code>ProfileObjectType</code> mapping information from the model.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct DetectedProfileObjectType {
    /// <p>The format of <code>sourceLastUpdatedTimestamp</code> that was detected in fields.</p>
    pub source_last_updated_timestamp_format: ::std::option::Option<::std::string::String>,
    /// <p>A map of the name and the <code>ObjectType</code> field.</p>
    pub fields: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>>,
    /// <p>A list of unique keys that can be used to map data to a profile.</p>
    pub keys: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>>,
}
impl DetectedProfileObjectType {
    /// <p>The format of <code>sourceLastUpdatedTimestamp</code> that was detected in fields.</p>
    pub fn source_last_updated_timestamp_format(&self) -> ::std::option::Option<&str> {
        self.source_last_updated_timestamp_format.as_deref()
    }
    /// <p>A map of the name and the <code>ObjectType</code> field.</p>
    pub fn fields(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>> {
        self.fields.as_ref()
    }
    /// <p>A list of unique keys that can be used to map data to a profile.</p>
    pub fn keys(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>> {
        self.keys.as_ref()
    }
}
impl ::std::fmt::Debug for DetectedProfileObjectType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("DetectedProfileObjectType");
        formatter.field("source_last_updated_timestamp_format", &self.source_last_updated_timestamp_format);
        formatter.field("fields", &"*** Sensitive Data Redacted ***");
        formatter.field("keys", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl DetectedProfileObjectType {
    /// Creates a new builder-style object to manufacture [`DetectedProfileObjectType`](crate::types::DetectedProfileObjectType).
    pub fn builder() -> crate::types::builders::DetectedProfileObjectTypeBuilder {
        crate::types::builders::DetectedProfileObjectTypeBuilder::default()
    }
}

/// A builder for [`DetectedProfileObjectType`](crate::types::DetectedProfileObjectType).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct DetectedProfileObjectTypeBuilder {
    pub(crate) source_last_updated_timestamp_format: ::std::option::Option<::std::string::String>,
    pub(crate) fields: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>>,
    pub(crate) keys: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>>,
}
impl DetectedProfileObjectTypeBuilder {
    /// <p>The format of <code>sourceLastUpdatedTimestamp</code> that was detected in fields.</p>
    pub fn source_last_updated_timestamp_format(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_last_updated_timestamp_format = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The format of <code>sourceLastUpdatedTimestamp</code> that was detected in fields.</p>
    pub fn set_source_last_updated_timestamp_format(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_last_updated_timestamp_format = input;
        self
    }
    /// <p>The format of <code>sourceLastUpdatedTimestamp</code> that was detected in fields.</p>
    pub fn get_source_last_updated_timestamp_format(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_last_updated_timestamp_format
    }
    /// Adds a key-value pair to `fields`.
    ///
    /// To override the contents of this collection use [`set_fields`](Self::set_fields).
    ///
    /// <p>A map of the name and the <code>ObjectType</code> field.</p>
    pub fn fields(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ObjectTypeField) -> Self {
        let mut hash_map = self.fields.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.fields = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A map of the name and the <code>ObjectType</code> field.</p>
    pub fn set_fields(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>>,
    ) -> Self {
        self.fields = input;
        self
    }
    /// <p>A map of the name and the <code>ObjectType</code> field.</p>
    pub fn get_fields(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>> {
        &self.fields
    }
    /// Adds a key-value pair to `keys`.
    ///
    /// To override the contents of this collection use [`set_keys`](Self::set_keys).
    ///
    /// <p>A list of unique keys that can be used to map data to a profile.</p>
    pub fn keys(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<crate::types::ObjectTypeKey>) -> Self {
        let mut hash_map = self.keys.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.keys = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A list of unique keys that can be used to map data to a profile.</p>
    pub fn set_keys(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>>,
    ) -> Self {
        self.keys = input;
        self
    }
    /// <p>A list of unique keys that can be used to map data to a profile.</p>
    pub fn get_keys(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>> {
        &self.keys
    }
    /// Consumes the builder and constructs a [`DetectedProfileObjectType`](crate::types::DetectedProfileObjectType).
    pub fn build(self) -> crate::types::DetectedProfileObjectType {
        crate::types::DetectedProfileObjectType {
            source_last_updated_timestamp_format: self.source_last_updated_timestamp_format,
            fields: self.fields,
            keys: self.keys,
        }
    }
}
impl ::std::fmt::Debug for DetectedProfileObjectTypeBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("DetectedProfileObjectTypeBuilder");
        formatter.field("source_last_updated_timestamp_format", &self.source_last_updated_timestamp_format);
        formatter.field("fields", &"*** Sensitive Data Redacted ***");
        formatter.field("keys", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}