/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.connect.model; import java.io.Serializable; /** *
* Contains information about which channels are supported, and how many * contacts an agent can have on a channel simultaneously. *
*/ public class MediaConcurrency implements Serializable { /** ** The channels that agents can handle in the Contact Control Panel (CCP). *
*
* Constraints:
* Allowed Values: VOICE, CHAT, TASK
*/
private String channel;
/**
*
* The number of contacts an agent can have on a channel simultaneously. *
*
* Valid Range for VOICE
: Minimum value of 1. Maximum value of
* 1.
*
* Valid Range for CHAT
: Minimum value of 1. Maximum value of
* 10.
*
* Valid Range for TASK
: Minimum value of 1. Maximum value of
* 10.
*
* Constraints:
* Range: 1 - 10
*/
private Integer concurrency;
/**
*
* Defines the cross-channel routing behavior for each channel that is * enabled for this Routing Profile. For example, this allows you to offer * an agent a different contact from another channel when they are currently * working with a contact from a Voice channel. *
*/ private CrossChannelBehavior crossChannelBehavior; /** ** The channels that agents can handle in the Contact Control Panel (CCP). *
*
* Constraints:
* Allowed Values: VOICE, CHAT, TASK
*
* @return
* The channels that agents can handle in the Contact Control Panel * (CCP). *
* @see Channel */ public String getChannel() { return channel; } /** ** The channels that agents can handle in the Contact Control Panel (CCP). *
*
* Constraints:
* Allowed Values: VOICE, CHAT, TASK
*
* @param channel
* The channels that agents can handle in the Contact Control * Panel (CCP). *
* @see Channel */ public void setChannel(String channel) { this.channel = channel; } /** ** The channels that agents can handle in the Contact Control Panel (CCP). *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: VOICE, CHAT, TASK
*
* @param channel
* The channels that agents can handle in the Contact Control * Panel (CCP). *
* @return A reference to this updated object so that method calls can be * chained together. * @see Channel */ public MediaConcurrency withChannel(String channel) { this.channel = channel; return this; } /** ** The channels that agents can handle in the Contact Control Panel (CCP). *
*
* Constraints:
* Allowed Values: VOICE, CHAT, TASK
*
* @param channel
* The channels that agents can handle in the Contact Control * Panel (CCP). *
* @see Channel */ public void setChannel(Channel channel) { this.channel = channel.toString(); } /** ** The channels that agents can handle in the Contact Control Panel (CCP). *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: VOICE, CHAT, TASK
*
* @param channel
* The channels that agents can handle in the Contact Control * Panel (CCP). *
* @return A reference to this updated object so that method calls can be * chained together. * @see Channel */ public MediaConcurrency withChannel(Channel channel) { this.channel = channel.toString(); return this; } /** ** The number of contacts an agent can have on a channel simultaneously. *
*
* Valid Range for VOICE
: Minimum value of 1. Maximum value of
* 1.
*
* Valid Range for CHAT
: Minimum value of 1. Maximum value of
* 10.
*
* Valid Range for TASK
: Minimum value of 1. Maximum value of
* 10.
*
* Constraints:
* Range: 1 - 10
*
* @return
* The number of contacts an agent can have on a channel * simultaneously. *
*
* Valid Range for VOICE
: Minimum value of 1. Maximum
* value of 1.
*
* Valid Range for CHAT
: Minimum value of 1. Maximum
* value of 10.
*
* Valid Range for TASK
: Minimum value of 1. Maximum
* value of 10.
*
* The number of contacts an agent can have on a channel simultaneously. *
*
* Valid Range for VOICE
: Minimum value of 1. Maximum value of
* 1.
*
* Valid Range for CHAT
: Minimum value of 1. Maximum value of
* 10.
*
* Valid Range for TASK
: Minimum value of 1. Maximum value of
* 10.
*
* Constraints:
* Range: 1 - 10
*
* @param concurrency
* The number of contacts an agent can have on a channel * simultaneously. *
*
* Valid Range for VOICE
: Minimum value of 1.
* Maximum value of 1.
*
* Valid Range for CHAT
: Minimum value of 1. Maximum
* value of 10.
*
* Valid Range for TASK
: Minimum value of 1. Maximum
* value of 10.
*
* The number of contacts an agent can have on a channel simultaneously. *
*
* Valid Range for VOICE
: Minimum value of 1. Maximum value of
* 1.
*
* Valid Range for CHAT
: Minimum value of 1. Maximum value of
* 10.
*
* Valid Range for TASK
: Minimum value of 1. Maximum value of
* 10.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 1 - 10
*
* @param concurrency
* The number of contacts an agent can have on a channel * simultaneously. *
*
* Valid Range for VOICE
: Minimum value of 1.
* Maximum value of 1.
*
* Valid Range for CHAT
: Minimum value of 1. Maximum
* value of 10.
*
* Valid Range for TASK
: Minimum value of 1. Maximum
* value of 10.
*
* Defines the cross-channel routing behavior for each channel that is * enabled for this Routing Profile. For example, this allows you to offer * an agent a different contact from another channel when they are currently * working with a contact from a Voice channel. *
* * @return* Defines the cross-channel routing behavior for each channel that * is enabled for this Routing Profile. For example, this allows you * to offer an agent a different contact from another channel when * they are currently working with a contact from a Voice channel. *
*/ public CrossChannelBehavior getCrossChannelBehavior() { return crossChannelBehavior; } /** ** Defines the cross-channel routing behavior for each channel that is * enabled for this Routing Profile. For example, this allows you to offer * an agent a different contact from another channel when they are currently * working with a contact from a Voice channel. *
* * @param crossChannelBehavior* Defines the cross-channel routing behavior for each channel * that is enabled for this Routing Profile. For example, this * allows you to offer an agent a different contact from another * channel when they are currently working with a contact from a * Voice channel. *
*/ public void setCrossChannelBehavior(CrossChannelBehavior crossChannelBehavior) { this.crossChannelBehavior = crossChannelBehavior; } /** ** Defines the cross-channel routing behavior for each channel that is * enabled for this Routing Profile. For example, this allows you to offer * an agent a different contact from another channel when they are currently * working with a contact from a Voice channel. *
** Returns a reference to this object so that method calls can be chained * together. * * @param crossChannelBehavior
* Defines the cross-channel routing behavior for each channel * that is enabled for this Routing Profile. For example, this * allows you to offer an agent a different contact from another * channel when they are currently working with a contact from a * Voice channel. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MediaConcurrency withCrossChannelBehavior(CrossChannelBehavior crossChannelBehavior) { this.crossChannelBehavior = crossChannelBehavior; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getChannel() != null) sb.append("Channel: " + getChannel() + ","); if (getConcurrency() != null) sb.append("Concurrency: " + getConcurrency() + ","); if (getCrossChannelBehavior() != null) sb.append("CrossChannelBehavior: " + getCrossChannelBehavior()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getChannel() == null) ? 0 : getChannel().hashCode()); hashCode = prime * hashCode + ((getConcurrency() == null) ? 0 : getConcurrency().hashCode()); hashCode = prime * hashCode + ((getCrossChannelBehavior() == null) ? 0 : getCrossChannelBehavior().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof MediaConcurrency == false) return false; MediaConcurrency other = (MediaConcurrency) obj; if (other.getChannel() == null ^ this.getChannel() == null) return false; if (other.getChannel() != null && other.getChannel().equals(this.getChannel()) == false) return false; if (other.getConcurrency() == null ^ this.getConcurrency() == null) return false; if (other.getConcurrency() != null && other.getConcurrency().equals(this.getConcurrency()) == false) return false; if (other.getCrossChannelBehavior() == null ^ this.getCrossChannelBehavior() == null) return false; if (other.getCrossChannelBehavior() != null && other.getCrossChannelBehavior().equals(this.getCrossChannelBehavior()) == false) return false; return true; } }