/* * 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; /** *

* Retrieves a transcript of the session, including details about any * attachments. For information about accessing past chat contact transcripts * for a persistent chat, see Enable persistent chat. *

* *

* ConnectionToken is used for invoking this API instead of * ParticipantToken. *

*
*

* The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication. *

*/ public class GetTranscriptRequest extends AmazonWebServiceRequest implements Serializable { /** *

* The contactId from the current contact chain for which transcript is * needed. *

*

* Constraints:
* Length: 1 - 256
*/ private String contactId; /** *

* The maximum number of results to return in the page. Default: 10. *

*

* Constraints:
* Range: 0 - 100
*/ private Integer maxResults; /** *

* The pagination token. Use the value returned previously in the next * subsequent request to retrieve the next set of results. *

*

* Constraints:
* Length: 1 - 1000
*/ private String nextToken; /** *

* The direction from StartPosition from which to retrieve message. Default: * BACKWARD when no StartPosition is provided, FORWARD with StartPosition. *

*

* Constraints:
* Allowed Values: FORWARD, BACKWARD */ private String scanDirection; /** *

* The sort order for the records. Default: DESCENDING. *

*

* Constraints:
* Allowed Values: DESCENDING, ASCENDING */ private String sortOrder; /** *

* A filtering option for where to start. *

*/ private StartPosition startPosition; /** *

* The authentication token associated with the participant's connection. *

*

* Constraints:
* Length: 1 - 1000
*/ private String connectionToken; /** *

* The contactId from the current contact chain for which transcript is * needed. *

*

* Constraints:
* Length: 1 - 256
* * @return

* The contactId from the current contact chain for which transcript * is needed. *

*/ public String getContactId() { return contactId; } /** *

* The contactId from the current contact chain for which transcript is * needed. *

*

* Constraints:
* Length: 1 - 256
* * @param contactId

* The contactId from the current contact chain for which * transcript is needed. *

*/ public void setContactId(String contactId) { this.contactId = contactId; } /** *

* The contactId from the current contact chain for which transcript is * needed. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 256
* * @param contactId

* The contactId from the current contact chain for which * transcript is needed. *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetTranscriptRequest withContactId(String contactId) { this.contactId = contactId; return this; } /** *

* The maximum number of results to return in the page. Default: 10. *

*

* Constraints:
* Range: 0 - 100
* * @return

* The maximum number of results to return in the page. Default: 10. *

*/ public Integer getMaxResults() { return maxResults; } /** *

* The maximum number of results to return in the page. Default: 10. *

*

* Constraints:
* Range: 0 - 100
* * @param maxResults

* The maximum number of results to return in the page. Default: * 10. *

*/ public void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } /** *

* The maximum number of results to return in the page. Default: 10. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Range: 0 - 100
* * @param maxResults

* The maximum number of results to return in the page. Default: * 10. *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetTranscriptRequest withMaxResults(Integer maxResults) { this.maxResults = maxResults; return this; } /** *

* The pagination token. Use the value returned previously in the next * subsequent request to retrieve the next set of results. *

*

* Constraints:
* Length: 1 - 1000
* * @return

* The pagination token. Use the value returned previously in the * next subsequent request to retrieve the next set of results. *

*/ public String getNextToken() { return nextToken; } /** *

* The pagination token. Use the value returned previously in the next * subsequent request to retrieve the next set of results. *

*

* Constraints:
* Length: 1 - 1000
* * @param nextToken

* The pagination token. Use the value returned previously in the * next subsequent request to retrieve the next set of results. *

*/ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* The pagination token. Use the value returned previously in the next * subsequent request to retrieve the next set of results. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 1000
* * @param nextToken

