<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/datamanager/v1/user_list_global_license_service.proto

namespace Google\Ads\DataManager\V1;

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

/**
 * Request to update a
 * [UserListGlobalLicense][google.ads.datamanager.v1.UserListGlobalLicense]
 * resource.
 *
 * Generated from protobuf message <code>google.ads.datamanager.v1.UpdateUserListGlobalLicenseRequest</code>
 */
class UpdateUserListGlobalLicenseRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The licenses' `name` field is used to identify the license to
     * update.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.UserListGlobalLicense user_list_global_license = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $user_list_global_license = null;
    /**
     * Optional. The list of fields to update. The special character `*` is not
     * supported and an `INVALID_UPDATE_MASK` error will be thrown if used.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $update_mask = null;

    /**
     * @param \Google\Ads\DataManager\V1\UserListGlobalLicense $userListGlobalLicense Required. The licenses' `name` field is used to identify the license to
     *                                                                                update.
     * @param \Google\Protobuf\FieldMask                       $updateMask            Optional. The list of fields to update. The special character `*` is not
     *                                                                                supported and an `INVALID_UPDATE_MASK` error will be thrown if used.
     *
     * @return \Google\Ads\DataManager\V1\UpdateUserListGlobalLicenseRequest
     *
     * @experimental
     */
    public static function build(\Google\Ads\DataManager\V1\UserListGlobalLicense $userListGlobalLicense, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setUserListGlobalLicense($userListGlobalLicense)
            ->setUpdateMask($updateMask);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\DataManager\V1\UserListGlobalLicense $user_list_global_license
     *           Required. The licenses' `name` field is used to identify the license to
     *           update.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Optional. The list of fields to update. The special character `*` is not
     *           supported and an `INVALID_UPDATE_MASK` error will be thrown if used.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Datamanager\V1\UserListGlobalLicenseService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The licenses' `name` field is used to identify the license to
     * update.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.UserListGlobalLicense user_list_global_license = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Ads\DataManager\V1\UserListGlobalLicense|null
     */
    public function getUserListGlobalLicense()
    {
        return $this->user_list_global_license;
    }

    public function hasUserListGlobalLicense()
    {
        return isset($this->user_list_global_license);
    }

    public function clearUserListGlobalLicense()
    {
        unset($this->user_list_global_license);
    }

    /**
     * Required. The licenses' `name` field is used to identify the license to
     * update.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.UserListGlobalLicense user_list_global_license = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Ads\DataManager\V1\UserListGlobalLicense $var
     * @return $this
     */
    public function setUserListGlobalLicense($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\DataManager\V1\UserListGlobalLicense::class);
        $this->user_list_global_license = $var;

        return $this;
    }

    /**
     * Optional. The list of fields to update. The special character `*` is not
     * supported and an `INVALID_UPDATE_MASK` error will be thrown if used.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];</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);
    }

    /**
     * Optional. The list of fields to update. The special character `*` is not
     * supported and an `INVALID_UPDATE_MASK` error will be thrown if used.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];</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;
    }

}

