<?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;

/**
 * A set of words or phrases that represents a common concept likely to appear
 * in your audio, for example a list of passenger ship names. CustomClass items
 * can be substituted into placeholders that you set in PhraseSet phrases.
 *
 * Generated from protobuf message <code>google.cloud.speech.v1p1beta1.CustomClass</code>
 */
class CustomClass extends \Google\Protobuf\Internal\Message
{
    /**
     * The resource name of the custom class.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * If this custom class is a resource, the custom_class_id is the resource id
     * of the CustomClass.
     *
     * Generated from protobuf field <code>string custom_class_id = 2;</code>
     */
    private $custom_class_id = '';
    /**
     * A collection of class items.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3;</code>
     */
    private $items;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The resource name of the custom class.
     *     @type string $custom_class_id
     *           If this custom class is a resource, the custom_class_id is the resource id
     *           of the CustomClass.
     *     @type \Google\Cloud\Speech\V1p1beta1\CustomClass\ClassItem[]|\Google\Protobuf\Internal\RepeatedField $items
     *           A collection of class items.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\Resource::initOnce();
        parent::__construct($data);
    }

    /**
     * The resource name of the custom class.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The resource name of the custom class.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * If this custom class is a resource, the custom_class_id is the resource id
     * of the CustomClass.
     *
     * Generated from protobuf field <code>string custom_class_id = 2;</code>
     * @return string
     */
    public function getCustomClassId()
    {
        return $this->custom_class_id;
    }

    /**
     * If this custom class is a resource, the custom_class_id is the resource id
     * of the CustomClass.
     *
     * Generated from protobuf field <code>string custom_class_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCustomClassId($var)
    {
        GPBUtil::checkString($var, True);
        $this->custom_class_id = $var;

        return $this;
    }

    /**
     * A collection of class items.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getItems()
    {
        return $this->items;
    }

    /**
     * A collection of class items.
     *
     * Generated from protobuf field <code>repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3;</code>
     * @param \Google\Cloud\Speech\V1p1beta1\CustomClass\ClassItem[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setItems($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\CustomClass\ClassItem::class);
        $this->items = $arr;

        return $this;
    }

}

