<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/chronicle/v1/data_access_control.proto

namespace Google\Cloud\Chronicle\V1;

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

/**
 * Request message for UpdateDataAccessLabel method.
 *
 * Generated from protobuf message <code>google.cloud.chronicle.v1.UpdateDataAccessLabelRequest</code>
 */
class UpdateDataAccessLabelRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The data access label to update.
     * The label's `name` field is used to identify the label to update.
     * Format:
     * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}`
     *
     * Generated from protobuf field <code>.google.cloud.chronicle.v1.DataAccessLabel data_access_label = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data_access_label = null;
    /**
     * The list of fields to update. If not included, all fields with a non-empty
     * value will be overwritten. Currently, only the description and definition
     * fields are supported for update; an update call that attempts to update any
     * other fields will return INVALID_ARGUMENT.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     */
    protected $update_mask = null;

    /**
     * @param \Google\Cloud\Chronicle\V1\DataAccessLabel $dataAccessLabel Required. The data access label to update.
     *
     *                                                                    The label's `name` field is used to identify the label to update.
     *                                                                    Format:
     *                                                                    `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}`
     * @param \Google\Protobuf\FieldMask                 $updateMask      The list of fields to update. If not included, all fields with a non-empty
     *                                                                    value will be overwritten. Currently, only the description and definition
     *                                                                    fields are supported for update; an update call that attempts to update any
     *                                                                    other fields will return INVALID_ARGUMENT.
     *
     * @return \Google\Cloud\Chronicle\V1\UpdateDataAccessLabelRequest
     *
     * @experimental
     */
    public static function build(\Google\Cloud\Chronicle\V1\DataAccessLabel $dataAccessLabel, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setDataAccessLabel($dataAccessLabel)
            ->setUpdateMask($updateMask);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Chronicle\V1\DataAccessLabel $data_access_label
     *           Required. The data access label to update.
     *           The label's `name` field is used to identify the label to update.
     *           Format:
     *           `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}`
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           The list of fields to update. If not included, all fields with a non-empty
     *           value will be overwritten. Currently, only the description and definition
     *           fields are supported for update; an update call that attempts to update any
     *           other fields will return INVALID_ARGUMENT.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The data access label to update.
     * The label's `name` field is used to identify the label to update.
     * Format:
     * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}`
     *
     * Generated from protobuf field <code>.google.cloud.chronicle.v1.DataAccessLabel data_access_label = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Chronicle\V1\DataAccessLabel|null
     */
    public function getDataAccessLabel()
    {
        return $this->data_access_label;
    }

    public function hasDataAccessLabel()
    {
        return isset($this->data_access_label);
    }

    public function clearDataAccessLabel()
    {
        unset($this->data_access_label);
    }

    /**
     * Required. The data access label to update.
     * The label's `name` field is used to identify the label to update.
     * Format:
     * `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}`
     *
     * Generated from protobuf field <code>.google.cloud.chronicle.v1.DataAccessLabel data_access_label = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Chronicle\V1\DataAccessLabel $var
     * @return $this
     */
    public function setDataAccessLabel($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Chronicle\V1\DataAccessLabel::class);
        $this->data_access_label = $var;

        return $this;
    }

    /**
     * The list of fields to update. If not included, all fields with a non-empty
     * value will be overwritten. Currently, only the description and definition
     * fields are supported for update; an update call that attempts to update any
     * other fields will return INVALID_ARGUMENT.
     *
     * 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 update. If not included, all fields with a non-empty
     * value will be overwritten. Currently, only the description and definition
     * fields are supported for update; an update call that attempts to update any
     * other fields will return INVALID_ARGUMENT.
     *
     * 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;
    }

}

