/* * 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.connect.model; import java.io.Serializable; /** *

* Information about the evaluation form. *

*/ public class EvaluationForm implements Serializable { /** *

* The unique identifier for the evaluation form. *

*

* Constraints:
* Length: 1 - 500
*/ private String evaluationFormId; /** *

* A version of the evaluation form. *

*

* Constraints:
* Range: 1 -
*/ private Integer evaluationFormVersion; /** *

* The flag indicating whether the evaluation form is locked for changes. *

*/ private Boolean locked; /** *

* The Amazon Resource Name (ARN) for the evaluation form resource. *

*/ private String evaluationFormArn; /** *

* A title of the evaluation form. *

*

* Constraints:
* Length: 1 - 128
*/ private String title; /** *

* The description of the evaluation form. *

*

* Constraints:
* Length: 0 - 1024
*/ private String description; /** *

* The status of the evaluation form. *

*

* Constraints:
* Allowed Values: DRAFT, ACTIVE */ private String status; /** *

* Items that are part of the evaluation form. The total number of sections * and questions must not exceed 100 each. Questions must be contained in a * section. *

*/ private java.util.List items; /** *

* A scoring strategy of the evaluation form. *

*/ private EvaluationFormScoringStrategy scoringStrategy; /** *

* The timestamp for when the evaluation form was created. *

*/ private java.util.Date createdTime; /** *

* The Amazon Resource Name (ARN) of the user who created the evaluation * form. *

*/ private String createdBy; /** *

* The timestamp for when the evaluation form was last updated. *

*/ private java.util.Date lastModifiedTime; /** *

* The Amazon Resource Name (ARN) of the user who last updated the * evaluation form. *

*/ private String lastModifiedBy; /** *

* The tags used to organize, track, or control access for this resource. * For example, { "tags": {"key1":"value1", "key2":"value2"} }. *

*/ private java.util.Map tags; /** *

* The unique identifier for the evaluation form. *

*

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

* The unique identifier for the evaluation form. *

*/ public String getEvaluationFormId() { return evaluationFormId; } /** *

* The unique identifier for the evaluation form. *

*

* Constraints:
* Length: 1 - 500
* * @param evaluationFormId

* The unique identifier for the evaluation form. *

*/ public void setEvaluationFormId(String evaluationFormId) { this.evaluationFormId = evaluationFormId; } /** *

* The unique identifier for the evaluation form. *

*

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

* Constraints:
* Length: 1 - 500
* * @param evaluationFormId

* The unique identifier for the evaluation form. *

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

* A version of the evaluation form. *

*

* Constraints:
* Range: 1 -
* * @return

* A version of the evaluation form. *

*/ public Integer getEvaluationFormVersion() { return evaluationFormVersion; } /** *

* A version of the evaluation form. *

*

* Constraints:
* Range: 1 -
* * @param evaluationFormVersion

* A version of the evaluation form. *

*/ public void setEvaluationFormVersion(Integer evaluationFormVersion) { this.evaluationFormVersion = evaluationFormVersion; } /** *

* A version of the evaluation form. *

*

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

* Constraints:
* Range: 1 -
* * @param evaluationFormVersion

* A version of the evaluation form. *

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

* The flag indicating whether the evaluation form is locked for changes. *

* * @return

* The flag indicating whether the evaluation form is locked for * changes. *

*/ public Boolean isLocked() { return locked; } /** *

* The flag indicating whether the evaluation form is locked for changes. *

* * @return

* The flag indicating whether the evaluation form is locked for * changes. *

*/ public Boolean getLocked() { return locked; } /** *

* The flag indicating whether the evaluation form is locked for changes. *

* * @param locked

* The flag indicating whether the evaluation form is locked for * changes. *

*/ public void setLocked(Boolean locked) { this.locked = locked; } /** *

* The flag indicating whether the evaluation form is locked for changes. *

*

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

* The flag indicating whether the evaluation form is locked for * changes. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationForm withLocked(Boolean locked) { this.locked = locked; return this; } /** *

* The Amazon Resource Name (ARN) for the evaluation form resource. *

* * @return

* The Amazon Resource Name (ARN) for the evaluation form resource. *

*/ public String getEvaluationFormArn() { return evaluationFormArn; } /** *

* The Amazon Resource Name (ARN) for the evaluation form resource. *

* * @param evaluationFormArn

* The Amazon Resource Name (ARN) for the evaluation form * resource. *

*/ public void setEvaluationFormArn(String evaluationFormArn) { this.evaluationFormArn = evaluationFormArn; } /** *

* The Amazon Resource Name (ARN) for the evaluation form resource. *

*

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

* The Amazon Resource Name (ARN) for the evaluation form * resource. *

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

* A title of the evaluation form. *

*

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

* A title of the evaluation form. *

*/ public String getTitle() { return title; } /** *

* A title of the evaluation form. *

*

* Constraints:
* Length: 1 - 128
* * @param title

* A title of the evaluation form. *

*/ public void setTitle(String title) { this.title = title; } /** *

* A title of the evaluation form. *

*

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

* Constraints:
* Length: 1 - 128
* * @param title

* A title of the evaluation form. *

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

* The description of the evaluation form. *

*

* Constraints:
* Length: 0 - 1024
* * @return

* The description of the evaluation form. *

*/ public String getDescription() { return description; } /** *

* The description of the evaluation form. *

*

* Constraints:
* Length: 0 - 1024
* * @param description

* The description of the evaluation form. *

*/ public void setDescription(String description) { this.description = description; } /** *

* The description of the evaluation form. *

*

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

* Constraints:
* Length: 0 - 1024
* * @param description

* The description of the evaluation form. *

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

* The status of the evaluation form. *

*

* Constraints:
* Allowed Values: DRAFT, ACTIVE * * @return

* The status of the evaluation form. *

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

* The status of the evaluation form. *

*

* Constraints:
* Allowed Values: DRAFT, ACTIVE * * @param status

* The status of the evaluation form. *

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

* The status of the evaluation form. *

*

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

* Constraints:
* Allowed Values: DRAFT, ACTIVE * * @param status

* The status of the evaluation form. *

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

* The status of the evaluation form. *

*

* Constraints:
* Allowed Values: DRAFT, ACTIVE * * @param status

* The status of the evaluation form. *

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

* The status of the evaluation form. *

*

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

* Constraints:
* Allowed Values: DRAFT, ACTIVE * * @param status

* The status of the evaluation form. *

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

* Items that are part of the evaluation form. The total number of sections * and questions must not exceed 100 each. Questions must be contained in a * section. *

* * @return

* Items that are part of the evaluation form. The total number of * sections and questions must not exceed 100 each. Questions must * be contained in a section. *

*/ public java.util.List getItems() { return items; } /** *

* Items that are part of the evaluation form. The total number of sections * and questions must not exceed 100 each. Questions must be contained in a * section. *

* * @param items

* Items that are part of the evaluation form. The total number * of sections and questions must not exceed 100 each. Questions * must be contained in a section. *

*/ public void setItems(java.util.Collection items) { if (items == null) { this.items = null; return; } this.items = new java.util.ArrayList(items); } /** *

* Items that are part of the evaluation form. The total number of sections * and questions must not exceed 100 each. Questions must be contained in a * section. *

*

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

* Items that are part of the evaluation form. The total number * of sections and questions must not exceed 100 each. Questions * must be contained in a section. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationForm withItems(EvaluationFormItem... items) { if (getItems() == null) { this.items = new java.util.ArrayList(items.length); } for (EvaluationFormItem value : items) { this.items.add(value); } return this; } /** *

* Items that are part of the evaluation form. The total number of sections * and questions must not exceed 100 each. Questions must be contained in a * section. *

*

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

* Items that are part of the evaluation form. The total number * of sections and questions must not exceed 100 each. Questions * must be contained in a section. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationForm withItems(java.util.Collection items) { setItems(items); return this; } /** *

* A scoring strategy of the evaluation form. *

* * @return

* A scoring strategy of the evaluation form. *

*/ public EvaluationFormScoringStrategy getScoringStrategy() { return scoringStrategy; } /** *

* A scoring strategy of the evaluation form. *

* * @param scoringStrategy

* A scoring strategy of the evaluation form. *

*/ public void setScoringStrategy(EvaluationFormScoringStrategy scoringStrategy) { this.scoringStrategy = scoringStrategy; } /** *

* A scoring strategy of the evaluation form. *

*

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

* A scoring strategy of the evaluation form. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationForm withScoringStrategy(EvaluationFormScoringStrategy scoringStrategy) { this.scoringStrategy = scoringStrategy; return this; } /** *

* The timestamp for when the evaluation form was created. *

* * @return

* The timestamp for when the evaluation form was created. *

*/ public java.util.Date getCreatedTime() { return createdTime; } /** *

* The timestamp for when the evaluation form was created. *

* * @param createdTime

* The timestamp for when the evaluation form was created. *

*/ public void setCreatedTime(java.util.Date createdTime) { this.createdTime = createdTime; } /** *

* The timestamp for when the evaluation form was created. *

*

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

* The timestamp for when the evaluation form was created. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationForm withCreatedTime(java.util.Date createdTime) { this.createdTime = createdTime; return this; } /** *

* The Amazon Resource Name (ARN) of the user who created the evaluation * form. *

* * @return

* The Amazon Resource Name (ARN) of the user who created the * evaluation form. *

*/ public String getCreatedBy() { return createdBy; } /** *

* The Amazon Resource Name (ARN) of the user who created the evaluation * form. *

* * @param createdBy

* The Amazon Resource Name (ARN) of the user who created the * evaluation form. *

*/ public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } /** *

* The Amazon Resource Name (ARN) of the user who created the evaluation * form. *

*

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

* The Amazon Resource Name (ARN) of the user who created the * evaluation form. *

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

* The timestamp for when the evaluation form was last updated. *

* * @return

* The timestamp for when the evaluation form was last updated. *

*/ public java.util.Date getLastModifiedTime() { return lastModifiedTime; } /** *

* The timestamp for when the evaluation form was last updated. *

* * @param lastModifiedTime

* The timestamp for when the evaluation form was last updated. *

*/ public void setLastModifiedTime(java.util.Date lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; } /** *

* The timestamp for when the evaluation form was last updated. *

*

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

* The timestamp for when the evaluation form was last updated. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationForm withLastModifiedTime(java.util.Date lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; return this; } /** *

* The Amazon Resource Name (ARN) of the user who last updated the * evaluation form. *

* * @return

* The Amazon Resource Name (ARN) of the user who last updated the * evaluation form. *

*/ public String getLastModifiedBy() { return lastModifiedBy; } /** *

* The Amazon Resource Name (ARN) of the user who last updated the * evaluation form. *

* * @param lastModifiedBy

* The Amazon Resource Name (ARN) of the user who last updated * the evaluation form. *

*/ public void setLastModifiedBy(String lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; } /** *

* The Amazon Resource Name (ARN) of the user who last updated the * evaluation form. *

*

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

* The Amazon Resource Name (ARN) of the user who last updated * the evaluation form. *

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

* The tags used to organize, track, or control access for this resource. * For example, { "tags": {"key1":"value1", "key2":"value2"} }. *

* * @return

* The tags used to organize, track, or control access for this * resource. For example, { "tags": {"key1":"value1", * "key2":"value2"} }. *

*/ public java.util.Map getTags() { return tags; } /** *

* The tags used to organize, track, or control access for this resource. * For example, { "tags": {"key1":"value1", "key2":"value2"} }. *

* * @param tags

* The tags used to organize, track, or control access for this * resource. For example, { "tags": {"key1":"value1", * "key2":"value2"} }. *

*/ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* The tags used to organize, track, or control access for this resource. * For example, { "tags": {"key1":"value1", "key2":"value2"} }. *

