/*
 * 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;

/**
 * To represent unanchored durations - the length of a date/time expression not related to calendar
 * in local context. E.g., "play first (DURATION: 5 minutes) of Yellow Submarine", "it takes
 * (DURATION: more than 3 days) to finish." In contrast, queries like: "wake me up in 5 minutes"
 * will be resolved to a AbsoluteDateTime since the query indicates that the reference is now. A
 * duration can be turned into a range if either end is anchored.
 *
 * <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 NlpSemanticParsingDatetimeDuration extends com.google.api.client.json.GenericJson {

  /**
   * This field of the Duration message should not in general be used by outside clients of the
   * grammar. It is intended to be used internally in Aqua for evaluation purposes. The rationale is
   * that token counts depend on the particular tokenization used in Aqua which may be different
   * from the one used by the client and may change from time to time. Outside clients should not
   * create a dependency on the current tokenization used in Aqua.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingAnnotationEvalData evalData;

  /**
   * For expressions such as "about 2 hrs".
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String modifier;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingDatetimeQuantity quantity;

  /**
   * See comments of Span.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingDatetimeSpan span;

  /**
   * This field of the Duration message should not in general be used by outside clients of the
   * grammar. It is intended to be used internally in Aqua for evaluation purposes. The rationale is
   * that token counts depend on the particular tokenization used in Aqua which may be different
   * from the one used by the client and may change from time to time. Outside clients should not
   * create a dependency on the current tokenization used in Aqua.
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingAnnotationEvalData getEvalData() {
    return evalData;
  }

  /**
   * This field of the Duration message should not in general be used by outside clients of the
   * grammar. It is intended to be used internally in Aqua for evaluation purposes. The rationale is
   * that token counts depend on the particular tokenization used in Aqua which may be different
   * from the one used by the client and may change from time to time. Outside clients should not
   * create a dependency on the current tokenization used in Aqua.
   * @param evalData evalData or {@code null} for none
   */
  public NlpSemanticParsingDatetimeDuration setEvalData(NlpSemanticParsingAnnotationEvalData evalData) {
    this.evalData = evalData;
    return this;
  }

  /**
   * For expressions such as "about 2 hrs".
   * @return value or {@code null} for none
   */
  public java.lang.String getModifier() {
    return modifier;
  }

  /**
   * For expressions such as "about 2 hrs".
   * @param modifier modifier or {@code null} for none
   */
  public NlpSemanticParsingDatetimeDuration setModifier(java.lang.String modifier) {
    this.modifier = modifier;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingDatetimeQuantity getQuantity() {
    return quantity;
  }

  /**
   * @param quantity quantity or {@code null} for none
   */
  public NlpSemanticParsingDatetimeDuration setQuantity(NlpSemanticParsingDatetimeQuantity quantity) {
    this.quantity = quantity;
    return this;
  }

  /**
   * See comments of Span.
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingDatetimeSpan getSpan() {
    return span;
  }

  /**
   * See comments of Span.
   * @param span span or {@code null} for none
   */
  public NlpSemanticParsingDatetimeDuration setSpan(NlpSemanticParsingDatetimeSpan span) {
    this.span = span;
    return this;
  }

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

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

}
