aws_sdk_connectcampaignsv2/operation/create_campaign/
_create_campaign_input.rs#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateCampaignInput {
pub name: ::std::option::Option<::std::string::String>,
pub connect_instance_id: ::std::option::Option<::std::string::String>,
pub channel_subtype_config: ::std::option::Option<crate::types::ChannelSubtypeConfig>,
pub source: ::std::option::Option<crate::types::Source>,
pub connect_campaign_flow_arn: ::std::option::Option<::std::string::String>,
pub schedule: ::std::option::Option<crate::types::Schedule>,
pub communication_time_config: ::std::option::Option<crate::types::CommunicationTimeConfig>,
pub communication_limits_override: ::std::option::Option<crate::types::CommunicationLimitsConfig>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateCampaignInput {
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn connect_instance_id(&self) -> ::std::option::Option<&str> {
self.connect_instance_id.as_deref()
}
pub fn channel_subtype_config(&self) -> ::std::option::Option<&crate::types::ChannelSubtypeConfig> {
self.channel_subtype_config.as_ref()
}
pub fn source(&self) -> ::std::option::Option<&crate::types::Source> {
self.source.as_ref()
}
pub fn connect_campaign_flow_arn(&self) -> ::std::option::Option<&str> {
self.connect_campaign_flow_arn.as_deref()
}
pub fn schedule(&self) -> ::std::option::Option<&crate::types::Schedule> {
self.schedule.as_ref()
}
pub fn communication_time_config(&self) -> ::std::option::Option<&crate::types::CommunicationTimeConfig> {
self.communication_time_config.as_ref()
}
pub fn communication_limits_override(&self) -> ::std::option::Option<&crate::types::CommunicationLimitsConfig> {
self.communication_limits_override.as_ref()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl CreateCampaignInput {
pub fn builder() -> crate::operation::create_campaign::builders::CreateCampaignInputBuilder {
crate::operation::create_campaign::builders::CreateCampaignInputBuilder::default()
}
}
#[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 {
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
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
}
pub fn set_connect_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.connect_instance_id = input;
self
}
pub fn get_connect_instance_id(&self) -> &::std::option::Option<::std::string::String> {
&self.connect_instance_id
}
pub fn channel_subtype_config(mut self, input: crate::types::ChannelSubtypeConfig) -> Self {
self.channel_subtype_config = ::std::option::Option::Some(input);
self
}
pub fn set_channel_subtype_config(mut self, input: ::std::option::Option<crate::types::ChannelSubtypeConfig>) -> Self {
self.channel_subtype_config = input;
self
}
pub fn get_channel_subtype_config(&self) -> &::std::option::Option<crate::types::ChannelSubtypeConfig> {
&self.channel_subtype_config
}
pub fn source(mut self, input: crate::types::Source) -> Self {
self.source = ::std::option::Option::Some(input);
self
}
pub fn set_source(mut self, input: ::std::option::Option<crate::types::Source>) -> Self {
self.source = input;
self
}
pub fn get_source(&self) -> &::std::option::Option<crate::types::Source> {
&self.source
}
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
}
pub fn set_connect_campaign_flow_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.connect_campaign_flow_arn = input;
self
}
pub fn get_connect_campaign_flow_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.connect_campaign_flow_arn
}
pub fn schedule(mut self, input: crate::types::Schedule) -> Self {
self.schedule = ::std::option::Option::Some(input);
self
}
pub fn set_schedule(mut self, input: ::std::option::Option<crate::types::Schedule>) -> Self {
self.schedule = input;
self
}
pub fn get_schedule(&self) -> &::std::option::Option<crate::types::Schedule> {
&self.schedule
}
pub fn communication_time_config(mut self, input: crate::types::CommunicationTimeConfig) -> Self {
self.communication_time_config = ::std::option::Option::Some(input);
self
}
pub fn set_communication_time_config(mut self, input: ::std::option::Option<crate::types::CommunicationTimeConfig>) -> Self {
self.communication_time_config = input;
self
}
pub fn get_communication_time_config(&self) -> &::std::option::Option<crate::types::CommunicationTimeConfig> {
&self.communication_time_config
}
pub fn communication_limits_override(mut self, input: crate::types::CommunicationLimitsConfig) -> Self {
self.communication_limits_override = ::std::option::Option::Some(input);
self
}
pub fn set_communication_limits_override(mut self, input: ::std::option::Option<crate::types::CommunicationLimitsConfig>) -> Self {
self.communication_limits_override = input;
self
}
pub fn get_communication_limits_override(&self) -> &::std::option::Option<crate::types::CommunicationLimitsConfig> {
&self.communication_limits_override
}
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
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
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,
})
}
}