*

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

* The tags used to organize, track, or control access for this * resource. For example, { "tags": {"key1":"value1", * "key2":"value2"} }. *

* @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationForm withTags(java.util.Map tags) { this.tags = tags; return this; } /** *

* The tags used to organize, track, or control access for this resource. * For example, { "tags": {"key1":"value1", "key2":"value2"} }. *

*

* The method adds a new key-value pair into Tags parameter, and returns a * reference to this object so that method calls can be chained together. * * @param key The key of the entry to be added into Tags. * @param value The corresponding value of the entry to be added into Tags. * @return A reference to this updated object so that method calls can be * chained together. */ public EvaluationForm addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. *

* Returns a reference to this object so that method calls can be chained * together. */ public EvaluationForm clearTagsEntries() { this.tags = null; 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 (getEvaluationFormId() != null) sb.append("EvaluationFormId: " + getEvaluationFormId() + ","); if (getEvaluationFormVersion() != null) sb.append("EvaluationFormVersion: " + getEvaluationFormVersion() + ","); if (getLocked() != null) sb.append("Locked: " + getLocked() + ","); if (getEvaluationFormArn() != null) sb.append("EvaluationFormArn: " + getEvaluationFormArn() + ","); if (getTitle() != null) sb.append("Title: " + getTitle() + ","); if (getDescription() != null) sb.append("Description: " + getDescription() + ","); if (getStatus() != null) sb.append("Status: " + getStatus() + ","); if (getItems() != null) sb.append("Items: " + getItems() + ","); if (getScoringStrategy() != null) sb.append("ScoringStrategy: " + getScoringStrategy() + ","); if (getCreatedTime() != null) sb.append("CreatedTime: " + getCreatedTime() + ","); if (getCreatedBy() != null) sb.append("CreatedBy: " + getCreatedBy() + ","); if (getLastModifiedTime() != null) sb.append("LastModifiedTime: " + getLastModifiedTime() + ","); if (getLastModifiedBy() != null) sb.append("LastModifiedBy: " + getLastModifiedBy() + ","); if (getTags() != null) sb.append("Tags: " + getTags()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEvaluationFormId() == null) ? 0 : getEvaluationFormId().hashCode()); hashCode = prime * hashCode + ((getEvaluationFormVersion() == null) ? 0 : getEvaluationFormVersion().hashCode()); hashCode = prime * hashCode + ((getLocked() == null) ? 0 : getLocked().hashCode()); hashCode = prime * hashCode + ((getEvaluationFormArn() == null) ? 0 : getEvaluationFormArn().hashCode()); hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getItems() == null) ? 0 : getItems().hashCode()); hashCode = prime * hashCode + ((getScoringStrategy() == null) ? 0 : getScoringStrategy().hashCode()); hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); hashCode = prime * hashCode + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode()); hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode()); hashCode = prime * hashCode + ((getLastModifiedBy() == null) ? 0 : getLastModifiedBy().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EvaluationForm == false) return false; EvaluationForm other = (EvaluationForm) obj; if (other.getEvaluationFormId() == null ^ this.getEvaluationFormId() == null) return false; if (other.getEvaluationFormId() != null && other.getEvaluationFormId().equals(this.getEvaluationFormId()) == false) return false; if (other.getEvaluationFormVersion() == null ^ this.getEvaluationFormVersion() == null) return false; if (other.getEvaluationFormVersion() != null && other.getEvaluationFormVersion().equals(this.getEvaluationFormVersion()) == false) return false; if (other.getLocked() == null ^ this.getLocked() == null) return false; if (other.getLocked() != null && other.getLocked().equals(this.getLocked()) == false) return false; if (other.getEvaluationFormArn() == null ^ this.getEvaluationFormArn() == null) return false; if (other.getEvaluationFormArn() != null && other.getEvaluationFormArn().equals(this.getEvaluationFormArn()) == false) return false; if (other.getTitle() == null ^ this.getTitle() == null) return false; if (other.getTitle() != null && other.getTitle().equals(this.getTitle()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getItems() == null ^ this.getItems() == null) return false; if (other.getItems() != null && other.getItems().equals(this.getItems()) == false) return false; if (other.getScoringStrategy() == null ^ this.getScoringStrategy() == null) return false; if (other.getScoringStrategy() != null && other.getScoringStrategy().equals(this.getScoringStrategy()) == false) return false; if (other.getCreatedTime() == null ^ this.getCreatedTime() == null) return false; if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false) return false; if (other.getCreatedBy() == null ^ this.getCreatedBy() == null) return false; if (other.getCreatedBy() != null && other.getCreatedBy().equals(this.getCreatedBy()) == false) return false; if (other.getLastModifiedTime() == null ^ this.getLastModifiedTime() == null) return false; if (other.getLastModifiedTime() != null && other.getLastModifiedTime().equals(this.getLastModifiedTime()) == false) return false; if (other.getLastModifiedBy() == null ^ this.getLastModifiedBy() == null) return false; if (other.getLastModifiedBy() != null && other.getLastModifiedBy().equals(this.getLastModifiedBy()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } }