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

* The case-insensitive input to indicate standard MIME type that describes the * format of the file that will be uploaded. *

*/ public class AttachmentItem implements Serializable { /** *

* Describes the MIME file type of the attachment. For a list of supported * file types, see Feature specifications in the Amazon Connect Administrator * Guide. *

*

* Constraints:
* Length: 1 - 255
*/ private String contentType; /** *

* A unique identifier for the attachment. *

*

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

* A case-sensitive name of the attachment being uploaded. *

*

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

* Status of the attachment. *

*

* Constraints:
* Allowed Values: APPROVED, REJECTED, IN_PROGRESS */ private String status; /** *

* Describes the MIME file type of the attachment. For a list of supported * file types, see Feature specifications in the Amazon Connect Administrator * Guide. *

*

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

* Describes the MIME file type of the attachment. For a list of * supported file types, see Feature specifications in the Amazon Connect * Administrator Guide. *

*/ public String getContentType() { return contentType; } /** *

* Describes the MIME file type of the attachment. For a list of supported * file types, see Feature specifications in the Amazon Connect Administrator * Guide. *

*

* Constraints:
* Length: 1 - 255
* * @param contentType

* Describes the MIME file type of the attachment. For a list of * supported file types, see Feature specifications in the Amazon Connect * Administrator Guide. *

*/ public void setContentType(String contentType) { this.contentType = contentType; } /** *

* Describes the MIME file type of the attachment. For a list of supported * file types, see Feature specifications in the Amazon Connect Administrator * Guide. *

*

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

* Constraints:
* Length: 1 - 255
* * @param contentType

* Describes the MIME file type of the attachment. For a list of * supported file types, see Feature specifications in the Amazon Connect * Administrator Guide. *

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

* A unique identifier for the attachment. *

*

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

* A unique identifier for the attachment. *

*/ public String getAttachmentId() { return attachmentId; } /** *

* A unique identifier for the attachment. *

*

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

* A unique identifier for the attachment. *

*/ public void setAttachmentId(String attachmentId) { this.attachmentId = attachmentId; } /** *

* A unique identifier for the attachment. *

*

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

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

* A unique identifier for the attachment. *

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

* A case-sensitive name of the attachment being uploaded. *

*

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

* A case-sensitive name of the attachment being uploaded. *

*/ public String getAttachmentName() { return attachmentName; } /** *

* A case-sensitive name of the attachment being uploaded. *

*

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

* A case-sensitive name of the attachment being uploaded. *

*/ public void setAttachmentName(String attachmentName) { this.attachmentName = attachmentName; } /** *

* A case-sensitive name of the attachment being uploaded. *

*

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

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

* A case-sensitive name of the attachment being uploaded. *

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

* Status of the attachment. *

*

* Constraints:
* Allowed Values: APPROVED, REJECTED, IN_PROGRESS * * @return

* Status of the attachment. *

* @see ArtifactStatus */ public String getStatus() { return status; } /** *

* Status of the attachment. *

*

* Constraints:
* Allowed Values: APPROVED, REJECTED, IN_PROGRESS * * @param status

* Status of the attachment. *

* @see ArtifactStatus */ public void setStatus(String status) { this.status = status; } /** *

* Status of the attachment. *

*

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

* Constraints:
* Allowed Values: APPROVED, REJECTED, IN_PROGRESS * * @param status

* Status of the attachment. *

* @return A reference to this updated object so that method calls can be * chained together. * @see ArtifactStatus */ public AttachmentItem withStatus(String status) { this.status = status; return this; } /** *

* Status of the attachment. *

*

* Constraints:
* Allowed Values: APPROVED, REJECTED, IN_PROGRESS * * @param status

* Status of the attachment. *

* @see ArtifactStatus */ public void setStatus(ArtifactStatus status) { this.status = status.toString(); } /** *

* Status of the attachment. *

*

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

* Constraints:
* Allowed Values: APPROVED, REJECTED, IN_PROGRESS * * @param status

* Status of the attachment. *

* @return A reference to this updated object so that method calls can be * chained together. * @see ArtifactStatus */ public AttachmentItem withStatus(ArtifactStatus status) { this.status = status.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 (getContentType() != null) sb.append("ContentType: " + getContentType() + ","); if (getAttachmentId() != null) sb.append("AttachmentId: " + getAttachmentId() + ","); if (getAttachmentName() != null) sb.append("AttachmentName: " + getAttachmentName() + ","); if (getStatus() != null) sb.append("Status: " + getStatus()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getContentType() == null) ? 0 : getContentType().hashCode()); hashCode = prime * hashCode + ((getAttachmentId() == null) ? 0 : getAttachmentId().hashCode()); hashCode = prime * hashCode + ((getAttachmentName() == null) ? 0 : getAttachmentName().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AttachmentItem == false) return false; AttachmentItem other = (AttachmentItem) obj; if (other.getContentType() == null ^ this.getContentType() == null) return false; if (other.getContentType() != null && other.getContentType().equals(this.getContentType()) == false) return false; if (other.getAttachmentId() == null ^ this.getAttachmentId() == null) return false; if (other.getAttachmentId() != null && other.getAttachmentId().equals(this.getAttachmentId()) == false) return false; if (other.getAttachmentName() == null ^ this.getAttachmentName() == null) return false; if (other.getAttachmentName() != null && other.getAttachmentName().equals(this.getAttachmentName()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; return true; } }