/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * 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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.datacatalog.v1.model;

/**
 * The template for an individual field within a tag template.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Google Cloud Data Catalog API. For a detailed
 * explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GoogleCloudDatacatalogV1TagTemplateField extends com.google.api.client.json.GenericJson {

  /**
   * The description for this field. Defaults to an empty string.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String description;

  /**
   * The display name for this field. Defaults to an empty string. The name must contain only
   * Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and can't start or end
   * with spaces. The maximum length is 200 characters.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String displayName;

  /**
   * If true, this field is required. Defaults to false.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean isRequired;

  /**
   * Output only. The resource name of the tag template field in URL format. Example:
   * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}` Note:
   * The tag template field itself might not be stored in the location specified in its name. The
   * name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start
   * with a letter or underscore. The maximum length is 64 characters.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * The order of this field with respect to other fields in this tag template. For example, a
   * higher value can indicate a more important field. The value can be negative. Multiple fields
   * can have the same order and field orders within a tag don't have to be sequential.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer order;

  /**
   * Required. The type of value this tag field can contain.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudDatacatalogV1FieldType type;

  /**
   * The description for this field. Defaults to an empty string.
   * @return value or {@code null} for none
   */
  public java.lang.String getDescription() {
    return description;
  }

  /**
   * The description for this field. Defaults to an empty string.
   * @param description description or {@code null} for none
   */
  public GoogleCloudDatacatalogV1TagTemplateField setDescription(java.lang.String description) {
    this.description = description;
    return this;
  }

  /**
   * The display name for this field. Defaults to an empty string. The name must contain only
   * Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and can't start or end
   * with spaces. The maximum length is 200 characters.
   * @return value or {@code null} for none
   */
  public java.lang.String getDisplayName() {
    return displayName;
  }

  /**
   * The display name for this field. Defaults to an empty string. The name must contain only
   * Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), and can't start or end
   * with spaces. The maximum length is 200 characters.
   * @param displayName displayName or {@code null} for none
   */
  public GoogleCloudDatacatalogV1TagTemplateField setDisplayName(java.lang.String displayName) {
    this.displayName = displayName;
    return this;
  }

  /**
   * If true, this field is required. Defaults to false.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getIsRequired() {
    return isRequired;
  }

  /**
   * If true, this field is required. Defaults to false.
   * @param isRequired isRequired or {@code null} for none
   */
  public GoogleCloudDatacatalogV1TagTemplateField setIsRequired(java.lang.Boolean isRequired) {
    this.isRequired = isRequired;
    return this;
  }

  /**
   * Output only. The resource name of the tag template field in URL format. Example:
   * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}` Note:
   * The tag template field itself might not be stored in the location specified in its name. The
   * name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start
   * with a letter or underscore. The maximum length is 64 characters.
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Output only. The resource name of the tag template field in URL format. Example:
   * `projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE}/fields/{FIELD}` Note:
   * The tag template field itself might not be stored in the location specified in its name. The
   * name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start
   * with a letter or underscore. The maximum length is 64 characters.
   * @param name name or {@code null} for none
   */
  public GoogleCloudDatacatalogV1TagTemplateField setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * The order of this field with respect to other fields in this tag template. For example, a
   * higher value can indicate a more important field. The value can be negative. Multiple fields
   * can have the same order and field orders within a tag don't have to be sequential.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getOrder() {
    return order;
  }

  /**
   * The order of this field with respect to other fields in this tag template. For example, a
   * higher value can indicate a more important field. The value can be negative. Multiple fields
   * can have the same order and field orders within a tag don't have to be sequential.
   * @param order order or {@code null} for none
   */
  public GoogleCloudDatacatalogV1TagTemplateField setOrder(java.lang.Integer order) {
    this.order = order;
    return this;
  }

  /**
   * Required. The type of value this tag field can contain.
   * @return value or {@code null} for none
   */
  public GoogleCloudDatacatalogV1FieldType getType() {
    return type;
  }

  /**
   * Required. The type of value this tag field can contain.
   * @param type type or {@code null} for none
   */
  public GoogleCloudDatacatalogV1TagTemplateField setType(GoogleCloudDatacatalogV1FieldType type) {
    this.type = type;
    return this;
  }

  @Override
  public GoogleCloudDatacatalogV1TagTemplateField set(String fieldName, Object value) {
    return (GoogleCloudDatacatalogV1TagTemplateField) super.set(fieldName, value);
  }

  @Override
  public GoogleCloudDatacatalogV1TagTemplateField clone() {
    return (GoogleCloudDatacatalogV1TagTemplateField) super.clone();
  }

}
