aws_sdk_connectcampaigns/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 dialer_config: ::std::option::Option<crate::types::DialerConfig>,
pub outbound_call_config: ::std::option::Option<crate::types::OutboundCallConfig>,
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 dialer_config(&self) -> ::std::option::Option<&crate::types::DialerConfig> {
self.dialer_config.as_ref()
}
pub fn outbound_call_config(&self) -> ::std::option::Option<&crate::types::OutboundCallConfig> {
self.outbound_call_config.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) dialer_config: ::std::option::Option<crate::types::DialerConfig>,
pub(crate) outbound_call_config: ::std::option::Option<crate::types::OutboundCallConfig>,
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 dialer_config(mut self, input: crate::types::DialerConfig) -> Self {
self.dialer_config = ::std::option::Option::Some(input);
self
}
pub fn set_dialer_config(mut self, input: ::std::option::Option<crate::types::DialerConfig>) -> Self {
self.dialer_config = input;
self
}
pub fn get_dialer_config(&self) -> &::std::option::Option<crate::types::DialerConfig> {
&self.dialer_config
}
pub fn outbound_call_config(mut self, input: crate::types::OutboundCallConfig) -> Self {
self.outbound_call_config = ::std::option::Option::Some(input);
self
}
pub fn set_outbound_call_config(mut self, input: ::std::option::Option<crate::types::OutboundCallConfig>) -> Self {
self.outbound_call_config = input;
self
}
pub fn get_outbound_call_config(&self) -> &::std::option::Option<crate::types::OutboundCallConfig> {
&self.outbound_call_config
}
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,
dialer_config: self.dialer_config,
outbound_call_config: self.outbound_call_config,
tags: self.tags,
})
}
}