<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Response message for ListDataAccessScopes.
 *
 * Generated from protobuf message <code>google.cloud.chronicle.v1.ListDataAccessScopesResponse</code>
 */
class ListDataAccessScopesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * List of data access scopes.
     *
     * Generated from protobuf field <code>repeated .google.cloud.chronicle.v1.DataAccessScope data_access_scopes = 1;</code>
     */
    private $data_access_scopes;
    /**
     * Whether or not global scope is granted to the user.
     *
     * Generated from protobuf field <code>optional bool global_data_access_scope_granted = 3;</code>
     */
    protected $global_data_access_scope_granted = null;
    /**
     * A token, which can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    protected $next_page_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Chronicle\V1\DataAccessScope[] $data_access_scopes
     *           List of data access scopes.
     *     @type bool $global_data_access_scope_granted
     *           Whether or not global scope is granted to the user.
     *     @type string $next_page_token
     *           A token, which can be sent as `page_token` to retrieve the next page.
     *           If this field is omitted, there are no subsequent pages.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Chronicle\V1\DataAccessControl::initOnce();
        parent::__construct($data);
    }

    /**
     * List of data access scopes.
     *
     * Generated from protobuf field <code>repeated .google.cloud.chronicle.v1.DataAccessScope data_access_scopes = 1;</code>
     * @return RepeatedField<\Google\Cloud\Chronicle\V1\DataAccessScope>
     */
    public function getDataAccessScopes()
    {
        return $this->data_access_scopes;
    }

    /**
     * List of data access scopes.
     *
     * Generated from protobuf field <code>repeated .google.cloud.chronicle.v1.DataAccessScope data_access_scopes = 1;</code>
     * @param \Google\Cloud\Chronicle\V1\DataAccessScope[] $var
     * @return $this
     */
    public function setDataAccessScopes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Chronicle\V1\DataAccessScope::class);
        $this->data_access_scopes = $arr;

        return $this;
    }

    /**
     * Whether or not global scope is granted to the user.
     *
     * Generated from protobuf field <code>optional bool global_data_access_scope_granted = 3;</code>
     * @return bool
     */
    public function getGlobalDataAccessScopeGranted()
    {
        return isset($this->global_data_access_scope_granted) ? $this->global_data_access_scope_granted : false;
    }

    public function hasGlobalDataAccessScopeGranted()
    {
        return isset($this->global_data_access_scope_granted);
    }

    public function clearGlobalDataAccessScopeGranted()
    {
        unset($this->global_data_access_scope_granted);
    }

    /**
     * Whether or not global scope is granted to the user.
     *
     * Generated from protobuf field <code>optional bool global_data_access_scope_granted = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setGlobalDataAccessScopeGranted($var)
    {
        GPBUtil::checkBool($var);
        $this->global_data_access_scope_granted = $var;

        return $this;
    }

    /**
     * A token, which can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * A token, which can be sent as `page_token` to retrieve the next page.
     * If this field is omitted, there are no subsequent pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setNextPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_page_token = $var;

        return $this;
    }

}

