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

/**
 * Next ID: 26 LINT.IfChange
 *
 * <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 NlpSemanticParsingLocalLocationElement extends com.google.api.client.json.GenericJson {

  /**
   * For elements with a NICKNAME alias location, this field will hold all matching alias icons,
   * which are used in search to resolve the location.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<PersonalizationMapsAliasIcon> aliasIcon;

  /**
   * The following fields (alias_location, qref_location, and saft_location) should have at most one
   * non-empty value between them.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String aliasLocation;

  /**
   * Set only when type is BUSINESS_NAME or BUSINESS_CATEGORY.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingLocalBusinessType businessType;

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

  /**
   * This will hold semantics from the dialog_referents subgrammar with offsets and indices relating
   * to a list of results shown to the user. This field is repeated while in the future we could
   * support multiple item list selection. i.e. [the starbucks] where multiple entries in the
   * results will be indicated here
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<NlpSemanticParsingModelsDialogReferentsDialogReferents> dialogReferents;

  /**
   * Set only when type is DIRECTIONAL_MODIFIER.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String directionalModifier;

  /**
   * DEPRECATED. See basic_location.element.type == LOCATION_REFERENT to determine this instead.
   * Populated by a type VISITED local action, this field is used to indicate a location element is
   * a general-case $PT_visited_location string.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean genericLocation;

  /**
   * Set only when business_type is hotel.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingLocalHotelType hotelType;

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

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

  /**
   * A field used to store the ID of a specific location entity, especially one not extracted via
   * QRef. For example, - a location selected by the users via a dialog follow-up query like [the
   * second one]. Will only be populated in the LocalSemanticsServlet, not in the grammar. - a
   * location resolved based on a full search, e.g., following the geocoding step for a directions
   * query. This field is also used by NoramlizeLocationForFingerprinting as the canonical place to
   * store FeatureIds.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingLocalLocalResultId localResultId;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer numBytes;

  /**
   * Represents zip codes, street numbers, etc. that were detected directly by the grammar (and not,
   * e.g., by QRef). DEPRECATED. We ran into problems with zip codes having leading zeroes. Now we
   * store numbers only in the text field.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer number;

  /**
   * A collection of QRefAnnotations repesenting Reference and Resolution data for Personal
   * References. See go/copley-local and go/copley-annotator.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private NlpSemanticParsingPersonalReferenceAnnotation personalReferenceLocation;

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

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

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String source;

  /**
   * The byte span, in the raw query, which corresponds to this location element.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer startByte;

  /**
   * A string representation of the location element. Typical, this field will be populated by the
   * MakeLocationElementFn semantic function with the substring of the raw_query defined by
   * start_byte and num_bytes. However, the field can also be populated explicitly in the grammar,
   * in which case MakeLocationElementFn leaves it alone.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String text;

  /**
   * Train number associated with /collection/geo/transit_line. Populated when user requests
   * specific instance of a transit line. For example, long distance trains in India have two
   * numbers for each train, one for up direction and other for down. And user use these numbers in
   * queries along with name to specify the specific trip of the train. More details in go/number-
   * transit-line-queries.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String transitLineNumber;

  /**
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String type;

  /**
   * For elements with a NICKNAME alias location, this field will hold all matching alias icons,
   * which are used in search to resolve the location.
   * @return value or {@code null} for none
   */
  public java.util.List<PersonalizationMapsAliasIcon> getAliasIcon() {
    return aliasIcon;
  }

  /**
   * For elements with a NICKNAME alias location, this field will hold all matching alias icons,
   * which are used in search to resolve the location.
   * @param aliasIcon aliasIcon or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setAliasIcon(java.util.List<PersonalizationMapsAliasIcon> aliasIcon) {
    this.aliasIcon = aliasIcon;
    return this;
  }

  /**
   * The following fields (alias_location, qref_location, and saft_location) should have at most one
   * non-empty value between them.
   * @return value or {@code null} for none
   */
  public java.lang.String getAliasLocation() {
    return aliasLocation;
  }

  /**
   * The following fields (alias_location, qref_location, and saft_location) should have at most one
   * non-empty value between them.
   * @param aliasLocation aliasLocation or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setAliasLocation(java.lang.String aliasLocation) {
    this.aliasLocation = aliasLocation;
    return this;
  }

  /**
   * Set only when type is BUSINESS_NAME or BUSINESS_CATEGORY.
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingLocalBusinessType getBusinessType() {
    return businessType;
  }

  /**
   * Set only when type is BUSINESS_NAME or BUSINESS_CATEGORY.
   * @param businessType businessType or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setBusinessType(NlpSemanticParsingLocalBusinessType businessType) {
    this.businessType = businessType;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingLocalContactLocation getContactLocation() {
    return contactLocation;
  }

  /**
   * @param contactLocation contactLocation or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setContactLocation(NlpSemanticParsingLocalContactLocation contactLocation) {
    this.contactLocation = contactLocation;
    return this;
  }

  /**
   * This will hold semantics from the dialog_referents subgrammar with offsets and indices relating
   * to a list of results shown to the user. This field is repeated while in the future we could
   * support multiple item list selection. i.e. [the starbucks] where multiple entries in the
   * results will be indicated here
   * @return value or {@code null} for none
   */
  public java.util.List<NlpSemanticParsingModelsDialogReferentsDialogReferents> getDialogReferents() {
    return dialogReferents;
  }

  /**
   * This will hold semantics from the dialog_referents subgrammar with offsets and indices relating
   * to a list of results shown to the user. This field is repeated while in the future we could
   * support multiple item list selection. i.e. [the starbucks] where multiple entries in the
   * results will be indicated here
   * @param dialogReferents dialogReferents or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setDialogReferents(java.util.List<NlpSemanticParsingModelsDialogReferentsDialogReferents> dialogReferents) {
    this.dialogReferents = dialogReferents;
    return this;
  }

  /**
   * Set only when type is DIRECTIONAL_MODIFIER.
   * @return value or {@code null} for none
   */
  public java.lang.String getDirectionalModifier() {
    return directionalModifier;
  }

  /**
   * Set only when type is DIRECTIONAL_MODIFIER.
   * @param directionalModifier directionalModifier or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setDirectionalModifier(java.lang.String directionalModifier) {
    this.directionalModifier = directionalModifier;
    return this;
  }

  /**
   * DEPRECATED. See basic_location.element.type == LOCATION_REFERENT to determine this instead.
   * Populated by a type VISITED local action, this field is used to indicate a location element is
   * a general-case $PT_visited_location string.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getGenericLocation() {
    return genericLocation;
  }

  /**
   * DEPRECATED. See basic_location.element.type == LOCATION_REFERENT to determine this instead.
   * Populated by a type VISITED local action, this field is used to indicate a location element is
   * a general-case $PT_visited_location string.
   * @param genericLocation genericLocation or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setGenericLocation(java.lang.Boolean genericLocation) {
    this.genericLocation = genericLocation;
    return this;
  }

  /**
   * Set only when business_type is hotel.
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingLocalHotelType getHotelType() {
    return hotelType;
  }

  /**
   * Set only when business_type is hotel.
   * @param hotelType hotelType or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setHotelType(NlpSemanticParsingLocalHotelType hotelType) {
    this.hotelType = hotelType;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingLocalHyperReliableData getHyperReliableData() {
    return hyperReliableData;
  }

  /**
   * @param hyperReliableData hyperReliableData or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setHyperReliableData(NlpSemanticParsingLocalHyperReliableData hyperReliableData) {
    this.hyperReliableData = hyperReliableData;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingLocalImplicitLocalCategory getImplicitLocalCategory() {
    return implicitLocalCategory;
  }

  /**
   * @param implicitLocalCategory implicitLocalCategory or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setImplicitLocalCategory(NlpSemanticParsingLocalImplicitLocalCategory implicitLocalCategory) {
    this.implicitLocalCategory = implicitLocalCategory;
    return this;
  }

  /**
   * A field used to store the ID of a specific location entity, especially one not extracted via
   * QRef. For example, - a location selected by the users via a dialog follow-up query like [the
   * second one]. Will only be populated in the LocalSemanticsServlet, not in the grammar. - a
   * location resolved based on a full search, e.g., following the geocoding step for a directions
   * query. This field is also used by NoramlizeLocationForFingerprinting as the canonical place to
   * store FeatureIds.
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingLocalLocalResultId getLocalResultId() {
    return localResultId;
  }

  /**
   * A field used to store the ID of a specific location entity, especially one not extracted via
   * QRef. For example, - a location selected by the users via a dialog follow-up query like [the
   * second one]. Will only be populated in the LocalSemanticsServlet, not in the grammar. - a
   * location resolved based on a full search, e.g., following the geocoding step for a directions
   * query. This field is also used by NoramlizeLocationForFingerprinting as the canonical place to
   * store FeatureIds.
   * @param localResultId localResultId or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setLocalResultId(NlpSemanticParsingLocalLocalResultId localResultId) {
    this.localResultId = localResultId;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.Integer getNumBytes() {
    return numBytes;
  }

  /**
   * @param numBytes numBytes or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setNumBytes(java.lang.Integer numBytes) {
    this.numBytes = numBytes;
    return this;
  }

  /**
   * Represents zip codes, street numbers, etc. that were detected directly by the grammar (and not,
   * e.g., by QRef). DEPRECATED. We ran into problems with zip codes having leading zeroes. Now we
   * store numbers only in the text field.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getNumber() {
    return number;
  }

  /**
   * Represents zip codes, street numbers, etc. that were detected directly by the grammar (and not,
   * e.g., by QRef). DEPRECATED. We ran into problems with zip codes having leading zeroes. Now we
   * store numbers only in the text field.
   * @param number number or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setNumber(java.lang.Integer number) {
    this.number = number;
    return this;
  }

  /**
   * A collection of QRefAnnotations repesenting Reference and Resolution data for Personal
   * References. See go/copley-local and go/copley-annotator.
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingPersonalReferenceAnnotation getPersonalReferenceLocation() {
    return personalReferenceLocation;
  }

  /**
   * A collection of QRefAnnotations repesenting Reference and Resolution data for Personal
   * References. See go/copley-local and go/copley-annotator.
   * @param personalReferenceLocation personalReferenceLocation or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setPersonalReferenceLocation(NlpSemanticParsingPersonalReferenceAnnotation personalReferenceLocation) {
    this.personalReferenceLocation = personalReferenceLocation;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingQRefAnnotation getQrefLocation() {
    return qrefLocation;
  }

  /**
   * @param qrefLocation qrefLocation or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setQrefLocation(NlpSemanticParsingQRefAnnotation qrefLocation) {
    this.qrefLocation = qrefLocation;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public NlpSemanticParsingSaftMentionAnnotation getSaftLocation() {
    return saftLocation;
  }

  /**
   * @param saftLocation saftLocation or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setSaftLocation(NlpSemanticParsingSaftMentionAnnotation saftLocation) {
    this.saftLocation = saftLocation;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.String getSource() {
    return source;
  }

  /**
   * @param source source or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setSource(java.lang.String source) {
    this.source = source;
    return this;
  }

  /**
   * The byte span, in the raw query, which corresponds to this location element.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getStartByte() {
    return startByte;
  }

  /**
   * The byte span, in the raw query, which corresponds to this location element.
   * @param startByte startByte or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setStartByte(java.lang.Integer startByte) {
    this.startByte = startByte;
    return this;
  }

  /**
   * A string representation of the location element. Typical, this field will be populated by the
   * MakeLocationElementFn semantic function with the substring of the raw_query defined by
   * start_byte and num_bytes. However, the field can also be populated explicitly in the grammar,
   * in which case MakeLocationElementFn leaves it alone.
   * @return value or {@code null} for none
   */
  public java.lang.String getText() {
    return text;
  }

  /**
   * A string representation of the location element. Typical, this field will be populated by the
   * MakeLocationElementFn semantic function with the substring of the raw_query defined by
   * start_byte and num_bytes. However, the field can also be populated explicitly in the grammar,
   * in which case MakeLocationElementFn leaves it alone.
   * @param text text or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setText(java.lang.String text) {
    this.text = text;
    return this;
  }

  /**
   * Train number associated with /collection/geo/transit_line. Populated when user requests
   * specific instance of a transit line. For example, long distance trains in India have two
   * numbers for each train, one for up direction and other for down. And user use these numbers in
   * queries along with name to specify the specific trip of the train. More details in go/number-
   * transit-line-queries.
   * @return value or {@code null} for none
   */
  public java.lang.String getTransitLineNumber() {
    return transitLineNumber;
  }

  /**
   * Train number associated with /collection/geo/transit_line. Populated when user requests
   * specific instance of a transit line. For example, long distance trains in India have two
   * numbers for each train, one for up direction and other for down. And user use these numbers in
   * queries along with name to specify the specific trip of the train. More details in go/number-
   * transit-line-queries.
   * @param transitLineNumber transitLineNumber or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setTransitLineNumber(java.lang.String transitLineNumber) {
    this.transitLineNumber = transitLineNumber;
    return this;
  }

  /**
   * @return value or {@code null} for none
   */
  public java.lang.String getType() {
    return type;
  }

  /**
   * @param type type or {@code null} for none
   */
  public NlpSemanticParsingLocalLocationElement setType(java.lang.String type) {
    this.type = type;
    return this;
  }

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

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

}