* The pagination token. Use the value returned previously in the * next subsequent request to retrieve the next set of results. *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetTranscriptRequest withNextToken(String nextToken) { this.nextToken = nextToken; return this; } /** *

* The direction from StartPosition from which to retrieve message. Default: * BACKWARD when no StartPosition is provided, FORWARD with StartPosition. *

*

* Constraints:
* Allowed Values: FORWARD, BACKWARD * * @return

* The direction from StartPosition from which to retrieve message. * Default: BACKWARD when no StartPosition is provided, FORWARD with * StartPosition. *

* @see ScanDirection */ public String getScanDirection() { return scanDirection; } /** *

* The direction from StartPosition from which to retrieve message. Default: * BACKWARD when no StartPosition is provided, FORWARD with StartPosition. *

*

* Constraints:
* Allowed Values: FORWARD, BACKWARD * * @param scanDirection

* The direction from StartPosition from which to retrieve * message. Default: BACKWARD when no StartPosition is provided, * FORWARD with StartPosition. *

* @see ScanDirection */ public void setScanDirection(String scanDirection) { this.scanDirection = scanDirection; } /** *

* The direction from StartPosition from which to retrieve message. Default: * BACKWARD when no StartPosition is provided, FORWARD with StartPosition. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: FORWARD, BACKWARD * * @param scanDirection

* The direction from StartPosition from which to retrieve * message. Default: BACKWARD when no StartPosition is provided, * FORWARD with StartPosition. *

* @return A reference to this updated object so that method calls can be * chained together. * @see ScanDirection */ public GetTranscriptRequest withScanDirection(String scanDirection) { this.scanDirection = scanDirection; return this; } /** *

* The direction from StartPosition from which to retrieve message. Default: * BACKWARD when no StartPosition is provided, FORWARD with StartPosition. *

*

* Constraints:
* Allowed Values: FORWARD, BACKWARD * * @param scanDirection

* The direction from StartPosition from which to retrieve * message. Default: BACKWARD when no StartPosition is provided, * FORWARD with StartPosition. *

* @see ScanDirection */ public void setScanDirection(ScanDirection scanDirection) { this.scanDirection = scanDirection.toString(); } /** *

* The direction from StartPosition from which to retrieve message. Default: * BACKWARD when no StartPosition is provided, FORWARD with StartPosition. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: FORWARD, BACKWARD * * @param scanDirection

* The direction from StartPosition from which to retrieve * message. Default: BACKWARD when no StartPosition is provided, * FORWARD with StartPosition. *

* @return A reference to this updated object so that method calls can be * chained together. * @see ScanDirection */ public GetTranscriptRequest withScanDirection(ScanDirection scanDirection) { this.scanDirection = scanDirection.toString(); return this; } /** *

* The sort order for the records. Default: DESCENDING. *

*

* Constraints:
* Allowed Values: DESCENDING, ASCENDING * * @return

* The sort order for the records. Default: DESCENDING. *

* @see SortKey */ public String getSortOrder() { return sortOrder; } /** *

* The sort order for the records. Default: DESCENDING. *

*

* Constraints:
* Allowed Values: DESCENDING, ASCENDING * * @param sortOrder

* The sort order for the records. Default: DESCENDING. *

* @see SortKey */ public void setSortOrder(String sortOrder) { this.sortOrder = sortOrder; } /** *

* The sort order for the records. Default: DESCENDING. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: DESCENDING, ASCENDING * * @param sortOrder

* The sort order for the records. Default: DESCENDING. *

* @return A reference to this updated object so that method calls can be * chained together. * @see SortKey */ public GetTranscriptRequest withSortOrder(String sortOrder) { this.sortOrder = sortOrder; return this; } /** *

* The sort order for the records. Default: DESCENDING. *

*

* Constraints:
* Allowed Values: DESCENDING, ASCENDING * * @param sortOrder

* The sort order for the records. Default: DESCENDING. *

* @see SortKey */ public void setSortOrder(SortKey sortOrder) { this.sortOrder = sortOrder.toString(); } /** *

* The sort order for the records. Default: DESCENDING. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: DESCENDING, ASCENDING * * @param sortOrder

* The sort order for the records. Default: DESCENDING. *

* @return A reference to this updated object so that method calls can be * chained together. * @see SortKey */ public GetTranscriptRequest withSortOrder(SortKey sortOrder) { this.sortOrder = sortOrder.toString(); return this; } /** *

* A filtering option for where to start. *

* * @return

* A filtering option for where to start. *

*/ public StartPosition getStartPosition() { return startPosition; } /** *

* A filtering option for where to start. *

* * @param startPosition

* A filtering option for where to start. *

*/ public void setStartPosition(StartPosition startPosition) { this.startPosition = startPosition; } /** *

* A filtering option for where to start. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param startPosition

* A filtering option for where to start. *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetTranscriptRequest withStartPosition(StartPosition startPosition) { this.startPosition = startPosition; return this; } /** *

* The authentication token associated with the participant's connection. *

*

* Constraints:
* Length: 1 - 1000
* * @return

* The authentication token associated with the participant's * connection. *

*/ public String getConnectionToken() { return connectionToken; } /** *

* The authentication token associated with the participant's connection. *

*

* Constraints:
* Length: 1 - 1000
* * @param connectionToken

* The authentication token associated with the participant's * connection. *

*/ public void setConnectionToken(String connectionToken) { this.connectionToken = connectionToken; } /** *

* The authentication token associated with the participant's connection. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 1000
* * @param connectionToken

* The authentication token associated with the participant's * connection. *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetTranscriptRequest withConnectionToken(String connectionToken) { this.connectionToken = connectionToken; 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 (getContactId() != null) sb.append("ContactId: " + getContactId() + ","); if (getMaxResults() != null) sb.append("MaxResults: " + getMaxResults() + ","); if (getNextToken() != null) sb.append("NextToken: " + getNextToken() + ","); if (getScanDirection() != null) sb.append("ScanDirection: " + getScanDirection() + ","); if (getSortOrder() != null) sb.append("SortOrder: " + getSortOrder() + ","); if (getStartPosition() != null) sb.append("StartPosition: " + getStartPosition() + ","); if (getConnectionToken() != null) sb.append("ConnectionToken: " + getConnectionToken()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getContactId() == null) ? 0 : getContactId().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getScanDirection() == null) ? 0 : getScanDirection().hashCode()); hashCode = prime * hashCode + ((getSortOrder() == null) ? 0 : getSortOrder().hashCode()); hashCode = prime * hashCode + ((getStartPosition() == null) ? 0 : getStartPosition().hashCode()); hashCode = prime * hashCode + ((getConnectionToken() == null) ? 0 : getConnectionToken().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetTranscriptRequest == false) return false; GetTranscriptRequest other = (GetTranscriptRequest) obj; if (other.getContactId() == null ^ this.getContactId() == null) return false; if (other.getContactId() != null && other.getContactId().equals(this.getContactId()) == false) return false; if (other.getMaxResults() == null ^ this.getMaxResults() == null) return false; if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getScanDirection() == null ^ this.getScanDirection() == null) return false; if (other.getScanDirection() != null && other.getScanDirection().equals(this.getScanDirection()) == false) return false; if (other.getSortOrder() == null ^ this.getSortOrder() == null) return false; if (other.getSortOrder() != null && other.getSortOrder().equals(this.getSortOrder()) == false) return false; if (other.getStartPosition() == null ^ this.getStartPosition() == null) return false; if (other.getStartPosition() != null && other.getStartPosition().equals(this.getStartPosition()) == false) return false; if (other.getConnectionToken() == null ^ this.getConnectionToken() == null) return false; if (other.getConnectionToken() != null && other.getConnectionToken().equals(this.getConnectionToken()) == false) return false; return true; } }