<?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;
    /**
     * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     * comprised by a set of derivation rules.
     * See specifications: https://www.w3.org/TR/speech-grammar
     *
     * Generated from protobuf field <code>.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4;</code>
     */
    private $abnf_grammar = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\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 array<string>|\Google\Protobuf\Internal\RepeatedField $phrase_set_references
     *           A collection of phrase set resource names to use.
     *     @type array<\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`.
     *     @type \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation\ABNFGrammar $abnf_grammar
     *           Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     *           comprised by a set of derivation rules.
     *           See specifications: https://www.w3.org/TR/speech-grammar
     * }
     */
    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 array<\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 array<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 array<\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;
    }

    /**
     * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     * comprised by a set of derivation rules.
     * See specifications: https://www.w3.org/TR/speech-grammar
     *
     * Generated from protobuf field <code>.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4;</code>
     * @return \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation\ABNFGrammar|null
     */
    public function getAbnfGrammar()
    {
        return $this->abnf_grammar;
    }

    public function hasAbnfGrammar()
    {
        return isset($this->abnf_grammar);
    }

    public function clearAbnfGrammar()
    {
        unset($this->abnf_grammar);
    }

    /**
     * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
     * comprised by a set of derivation rules.
     * See specifications: https://www.w3.org/TR/speech-grammar
     *
     * Generated from protobuf field <code>.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4;</code>
     * @param \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation\ABNFGrammar $var
     * @return $this
     */
    public function setAbnfGrammar($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation\ABNFGrammar::class);
        $this->abnf_grammar = $var;

        return $this;
    }

}

