/* * 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.transcribe.model; import java.io.Serializable; /** *
* Makes it possible to specify which speaker is on which channel. For example,
* if your agent is the first participant to speak, you would set
* ChannelId
to 0
(to indicate the first channel) and
* ParticipantRole
to AGENT
(to indicate that it's the
* agent speaking).
*
* Specify the audio channel you want to define. *
*
* Constraints:
* Range: 0 - 1
*/
private Integer channelId;
/**
*
* Specify the speaker you want to define. Omitting this parameter is * equivalent to specifying both participants. *
*
* Constraints:
* Allowed Values: AGENT, CUSTOMER
*/
private String participantRole;
/**
*
* Specify the audio channel you want to define. *
*
* Constraints:
* Range: 0 - 1
*
* @return
* Specify the audio channel you want to define. *
*/ public Integer getChannelId() { return channelId; } /** ** Specify the audio channel you want to define. *
*
* Constraints:
* Range: 0 - 1
*
* @param channelId
* Specify the audio channel you want to define. *
*/ public void setChannelId(Integer channelId) { this.channelId = channelId; } /** ** Specify the audio channel you want to define. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0 - 1
*
* @param channelId
* Specify the audio channel you want to define. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ChannelDefinition withChannelId(Integer channelId) { this.channelId = channelId; return this; } /** ** Specify the speaker you want to define. Omitting this parameter is * equivalent to specifying both participants. *
*
* Constraints:
* Allowed Values: AGENT, CUSTOMER
*
* @return
* Specify the speaker you want to define. Omitting this parameter * is equivalent to specifying both participants. *
* @see ParticipantRole */ public String getParticipantRole() { return participantRole; } /** ** Specify the speaker you want to define. Omitting this parameter is * equivalent to specifying both participants. *
*
* Constraints:
* Allowed Values: AGENT, CUSTOMER
*
* @param participantRole
* Specify the speaker you want to define. Omitting this * parameter is equivalent to specifying both participants. *
* @see ParticipantRole */ public void setParticipantRole(String participantRole) { this.participantRole = participantRole; } /** ** Specify the speaker you want to define. Omitting this parameter is * equivalent to specifying both participants. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: AGENT, CUSTOMER
*
* @param participantRole
* Specify the speaker you want to define. Omitting this * parameter is equivalent to specifying both participants. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ParticipantRole */ public ChannelDefinition withParticipantRole(String participantRole) { this.participantRole = participantRole; return this; } /** ** Specify the speaker you want to define. Omitting this parameter is * equivalent to specifying both participants. *
*
* Constraints:
* Allowed Values: AGENT, CUSTOMER
*
* @param participantRole
* Specify the speaker you want to define. Omitting this * parameter is equivalent to specifying both participants. *
* @see ParticipantRole */ public void setParticipantRole(ParticipantRole participantRole) { this.participantRole = participantRole.toString(); } /** ** Specify the speaker you want to define. Omitting this parameter is * equivalent to specifying both participants. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: AGENT, CUSTOMER
*
* @param participantRole
* Specify the speaker you want to define. Omitting this * parameter is equivalent to specifying both participants. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ParticipantRole */ public ChannelDefinition withParticipantRole(ParticipantRole participantRole) { this.participantRole = participantRole.toString(); 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 (getChannelId() != null) sb.append("ChannelId: " + getChannelId() + ","); if (getParticipantRole() != null) sb.append("ParticipantRole: " + getParticipantRole()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getChannelId() == null) ? 0 : getChannelId().hashCode()); hashCode = prime * hashCode + ((getParticipantRole() == null) ? 0 : getParticipantRole().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ChannelDefinition == false) return false; ChannelDefinition other = (ChannelDefinition) obj; if (other.getChannelId() == null ^ this.getChannelId() == null) return false; if (other.getChannelId() != null && other.getChannelId().equals(this.getChannelId()) == false) return false; if (other.getParticipantRole() == null ^ this.getParticipantRole() == null) return false; if (other.getParticipantRole() != null && other.getParticipantRole().equals(this.getParticipantRole()) == false) return false; return true; } }