aws_sdk_connectcampaignsv2/operation/create_campaign/
_create_campaign_input.rs

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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// The request for CreateCampaign API.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateCampaignInput {
    /// The name of an Amazon Connect Campaign name.
    pub name: ::std::option::Option<::std::string::String>,
    /// Amazon Connect Instance Id
    pub connect_instance_id: ::std::option::Option<::std::string::String>,
    /// Campaign Channel Subtype config
    pub channel_subtype_config: ::std::option::Option<crate::types::ChannelSubtypeConfig>,
    /// Source of the campaign
    pub source: ::std::option::Option<crate::types::Source>,
    /// Amazon Resource Names(ARN)
    pub connect_campaign_flow_arn: ::std::option::Option<::std::string::String>,
    /// Campaign schedule
    pub schedule: ::std::option::Option<crate::types::Schedule>,
    /// Campaign communication time config
    pub communication_time_config: ::std::option::Option<crate::types::CommunicationTimeConfig>,
    /// Communication limits config
    pub communication_limits_override: ::std::option::Option<crate::types::CommunicationLimitsConfig>,
    /// Tag map with key and value.
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateCampaignInput {
    /// The name of an Amazon Connect Campaign name.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// Amazon Connect Instance Id
    pub fn connect_instance_id(&self) -> ::std::option::Option<&str> {
        self.connect_instance_id.as_deref()
    }
    /// Campaign Channel Subtype config
    pub fn channel_subtype_config(&self) -> ::std::option::Option<&crate::types::ChannelSubtypeConfig> {
        self.channel_subtype_config.as_ref()
    }
    /// Source of the campaign
    pub fn source(&self) -> ::std::option::Option<&crate::types::Source> {
        self.source.as_ref()
    }
    /// Amazon Resource Names(ARN)
    pub fn connect_campaign_flow_arn(&self) -> ::std::option::Option<&str> {
        self.connect_campaign_flow_arn.as_deref()
    }
    /// Campaign schedule
    pub fn schedule(&self) -> ::std::option::Option<&crate::types::Schedule> {
        self.schedule.as_ref()
    }
    /// Campaign communication time config
    pub fn communication_time_config(&self) -> ::std::option::Option<&crate::types::CommunicationTimeConfig> {
        self.communication_time_config.as_ref()
    }
    /// Communication limits config
    pub fn communication_limits_override(&self) -> ::std::option::Option<&crate::types::CommunicationLimitsConfig> {
        self.communication_limits_override.as_ref()
    }
    /// Tag map with key and value.
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreateCampaignInput {
    /// Creates a new builder-style object to manufacture [`CreateCampaignInput`](crate::operation::create_campaign::CreateCampaignInput).
    pub fn builder() -> crate::operation::create_campaign::builders::CreateCampaignInputBuilder {
        crate::operation::create_campaign::builders::CreateCampaignInputBuilder::default()
    }
}

/// A builder for [`CreateCampaignInput`](crate::operation::create_campaign::CreateCampaignInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateCampaignInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) connect_instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) channel_subtype_config: ::std::option::Option<crate::types::ChannelSubtypeConfig>,
    pub(crate) source: ::std::option::Option<crate::types::Source>,
    pub(crate) connect_campaign_flow_arn: ::std::option::Option<::std::string::String>,
    pub(crate) schedule: ::std::option::Option<crate::types::Schedule>,
    pub(crate) communication_time_config: ::std::option::Option<crate::types::CommunicationTimeConfig>,
    pub(crate) communication_limits_override: ::std::option::Option<crate::types::CommunicationLimitsConfig>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateCampaignInputBuilder {
    /// The name of an Amazon Connect Campaign name.
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// The name of an Amazon Connect Campaign name.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The name of an Amazon Connect Campaign name.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Amazon Connect Instance Id
    /// This field is required.
    pub fn connect_instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connect_instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// Amazon Connect Instance Id
    pub fn set_connect_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connect_instance_id = input;
        self
    }
    /// Amazon Connect Instance Id
    pub fn get_connect_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.connect_instance_id
    }
    /// Campaign Channel Subtype config
    /// This field is required.
    pub fn channel_subtype_config(mut self, input: crate::types::ChannelSubtypeConfig) -> Self {
        self.channel_subtype_config = ::std::option::Option::Some(input);
        self
    }
    /// Campaign Channel Subtype config
    pub fn set_channel_subtype_config(mut self, input: ::std::option::Option<crate::types::ChannelSubtypeConfig>) -> Self {
        self.channel_subtype_config = input;
        self
    }
    /// Campaign Channel Subtype config
    pub fn get_channel_subtype_config(&self) -> &::std::option::Option<crate::types::ChannelSubtypeConfig> {
        &self.channel_subtype_config
    }
    /// Source of the campaign
    pub fn source(mut self, input: crate::types::Source) -> Self {
        self.source = ::std::option::Option::Some(input);
        self
    }
    /// Source of the campaign
    pub fn set_source(mut self, input: ::std::option::Option<crate::types::Source>) -> Self {
        self.source = input;
        self
    }
    /// Source of the campaign
    pub fn get_source(&self) -> &::std::option::Option<crate::types::Source> {
        &self.source
    }
    /// Amazon Resource Names(ARN)
    pub fn connect_campaign_flow_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connect_campaign_flow_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// Amazon Resource Names(ARN)
    pub fn set_connect_campaign_flow_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connect_campaign_flow_arn = input;
        self
    }
    /// Amazon Resource Names(ARN)
    pub fn get_connect_campaign_flow_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.connect_campaign_flow_arn
    }
    /// Campaign schedule
    pub fn schedule(mut self, input: crate::types::Schedule) -> Self {
        self.schedule = ::std::option::Option::Some(input);
        self
    }
    /// Campaign schedule
    pub fn set_schedule(mut self, input: ::std::option::Option<crate::types::Schedule>) -> Self {
        self.schedule = input;
        self
    }
    /// Campaign schedule
    pub fn get_schedule(&self) -> &::std::option::Option<crate::types::Schedule> {
        &self.schedule
    }
    /// Campaign communication time config
    pub fn communication_time_config(mut self, input: crate::types::CommunicationTimeConfig) -> Self {
        self.communication_time_config = ::std::option::Option::Some(input);
        self
    }
    /// Campaign communication time config
    pub fn set_communication_time_config(mut self, input: ::std::option::Option<crate::types::CommunicationTimeConfig>) -> Self {
        self.communication_time_config = input;
        self
    }
    /// Campaign communication time config
    pub fn get_communication_time_config(&self) -> &::std::option::Option<crate::types::CommunicationTimeConfig> {
        &self.communication_time_config
    }
    /// Communication limits config
    pub fn communication_limits_override(mut self, input: crate::types::CommunicationLimitsConfig) -> Self {
        self.communication_limits_override = ::std::option::Option::Some(input);
        self
    }
    /// Communication limits config
    pub fn set_communication_limits_override(mut self, input: ::std::option::Option<crate::types::CommunicationLimitsConfig>) -> Self {
        self.communication_limits_override = input;
        self
    }
    /// Communication limits config
    pub fn get_communication_limits_override(&self) -> &::std::option::Option<crate::types::CommunicationLimitsConfig> {
        &self.communication_limits_override
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// Tag map with key and value.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// Tag map with key and value.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// Tag map with key and value.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateCampaignInput`](crate::operation::create_campaign::CreateCampaignInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_campaign::CreateCampaignInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_campaign::CreateCampaignInput {
            name: self.name,
            connect_instance_id: self.connect_instance_id,
            channel_subtype_config: self.channel_subtype_config,
            source: self.source,
            connect_campaign_flow_arn: self.connect_campaign_flow_arn,
            schedule: self.schedule,
            communication_time_config: self.communication_time_config,
            communication_limits_override: self.communication_limits_override,
            tags: self.tags,
        })
    }
}