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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct MergeProfilesInput {
    /// <p>The unique name of the domain.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the profile to be taken.</p>
    pub main_profile_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the profile to be merged into MainProfileId.</p>
    pub profile_ids_to_be_merged: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The identifiers of the fields in the profile that has the information you want to apply to the merge. For example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier of the EmailAddress field in Profile1.</p>
    pub field_source_profile_ids: ::std::option::Option<crate::types::FieldSourceProfileIds>,
}
impl MergeProfilesInput {
    /// <p>The unique name of the domain.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The identifier of the profile to be taken.</p>
    pub fn main_profile_id(&self) -> ::std::option::Option<&str> {
        self.main_profile_id.as_deref()
    }
    /// <p>The identifier of the profile to be merged into MainProfileId.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.profile_ids_to_be_merged.is_none()`.
    pub fn profile_ids_to_be_merged(&self) -> &[::std::string::String] {
        self.profile_ids_to_be_merged.as_deref().unwrap_or_default()
    }
    /// <p>The identifiers of the fields in the profile that has the information you want to apply to the merge. For example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier of the EmailAddress field in Profile1.</p>
    pub fn field_source_profile_ids(&self) -> ::std::option::Option<&crate::types::FieldSourceProfileIds> {
        self.field_source_profile_ids.as_ref()
    }
}
impl MergeProfilesInput {
    /// Creates a new builder-style object to manufacture [`MergeProfilesInput`](crate::operation::merge_profiles::MergeProfilesInput).
    pub fn builder() -> crate::operation::merge_profiles::builders::MergeProfilesInputBuilder {
        crate::operation::merge_profiles::builders::MergeProfilesInputBuilder::default()
    }
}

/// A builder for [`MergeProfilesInput`](crate::operation::merge_profiles::MergeProfilesInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct MergeProfilesInputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) main_profile_id: ::std::option::Option<::std::string::String>,
    pub(crate) profile_ids_to_be_merged: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) field_source_profile_ids: ::std::option::Option<crate::types::FieldSourceProfileIds>,
}
impl MergeProfilesInputBuilder {
    /// <p>The unique name of the domain.</p>
    /// This field is required.
    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique name of the domain.</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>The unique name of the domain.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The identifier of the profile to be taken.</p>
    /// This field is required.
    pub fn main_profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.main_profile_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the profile to be taken.</p>
    pub fn set_main_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.main_profile_id = input;
        self
    }
    /// <p>The identifier of the profile to be taken.</p>
    pub fn get_main_profile_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.main_profile_id
    }
    /// Appends an item to `profile_ids_to_be_merged`.
    ///
    /// To override the contents of this collection use [`set_profile_ids_to_be_merged`](Self::set_profile_ids_to_be_merged).
    ///
    /// <p>The identifier of the profile to be merged into MainProfileId.</p>
    pub fn profile_ids_to_be_merged(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.profile_ids_to_be_merged.unwrap_or_default();
        v.push(input.into());
        self.profile_ids_to_be_merged = ::std::option::Option::Some(v);
        self
    }
    /// <p>The identifier of the profile to be merged into MainProfileId.</p>
    pub fn set_profile_ids_to_be_merged(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.profile_ids_to_be_merged = input;
        self
    }
    /// <p>The identifier of the profile to be merged into MainProfileId.</p>
    pub fn get_profile_ids_to_be_merged(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.profile_ids_to_be_merged
    }
    /// <p>The identifiers of the fields in the profile that has the information you want to apply to the merge. For example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier of the EmailAddress field in Profile1.</p>
    pub fn field_source_profile_ids(mut self, input: crate::types::FieldSourceProfileIds) -> Self {
        self.field_source_profile_ids = ::std::option::Option::Some(input);
        self
    }
    /// <p>The identifiers of the fields in the profile that has the information you want to apply to the merge. For example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier of the EmailAddress field in Profile1.</p>
    pub fn set_field_source_profile_ids(mut self, input: ::std::option::Option<crate::types::FieldSourceProfileIds>) -> Self {
        self.field_source_profile_ids = input;
        self
    }
    /// <p>The identifiers of the fields in the profile that has the information you want to apply to the merge. For example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier of the EmailAddress field in Profile1.</p>
    pub fn get_field_source_profile_ids(&self) -> &::std::option::Option<crate::types::FieldSourceProfileIds> {
        &self.field_source_profile_ids
    }
    /// Consumes the builder and constructs a [`MergeProfilesInput`](crate::operation::merge_profiles::MergeProfilesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::merge_profiles::MergeProfilesInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::merge_profiles::MergeProfilesInput {
            domain_name: self.domain_name,
            main_profile_id: self.main_profile_id,
            profile_ids_to_be_merged: self.profile_ids_to_be_merged,
            field_source_profile_ids: self.field_source_profile_ids,
        })
    }
}