All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.connect.model.MediaConcurrency Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Connect module holds the client classes that are used for communicating with Connect.

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright 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 software.amazon.awssdk.services.connect.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Contains information about which channels are supported, and how many contacts an agent can have on a channel * simultaneously. *

*/ @Generated("software.amazon.awssdk:codegen") public final class MediaConcurrency implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField CHANNEL_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Channel") .getter(getter(MediaConcurrency::channelAsString)).setter(setter(Builder::channel)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Channel").build()).build(); private static final SdkField CONCURRENCY_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("Concurrency").getter(getter(MediaConcurrency::concurrency)).setter(setter(Builder::concurrency)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Concurrency").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CHANNEL_FIELD, CONCURRENCY_FIELD)); private static final long serialVersionUID = 1L; private final String channel; private final Integer concurrency; private MediaConcurrency(BuilderImpl builder) { this.channel = builder.channel; this.concurrency = builder.concurrency; } /** *

* The channels that agents can handle in the Contact Control Panel (CCP). *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #channel} will * return {@link Channel#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #channelAsString}. *

* * @return The channels that agents can handle in the Contact Control Panel (CCP). * @see Channel */ public final Channel channel() { return Channel.fromValue(channel); } /** *

* The channels that agents can handle in the Contact Control Panel (CCP). *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #channel} will * return {@link Channel#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #channelAsString}. *

* * @return The channels that agents can handle in the Contact Control Panel (CCP). * @see Channel */ public final String channelAsString() { return 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. *

* * @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. */ public final Integer concurrency() { return concurrency; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(channelAsString()); hashCode = 31 * hashCode + Objects.hashCode(concurrency()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof MediaConcurrency)) { return false; } MediaConcurrency other = (MediaConcurrency) obj; return Objects.equals(channelAsString(), other.channelAsString()) && Objects.equals(concurrency(), other.concurrency()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("MediaConcurrency").add("Channel", channelAsString()).add("Concurrency", concurrency()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Channel": return Optional.ofNullable(clazz.cast(channelAsString())); case "Concurrency": return Optional.ofNullable(clazz.cast(concurrency())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((MediaConcurrency) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The channels that agents can handle in the Contact Control Panel (CCP). *

* * @param channel * The channels that agents can handle in the Contact Control Panel (CCP). * @see Channel * @return Returns a reference to this object so that method calls can be chained together. * @see Channel */ Builder channel(String channel); /** *

* The channels that agents can handle in the Contact Control Panel (CCP). *

* * @param channel * The channels that agents can handle in the Contact Control Panel (CCP). * @see Channel * @return Returns a reference to this object so that method calls can be chained together. * @see Channel */ Builder channel(Channel 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. *

* * @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. * @return Returns a reference to this object so that method calls can be chained together. */ Builder concurrency(Integer concurrency); } static final class BuilderImpl implements Builder { private String channel; private Integer concurrency; private BuilderImpl() { } private BuilderImpl(MediaConcurrency model) { channel(model.channel); concurrency(model.concurrency); } public final String getChannel() { return channel; } public final void setChannel(String channel) { this.channel = channel; } @Override public final Builder channel(String channel) { this.channel = channel; return this; } @Override public final Builder channel(Channel channel) { this.channel(channel == null ? null : channel.toString()); return this; } public final Integer getConcurrency() { return concurrency; } public final void setConcurrency(Integer concurrency) { this.concurrency = concurrency; } @Override public final Builder concurrency(Integer concurrency) { this.concurrency = concurrency; return this; } @Override public MediaConcurrency build() { return new MediaConcurrency(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy