/* * 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; /** *
* Describes a single task template field. *
*/ public class TaskTemplateField implements Serializable { /** ** The unique identifier for the field. *
*/ private TaskTemplateFieldIdentifier id; /** ** The description of the field. *
*
* Constraints:
* Length: 1 - 255
*/
private String description;
/**
*
* Indicates the type of field. *
*
* Constraints:
* Allowed Values: NAME, DESCRIPTION, SCHEDULED_TIME, QUICK_CONNECT,
* URL, NUMBER, TEXT, TEXT_AREA, DATE_TIME, BOOLEAN, SINGLE_SELECT, EMAIL
*/
private String type;
/**
*
* A list of options for a single select field. *
*/ private java.util.List* The unique identifier for the field. *
* * @return* The unique identifier for the field. *
*/ public TaskTemplateFieldIdentifier getId() { return id; } /** ** The unique identifier for the field. *
* * @param id* The unique identifier for the field. *
*/ public void setId(TaskTemplateFieldIdentifier id) { this.id = id; } /** ** The unique identifier for the field. *
** Returns a reference to this object so that method calls can be chained * together. * * @param id
* The unique identifier for the field. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TaskTemplateField withId(TaskTemplateFieldIdentifier id) { this.id = id; return this; } /** ** The description of the field. *
*
* Constraints:
* Length: 1 - 255
*
* @return
* The description of the field. *
*/ public String getDescription() { return description; } /** ** The description of the field. *
*
* Constraints:
* Length: 1 - 255
*
* @param description
* The description of the field. *
*/ public void setDescription(String description) { this.description = description; } /** ** The description of the field. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 255
*
* @param description
* The description of the field. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TaskTemplateField withDescription(String description) { this.description = description; return this; } /** ** Indicates the type of field. *
*
* Constraints:
* Allowed Values: NAME, DESCRIPTION, SCHEDULED_TIME, QUICK_CONNECT,
* URL, NUMBER, TEXT, TEXT_AREA, DATE_TIME, BOOLEAN, SINGLE_SELECT, EMAIL
*
* @return
* Indicates the type of field. *
* @see TaskTemplateFieldType */ public String getType() { return type; } /** ** Indicates the type of field. *
*
* Constraints:
* Allowed Values: NAME, DESCRIPTION, SCHEDULED_TIME, QUICK_CONNECT,
* URL, NUMBER, TEXT, TEXT_AREA, DATE_TIME, BOOLEAN, SINGLE_SELECT, EMAIL
*
* @param type
* Indicates the type of field. *
* @see TaskTemplateFieldType */ public void setType(String type) { this.type = type; } /** ** Indicates the type of field. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: NAME, DESCRIPTION, SCHEDULED_TIME, QUICK_CONNECT,
* URL, NUMBER, TEXT, TEXT_AREA, DATE_TIME, BOOLEAN, SINGLE_SELECT, EMAIL
*
* @param type
* Indicates the type of field. *
* @return A reference to this updated object so that method calls can be * chained together. * @see TaskTemplateFieldType */ public TaskTemplateField withType(String type) { this.type = type; return this; } /** ** Indicates the type of field. *
*
* Constraints:
* Allowed Values: NAME, DESCRIPTION, SCHEDULED_TIME, QUICK_CONNECT,
* URL, NUMBER, TEXT, TEXT_AREA, DATE_TIME, BOOLEAN, SINGLE_SELECT, EMAIL
*
* @param type
* Indicates the type of field. *
* @see TaskTemplateFieldType */ public void setType(TaskTemplateFieldType type) { this.type = type.toString(); } /** ** Indicates the type of field. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: NAME, DESCRIPTION, SCHEDULED_TIME, QUICK_CONNECT,
* URL, NUMBER, TEXT, TEXT_AREA, DATE_TIME, BOOLEAN, SINGLE_SELECT, EMAIL
*
* @param type
* Indicates the type of field. *
* @return A reference to this updated object so that method calls can be * chained together. * @see TaskTemplateFieldType */ public TaskTemplateField withType(TaskTemplateFieldType type) { this.type = type.toString(); return this; } /** ** A list of options for a single select field. *
* * @return* A list of options for a single select field. *
*/ public java.util.List* A list of options for a single select field. *
* * @param singleSelectOptions* A list of options for a single select field. *
*/ public void setSingleSelectOptions(java.util.Collection* A list of options for a single select field. *
** Returns a reference to this object so that method calls can be chained * together. * * @param singleSelectOptions
* A list of options for a single select field. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TaskTemplateField withSingleSelectOptions(String... singleSelectOptions) { if (getSingleSelectOptions() == null) { this.singleSelectOptions = new java.util.ArrayList* A list of options for a single select field. *
** Returns a reference to this object so that method calls can be chained * together. * * @param singleSelectOptions
* A list of options for a single select field. *
* @return A reference to this updated object so that method calls can be * chained together. */ public TaskTemplateField withSingleSelectOptions( java.util.Collection