/*
 * 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.discoveryengine.v1beta.model;

/**
 * Configurations for fields of a schema. For example, configuring a field is indexable, or
 * searchable.
 *
 * <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 Discovery Engine 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 GoogleCloudDiscoveryengineV1alphaFieldConfig extends com.google.api.client.json.GenericJson {

  /**
   * If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as
   * suggestions for Autocomplete in CompletionService.CompleteQuery. If completable_option is
   * unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting
   * completable options, which are just `string` fields. For those fields that do not support
   * setting completable options, the server will skip completable option setting, and setting
   * completable_option for those fields will throw `INVALID_ARGUMENT` error.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String completableOption;

  /**
   * If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for
   * dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is
   * INDEXABLE_DISABLED. Otherwise, an `INVALID_ARGUMENT` error will be returned. If
   * dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED
   * for fields that support setting dynamic facetable options. For those fields that do not support
   * setting dynamic facetable options, such as `object` and `boolean`, the server will skip dynamic
   * facetable option setting, and setting dynamic_facetable_option for those fields will throw
   * `INVALID_ARGUMENT` error.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String dynamicFacetableOption;

  /**
   * Required. Field path of the schema field. For example: `title`, `description`,
   * `release_info.release_year`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String fieldPath;

  /**
   * Output only. Raw type of the field.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String fieldType;

  /**
   * If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered
   * or faceted in SearchService.Search. If indexable_option is unset, the server behavior defaults
   * to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that
   * do not support setting indexable options, such as `object` and `boolean` and key properties,
   * the server will skip indexable_option setting, and setting indexable_option for those fields
   * will throw `INVALID_ARGUMENT` error.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String indexableOption;

  /**
   * Output only. Type of the key property that this field is mapped to. Empty string if this is not
   * annotated as mapped to a key property. Example types are `title`, `description`. Full list is
   * defined by `keyPropertyMapping` in the schema field annotation. If the schema field has a
   * `KeyPropertyMapping` annotation, `indexable_option` and `searchable_option` of this field
   * cannot be modified.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String keyPropertyType;

  /**
   * If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter
   * expression in RecommendationService.Recommend. If FILTERABLE_ENABLED but the field type is
   * numerical, field values are not filterable by text queries in RecommendationService.Recommend.
   * Only textual fields are supported. If recs_filterable_option is unset, the default setting is
   * FILTERABLE_DISABLED for fields that support setting filterable options. When a field set to
   * [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String recsFilterableOption;

  /**
   * If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results.
   * If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields
   * that support setting retrievable options. For those fields that do not support setting
   * retrievable options, such as `object` and `boolean`, the server will skip retrievable option
   * setting, and setting retrievable_option for those fields will throw `INVALID_ARGUMENT` error.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String retrievableOption;

  /**
   * If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in
   * SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not
   * be searchable by text queries in SearchService.Search, as there are no text values associated
   * to numerical fields. If searchable_option is unset, the server behavior defaults to
   * SEARCHABLE_DISABLED for fields that support setting searchable options. Only `string` fields
   * that have no key property mapping support setting searchable_option. For those fields that do
   * not support setting searchable options, the server will skip searchable option setting, and
   * setting searchable_option for those fields will throw `INVALID_ARGUMENT` error.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String searchableOption;

  /**
   * If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as
   * suggestions for Autocomplete in CompletionService.CompleteQuery. If completable_option is
   * unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting
   * completable options, which are just `string` fields. For those fields that do not support
   * setting completable options, the server will skip completable option setting, and setting
   * completable_option for those fields will throw `INVALID_ARGUMENT` error.
   * @return value or {@code null} for none
   */
  public java.lang.String getCompletableOption() {
    return completableOption;
  }

  /**
   * If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as
   * suggestions for Autocomplete in CompletionService.CompleteQuery. If completable_option is
   * unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting
   * completable options, which are just `string` fields. For those fields that do not support
   * setting completable options, the server will skip completable option setting, and setting
   * completable_option for those fields will throw `INVALID_ARGUMENT` error.
   * @param completableOption completableOption or {@code null} for none
   */
  public GoogleCloudDiscoveryengineV1alphaFieldConfig setCompletableOption(java.lang.String completableOption) {
    this.completableOption = completableOption;
    return this;
  }

  /**
   * If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for
   * dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is
   * INDEXABLE_DISABLED. Otherwise, an `INVALID_ARGUMENT` error will be returned. If
   * dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED
   * for fields that support setting dynamic facetable options. For those fields that do not support
   * setting dynamic facetable options, such as `object` and `boolean`, the server will skip dynamic
   * facetable option setting, and setting dynamic_facetable_option for those fields will throw
   * `INVALID_ARGUMENT` error.
   * @return value or {@code null} for none
   */
  public java.lang.String getDynamicFacetableOption() {
    return dynamicFacetableOption;
  }

  /**
   * If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for
   * dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is
   * INDEXABLE_DISABLED. Otherwise, an `INVALID_ARGUMENT` error will be returned. If
   * dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED
   * for fields that support setting dynamic facetable options. For those fields that do not support
   * setting dynamic facetable options, such as `object` and `boolean`, the server will skip dynamic
   * facetable option setting, and setting dynamic_facetable_option for those fields will throw
   * `INVALID_ARGUMENT` error.
   * @param dynamicFacetableOption dynamicFacetableOption or {@code null} for none
   */
  public GoogleCloudDiscoveryengineV1alphaFieldConfig setDynamicFacetableOption(java.lang.String dynamicFacetableOption) {
    this.dynamicFacetableOption = dynamicFacetableOption;
    return this;
  }

  /**
   * Required. Field path of the schema field. For example: `title`, `description`,
   * `release_info.release_year`.
   * @return value or {@code null} for none
   */
  public java.lang.String getFieldPath() {
    return fieldPath;
  }

  /**
   * Required. Field path of the schema field. For example: `title`, `description`,
   * `release_info.release_year`.
   * @param fieldPath fieldPath or {@code null} for none
   */
  public GoogleCloudDiscoveryengineV1alphaFieldConfig setFieldPath(java.lang.String fieldPath) {
    this.fieldPath = fieldPath;
    return this;
  }

  /**
   * Output only. Raw type of the field.
   * @return value or {@code null} for none
   */
  public java.lang.String getFieldType() {
    return fieldType;
  }

  /**
   * Output only. Raw type of the field.
   * @param fieldType fieldType or {@code null} for none
   */
  public GoogleCloudDiscoveryengineV1alphaFieldConfig setFieldType(java.lang.String fieldType) {
    this.fieldType = fieldType;
    return this;
  }

  /**
   * If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered
   * or faceted in SearchService.Search. If indexable_option is unset, the server behavior defaults
   * to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that
   * do not support setting indexable options, such as `object` and `boolean` and key properties,
   * the server will skip indexable_option setting, and setting indexable_option for those fields
   * will throw `INVALID_ARGUMENT` error.
   * @return value or {@code null} for none
   */
  public java.lang.String getIndexableOption() {
    return indexableOption;
  }

  /**
   * If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered
   * or faceted in SearchService.Search. If indexable_option is unset, the server behavior defaults
   * to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that
   * do not support setting indexable options, such as `object` and `boolean` and key properties,
   * the server will skip indexable_option setting, and setting indexable_option for those fields
   * will throw `INVALID_ARGUMENT` error.
   * @param indexableOption indexableOption or {@code null} for none
   */
  public GoogleCloudDiscoveryengineV1alphaFieldConfig setIndexableOption(java.lang.String indexableOption) {
    this.indexableOption = indexableOption;
    return this;
  }

  /**
   * Output only. Type of the key property that this field is mapped to. Empty string if this is not
   * annotated as mapped to a key property. Example types are `title`, `description`. Full list is
   * defined by `keyPropertyMapping` in the schema field annotation. If the schema field has a
   * `KeyPropertyMapping` annotation, `indexable_option` and `searchable_option` of this field
   * cannot be modified.
   * @return value or {@code null} for none
   */
  public java.lang.String getKeyPropertyType() {
    return keyPropertyType;
  }

  /**
   * Output only. Type of the key property that this field is mapped to. Empty string if this is not
   * annotated as mapped to a key property. Example types are `title`, `description`. Full list is
   * defined by `keyPropertyMapping` in the schema field annotation. If the schema field has a
   * `KeyPropertyMapping` annotation, `indexable_option` and `searchable_option` of this field
   * cannot be modified.
   * @param keyPropertyType keyPropertyType or {@code null} for none
   */
  public GoogleCloudDiscoveryengineV1alphaFieldConfig setKeyPropertyType(java.lang.String keyPropertyType) {
    this.keyPropertyType = keyPropertyType;
    return this;
  }

  /**
   * If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter
   * expression in RecommendationService.Recommend. If FILTERABLE_ENABLED but the field type is
   * numerical, field values are not filterable by text queries in RecommendationService.Recommend.
   * Only textual fields are supported. If recs_filterable_option is unset, the default setting is
   * FILTERABLE_DISABLED for fields that support setting filterable options. When a field set to
   * [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned.
   * @return value or {@code null} for none
   */
  public java.lang.String getRecsFilterableOption() {
    return recsFilterableOption;
  }

  /**
   * If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter
   * expression in RecommendationService.Recommend. If FILTERABLE_ENABLED but the field type is
   * numerical, field values are not filterable by text queries in RecommendationService.Recommend.
   * Only textual fields are supported. If recs_filterable_option is unset, the default setting is
   * FILTERABLE_DISABLED for fields that support setting filterable options. When a field set to
   * [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned.
   * @param recsFilterableOption recsFilterableOption or {@code null} for none
   */
  public GoogleCloudDiscoveryengineV1alphaFieldConfig setRecsFilterableOption(java.lang.String recsFilterableOption) {
    this.recsFilterableOption = recsFilterableOption;
    return this;
  }

  /**
   * If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results.
   * If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields
   * that support setting retrievable options. For those fields that do not support setting
   * retrievable options, such as `object` and `boolean`, the server will skip retrievable option
   * setting, and setting retrievable_option for those fields will throw `INVALID_ARGUMENT` error.
   * @return value or {@code null} for none
   */
  public java.lang.String getRetrievableOption() {
    return retrievableOption;
  }

  /**
   * If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results.
   * If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields
   * that support setting retrievable options. For those fields that do not support setting
   * retrievable options, such as `object` and `boolean`, the server will skip retrievable option
   * setting, and setting retrievable_option for those fields will throw `INVALID_ARGUMENT` error.
   * @param retrievableOption retrievableOption or {@code null} for none
   */
  public GoogleCloudDiscoveryengineV1alphaFieldConfig setRetrievableOption(java.lang.String retrievableOption) {
    this.retrievableOption = retrievableOption;
    return this;
  }

  /**
   * If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in
   * SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not
   * be searchable by text queries in SearchService.Search, as there are no text values associated
   * to numerical fields. If searchable_option is unset, the server behavior defaults to
   * SEARCHABLE_DISABLED for fields that support setting searchable options. Only `string` fields
   * that have no key property mapping support setting searchable_option. For those fields that do
   * not support setting searchable options, the server will skip searchable option setting, and
   * setting searchable_option for those fields will throw `INVALID_ARGUMENT` error.
   * @return value or {@code null} for none
   */
  public java.lang.String getSearchableOption() {
    return searchableOption;
  }

  /**
   * If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in
   * SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not
   * be searchable by text queries in SearchService.Search, as there are no text values associated
   * to numerical fields. If searchable_option is unset, the server behavior defaults to
   * SEARCHABLE_DISABLED for fields that support setting searchable options. Only `string` fields
   * that have no key property mapping support setting searchable_option. For those fields that do
   * not support setting searchable options, the server will skip searchable option setting, and
   * setting searchable_option for those fields will throw `INVALID_ARGUMENT` error.
   * @param searchableOption searchableOption or {@code null} for none
   */
  public GoogleCloudDiscoveryengineV1alphaFieldConfig setSearchableOption(java.lang.String searchableOption) {
    this.searchableOption = searchableOption;
    return this;
  }

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

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

}
