/* * 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.connectparticipant.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *
* Creates the participant's connection. *
*
* ParticipantToken
is used for invoking this API instead of
* ConnectionToken
.
*
* The participant token is valid for the lifetime of the participant – until * they are part of a contact. *
*
* The response URL for WEBSOCKET
Type has a connect expiry timeout
* of 100s. Clients must manually connect to the returned websocket URL and
* subscribe to the desired topic.
*
* For chat, you need to publish the following on the established websocket * connection: *
*
* {"topic":"aws/subscribe","content":{"topics":["aws/chat"]}}
*
* Upon websocket URL expiry, as specified in the response ConnectionExpiry * parameter, clients need to call this API again to obtain a new websocket URL * and perform the same steps as before. *
** Message streaming support: This API can also be used together with the * StartContactStreaming API to create a participant connection for chat * contacts that are not using a websocket. For more information about message * streaming, Enable real-time chat message streaming in the Amazon Connect * Administrator Guide. *
** Feature specifications: For information about feature specifications, * such as the allowed number of open websocket connections per participant, see * Feature specifications in the Amazon Connect Administrator Guide. *
** The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication. *
*
* Type of connection information required. This can be omitted if
* ConnectParticipant
is true
.
*
* This is a header parameter. *
** The ParticipantToken as obtained from StartChatContact API response. *
*
* Constraints:
* Length: 1 - 1000
*/
private String participantToken;
/**
*
* Amazon Connect Participant is used to mark the participant as connected * for customer participant in message streaming, as well as for agent or * manager participant in non-streaming chats. *
*/ private Boolean connectParticipant; /** *
* Type of connection information required. This can be omitted if
* ConnectParticipant
is true
.
*
* Type of connection information required. This can be omitted if
* ConnectParticipant
is true
.
*
* Type of connection information required. This can be omitted if
* ConnectParticipant
is true
.
*
* Type of connection information required. This can be omitted
* if ConnectParticipant
is true
.
*
* Type of connection information required. This can be omitted if
* ConnectParticipant
is true
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param type
* Type of connection information required. This can be omitted
* if ConnectParticipant
is true
.
*
* Type of connection information required. This can be omitted if
* ConnectParticipant
is true
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param type
* Type of connection information required. This can be omitted
* if ConnectParticipant
is true
.
*
* This is a header parameter. *
** The ParticipantToken as obtained from StartChatContact API response. *
*
* Constraints:
* Length: 1 - 1000
*
* @return
* This is a header parameter. *
** The ParticipantToken as obtained from StartChatContact API response. *
*/ public String getParticipantToken() { return participantToken; } /** ** This is a header parameter. *
** The ParticipantToken as obtained from StartChatContact API response. *
*
* Constraints:
* Length: 1 - 1000
*
* @param participantToken
* This is a header parameter. *
** The ParticipantToken as obtained from StartChatContact API response. *
*/ public void setParticipantToken(String participantToken) { this.participantToken = participantToken; } /** ** This is a header parameter. *
** The ParticipantToken as obtained from StartChatContact API response. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 1000
*
* @param participantToken
* This is a header parameter. *
** The ParticipantToken as obtained from StartChatContact API response. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateParticipantConnectionRequest withParticipantToken(String participantToken) { this.participantToken = participantToken; return this; } /** ** Amazon Connect Participant is used to mark the participant as connected * for customer participant in message streaming, as well as for agent or * manager participant in non-streaming chats. *
* * @return* Amazon Connect Participant is used to mark the participant as * connected for customer participant in message streaming, as well * as for agent or manager participant in non-streaming chats. *
*/ public Boolean isConnectParticipant() { return connectParticipant; } /** ** Amazon Connect Participant is used to mark the participant as connected * for customer participant in message streaming, as well as for agent or * manager participant in non-streaming chats. *
* * @return* Amazon Connect Participant is used to mark the participant as * connected for customer participant in message streaming, as well * as for agent or manager participant in non-streaming chats. *
*/ public Boolean getConnectParticipant() { return connectParticipant; } /** ** Amazon Connect Participant is used to mark the participant as connected * for customer participant in message streaming, as well as for agent or * manager participant in non-streaming chats. *
* * @param connectParticipant* Amazon Connect Participant is used to mark the participant as * connected for customer participant in message streaming, as * well as for agent or manager participant in non-streaming * chats. *
*/ public void setConnectParticipant(Boolean connectParticipant) { this.connectParticipant = connectParticipant; } /** ** Amazon Connect Participant is used to mark the participant as connected * for customer participant in message streaming, as well as for agent or * manager participant in non-streaming chats. *
** Returns a reference to this object so that method calls can be chained * together. * * @param connectParticipant
* Amazon Connect Participant is used to mark the participant as * connected for customer participant in message streaming, as * well as for agent or manager participant in non-streaming * chats. *
* @return A reference to this updated object so that method calls can be * chained together. */ public CreateParticipantConnectionRequest withConnectParticipant(Boolean connectParticipant) { this.connectParticipant = connectParticipant; 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 (getType() != null) sb.append("Type: " + getType() + ","); if (getParticipantToken() != null) sb.append("ParticipantToken: " + getParticipantToken() + ","); if (getConnectParticipant() != null) sb.append("ConnectParticipant: " + getConnectParticipant()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getParticipantToken() == null) ? 0 : getParticipantToken().hashCode()); hashCode = prime * hashCode + ((getConnectParticipant() == null) ? 0 : getConnectParticipant().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateParticipantConnectionRequest == false) return false; CreateParticipantConnectionRequest other = (CreateParticipantConnectionRequest) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getParticipantToken() == null ^ this.getParticipantToken() == null) return false; if (other.getParticipantToken() != null && other.getParticipantToken().equals(this.getParticipantToken()) == false) return false; if (other.getConnectParticipant() == null ^ this.getConnectParticipant() == null) return false; if (other.getConnectParticipant() != null && other.getConnectParticipant().equals(this.getConnectParticipant()) == false) return false; return true; } }