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

/**
 * Config for Document OCR.
 *
 * <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 Cloud Document AI 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 GoogleCloudDocumentaiV1OcrConfig extends com.google.api.client.json.GenericJson {

  /**
   * A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: -
   * `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the
   * current ML-based layout detection algorithm. Customers can choose the best suitable layout
   * algorithm based on their situation.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> advancedOcrOptions;

  /**
   * Turn on font id model and returns font style information. Use
   * PremiumFeatures.compute_style_info instead.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean computeStyleInfo;

  /**
   * Enables intelligent document quality scores after OCR. Can help with diagnosing why OCR
   * responses are of poor quality for a given input. Adds additional latency comparable to regular
   * OCR to the process call.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean enableImageQualityScores;

  /**
   * Enables special handling for PDFs with existing text information. Results in better text
   * extraction quality in such PDF inputs.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean enableNativePdfParsing;

  /**
   * Includes symbol level OCR information if set to true.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean enableSymbol;

  /**
   * Hints for the OCR model.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudDocumentaiV1OcrConfigHints hints;

  /**
   * A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: -
   * `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the
   * current ML-based layout detection algorithm. Customers can choose the best suitable layout
   * algorithm based on their situation.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getAdvancedOcrOptions() {
    return advancedOcrOptions;
  }

  /**
   * A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: -
   * `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the
   * current ML-based layout detection algorithm. Customers can choose the best suitable layout
   * algorithm based on their situation.
   * @param advancedOcrOptions advancedOcrOptions or {@code null} for none
   */
  public GoogleCloudDocumentaiV1OcrConfig setAdvancedOcrOptions(java.util.List<java.lang.String> advancedOcrOptions) {
    this.advancedOcrOptions = advancedOcrOptions;
    return this;
  }

  /**
   * Turn on font id model and returns font style information. Use
   * PremiumFeatures.compute_style_info instead.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getComputeStyleInfo() {
    return computeStyleInfo;
  }

  /**
   * Turn on font id model and returns font style information. Use
   * PremiumFeatures.compute_style_info instead.
   * @param computeStyleInfo computeStyleInfo or {@code null} for none
   */
  public GoogleCloudDocumentaiV1OcrConfig setComputeStyleInfo(java.lang.Boolean computeStyleInfo) {
    this.computeStyleInfo = computeStyleInfo;
    return this;
  }

  /**
   * Enables intelligent document quality scores after OCR. Can help with diagnosing why OCR
   * responses are of poor quality for a given input. Adds additional latency comparable to regular
   * OCR to the process call.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getEnableImageQualityScores() {
    return enableImageQualityScores;
  }

  /**
   * Enables intelligent document quality scores after OCR. Can help with diagnosing why OCR
   * responses are of poor quality for a given input. Adds additional latency comparable to regular
   * OCR to the process call.
   * @param enableImageQualityScores enableImageQualityScores or {@code null} for none
   */
  public GoogleCloudDocumentaiV1OcrConfig setEnableImageQualityScores(java.lang.Boolean enableImageQualityScores) {
    this.enableImageQualityScores = enableImageQualityScores;
    return this;
  }

  /**
   * Enables special handling for PDFs with existing text information. Results in better text
   * extraction quality in such PDF inputs.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getEnableNativePdfParsing() {
    return enableNativePdfParsing;
  }

  /**
   * Enables special handling for PDFs with existing text information. Results in better text
   * extraction quality in such PDF inputs.
   * @param enableNativePdfParsing enableNativePdfParsing or {@code null} for none
   */
  public GoogleCloudDocumentaiV1OcrConfig setEnableNativePdfParsing(java.lang.Boolean enableNativePdfParsing) {
    this.enableNativePdfParsing = enableNativePdfParsing;
    return this;
  }

  /**
   * Includes symbol level OCR information if set to true.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getEnableSymbol() {
    return enableSymbol;
  }

  /**
   * Includes symbol level OCR information if set to true.
   * @param enableSymbol enableSymbol or {@code null} for none
   */
  public GoogleCloudDocumentaiV1OcrConfig setEnableSymbol(java.lang.Boolean enableSymbol) {
    this.enableSymbol = enableSymbol;
    return this;
  }

  /**
   * Hints for the OCR model.
   * @return value or {@code null} for none
   */
  public GoogleCloudDocumentaiV1OcrConfigHints getHints() {
    return hints;
  }

  /**
   * Hints for the OCR model.
   * @param hints hints or {@code null} for none
   */
  public GoogleCloudDocumentaiV1OcrConfig setHints(GoogleCloudDocumentaiV1OcrConfigHints hints) {
    this.hints = hints;
    return this;
  }

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

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

}
