/*
 * 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.contentwarehouse.v1.model;

/**
 * A NumberType configures a value whose type is intended to be numeric.
 *
 * <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 Document AI Warehouse 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 KnowledgeAnswersNumberType extends com.google.api.client.json.GenericJson {

  /**
   * If true, the semantics of the NumberType argument are retained as a string, rather than being
   * converted to a float-type object. This option is particularly useful in cases where leading 0s
   * in the user input are meaningful, e.g. for zip codes or sports jersey numbers. For the user-
   * specified value "01", for instance, the PathQuery semantics will be: def $Slot "01"
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean keepAsString;

  /**
   * Range constraint limits the set of numbers accepted by this type. The constraint applies to all
   * subtypes. Currently, this constraint is only enforced in Loose Parser.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private KnowledgeAnswersRangeConstraint rangeConstraint;

  /**
   * Contains data about current schema remodelings at this ValueType level. For more information
   * see go/meaning-remodeling-framework.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpMeaningMeaningRemodelings remodelings;

  /**
   * sub_type is a list of the NumberSubTypes which are accepted. If the list is empty, that means
   * all numeric or ordinal values are accepted. If multiple values are specified, then this value
   * accepts any of the sub_types in the list.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> subType;

  /**
   * If true, the semantics of the NumberType argument are retained as a string, rather than being
   * converted to a float-type object. This option is particularly useful in cases where leading 0s
   * in the user input are meaningful, e.g. for zip codes or sports jersey numbers. For the user-
   * specified value "01", for instance, the PathQuery semantics will be: def $Slot "01"
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getKeepAsString() {
    return keepAsString;
  }

  /**
   * If true, the semantics of the NumberType argument are retained as a string, rather than being
   * converted to a float-type object. This option is particularly useful in cases where leading 0s
   * in the user input are meaningful, e.g. for zip codes or sports jersey numbers. For the user-
   * specified value "01", for instance, the PathQuery semantics will be: def $Slot "01"
   * @param keepAsString keepAsString or {@code null} for none
   */
  public KnowledgeAnswersNumberType setKeepAsString(java.lang.Boolean keepAsString) {
    this.keepAsString = keepAsString;
    return this;
  }

  /**
   * Range constraint limits the set of numbers accepted by this type. The constraint applies to all
   * subtypes. Currently, this constraint is only enforced in Loose Parser.
   * @return value or {@code null} for none
   */
  public KnowledgeAnswersRangeConstraint getRangeConstraint() {
    return rangeConstraint;
  }

  /**
   * Range constraint limits the set of numbers accepted by this type. The constraint applies to all
   * subtypes. Currently, this constraint is only enforced in Loose Parser.
   * @param rangeConstraint rangeConstraint or {@code null} for none
   */
  public KnowledgeAnswersNumberType setRangeConstraint(KnowledgeAnswersRangeConstraint rangeConstraint) {
    this.rangeConstraint = rangeConstraint;
    return this;
  }

  /**
   * Contains data about current schema remodelings at this ValueType level. For more information
   * see go/meaning-remodeling-framework.
   * @return value or {@code null} for none
   */
  public NlpMeaningMeaningRemodelings getRemodelings() {
    return remodelings;
  }

  /**
   * Contains data about current schema remodelings at this ValueType level. For more information
   * see go/meaning-remodeling-framework.
   * @param remodelings remodelings or {@code null} for none
   */
  public KnowledgeAnswersNumberType setRemodelings(NlpMeaningMeaningRemodelings remodelings) {
    this.remodelings = remodelings;
    return this;
  }

  /**
   * sub_type is a list of the NumberSubTypes which are accepted. If the list is empty, that means
   * all numeric or ordinal values are accepted. If multiple values are specified, then this value
   * accepts any of the sub_types in the list.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getSubType() {
    return subType;
  }

  /**
   * sub_type is a list of the NumberSubTypes which are accepted. If the list is empty, that means
   * all numeric or ordinal values are accepted. If multiple values are specified, then this value
   * accepts any of the sub_types in the list.
   * @param subType subType or {@code null} for none
   */
  public KnowledgeAnswersNumberType setSubType(java.util.List<java.lang.String> subType) {
    this.subType = subType;
    return this;
  }

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

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

}
