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

namespace Google\Cloud\Speech\V1p1beta1;

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

/**
 * Speech adaptation configuration.
 *
 * Generated from protobuf message <code>google.cloud.speech.v1p1beta1.SpeechAdaptation</code>
 */
class SpeechAdaptation extends \Google\Protobuf\Internal\Message
{
    /**
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v1p1beta1.PhraseSet phrase_sets = 1;</code>
     */
    private $phrase_sets;
    /**
     * A collection of phrase set resource names to use.
     *
     * Generated from protobuf field <code>repeated string phrase_set_references = 2 [(.google.api.resource_reference) = {</code>
     */
    private $phrase_set_references;
    /**
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v1p1beta1.CustomClass custom_classes = 3;</code>
     */
    private $custom_classes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Speech\V1p1beta1\PhraseSet[]|\Google\Protobuf\Internal\RepeatedField $phrase_sets
     *           A collection of phrase sets. To specify the hints inline, leave the
     *           phrase set's `name` blank and fill in the rest of its fields. Any
     *           phrase set can use any custom class.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $phrase_set_references
     *           A collection of phrase set resource names to use.
     *     @type \Google\Cloud\Speech\V1p1beta1\CustomClass[]|\Google\Protobuf\Internal\RepeatedField $custom_classes
     *           A collection of custom classes. To specify the classes inline, leave the
     *           class' `name` blank and fill in the rest of its fields, giving it a unique
     *           `custom_class_id`. Refer to the inline defined class in phrase hints by its
     *           `custom_class_id`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\Resource::initOnce();
        parent::__construct($data);
    }

    /**
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v1p1beta1.PhraseSet phrase_sets = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPhraseSets()
    {
        return $this->phrase_sets;
    }

    /**
     * A collection of phrase sets. To specify the hints inline, leave the
     * phrase set's `name` blank and fill in the rest of its fields. Any
     * phrase set can use any custom class.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v1p1beta1.PhraseSet phrase_sets = 1;</code>
     * @param \Google\Cloud\Speech\V1p1beta1\PhraseSet[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPhraseSets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\PhraseSet::class);
        $this->phrase_sets = $arr;

        return $this;
    }

    /**
     * A collection of phrase set resource names to use.
     *
     * Generated from protobuf field <code>repeated string phrase_set_references = 2 [(.google.api.resource_reference) = {</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPhraseSetReferences()
    {
        return $this->phrase_set_references;
    }

    /**
     * A collection of phrase set resource names to use.
     *
     * Generated from protobuf field <code>repeated string phrase_set_references = 2 [(.google.api.resource_reference) = {</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPhraseSetReferences($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->phrase_set_references = $arr;

        return $this;
    }

    /**
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v1p1beta1.CustomClass custom_classes = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCustomClasses()
    {
        return $this->custom_classes;
    }

    /**
     * A collection of custom classes. To specify the classes inline, leave the
     * class' `name` blank and fill in the rest of its fields, giving it a unique
     * `custom_class_id`. Refer to the inline defined class in phrase hints by its
     * `custom_class_id`.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v1p1beta1.CustomClass custom_classes = 3;</code>
     * @param \Google\Cloud\Speech\V1p1beta1\CustomClass[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCustomClasses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\CustomClass::class);
        $this->custom_classes = $arr;

        return $this;
    }

}

