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

namespace Google\Cloud\DiscoveryEngine\V1\BatchUpdateUserLicensesRequest;

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

/**
 * The inline source for the input config for BatchUpdateUserLicenses
 * method.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.BatchUpdateUserLicensesRequest.InlineSource</code>
 */
class InlineSource extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. A list of user licenses to update. Each user license
     * must have a valid
     * [UserLicense.user_principal][google.cloud.discoveryengine.v1.UserLicense.user_principal].
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $user_licenses;
    /**
     * Optional. The list of fields to update.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DiscoveryEngine\V1\UserLicense[] $user_licenses
     *           Required. A list of user licenses to update. Each user license
     *           must have a valid
     *           [UserLicense.user_principal][google.cloud.discoveryengine.v1.UserLicense.user_principal].
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Optional. The list of fields to update.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserLicenseService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. A list of user licenses to update. Each user license
     * must have a valid
     * [UserLicense.user_principal][google.cloud.discoveryengine.v1.UserLicense.user_principal].
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return RepeatedField<\Google\Cloud\DiscoveryEngine\V1\UserLicense>
     */
    public function getUserLicenses()
    {
        return $this->user_licenses;
    }

    /**
     * Required. A list of user licenses to update. Each user license
     * must have a valid
     * [UserLicense.user_principal][google.cloud.discoveryengine.v1.UserLicense.user_principal].
     *
     * Generated from protobuf field <code>repeated .google.cloud.discoveryengine.v1.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\DiscoveryEngine\V1\UserLicense[] $var
     * @return $this
     */
    public function setUserLicenses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\UserLicense::class);
        $this->user_licenses = $arr;

        return $this;
    }

    /**
     * Optional. The list of fields to update.
     *
     * 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.
     *
     * 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;
    }

}

