<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/speech/v2/cloud_speech.proto

namespace Google\Cloud\Speech\V2;

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

/**
 * Provides "hints" to the speech recognizer to favor specific words and phrases
 * in the results. Phrase sets can be specified as an inline resource, or a
 * reference to an existing phrase set resource.
 *
 * Generated from protobuf message <code>google.cloud.speech.v2.SpeechAdaptation</code>
 */
class SpeechAdaptation extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of inline or referenced phrase sets.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;</code>
     */
    private $phrase_sets;
    /**
     * A list of inline custom classes. Existing custom class resources can be
     * referenced directly in a phrase set.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;</code>
     */
    private $custom_classes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Speech\V2\SpeechAdaptation\AdaptationPhraseSet>|\Google\Protobuf\Internal\RepeatedField $phrase_sets
     *           A list of inline or referenced phrase sets.
     *     @type array<\Google\Cloud\Speech\V2\CustomClass>|\Google\Protobuf\Internal\RepeatedField $custom_classes
     *           A list of inline custom classes. Existing custom class resources can be
     *           referenced directly in a phrase set.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of inline or referenced phrase sets.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPhraseSets()
    {
        return $this->phrase_sets;
    }

    /**
     * A list of inline or referenced phrase sets.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;</code>
     * @param array<\Google\Cloud\Speech\V2\SpeechAdaptation\AdaptationPhraseSet>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPhraseSets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\SpeechAdaptation\AdaptationPhraseSet::class);
        $this->phrase_sets = $arr;

        return $this;
    }

    /**
     * A list of inline custom classes. Existing custom class resources can be
     * referenced directly in a phrase set.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCustomClasses()
    {
        return $this->custom_classes;
    }

    /**
     * A list of inline custom classes. Existing custom class resources can be
     * referenced directly in a phrase set.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;</code>
     * @param array<\Google\Cloud\Speech\V2\CustomClass>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCustomClasses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\CustomClass::class);
        $this->custom_classes = $arr;

        return $this;
    }

}

