<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/iam/v2/policy.proto

namespace Google\Cloud\Iam\V2;

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

/**
 * Response message for `ListPolicies`.
 *
 * Generated from protobuf message <code>google.iam.v2.ListPoliciesResponse</code>
 */
class ListPoliciesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Metadata for the policies that are attached to the resource.
     *
     * Generated from protobuf field <code>repeated .google.iam.v2.Policy policies = 1;</code>
     */
    private $policies;
    /**
     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
     * next page. If this field is omitted, there are no additional pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    private $next_page_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Iam\V2\Policy>|\Google\Protobuf\Internal\RepeatedField $policies
     *           Metadata for the policies that are attached to the resource.
     *     @type string $next_page_token
     *           A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
     *           next page. If this field is omitted, there are no additional pages.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Iam\V2\Policy::initOnce();
        parent::__construct($data);
    }

    /**
     * Metadata for the policies that are attached to the resource.
     *
     * Generated from protobuf field <code>repeated .google.iam.v2.Policy policies = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPolicies()
    {
        return $this->policies;
    }

    /**
     * Metadata for the policies that are attached to the resource.
     *
     * Generated from protobuf field <code>repeated .google.iam.v2.Policy policies = 1;</code>
     * @param array<\Google\Cloud\Iam\V2\Policy>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPolicies($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Iam\V2\Policy::class);
        $this->policies = $arr;

        return $this;
    }

    /**
     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
     * next page. If this field is omitted, there are no additional pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
     * next page. If this field is omitted, there are no additional 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;
    }

}

