aws-sdk-connect 1.154.0

AWS SDK for Amazon Connect Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateRoutingProfileInput {
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the routing profile. Must not be more than 127 characters.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Description of the routing profile. Must not be more than 250 characters.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The default outbound queue for the routing profile.</p>
    pub default_outbound_queue_id: ::std::option::Option<::std::string::String>,
    /// <p>The inbound queues associated with the routing profile. If no queue is added, the agent can make only outbound calls.</p>
    /// <p>The limit of 10 array members applies to the maximum number of <code>RoutingProfileQueueConfig</code> objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in <a href="https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html">Amazon Connect service quotas</a>.</p>
    pub queue_configs: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileQueueConfig>>,
    /// <p>The manual assignment queues associated with the routing profile. If no queue is added, agents and supervisors can't pick or assign any contacts from this routing profile. The limit of 10 array members applies to the maximum number of RoutingProfileManualAssignmentQueueConfig objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in Amazon Connect service quotas.</p>
    /// <p>Note: Use this config for chat, email, and task contacts. It does not support voice contacts.</p>
    pub manual_assignment_queue_configs: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileManualAssignmentQueueConfig>>,
    /// <p>The channels that agents can handle in the Contact Control Panel (CCP) for this routing profile.</p>
    pub media_concurrencies: ::std::option::Option<::std::vec::Vec<crate::types::MediaConcurrency>>,
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>Whether agents with this routing profile will have their routing order calculated based on <i>longest idle time</i> or <i>time since their last inbound contact</i>.</p>
    pub agent_availability_timer: ::std::option::Option<crate::types::AgentAvailabilityTimer>,
}
impl CreateRoutingProfileInput {
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The name of the routing profile. Must not be more than 127 characters.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Description of the routing profile. Must not be more than 250 characters.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The default outbound queue for the routing profile.</p>
    pub fn default_outbound_queue_id(&self) -> ::std::option::Option<&str> {
        self.default_outbound_queue_id.as_deref()
    }
    /// <p>The inbound queues associated with the routing profile. If no queue is added, the agent can make only outbound calls.</p>
    /// <p>The limit of 10 array members applies to the maximum number of <code>RoutingProfileQueueConfig</code> objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in <a href="https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html">Amazon Connect service quotas</a>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.queue_configs.is_none()`.
    pub fn queue_configs(&self) -> &[crate::types::RoutingProfileQueueConfig] {
        self.queue_configs.as_deref().unwrap_or_default()
    }
    /// <p>The manual assignment queues associated with the routing profile. If no queue is added, agents and supervisors can't pick or assign any contacts from this routing profile. The limit of 10 array members applies to the maximum number of RoutingProfileManualAssignmentQueueConfig objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in Amazon Connect service quotas.</p>
    /// <p>Note: Use this config for chat, email, and task contacts. It does not support voice contacts.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.manual_assignment_queue_configs.is_none()`.
    pub fn manual_assignment_queue_configs(&self) -> &[crate::types::RoutingProfileManualAssignmentQueueConfig] {
        self.manual_assignment_queue_configs.as_deref().unwrap_or_default()
    }
    /// <p>The channels that agents can handle in the Contact Control Panel (CCP) for this routing profile.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.media_concurrencies.is_none()`.
    pub fn media_concurrencies(&self) -> &[crate::types::MediaConcurrency] {
        self.media_concurrencies.as_deref().unwrap_or_default()
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>Whether agents with this routing profile will have their routing order calculated based on <i>longest idle time</i> or <i>time since their last inbound contact</i>.</p>
    pub fn agent_availability_timer(&self) -> ::std::option::Option<&crate::types::AgentAvailabilityTimer> {
        self.agent_availability_timer.as_ref()
    }
}
impl CreateRoutingProfileInput {
    /// Creates a new builder-style object to manufacture [`CreateRoutingProfileInput`](crate::operation::create_routing_profile::CreateRoutingProfileInput).
    pub fn builder() -> crate::operation::create_routing_profile::builders::CreateRoutingProfileInputBuilder {
        crate::operation::create_routing_profile::builders::CreateRoutingProfileInputBuilder::default()
    }
}

/// A builder for [`CreateRoutingProfileInput`](crate::operation::create_routing_profile::CreateRoutingProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateRoutingProfileInputBuilder {
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) default_outbound_queue_id: ::std::option::Option<::std::string::String>,
    pub(crate) queue_configs: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileQueueConfig>>,
    pub(crate) manual_assignment_queue_configs: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileManualAssignmentQueueConfig>>,
    pub(crate) media_concurrencies: ::std::option::Option<::std::vec::Vec<crate::types::MediaConcurrency>>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) agent_availability_timer: ::std::option::Option<crate::types::AgentAvailabilityTimer>,
}
impl CreateRoutingProfileInputBuilder {
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    /// This field is required.
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>The name of the routing profile. Must not be more than 127 characters.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the routing profile. Must not be more than 127 characters.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the routing profile. Must not be more than 127 characters.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Description of the routing profile. Must not be more than 250 characters.</p>
    /// This field is required.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Description of the routing profile. Must not be more than 250 characters.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>Description of the routing profile. Must not be more than 250 characters.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The default outbound queue for the routing profile.</p>
    /// This field is required.
    pub fn default_outbound_queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.default_outbound_queue_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The default outbound queue for the routing profile.</p>
    pub fn set_default_outbound_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.default_outbound_queue_id = input;
        self
    }
    /// <p>The default outbound queue for the routing profile.</p>
    pub fn get_default_outbound_queue_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.default_outbound_queue_id
    }
    /// Appends an item to `queue_configs`.
    ///
    /// To override the contents of this collection use [`set_queue_configs`](Self::set_queue_configs).
    ///
    /// <p>The inbound queues associated with the routing profile. If no queue is added, the agent can make only outbound calls.</p>
    /// <p>The limit of 10 array members applies to the maximum number of <code>RoutingProfileQueueConfig</code> objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in <a href="https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html">Amazon Connect service quotas</a>.</p>
    pub fn queue_configs(mut self, input: crate::types::RoutingProfileQueueConfig) -> Self {
        let mut v = self.queue_configs.unwrap_or_default();
        v.push(input);
        self.queue_configs = ::std::option::Option::Some(v);
        self
    }
    /// <p>The inbound queues associated with the routing profile. If no queue is added, the agent can make only outbound calls.</p>
    /// <p>The limit of 10 array members applies to the maximum number of <code>RoutingProfileQueueConfig</code> objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in <a href="https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html">Amazon Connect service quotas</a>.</p>
    pub fn set_queue_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileQueueConfig>>) -> Self {
        self.queue_configs = input;
        self
    }
    /// <p>The inbound queues associated with the routing profile. If no queue is added, the agent can make only outbound calls.</p>
    /// <p>The limit of 10 array members applies to the maximum number of <code>RoutingProfileQueueConfig</code> objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in <a href="https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html">Amazon Connect service quotas</a>.</p>
    pub fn get_queue_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileQueueConfig>> {
        &self.queue_configs
    }
    /// Appends an item to `manual_assignment_queue_configs`.
    ///
    /// To override the contents of this collection use [`set_manual_assignment_queue_configs`](Self::set_manual_assignment_queue_configs).
    ///
    /// <p>The manual assignment queues associated with the routing profile. If no queue is added, agents and supervisors can't pick or assign any contacts from this routing profile. The limit of 10 array members applies to the maximum number of RoutingProfileManualAssignmentQueueConfig objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in Amazon Connect service quotas.</p>
    /// <p>Note: Use this config for chat, email, and task contacts. It does not support voice contacts.</p>
    pub fn manual_assignment_queue_configs(mut self, input: crate::types::RoutingProfileManualAssignmentQueueConfig) -> Self {
        let mut v = self.manual_assignment_queue_configs.unwrap_or_default();
        v.push(input);
        self.manual_assignment_queue_configs = ::std::option::Option::Some(v);
        self
    }
    /// <p>The manual assignment queues associated with the routing profile. If no queue is added, agents and supervisors can't pick or assign any contacts from this routing profile. The limit of 10 array members applies to the maximum number of RoutingProfileManualAssignmentQueueConfig objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in Amazon Connect service quotas.</p>
    /// <p>Note: Use this config for chat, email, and task contacts. It does not support voice contacts.</p>
    pub fn set_manual_assignment_queue_configs(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileManualAssignmentQueueConfig>>,
    ) -> Self {
        self.manual_assignment_queue_configs = input;
        self
    }
    /// <p>The manual assignment queues associated with the routing profile. If no queue is added, agents and supervisors can't pick or assign any contacts from this routing profile. The limit of 10 array members applies to the maximum number of RoutingProfileManualAssignmentQueueConfig objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in Amazon Connect service quotas.</p>
    /// <p>Note: Use this config for chat, email, and task contacts. It does not support voice contacts.</p>
    pub fn get_manual_assignment_queue_configs(
        &self,
    ) -> &::std::option::Option<::std::vec::Vec<crate::types::RoutingProfileManualAssignmentQueueConfig>> {
        &self.manual_assignment_queue_configs
    }
    /// Appends an item to `media_concurrencies`.
    ///
    /// To override the contents of this collection use [`set_media_concurrencies`](Self::set_media_concurrencies).
    ///
    /// <p>The channels that agents can handle in the Contact Control Panel (CCP) for this routing profile.</p>
    pub fn media_concurrencies(mut self, input: crate::types::MediaConcurrency) -> Self {
        let mut v = self.media_concurrencies.unwrap_or_default();
        v.push(input);
        self.media_concurrencies = ::std::option::Option::Some(v);
        self
    }
    /// <p>The channels that agents can handle in the Contact Control Panel (CCP) for this routing profile.</p>
    pub fn set_media_concurrencies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MediaConcurrency>>) -> Self {
        self.media_concurrencies = input;
        self
    }
    /// <p>The channels that agents can handle in the Contact Control Panel (CCP) for this routing profile.</p>
    pub fn get_media_concurrencies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MediaConcurrency>> {
        &self.media_concurrencies
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    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
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>Whether agents with this routing profile will have their routing order calculated based on <i>longest idle time</i> or <i>time since their last inbound contact</i>.</p>
    pub fn agent_availability_timer(mut self, input: crate::types::AgentAvailabilityTimer) -> Self {
        self.agent_availability_timer = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether agents with this routing profile will have their routing order calculated based on <i>longest idle time</i> or <i>time since their last inbound contact</i>.</p>
    pub fn set_agent_availability_timer(mut self, input: ::std::option::Option<crate::types::AgentAvailabilityTimer>) -> Self {
        self.agent_availability_timer = input;
        self
    }
    /// <p>Whether agents with this routing profile will have their routing order calculated based on <i>longest idle time</i> or <i>time since their last inbound contact</i>.</p>
    pub fn get_agent_availability_timer(&self) -> &::std::option::Option<crate::types::AgentAvailabilityTimer> {
        &self.agent_availability_timer
    }
    /// Consumes the builder and constructs a [`CreateRoutingProfileInput`](crate::operation::create_routing_profile::CreateRoutingProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_routing_profile::CreateRoutingProfileInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_routing_profile::CreateRoutingProfileInput {
            instance_id: self.instance_id,
            name: self.name,
            description: self.description,
            default_outbound_queue_id: self.default_outbound_queue_id,
            queue_configs: self.queue_configs,
            manual_assignment_queue_configs: self.manual_assignment_queue_configs,
            media_concurrencies: self.media_concurrencies,
            tags: self.tags,
            agent_availability_timer: self.agent_availability_timer,
        })
    }
}