<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/documentai/v1/document_io.proto

namespace Google\Cloud\DocumentAI\V1\OcrConfig;

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

/**
 * Hints for OCR Engine
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.OcrConfig.Hints</code>
 */
class Hints extends \Google\Protobuf\Internal\Message
{
    /**
     * List of BCP-47 language codes to use for OCR. In most cases, not
     * specifying it yields the best results since it enables automatic language
     * detection. For languages based on the Latin alphabet, setting hints is
     * not needed. In rare cases, when the language of the text in the
     * image is known, setting a hint will help get better results (although it
     * will be a significant hindrance if the hint is wrong).
     *
     * Generated from protobuf field <code>repeated string language_hints = 1;</code>
     */
    private $language_hints;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[] $language_hints
     *           List of BCP-47 language codes to use for OCR. In most cases, not
     *           specifying it yields the best results since it enables automatic language
     *           detection. For languages based on the Latin alphabet, setting hints is
     *           not needed. In rare cases, when the language of the text in the
     *           image is known, setting a hint will help get better results (although it
     *           will be a significant hindrance if the hint is wrong).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\DocumentIo::initOnce();
        parent::__construct($data);
    }

    /**
     * List of BCP-47 language codes to use for OCR. In most cases, not
     * specifying it yields the best results since it enables automatic language
     * detection. For languages based on the Latin alphabet, setting hints is
     * not needed. In rare cases, when the language of the text in the
     * image is known, setting a hint will help get better results (although it
     * will be a significant hindrance if the hint is wrong).
     *
     * Generated from protobuf field <code>repeated string language_hints = 1;</code>
     * @return RepeatedField<string>
     */
    public function getLanguageHints()
    {
        return $this->language_hints;
    }

    /**
     * List of BCP-47 language codes to use for OCR. In most cases, not
     * specifying it yields the best results since it enables automatic language
     * detection. For languages based on the Latin alphabet, setting hints is
     * not needed. In rare cases, when the language of the text in the
     * image is known, setting a hint will help get better results (although it
     * will be a significant hindrance if the hint is wrong).
     *
     * Generated from protobuf field <code>repeated string language_hints = 1;</code>
     * @param string[] $var
     * @return $this
     */
    public function setLanguageHints($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->language_hints = $arr;

        return $this;
    }

}

