// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[derive(Debug)]
pub(crate) struct Handle {
pub(crate) client: aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
pub(crate) conf: crate::Config,
}
/// Client for AmazonConnectCampaignService
///
/// Client for invoking operations on AmazonConnectCampaignService. Each operation on AmazonConnectCampaignService is a method on this
/// this struct. `.send()` MUST be invoked on the generated operations to dispatch the request to the service.
///
/// # Examples
/// **Constructing a client and invoking an operation**
/// ```rust,no_run
/// # async fn docs() {
/// // create a shared configuration. This can be used & shared between multiple service clients.
/// let shared_config = aws_config::load_from_env().await;
/// let client = aws_sdk_connectcampaigns::Client::new(&shared_config);
/// // invoke an operation
/// /* let rsp = client
/// .<operation_name>().
/// .<param>("some value")
/// .send().await; */
/// # }
/// ```
/// **Constructing a client with custom configuration**
/// ```rust,no_run
/// use aws_config::retry::RetryConfig;
/// # async fn docs() {
/// let shared_config = aws_config::load_from_env().await;
/// let config = aws_sdk_connectcampaigns::config::Builder::from(&shared_config)
/// .retry_config(RetryConfig::disabled())
/// .build();
/// let client = aws_sdk_connectcampaigns::Client::from_conf(config);
/// # }
#[derive(std::fmt::Debug)]
pub struct Client {
handle: std::sync::Arc<Handle>,
}
impl std::clone::Clone for Client {
fn clone(&self) -> Self {
Self {
handle: self.handle.clone(),
}
}
}
#[doc(inline)]
pub use aws_smithy_client::Builder;
impl
From<
aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
> for Client
{
fn from(
client: aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
) -> Self {
Self::with_config(client, crate::Config::builder().build())
}
}
impl Client {
/// Creates a client with the given service configuration.
pub fn with_config(
client: aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
conf: crate::Config,
) -> Self {
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
/// Returns the client's configuration.
pub fn conf(&self) -> &crate::Config {
&self.handle.conf
}
}
impl Client {
/// Constructs a fluent builder for the [`CreateCampaign`](crate::client::fluent_builders::CreateCampaign) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::CreateCampaign::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::CreateCampaign::set_name): The name of an Amazon Connect Campaign name.
/// - [`connect_instance_id(impl Into<String>)`](crate::client::fluent_builders::CreateCampaign::connect_instance_id) / [`set_connect_instance_id(Option<String>)`](crate::client::fluent_builders::CreateCampaign::set_connect_instance_id): Amazon Connect Instance Id
/// - [`dialer_config(DialerConfig)`](crate::client::fluent_builders::CreateCampaign::dialer_config) / [`set_dialer_config(Option<DialerConfig>)`](crate::client::fluent_builders::CreateCampaign::set_dialer_config): The possible types of dialer config parameters
/// - [`outbound_call_config(OutboundCallConfig)`](crate::client::fluent_builders::CreateCampaign::outbound_call_config) / [`set_outbound_call_config(Option<OutboundCallConfig>)`](crate::client::fluent_builders::CreateCampaign::set_outbound_call_config): The configuration used for outbound calls.
/// - [`tags(HashMap<String, String>)`](crate::client::fluent_builders::CreateCampaign::tags) / [`set_tags(Option<HashMap<String, String>>)`](crate::client::fluent_builders::CreateCampaign::set_tags): Tag map with key and value.
/// - On success, responds with [`CreateCampaignOutput`](crate::output::CreateCampaignOutput) with field(s):
/// - [`id(Option<String>)`](crate::output::CreateCampaignOutput::id): Identifier representing a Campaign
/// - [`arn(Option<String>)`](crate::output::CreateCampaignOutput::arn): The resource name of an Amazon Connect campaign.
/// - [`tags(Option<HashMap<String, String>>)`](crate::output::CreateCampaignOutput::tags): Tag map with key and value.
/// - On failure, responds with [`SdkError<CreateCampaignError>`](crate::error::CreateCampaignError)
pub fn create_campaign(&self) -> fluent_builders::CreateCampaign {
fluent_builders::CreateCampaign::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeleteCampaign`](crate::client::fluent_builders::DeleteCampaign) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::DeleteCampaign::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::DeleteCampaign::set_id): Identifier representing a Campaign
/// - On success, responds with [`DeleteCampaignOutput`](crate::output::DeleteCampaignOutput)
/// - On failure, responds with [`SdkError<DeleteCampaignError>`](crate::error::DeleteCampaignError)
pub fn delete_campaign(&self) -> fluent_builders::DeleteCampaign {
fluent_builders::DeleteCampaign::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeleteConnectInstanceConfig`](crate::client::fluent_builders::DeleteConnectInstanceConfig) operation.
///
/// - The fluent builder is configurable:
/// - [`connect_instance_id(impl Into<String>)`](crate::client::fluent_builders::DeleteConnectInstanceConfig::connect_instance_id) / [`set_connect_instance_id(Option<String>)`](crate::client::fluent_builders::DeleteConnectInstanceConfig::set_connect_instance_id): Amazon Connect Instance Id
/// - On success, responds with [`DeleteConnectInstanceConfigOutput`](crate::output::DeleteConnectInstanceConfigOutput)
/// - On failure, responds with [`SdkError<DeleteConnectInstanceConfigError>`](crate::error::DeleteConnectInstanceConfigError)
pub fn delete_connect_instance_config(&self) -> fluent_builders::DeleteConnectInstanceConfig {
fluent_builders::DeleteConnectInstanceConfig::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeleteInstanceOnboardingJob`](crate::client::fluent_builders::DeleteInstanceOnboardingJob) operation.
///
/// - The fluent builder is configurable:
/// - [`connect_instance_id(impl Into<String>)`](crate::client::fluent_builders::DeleteInstanceOnboardingJob::connect_instance_id) / [`set_connect_instance_id(Option<String>)`](crate::client::fluent_builders::DeleteInstanceOnboardingJob::set_connect_instance_id): Amazon Connect Instance Id
/// - On success, responds with [`DeleteInstanceOnboardingJobOutput`](crate::output::DeleteInstanceOnboardingJobOutput)
/// - On failure, responds with [`SdkError<DeleteInstanceOnboardingJobError>`](crate::error::DeleteInstanceOnboardingJobError)
pub fn delete_instance_onboarding_job(&self) -> fluent_builders::DeleteInstanceOnboardingJob {
fluent_builders::DeleteInstanceOnboardingJob::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DescribeCampaign`](crate::client::fluent_builders::DescribeCampaign) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::DescribeCampaign::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::DescribeCampaign::set_id): Identifier representing a Campaign
/// - On success, responds with [`DescribeCampaignOutput`](crate::output::DescribeCampaignOutput) with field(s):
/// - [`campaign(Option<Campaign>)`](crate::output::DescribeCampaignOutput::campaign): An Amazon Connect campaign.
/// - On failure, responds with [`SdkError<DescribeCampaignError>`](crate::error::DescribeCampaignError)
pub fn describe_campaign(&self) -> fluent_builders::DescribeCampaign {
fluent_builders::DescribeCampaign::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetCampaignState`](crate::client::fluent_builders::GetCampaignState) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::GetCampaignState::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::GetCampaignState::set_id): Identifier representing a Campaign
/// - On success, responds with [`GetCampaignStateOutput`](crate::output::GetCampaignStateOutput) with field(s):
/// - [`state(Option<CampaignState>)`](crate::output::GetCampaignStateOutput::state): State of a campaign
/// - On failure, responds with [`SdkError<GetCampaignStateError>`](crate::error::GetCampaignStateError)
pub fn get_campaign_state(&self) -> fluent_builders::GetCampaignState {
fluent_builders::GetCampaignState::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetCampaignStateBatch`](crate::client::fluent_builders::GetCampaignStateBatch) operation.
///
/// - The fluent builder is configurable:
/// - [`campaign_ids(Vec<String>)`](crate::client::fluent_builders::GetCampaignStateBatch::campaign_ids) / [`set_campaign_ids(Option<Vec<String>>)`](crate::client::fluent_builders::GetCampaignStateBatch::set_campaign_ids): List of CampaignId
/// - On success, responds with [`GetCampaignStateBatchOutput`](crate::output::GetCampaignStateBatchOutput) with field(s):
/// - [`successful_requests(Option<Vec<SuccessfulCampaignStateResponse>>)`](crate::output::GetCampaignStateBatchOutput::successful_requests): List of successful response of campaign state
/// - [`failed_requests(Option<Vec<FailedCampaignStateResponse>>)`](crate::output::GetCampaignStateBatchOutput::failed_requests): List of failed requests of campaign state
/// - On failure, responds with [`SdkError<GetCampaignStateBatchError>`](crate::error::GetCampaignStateBatchError)
pub fn get_campaign_state_batch(&self) -> fluent_builders::GetCampaignStateBatch {
fluent_builders::GetCampaignStateBatch::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetConnectInstanceConfig`](crate::client::fluent_builders::GetConnectInstanceConfig) operation.
///
/// - The fluent builder is configurable:
/// - [`connect_instance_id(impl Into<String>)`](crate::client::fluent_builders::GetConnectInstanceConfig::connect_instance_id) / [`set_connect_instance_id(Option<String>)`](crate::client::fluent_builders::GetConnectInstanceConfig::set_connect_instance_id): Amazon Connect Instance Id
/// - On success, responds with [`GetConnectInstanceConfigOutput`](crate::output::GetConnectInstanceConfigOutput) with field(s):
/// - [`connect_instance_config(Option<InstanceConfig>)`](crate::output::GetConnectInstanceConfigOutput::connect_instance_config): Instance config object
/// - On failure, responds with [`SdkError<GetConnectInstanceConfigError>`](crate::error::GetConnectInstanceConfigError)
pub fn get_connect_instance_config(&self) -> fluent_builders::GetConnectInstanceConfig {
fluent_builders::GetConnectInstanceConfig::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetInstanceOnboardingJobStatus`](crate::client::fluent_builders::GetInstanceOnboardingJobStatus) operation.
///
/// - The fluent builder is configurable:
/// - [`connect_instance_id(impl Into<String>)`](crate::client::fluent_builders::GetInstanceOnboardingJobStatus::connect_instance_id) / [`set_connect_instance_id(Option<String>)`](crate::client::fluent_builders::GetInstanceOnboardingJobStatus::set_connect_instance_id): Amazon Connect Instance Id
/// - On success, responds with [`GetInstanceOnboardingJobStatusOutput`](crate::output::GetInstanceOnboardingJobStatusOutput) with field(s):
/// - [`connect_instance_onboarding_job_status(Option<InstanceOnboardingJobStatus>)`](crate::output::GetInstanceOnboardingJobStatusOutput::connect_instance_onboarding_job_status): Instance onboarding job status object
/// - On failure, responds with [`SdkError<GetInstanceOnboardingJobStatusError>`](crate::error::GetInstanceOnboardingJobStatusError)
pub fn get_instance_onboarding_job_status(
&self,
) -> fluent_builders::GetInstanceOnboardingJobStatus {
fluent_builders::GetInstanceOnboardingJobStatus::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListCampaigns`](crate::client::fluent_builders::ListCampaigns) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListCampaigns::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`max_results(i32)`](crate::client::fluent_builders::ListCampaigns::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListCampaigns::set_max_results): The maximum number of results to return per page.
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListCampaigns::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListCampaigns::set_next_token): The token for the next set of results.
/// - [`filters(CampaignFilters)`](crate::client::fluent_builders::ListCampaigns::filters) / [`set_filters(Option<CampaignFilters>)`](crate::client::fluent_builders::ListCampaigns::set_filters): Filter model by type
/// - On success, responds with [`ListCampaignsOutput`](crate::output::ListCampaignsOutput) with field(s):
/// - [`next_token(Option<String>)`](crate::output::ListCampaignsOutput::next_token): The token for the next set of results.
/// - [`campaign_summary_list(Option<Vec<CampaignSummary>>)`](crate::output::ListCampaignsOutput::campaign_summary_list): A list of Amazon Connect campaigns.
/// - On failure, responds with [`SdkError<ListCampaignsError>`](crate::error::ListCampaignsError)
pub fn list_campaigns(&self) -> fluent_builders::ListCampaigns {
fluent_builders::ListCampaigns::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListTagsForResource`](crate::client::fluent_builders::ListTagsForResource) operation.
///
/// - The fluent builder is configurable:
/// - [`arn(impl Into<String>)`](crate::client::fluent_builders::ListTagsForResource::arn) / [`set_arn(Option<String>)`](crate::client::fluent_builders::ListTagsForResource::set_arn): Arn
/// - On success, responds with [`ListTagsForResourceOutput`](crate::output::ListTagsForResourceOutput) with field(s):
/// - [`tags(Option<HashMap<String, String>>)`](crate::output::ListTagsForResourceOutput::tags): Tag map with key and value.
/// - On failure, responds with [`SdkError<ListTagsForResourceError>`](crate::error::ListTagsForResourceError)
pub fn list_tags_for_resource(&self) -> fluent_builders::ListTagsForResource {
fluent_builders::ListTagsForResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`PauseCampaign`](crate::client::fluent_builders::PauseCampaign) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::PauseCampaign::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::PauseCampaign::set_id): Identifier representing a Campaign
/// - On success, responds with [`PauseCampaignOutput`](crate::output::PauseCampaignOutput)
/// - On failure, responds with [`SdkError<PauseCampaignError>`](crate::error::PauseCampaignError)
pub fn pause_campaign(&self) -> fluent_builders::PauseCampaign {
fluent_builders::PauseCampaign::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`PutDialRequestBatch`](crate::client::fluent_builders::PutDialRequestBatch) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::PutDialRequestBatch::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::PutDialRequestBatch::set_id): Identifier representing a Campaign
/// - [`dial_requests(Vec<DialRequest>)`](crate::client::fluent_builders::PutDialRequestBatch::dial_requests) / [`set_dial_requests(Option<Vec<DialRequest>>)`](crate::client::fluent_builders::PutDialRequestBatch::set_dial_requests): A list of dial requests.
/// - On success, responds with [`PutDialRequestBatchOutput`](crate::output::PutDialRequestBatchOutput) with field(s):
/// - [`successful_requests(Option<Vec<SuccessfulRequest>>)`](crate::output::PutDialRequestBatchOutput::successful_requests): A list of successful requests identified by the unique client token.
/// - [`failed_requests(Option<Vec<FailedRequest>>)`](crate::output::PutDialRequestBatchOutput::failed_requests): A list of failed requests.
/// - On failure, responds with [`SdkError<PutDialRequestBatchError>`](crate::error::PutDialRequestBatchError)
pub fn put_dial_request_batch(&self) -> fluent_builders::PutDialRequestBatch {
fluent_builders::PutDialRequestBatch::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ResumeCampaign`](crate::client::fluent_builders::ResumeCampaign) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::ResumeCampaign::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::ResumeCampaign::set_id): Identifier representing a Campaign
/// - On success, responds with [`ResumeCampaignOutput`](crate::output::ResumeCampaignOutput)
/// - On failure, responds with [`SdkError<ResumeCampaignError>`](crate::error::ResumeCampaignError)
pub fn resume_campaign(&self) -> fluent_builders::ResumeCampaign {
fluent_builders::ResumeCampaign::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`StartCampaign`](crate::client::fluent_builders::StartCampaign) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::StartCampaign::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::StartCampaign::set_id): Identifier representing a Campaign
/// - On success, responds with [`StartCampaignOutput`](crate::output::StartCampaignOutput)
/// - On failure, responds with [`SdkError<StartCampaignError>`](crate::error::StartCampaignError)
pub fn start_campaign(&self) -> fluent_builders::StartCampaign {
fluent_builders::StartCampaign::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`StartInstanceOnboardingJob`](crate::client::fluent_builders::StartInstanceOnboardingJob) operation.
///
/// - The fluent builder is configurable:
/// - [`connect_instance_id(impl Into<String>)`](crate::client::fluent_builders::StartInstanceOnboardingJob::connect_instance_id) / [`set_connect_instance_id(Option<String>)`](crate::client::fluent_builders::StartInstanceOnboardingJob::set_connect_instance_id): Amazon Connect Instance Id
/// - [`encryption_config(EncryptionConfig)`](crate::client::fluent_builders::StartInstanceOnboardingJob::encryption_config) / [`set_encryption_config(Option<EncryptionConfig>)`](crate::client::fluent_builders::StartInstanceOnboardingJob::set_encryption_config): Encryption config for Connect Instance. Note that sensitive data will always be encrypted. If disabled, service will perform encryption with its own key. If enabled, a KMS key id needs to be provided and KMS charges will apply. KMS is only type supported
/// - On success, responds with [`StartInstanceOnboardingJobOutput`](crate::output::StartInstanceOnboardingJobOutput) with field(s):
/// - [`connect_instance_onboarding_job_status(Option<InstanceOnboardingJobStatus>)`](crate::output::StartInstanceOnboardingJobOutput::connect_instance_onboarding_job_status): Instance onboarding job status object
/// - On failure, responds with [`SdkError<StartInstanceOnboardingJobError>`](crate::error::StartInstanceOnboardingJobError)
pub fn start_instance_onboarding_job(&self) -> fluent_builders::StartInstanceOnboardingJob {
fluent_builders::StartInstanceOnboardingJob::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`StopCampaign`](crate::client::fluent_builders::StopCampaign) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::StopCampaign::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::StopCampaign::set_id): Identifier representing a Campaign
/// - On success, responds with [`StopCampaignOutput`](crate::output::StopCampaignOutput)
/// - On failure, responds with [`SdkError<StopCampaignError>`](crate::error::StopCampaignError)
pub fn stop_campaign(&self) -> fluent_builders::StopCampaign {
fluent_builders::StopCampaign::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`TagResource`](crate::client::fluent_builders::TagResource) operation.
///
/// - The fluent builder is configurable:
/// - [`arn(impl Into<String>)`](crate::client::fluent_builders::TagResource::arn) / [`set_arn(Option<String>)`](crate::client::fluent_builders::TagResource::set_arn): Arn
/// - [`tags(HashMap<String, String>)`](crate::client::fluent_builders::TagResource::tags) / [`set_tags(Option<HashMap<String, String>>)`](crate::client::fluent_builders::TagResource::set_tags): Tag map with key and value.
/// - On success, responds with [`TagResourceOutput`](crate::output::TagResourceOutput)
/// - On failure, responds with [`SdkError<TagResourceError>`](crate::error::TagResourceError)
pub fn tag_resource(&self) -> fluent_builders::TagResource {
fluent_builders::TagResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UntagResource`](crate::client::fluent_builders::UntagResource) operation.
///
/// - The fluent builder is configurable:
/// - [`arn(impl Into<String>)`](crate::client::fluent_builders::UntagResource::arn) / [`set_arn(Option<String>)`](crate::client::fluent_builders::UntagResource::set_arn): Arn
/// - [`tag_keys(Vec<String>)`](crate::client::fluent_builders::UntagResource::tag_keys) / [`set_tag_keys(Option<Vec<String>>)`](crate::client::fluent_builders::UntagResource::set_tag_keys): List of tag keys.
/// - On success, responds with [`UntagResourceOutput`](crate::output::UntagResourceOutput)
/// - On failure, responds with [`SdkError<UntagResourceError>`](crate::error::UntagResourceError)
pub fn untag_resource(&self) -> fluent_builders::UntagResource {
fluent_builders::UntagResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateCampaignDialerConfig`](crate::client::fluent_builders::UpdateCampaignDialerConfig) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::UpdateCampaignDialerConfig::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::UpdateCampaignDialerConfig::set_id): Identifier representing a Campaign
/// - [`dialer_config(DialerConfig)`](crate::client::fluent_builders::UpdateCampaignDialerConfig::dialer_config) / [`set_dialer_config(Option<DialerConfig>)`](crate::client::fluent_builders::UpdateCampaignDialerConfig::set_dialer_config): The possible types of dialer config parameters
/// - On success, responds with [`UpdateCampaignDialerConfigOutput`](crate::output::UpdateCampaignDialerConfigOutput)
/// - On failure, responds with [`SdkError<UpdateCampaignDialerConfigError>`](crate::error::UpdateCampaignDialerConfigError)
pub fn update_campaign_dialer_config(&self) -> fluent_builders::UpdateCampaignDialerConfig {
fluent_builders::UpdateCampaignDialerConfig::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateCampaignName`](crate::client::fluent_builders::UpdateCampaignName) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::UpdateCampaignName::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::UpdateCampaignName::set_id): Identifier representing a Campaign
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::UpdateCampaignName::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::UpdateCampaignName::set_name): The name of an Amazon Connect Campaign name.
/// - On success, responds with [`UpdateCampaignNameOutput`](crate::output::UpdateCampaignNameOutput)
/// - On failure, responds with [`SdkError<UpdateCampaignNameError>`](crate::error::UpdateCampaignNameError)
pub fn update_campaign_name(&self) -> fluent_builders::UpdateCampaignName {
fluent_builders::UpdateCampaignName::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateCampaignOutboundCallConfig`](crate::client::fluent_builders::UpdateCampaignOutboundCallConfig) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::UpdateCampaignOutboundCallConfig::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::UpdateCampaignOutboundCallConfig::set_id): Identifier representing a Campaign
/// - [`connect_contact_flow_id(impl Into<String>)`](crate::client::fluent_builders::UpdateCampaignOutboundCallConfig::connect_contact_flow_id) / [`set_connect_contact_flow_id(Option<String>)`](crate::client::fluent_builders::UpdateCampaignOutboundCallConfig::set_connect_contact_flow_id): The identifier of the contact flow for the outbound call.
/// - [`connect_source_phone_number(impl Into<String>)`](crate::client::fluent_builders::UpdateCampaignOutboundCallConfig::connect_source_phone_number) / [`set_connect_source_phone_number(Option<String>)`](crate::client::fluent_builders::UpdateCampaignOutboundCallConfig::set_connect_source_phone_number): The phone number associated with the Amazon Connect instance, in E.164 format. If you do not specify a source phone number, you must specify a queue.
/// - [`answer_machine_detection_config(AnswerMachineDetectionConfig)`](crate::client::fluent_builders::UpdateCampaignOutboundCallConfig::answer_machine_detection_config) / [`set_answer_machine_detection_config(Option<AnswerMachineDetectionConfig>)`](crate::client::fluent_builders::UpdateCampaignOutboundCallConfig::set_answer_machine_detection_config): Answering Machine Detection config
/// - On success, responds with [`UpdateCampaignOutboundCallConfigOutput`](crate::output::UpdateCampaignOutboundCallConfigOutput)
/// - On failure, responds with [`SdkError<UpdateCampaignOutboundCallConfigError>`](crate::error::UpdateCampaignOutboundCallConfigError)
pub fn update_campaign_outbound_call_config(
&self,
) -> fluent_builders::UpdateCampaignOutboundCallConfig {
fluent_builders::UpdateCampaignOutboundCallConfig::new(self.handle.clone())
}
}
pub mod fluent_builders {
//! Utilities to ergonomically construct a request to the service.
//!
//! Fluent builders are created through the [`Client`](crate::client::Client) by calling
//! one if its operation methods. After parameters are set using the builder methods,
//! the `send` method can be called to initiate the request.
/// Fluent builder constructing a request to `CreateCampaign`.
///
/// Creates a campaign for the specified Amazon Connect account. This API is idempotent.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreateCampaign {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::create_campaign_input::Builder,
}
impl CreateCampaign {
/// Creates a new `CreateCampaign`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::CreateCampaign,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::CreateCampaignError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateCampaignOutput,
aws_smithy_http::result::SdkError<crate::error::CreateCampaignError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// The name of an Amazon Connect Campaign name.
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(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.inner = self.inner.set_name(input);
self
}
/// Amazon Connect Instance Id
pub fn connect_instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connect_instance_id(input.into());
self
}
/// Amazon Connect Instance Id
pub fn set_connect_instance_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connect_instance_id(input);
self
}
/// The possible types of dialer config parameters
pub fn dialer_config(mut self, input: crate::model::DialerConfig) -> Self {
self.inner = self.inner.dialer_config(input);
self
}
/// The possible types of dialer config parameters
pub fn set_dialer_config(
mut self,
input: std::option::Option<crate::model::DialerConfig>,
) -> Self {
self.inner = self.inner.set_dialer_config(input);
self
}
/// The configuration used for outbound calls.
pub fn outbound_call_config(mut self, input: crate::model::OutboundCallConfig) -> Self {
self.inner = self.inner.outbound_call_config(input);
self
}
/// The configuration used for outbound calls.
pub fn set_outbound_call_config(
mut self,
input: std::option::Option<crate::model::OutboundCallConfig>,
) -> Self {
self.inner = self.inner.set_outbound_call_config(input);
self
}
/// 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 Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.tags(k.into(), v.into());
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.inner = self.inner.set_tags(input);
self
}
}
/// Fluent builder constructing a request to `DeleteCampaign`.
///
/// Deletes a campaign from the specified Amazon Connect account.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DeleteCampaign {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::delete_campaign_input::Builder,
}
impl DeleteCampaign {
/// Creates a new `DeleteCampaign`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DeleteCampaign,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::DeleteCampaignError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteCampaignOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteCampaignError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Identifier representing a Campaign
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// Identifier representing a Campaign
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteConnectInstanceConfig`.
///
/// Deletes a connect instance config from the specified AWS account.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DeleteConnectInstanceConfig {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::delete_connect_instance_config_input::Builder,
}
impl DeleteConnectInstanceConfig {
/// Creates a new `DeleteConnectInstanceConfig`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DeleteConnectInstanceConfig,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::DeleteConnectInstanceConfigError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteConnectInstanceConfigOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteConnectInstanceConfigError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Amazon Connect Instance Id
pub fn connect_instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connect_instance_id(input.into());
self
}
/// Amazon Connect Instance Id
pub fn set_connect_instance_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connect_instance_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteInstanceOnboardingJob`.
///
/// Delete the Connect Campaigns onboarding job for the specified Amazon Connect instance.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DeleteInstanceOnboardingJob {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::delete_instance_onboarding_job_input::Builder,
}
impl DeleteInstanceOnboardingJob {
/// Creates a new `DeleteInstanceOnboardingJob`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DeleteInstanceOnboardingJob,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::DeleteInstanceOnboardingJobError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteInstanceOnboardingJobOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteInstanceOnboardingJobError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Amazon Connect Instance Id
pub fn connect_instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connect_instance_id(input.into());
self
}
/// Amazon Connect Instance Id
pub fn set_connect_instance_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connect_instance_id(input);
self
}
}
/// Fluent builder constructing a request to `DescribeCampaign`.
///
/// Describes the specific campaign.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DescribeCampaign {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::describe_campaign_input::Builder,
}
impl DescribeCampaign {
/// Creates a new `DescribeCampaign`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DescribeCampaign,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::DescribeCampaignError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeCampaignOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeCampaignError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Identifier representing a Campaign
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// Identifier representing a Campaign
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
}
/// Fluent builder constructing a request to `GetCampaignState`.
///
/// Get state of a campaign for the specified Amazon Connect account.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetCampaignState {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_campaign_state_input::Builder,
}
impl GetCampaignState {
/// Creates a new `GetCampaignState`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::GetCampaignState,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::GetCampaignStateError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetCampaignStateOutput,
aws_smithy_http::result::SdkError<crate::error::GetCampaignStateError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Identifier representing a Campaign
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// Identifier representing a Campaign
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
}
/// Fluent builder constructing a request to `GetCampaignStateBatch`.
///
/// Get state of campaigns for the specified Amazon Connect account.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetCampaignStateBatch {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_campaign_state_batch_input::Builder,
}
impl GetCampaignStateBatch {
/// Creates a new `GetCampaignStateBatch`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::GetCampaignStateBatch,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::GetCampaignStateBatchError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetCampaignStateBatchOutput,
aws_smithy_http::result::SdkError<crate::error::GetCampaignStateBatchError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Appends an item to `campaignIds`.
///
/// To override the contents of this collection use [`set_campaign_ids`](Self::set_campaign_ids).
///
/// List of CampaignId
pub fn campaign_ids(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.campaign_ids(input.into());
self
}
/// List of CampaignId
pub fn set_campaign_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_campaign_ids(input);
self
}
}
/// Fluent builder constructing a request to `GetConnectInstanceConfig`.
///
/// Get the specific Connect instance config.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetConnectInstanceConfig {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_connect_instance_config_input::Builder,
}
impl GetConnectInstanceConfig {
/// Creates a new `GetConnectInstanceConfig`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::GetConnectInstanceConfig,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::GetConnectInstanceConfigError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetConnectInstanceConfigOutput,
aws_smithy_http::result::SdkError<crate::error::GetConnectInstanceConfigError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Amazon Connect Instance Id
pub fn connect_instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connect_instance_id(input.into());
self
}
/// Amazon Connect Instance Id
pub fn set_connect_instance_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connect_instance_id(input);
self
}
}
/// Fluent builder constructing a request to `GetInstanceOnboardingJobStatus`.
///
/// Get the specific instance onboarding job status.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetInstanceOnboardingJobStatus {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_instance_onboarding_job_status_input::Builder,
}
impl GetInstanceOnboardingJobStatus {
/// Creates a new `GetInstanceOnboardingJobStatus`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::GetInstanceOnboardingJobStatus,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::GetInstanceOnboardingJobStatusError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetInstanceOnboardingJobStatusOutput,
aws_smithy_http::result::SdkError<crate::error::GetInstanceOnboardingJobStatusError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Amazon Connect Instance Id
pub fn connect_instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connect_instance_id(input.into());
self
}
/// Amazon Connect Instance Id
pub fn set_connect_instance_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connect_instance_id(input);
self
}
}
/// Fluent builder constructing a request to `ListCampaigns`.
///
/// Provides summary information about the campaigns under the specified Amazon Connect account.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListCampaigns {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_campaigns_input::Builder,
}
impl ListCampaigns {
/// Creates a new `ListCampaigns`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ListCampaigns,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ListCampaignsError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListCampaignsOutput,
aws_smithy_http::result::SdkError<crate::error::ListCampaignsError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListCampaignsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListCampaignsPaginator {
crate::paginator::ListCampaignsPaginator::new(self.handle, self.inner)
}
/// The maximum number of results to return per page.
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// The maximum number of results to return per page.
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// The token for the next set of results.
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// The token for the next set of results.
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// Filter model by type
pub fn filters(mut self, input: crate::model::CampaignFilters) -> Self {
self.inner = self.inner.filters(input);
self
}
/// Filter model by type
pub fn set_filters(
mut self,
input: std::option::Option<crate::model::CampaignFilters>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
}
/// Fluent builder constructing a request to `ListTagsForResource`.
///
/// List tags for a resource.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListTagsForResource {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_tags_for_resource_input::Builder,
}
impl ListTagsForResource {
/// Creates a new `ListTagsForResource`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ListTagsForResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListTagsForResourceOutput,
aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Arn
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.arn(input.into());
self
}
/// Arn
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_arn(input);
self
}
}
/// Fluent builder constructing a request to `PauseCampaign`.
///
/// Pauses a campaign for the specified Amazon Connect account.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct PauseCampaign {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::pause_campaign_input::Builder,
}
impl PauseCampaign {
/// Creates a new `PauseCampaign`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::PauseCampaign,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::PauseCampaignError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::PauseCampaignOutput,
aws_smithy_http::result::SdkError<crate::error::PauseCampaignError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Identifier representing a Campaign
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// Identifier representing a Campaign
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
}
/// Fluent builder constructing a request to `PutDialRequestBatch`.
///
/// Creates dials requests for the specified campaign Amazon Connect account. This API is idempotent.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct PutDialRequestBatch {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::put_dial_request_batch_input::Builder,
}
impl PutDialRequestBatch {
/// Creates a new `PutDialRequestBatch`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::PutDialRequestBatch,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::PutDialRequestBatchError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::PutDialRequestBatchOutput,
aws_smithy_http::result::SdkError<crate::error::PutDialRequestBatchError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Identifier representing a Campaign
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// Identifier representing a Campaign
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
/// Appends an item to `dialRequests`.
///
/// To override the contents of this collection use [`set_dial_requests`](Self::set_dial_requests).
///
/// A list of dial requests.
pub fn dial_requests(mut self, input: crate::model::DialRequest) -> Self {
self.inner = self.inner.dial_requests(input);
self
}
/// A list of dial requests.
pub fn set_dial_requests(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::DialRequest>>,
) -> Self {
self.inner = self.inner.set_dial_requests(input);
self
}
}
/// Fluent builder constructing a request to `ResumeCampaign`.
///
/// Stops a campaign for the specified Amazon Connect account.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ResumeCampaign {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::resume_campaign_input::Builder,
}
impl ResumeCampaign {
/// Creates a new `ResumeCampaign`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ResumeCampaign,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ResumeCampaignError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ResumeCampaignOutput,
aws_smithy_http::result::SdkError<crate::error::ResumeCampaignError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Identifier representing a Campaign
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// Identifier representing a Campaign
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
}
/// Fluent builder constructing a request to `StartCampaign`.
///
/// Starts a campaign for the specified Amazon Connect account.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct StartCampaign {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::start_campaign_input::Builder,
}
impl StartCampaign {
/// Creates a new `StartCampaign`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::StartCampaign,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::StartCampaignError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::StartCampaignOutput,
aws_smithy_http::result::SdkError<crate::error::StartCampaignError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Identifier representing a Campaign
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// Identifier representing a Campaign
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
}
/// Fluent builder constructing a request to `StartInstanceOnboardingJob`.
///
/// Onboard the specific Amazon Connect instance to Connect Campaigns.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct StartInstanceOnboardingJob {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::start_instance_onboarding_job_input::Builder,
}
impl StartInstanceOnboardingJob {
/// Creates a new `StartInstanceOnboardingJob`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::StartInstanceOnboardingJob,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::StartInstanceOnboardingJobError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::StartInstanceOnboardingJobOutput,
aws_smithy_http::result::SdkError<crate::error::StartInstanceOnboardingJobError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Amazon Connect Instance Id
pub fn connect_instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connect_instance_id(input.into());
self
}
/// Amazon Connect Instance Id
pub fn set_connect_instance_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connect_instance_id(input);
self
}
/// Encryption config for Connect Instance. Note that sensitive data will always be encrypted. If disabled, service will perform encryption with its own key. If enabled, a KMS key id needs to be provided and KMS charges will apply. KMS is only type supported
pub fn encryption_config(mut self, input: crate::model::EncryptionConfig) -> Self {
self.inner = self.inner.encryption_config(input);
self
}
/// Encryption config for Connect Instance. Note that sensitive data will always be encrypted. If disabled, service will perform encryption with its own key. If enabled, a KMS key id needs to be provided and KMS charges will apply. KMS is only type supported
pub fn set_encryption_config(
mut self,
input: std::option::Option<crate::model::EncryptionConfig>,
) -> Self {
self.inner = self.inner.set_encryption_config(input);
self
}
}
/// Fluent builder constructing a request to `StopCampaign`.
///
/// Stops a campaign for the specified Amazon Connect account.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct StopCampaign {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::stop_campaign_input::Builder,
}
impl StopCampaign {
/// Creates a new `StopCampaign`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::StopCampaign,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::StopCampaignError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::StopCampaignOutput,
aws_smithy_http::result::SdkError<crate::error::StopCampaignError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Identifier representing a Campaign
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// Identifier representing a Campaign
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
}
/// Fluent builder constructing a request to `TagResource`.
///
/// Tag a resource.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct TagResource {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::tag_resource_input::Builder,
}
impl TagResource {
/// Creates a new `TagResource`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::TagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::TagResourceError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::TagResourceOutput,
aws_smithy_http::result::SdkError<crate::error::TagResourceError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Arn
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.arn(input.into());
self
}
/// Arn
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_arn(input);
self
}
/// 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 Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.tags(k.into(), v.into());
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.inner = self.inner.set_tags(input);
self
}
}
/// Fluent builder constructing a request to `UntagResource`.
///
/// Untag a resource.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UntagResource {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::untag_resource_input::Builder,
}
impl UntagResource {
/// Creates a new `UntagResource`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::UntagResource,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::UntagResourceError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UntagResourceOutput,
aws_smithy_http::result::SdkError<crate::error::UntagResourceError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Arn
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.arn(input.into());
self
}
/// Arn
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_arn(input);
self
}
/// Appends an item to `tagKeys`.
///
/// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
///
/// List of tag keys.
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.tag_keys(input.into());
self
}
/// List of tag keys.
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_tag_keys(input);
self
}
}
/// Fluent builder constructing a request to `UpdateCampaignDialerConfig`.
///
/// Updates the dialer config of a campaign. This API is idempotent.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdateCampaignDialerConfig {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::update_campaign_dialer_config_input::Builder,
}
impl UpdateCampaignDialerConfig {
/// Creates a new `UpdateCampaignDialerConfig`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::UpdateCampaignDialerConfig,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::UpdateCampaignDialerConfigError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UpdateCampaignDialerConfigOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateCampaignDialerConfigError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Identifier representing a Campaign
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// Identifier representing a Campaign
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
/// The possible types of dialer config parameters
pub fn dialer_config(mut self, input: crate::model::DialerConfig) -> Self {
self.inner = self.inner.dialer_config(input);
self
}
/// The possible types of dialer config parameters
pub fn set_dialer_config(
mut self,
input: std::option::Option<crate::model::DialerConfig>,
) -> Self {
self.inner = self.inner.set_dialer_config(input);
self
}
}
/// Fluent builder constructing a request to `UpdateCampaignName`.
///
/// Updates the name of a campaign. This API is idempotent.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdateCampaignName {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::update_campaign_name_input::Builder,
}
impl UpdateCampaignName {
/// Creates a new `UpdateCampaignName`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::UpdateCampaignName,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::UpdateCampaignNameError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UpdateCampaignNameOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateCampaignNameError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Identifier representing a Campaign
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// Identifier representing a Campaign
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
/// The name of an Amazon Connect Campaign name.
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(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.inner = self.inner.set_name(input);
self
}
}
/// Fluent builder constructing a request to `UpdateCampaignOutboundCallConfig`.
///
/// Updates the outbound call config of a campaign. This API is idempotent.
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdateCampaignOutboundCallConfig {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::update_campaign_outbound_call_config_input::Builder,
}
impl UpdateCampaignOutboundCallConfig {
/// Creates a new `UpdateCampaignOutboundCallConfig`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Consume this builder, creating a customizable operation that can be modified before being
/// sent. The operation's inner [http::Request] can be modified as well.
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::UpdateCampaignOutboundCallConfig,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::UpdateCampaignOutboundCallConfigError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UpdateCampaignOutboundCallConfigOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateCampaignOutboundCallConfigError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
/// Identifier representing a Campaign
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// Identifier representing a Campaign
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
/// The identifier of the contact flow for the outbound call.
pub fn connect_contact_flow_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.connect_contact_flow_id(input.into());
self
}
/// The identifier of the contact flow for the outbound call.
pub fn set_connect_contact_flow_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connect_contact_flow_id(input);
self
}
/// The phone number associated with the Amazon Connect instance, in E.164 format. If you do not specify a source phone number, you must specify a queue.
pub fn connect_source_phone_number(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.connect_source_phone_number(input.into());
self
}
/// The phone number associated with the Amazon Connect instance, in E.164 format. If you do not specify a source phone number, you must specify a queue.
pub fn set_connect_source_phone_number(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_connect_source_phone_number(input);
self
}
/// Answering Machine Detection config
pub fn answer_machine_detection_config(
mut self,
input: crate::model::AnswerMachineDetectionConfig,
) -> Self {
self.inner = self.inner.answer_machine_detection_config(input);
self
}
/// Answering Machine Detection config
pub fn set_answer_machine_detection_config(
mut self,
input: std::option::Option<crate::model::AnswerMachineDetectionConfig>,
) -> Self {
self.inner = self.inner.set_answer_machine_detection_config(input);
self
}
}
}
impl Client {
/// Creates a new client from an [SDK Config](aws_types::sdk_config::SdkConfig).
///
/// # Panics
///
/// - This method will panic if the `sdk_config` is missing an async sleep implementation. If you experience this panic, set
/// the `sleep_impl` on the Config passed into this function to fix it.
/// - This method will panic if the `sdk_config` is missing an HTTP connector. If you experience this panic, set the
/// `http_connector` on the Config passed into this function to fix it.
pub fn new(sdk_config: &aws_types::sdk_config::SdkConfig) -> Self {
Self::from_conf(sdk_config.into())
}
/// Creates a new client from the service [`Config`](crate::Config).
///
/// # Panics
///
/// - This method will panic if the `conf` is missing an async sleep implementation. If you experience this panic, set
/// the `sleep_impl` on the Config passed into this function to fix it.
/// - This method will panic if the `conf` is missing an HTTP connector. If you experience this panic, set the
/// `http_connector` on the Config passed into this function to fix it.
pub fn from_conf(conf: crate::Config) -> Self {
let retry_config = conf
.retry_config()
.cloned()
.unwrap_or_else(aws_smithy_types::retry::RetryConfig::disabled);
let timeout_config = conf
.timeout_config()
.cloned()
.unwrap_or_else(aws_smithy_types::timeout::TimeoutConfig::disabled);
let sleep_impl = conf.sleep_impl();
if (retry_config.has_retry() || timeout_config.has_timeouts()) && sleep_impl.is_none() {
panic!("An async sleep implementation is required for retries or timeouts to work. \
Set the `sleep_impl` on the Config passed into this function to fix this panic.");
}
let connector = conf.http_connector().and_then(|c| {
let timeout_config = conf
.timeout_config()
.cloned()
.unwrap_or_else(aws_smithy_types::timeout::TimeoutConfig::disabled);
let connector_settings =
aws_smithy_client::http_connector::ConnectorSettings::from_timeout_config(
&timeout_config,
);
c.connector(&connector_settings, conf.sleep_impl())
});
let builder = aws_smithy_client::Builder::new();
let builder = match connector {
// Use provided connector
Some(c) => builder.connector(c),
None => {
#[cfg(any(feature = "rustls", feature = "native-tls"))]
{
// Use default connector based on enabled features
builder.dyn_https_connector(
aws_smithy_client::http_connector::ConnectorSettings::from_timeout_config(
&timeout_config,
),
)
}
#[cfg(not(any(feature = "rustls", feature = "native-tls")))]
{
panic!("No HTTP connector was available. Enable the `rustls` or `native-tls` crate feature or set a connector to fix this.");
}
}
};
let mut builder = builder
.middleware(aws_smithy_client::erase::DynMiddleware::new(
crate::middleware::DefaultMiddleware::new(),
))
.retry_config(retry_config.into())
.operation_timeout_config(timeout_config.into());
builder.set_sleep_impl(sleep_impl);
let client = builder.build();
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
}