<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/discoveryengine/v1beta/document_processing_config.proto

namespace Google\Cloud\DiscoveryEngine\V1beta\DocumentProcessingConfig\ParsingConfig;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * The OCR parsing configurations for documents.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig.OcrParsingConfig</code>
 */
class OcrParsingConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Apply additional enhanced OCR processing to a list of document
     * elements.
     * Supported values:
     * * `table`: advanced table parsing model.
     *
     * Generated from protobuf field <code>repeated string enhanced_document_elements = 1;</code>
     */
    private $enhanced_document_elements;
    /**
     * If true, will use native text instead of OCR text on pages containing
     * native text.
     *
     * Generated from protobuf field <code>bool use_native_text = 2;</code>
     */
    protected $use_native_text = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $enhanced_document_elements
     *           Apply additional enhanced OCR processing to a list of document
     *           elements.
     *           Supported values:
     *           * `table`: advanced table parsing model.
     *     @type bool $use_native_text
     *           If true, will use native text instead of OCR text on pages containing
     *           native text.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\DocumentProcessingConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * Apply additional enhanced OCR processing to a list of document
     * elements.
     * Supported values:
     * * `table`: advanced table parsing model.
     *
     * Generated from protobuf field <code>repeated string enhanced_document_elements = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEnhancedDocumentElements()
    {
        return $this->enhanced_document_elements;
    }

    /**
     * Apply additional enhanced OCR processing to a list of document
     * elements.
     * Supported values:
     * * `table`: advanced table parsing model.
     *
     * Generated from protobuf field <code>repeated string enhanced_document_elements = 1;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEnhancedDocumentElements($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->enhanced_document_elements = $arr;

        return $this;
    }

    /**
     * If true, will use native text instead of OCR text on pages containing
     * native text.
     *
     * Generated from protobuf field <code>bool use_native_text = 2;</code>
     * @return bool
     */
    public function getUseNativeText()
    {
        return $this->use_native_text;
    }

    /**
     * If true, will use native text instead of OCR text on pages containing
     * native text.
     *
     * Generated from protobuf field <code>bool use_native_text = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setUseNativeText($var)
    {
        GPBUtil::checkBool($var);
        $this->use_native_text = $var;

        return $this;
    }

}


