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

/**
 * Request message for the
 * [UpdateCustomClass][google.cloud.speech.v2.Speech.UpdateCustomClass] method.
 *
 * Generated from protobuf message <code>google.cloud.speech.v2.UpdateCustomClassRequest</code>
 */
class UpdateCustomClassRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The CustomClass to update.
     * The CustomClass's `name` field is used to identify the CustomClass to
     * update. Format:
     * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
     *
     * Generated from protobuf field <code>.google.cloud.speech.v2.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $custom_class = null;
    /**
     * The list of fields to be updated. If empty, all fields are considered for
     * update.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     */
    private $update_mask = null;
    /**
     * If set, validate the request and preview the updated CustomClass, but do
     * not actually update it.
     *
     * Generated from protobuf field <code>bool validate_only = 4;</code>
     */
    private $validate_only = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Speech\V2\CustomClass $custom_class
     *           Required. The CustomClass to update.
     *           The CustomClass's `name` field is used to identify the CustomClass to
     *           update. Format:
     *           `projects/{project}/locations/{location}/customClasses/{custom_class}`.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           The list of fields to be updated. If empty, all fields are considered for
     *           update.
     *     @type bool $validate_only
     *           If set, validate the request and preview the updated CustomClass, but do
     *           not actually update it.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The CustomClass to update.
     * The CustomClass's `name` field is used to identify the CustomClass to
     * update. Format:
     * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
     *
     * Generated from protobuf field <code>.google.cloud.speech.v2.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Speech\V2\CustomClass|null
     */
    public function getCustomClass()
    {
        return $this->custom_class;
    }

    public function hasCustomClass()
    {
        return isset($this->custom_class);
    }

    public function clearCustomClass()
    {
        unset($this->custom_class);
    }

    /**
     * Required. The CustomClass to update.
     * The CustomClass's `name` field is used to identify the CustomClass to
     * update. Format:
     * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
     *
     * Generated from protobuf field <code>.google.cloud.speech.v2.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Speech\V2\CustomClass $var
     * @return $this
     */
    public function setCustomClass($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\CustomClass::class);
        $this->custom_class = $var;

        return $this;
    }

    /**
     * The list of fields to be updated. If empty, all fields are considered for
     * update.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    public function hasUpdateMask()
    {
        return isset($this->update_mask);
    }

    public function clearUpdateMask()
    {
        unset($this->update_mask);
    }

    /**
     * The list of fields to be updated. If empty, all fields are considered for
     * update.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

    /**
     * If set, validate the request and preview the updated CustomClass, but do
     * not actually update it.
     *
     * Generated from protobuf field <code>bool validate_only = 4;</code>
     * @return bool
     */
    public function getValidateOnly()
    {
        return $this->validate_only;
    }

    /**
     * If set, validate the request and preview the updated CustomClass, but do
     * not actually update it.
     *
     * Generated from protobuf field <code>bool validate_only = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setValidateOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->validate_only = $var;

        return $this;
    }

}

