/* * 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; public class GetTaskTemplateResult implements Serializable { /** *
* The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the * instance. *
*
* Constraints:
* Length: 1 - 100
*/
private String instanceId;
/**
*
* A unique identifier for the task template. *
*
* Constraints:
* Length: 1 - 500
*/
private String id;
/**
*
* The Amazon Resource Name (ARN). *
*
* Constraints:
* Length: 1 - 500
*/
private String arn;
/**
*
* The name of the task template. *
*
* Constraints:
* Length: 1 - 100
*/
private String name;
/**
*
* The description of the task template. *
*
* Constraints:
* Length: 1 - 255
*/
private String description;
/**
*
* The identifier of the flow that runs by default when a task is created by * referencing this template. *
*
* Constraints:
* Length: - 500
*/
private String contactFlowId;
/**
*
* Constraints that are applicable to the fields listed. *
*/ private TaskTemplateConstraints constraints; /** ** The default values for fields when a task is created by referencing this * template. *
*/ private TaskTemplateDefaults defaults; /** ** Fields that are part of the template. *
*/ private java.util.List
* Marks a template as ACTIVE
or INACTIVE
for a
* task to refer to it. Tasks can only be created from ACTIVE
* templates. If a template is marked as INACTIVE
, then a task
* that refers to this template cannot be created.
*
* Constraints:
* Allowed Values: ACTIVE, INACTIVE
*/
private String status;
/**
*
* The timestamp when the task template was last modified. *
*/ private java.util.Date lastModifiedTime; /** ** The timestamp when the task template was created. *
*/ private java.util.Date createdTime; /** ** The tags used to organize, track, or control access for this resource. * For example, { "tags": {"key1":"value1", "key2":"value2"} }. *
*/ private java.util.Map* The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the * instance. *
*
* Constraints:
* Length: 1 - 100
*
* @return
* The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of * the instance. *
*/ public String getInstanceId() { return instanceId; } /** ** The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the * instance. *
*
* Constraints:
* Length: 1 - 100
*
* @param instanceId
* The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of * the instance. *
*/ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** ** The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the * instance. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 100
*
* @param instanceId
* The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of * the instance. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetTaskTemplateResult withInstanceId(String instanceId) { this.instanceId = instanceId; return this; } /** ** A unique identifier for the task template. *
*
* Constraints:
* Length: 1 - 500
*
* @return
* A unique identifier for the task template. *
*/ public String getId() { return id; } /** ** A unique identifier for the task template. *
*
* Constraints:
* Length: 1 - 500
*
* @param id
* A unique identifier for the task template. *
*/ public void setId(String id) { this.id = id; } /** ** A unique identifier for the task template. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 500
*
* @param id
* A unique identifier for the task template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetTaskTemplateResult withId(String id) { this.id = id; return this; } /** ** The Amazon Resource Name (ARN). *
*
* Constraints:
* Length: 1 - 500
*
* @return
* The Amazon Resource Name (ARN). *
*/ public String getArn() { return arn; } /** ** The Amazon Resource Name (ARN). *
*
* Constraints:
* Length: 1 - 500
*
* @param arn
* The Amazon Resource Name (ARN). *
*/ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN). *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 500
*
* @param arn
* The Amazon Resource Name (ARN). *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetTaskTemplateResult withArn(String arn) { this.arn = arn; return this; } /** ** The name of the task template. *
*
* Constraints:
* Length: 1 - 100
*
* @return
* The name of the task template. *
*/ public String getName() { return name; } /** ** The name of the task template. *
*
* Constraints:
* Length: 1 - 100
*
* @param name
* The name of the task template. *
*/ public void setName(String name) { this.name = name; } /** ** The name of the task template. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 100
*
* @param name
* The name of the task template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetTaskTemplateResult withName(String name) { this.name = name; return this; } /** ** The description of the task template. *
*
* Constraints:
* Length: 1 - 255
*
* @return
* The description of the task template. *
*/ public String getDescription() { return description; } /** ** The description of the task template. *
*
* Constraints:
* Length: 1 - 255
*
* @param description
* The description of the task template. *
*/ public void setDescription(String description) { this.description = description; } /** ** The description of the task template. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 255
*
* @param description
* The description of the task template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetTaskTemplateResult withDescription(String description) { this.description = description; return this; } /** ** The identifier of the flow that runs by default when a task is created by * referencing this template. *
*
* Constraints:
* Length: - 500
*
* @return
* The identifier of the flow that runs by default when a task is * created by referencing this template. *
*/ public String getContactFlowId() { return contactFlowId; } /** ** The identifier of the flow that runs by default when a task is created by * referencing this template. *
*
* Constraints:
* Length: - 500
*
* @param contactFlowId
* The identifier of the flow that runs by default when a task is * created by referencing this template. *
*/ public void setContactFlowId(String contactFlowId) { this.contactFlowId = contactFlowId; } /** ** The identifier of the flow that runs by default when a task is created by * referencing this template. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 500
*
* @param contactFlowId
* The identifier of the flow that runs by default when a task is * created by referencing this template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetTaskTemplateResult withContactFlowId(String contactFlowId) { this.contactFlowId = contactFlowId; return this; } /** ** Constraints that are applicable to the fields listed. *
* * @return* Constraints that are applicable to the fields listed. *
*/ public TaskTemplateConstraints getConstraints() { return constraints; } /** ** Constraints that are applicable to the fields listed. *
* * @param constraints* Constraints that are applicable to the fields listed. *
*/ public void setConstraints(TaskTemplateConstraints constraints) { this.constraints = constraints; } /** ** Constraints that are applicable to the fields listed. *
** Returns a reference to this object so that method calls can be chained * together. * * @param constraints
* Constraints that are applicable to the fields listed. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetTaskTemplateResult withConstraints(TaskTemplateConstraints constraints) { this.constraints = constraints; return this; } /** ** The default values for fields when a task is created by referencing this * template. *
* * @return* The default values for fields when a task is created by * referencing this template. *
*/ public TaskTemplateDefaults getDefaults() { return defaults; } /** ** The default values for fields when a task is created by referencing this * template. *
* * @param defaults* The default values for fields when a task is created by * referencing this template. *
*/ public void setDefaults(TaskTemplateDefaults defaults) { this.defaults = defaults; } /** ** The default values for fields when a task is created by referencing this * template. *
** Returns a reference to this object so that method calls can be chained * together. * * @param defaults
* The default values for fields when a task is created by * referencing this template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetTaskTemplateResult withDefaults(TaskTemplateDefaults defaults) { this.defaults = defaults; return this; } /** ** Fields that are part of the template. *
* * @return* Fields that are part of the template. *
*/ public java.util.List* Fields that are part of the template. *
* * @param fields* Fields that are part of the template. *
*/ public void setFields(java.util.Collection* Fields that are part of the template. *
** Returns a reference to this object so that method calls can be chained * together. * * @param fields
* Fields that are part of the template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetTaskTemplateResult withFields(TaskTemplateField... fields) { if (getFields() == null) { this.fields = new java.util.ArrayList* Fields that are part of the template. *
** Returns a reference to this object so that method calls can be chained * together. * * @param fields
* Fields that are part of the template. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetTaskTemplateResult withFields(java.util.Collection
* Marks a template as ACTIVE
or INACTIVE
for a
* task to refer to it. Tasks can only be created from ACTIVE
* templates. If a template is marked as INACTIVE
, then a task
* that refers to this template cannot be created.
*
* Constraints:
* Allowed Values: ACTIVE, INACTIVE
*
* @return
* Marks a template as ACTIVE
or INACTIVE
* for a task to refer to it. Tasks can only be created from
* ACTIVE
templates. If a template is marked as
* INACTIVE
, then a task that refers to this template
* cannot be created.
*
* Marks a template as ACTIVE
or INACTIVE
for a
* task to refer to it. Tasks can only be created from ACTIVE
* templates. If a template is marked as INACTIVE
, then a task
* that refers to this template cannot be created.
*
* Constraints:
* Allowed Values: ACTIVE, INACTIVE
*
* @param status
* Marks a template as ACTIVE
or
* INACTIVE
for a task to refer to it. Tasks can
* only be created from ACTIVE
templates. If a
* template is marked as INACTIVE
, then a task that
* refers to this template cannot be created.
*
* Marks a template as ACTIVE
or INACTIVE
for a
* task to refer to it. Tasks can only be created from ACTIVE
* templates. If a template is marked as INACTIVE
, then a task
* that refers to this template cannot be created.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: ACTIVE, INACTIVE
*
* @param status
* Marks a template as ACTIVE
or
* INACTIVE
for a task to refer to it. Tasks can
* only be created from ACTIVE
templates. If a
* template is marked as INACTIVE
, then a task that
* refers to this template cannot be created.
*
* Marks a template as ACTIVE
or INACTIVE
for a
* task to refer to it. Tasks can only be created from ACTIVE
* templates. If a template is marked as INACTIVE
, then a task
* that refers to this template cannot be created.
*
* Constraints:
* Allowed Values: ACTIVE, INACTIVE
*
* @param status
* Marks a template as ACTIVE
or
* INACTIVE
for a task to refer to it. Tasks can
* only be created from ACTIVE
templates. If a
* template is marked as INACTIVE
, then a task that
* refers to this template cannot be created.
*
* Marks a template as ACTIVE
or INACTIVE
for a
* task to refer to it. Tasks can only be created from ACTIVE
* templates. If a template is marked as INACTIVE
, then a task
* that refers to this template cannot be created.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: ACTIVE, INACTIVE
*
* @param status
* Marks a template as ACTIVE
or
* INACTIVE
for a task to refer to it. Tasks can
* only be created from ACTIVE
templates. If a
* template is marked as INACTIVE
, then a task that
* refers to this template cannot be created.
*
* The timestamp when the task template was last modified. *
* * @return* The timestamp when the task template was last modified. *
*/ public java.util.Date getLastModifiedTime() { return lastModifiedTime; } /** ** The timestamp when the task template was last modified. *
* * @param lastModifiedTime* The timestamp when the task template was last modified. *
*/ public void setLastModifiedTime(java.util.Date lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; } /** ** The timestamp when the task template was last modified. *
** Returns a reference to this object so that method calls can be chained * together. * * @param lastModifiedTime
* The timestamp when the task template was last modified. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetTaskTemplateResult withLastModifiedTime(java.util.Date lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; return this; } /** ** The timestamp when the task template was created. *
* * @return* The timestamp when the task template was created. *
*/ public java.util.Date getCreatedTime() { return createdTime; } /** ** The timestamp when the task template was created. *
* * @param createdTime* The timestamp when the task template was created. *
*/ public void setCreatedTime(java.util.Date createdTime) { this.createdTime = createdTime; } /** ** The timestamp when the task template was created. *
** Returns a reference to this object so that method calls can be chained * together. * * @param createdTime
* The timestamp when the task template was created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public GetTaskTemplateResult withCreatedTime(java.util.Date createdTime) { this.createdTime = createdTime; 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* 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* 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 GetTaskTemplateResult withTags(java.util.Map* 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 GetTaskTemplateResult addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap
* Returns a reference to this object so that method calls can be chained
* together.
*/
public GetTaskTemplateResult 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 (getInstanceId() != null)
sb.append("InstanceId: " + getInstanceId() + ",");
if (getId() != null)
sb.append("Id: " + getId() + ",");
if (getArn() != null)
sb.append("Arn: " + getArn() + ",");
if (getName() != null)
sb.append("Name: " + getName() + ",");
if (getDescription() != null)
sb.append("Description: " + getDescription() + ",");
if (getContactFlowId() != null)
sb.append("ContactFlowId: " + getContactFlowId() + ",");
if (getConstraints() != null)
sb.append("Constraints: " + getConstraints() + ",");
if (getDefaults() != null)
sb.append("Defaults: " + getDefaults() + ",");
if (getFields() != null)
sb.append("Fields: " + getFields() + ",");
if (getStatus() != null)
sb.append("Status: " + getStatus() + ",");
if (getLastModifiedTime() != null)
sb.append("LastModifiedTime: " + getLastModifiedTime() + ",");
if (getCreatedTime() != null)
sb.append("CreatedTime: " + getCreatedTime() + ",");
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 + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode
+ ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode
+ ((getContactFlowId() == null) ? 0 : getContactFlowId().hashCode());
hashCode = prime * hashCode
+ ((getConstraints() == null) ? 0 : getConstraints().hashCode());
hashCode = prime * hashCode + ((getDefaults() == null) ? 0 : getDefaults().hashCode());
hashCode = prime * hashCode + ((getFields() == null) ? 0 : getFields().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode
+ ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode());
hashCode = prime * hashCode
+ ((getCreatedTime() == null) ? 0 : getCreatedTime().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 GetTaskTemplateResult == false)
return false;
GetTaskTemplateResult other = (GetTaskTemplateResult) obj;
if (other.getInstanceId() == null ^ this.getInstanceId() == null)
return false;
if (other.getInstanceId() != null
&& other.getInstanceId().equals(this.getInstanceId()) == false)
return false;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == 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.getContactFlowId() == null ^ this.getContactFlowId() == null)
return false;
if (other.getContactFlowId() != null
&& other.getContactFlowId().equals(this.getContactFlowId()) == false)
return false;
if (other.getConstraints() == null ^ this.getConstraints() == null)
return false;
if (other.getConstraints() != null
&& other.getConstraints().equals(this.getConstraints()) == false)
return false;
if (other.getDefaults() == null ^ this.getDefaults() == null)
return false;
if (other.getDefaults() != null && other.getDefaults().equals(this.getDefaults()) == false)
return false;
if (other.getFields() == null ^ this.getFields() == null)
return false;
if (other.getFields() != null && other.getFields().equals(this.getFields()) == 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.getLastModifiedTime() == null ^ this.getLastModifiedTime() == null)
return false;
if (other.getLastModifiedTime() != null
&& other.getLastModifiedTime().equals(this.getLastModifiedTime()) == 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.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
}