<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/resourcemanager/v3/projects.proto

namespace Google\Cloud\ResourceManager\V3;

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

/**
 * A page of the response received from the
 * [ListProjects][google.cloud.resourcemanager.v3.Projects.ListProjects]
 * method.
 * A paginated response where more pages are available has
 * `next_page_token` set. This token can be used in a subsequent request to
 * retrieve the next request page.
 * NOTE: A response may contain fewer elements than the request `page_size` and
 * still have a `next_page_token`.
 *
 * Generated from protobuf message <code>google.cloud.resourcemanager.v3.ListProjectsResponse</code>
 */
class ListProjectsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of Projects under the parent. This list can be paginated.
     *
     * Generated from protobuf field <code>repeated .google.cloud.resourcemanager.v3.Project projects = 1;</code>
     */
    private $projects;
    /**
     * Pagination token.
     * If the result set is too large to fit in a single response, this token
     * is returned. It encodes the position of the current result cursor.
     * Feeding this value into a new list request with the `page_token` parameter
     * gives the next page of the results.
     * When `next_page_token` is not filled in, there is no next page and
     * the list returned is the last page in the result set.
     * Pagination tokens have a limited lifetime.
     *
     * 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\ResourceManager\V3\Project>|\Google\Protobuf\Internal\RepeatedField $projects
     *           The list of Projects under the parent. This list can be paginated.
     *     @type string $next_page_token
     *           Pagination token.
     *           If the result set is too large to fit in a single response, this token
     *           is returned. It encodes the position of the current result cursor.
     *           Feeding this value into a new list request with the `page_token` parameter
     *           gives the next page of the results.
     *           When `next_page_token` is not filled in, there is no next page and
     *           the list returned is the last page in the result set.
     *           Pagination tokens have a limited lifetime.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Resourcemanager\V3\Projects::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of Projects under the parent. This list can be paginated.
     *
     * Generated from protobuf field <code>repeated .google.cloud.resourcemanager.v3.Project projects = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getProjects()
    {
        return $this->projects;
    }

    /**
     * The list of Projects under the parent. This list can be paginated.
     *
     * Generated from protobuf field <code>repeated .google.cloud.resourcemanager.v3.Project projects = 1;</code>
     * @param array<\Google\Cloud\ResourceManager\V3\Project>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setProjects($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ResourceManager\V3\Project::class);
        $this->projects = $arr;

        return $this;
    }

    /**
     * Pagination token.
     * If the result set is too large to fit in a single response, this token
     * is returned. It encodes the position of the current result cursor.
     * Feeding this value into a new list request with the `page_token` parameter
     * gives the next page of the results.
     * When `next_page_token` is not filled in, there is no next page and
     * the list returned is the last page in the result set.
     * Pagination tokens have a limited lifetime.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * Pagination token.
     * If the result set is too large to fit in a single response, this token
     * is returned. It encodes the position of the current result cursor.
     * Feeding this value into a new list request with the `page_token` parameter
     * gives the next page of the results.
     * When `next_page_token` is not filled in, there is no next page and
     * the list returned is the last page in the result set.
     * Pagination tokens have a limited lifetime.
     *
     * 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;
    }

}

