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

namespace Google\Cloud\Container\V1;

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

/**
 * ListUsableSubnetworksResponse is the response of
 * ListUsableSubnetworksRequest.
 *
 * Generated from protobuf message <code>google.container.v1.ListUsableSubnetworksResponse</code>
 */
class ListUsableSubnetworksResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of usable subnetworks in the specified network project.
     *
     * Generated from protobuf field <code>repeated .google.container.v1.UsableSubnetwork subnetworks = 1;</code>
     */
    private $subnetworks;
    /**
     * This token allows you to get the next page of results for list requests.
     * If the number of results is larger than `page_size`, use the
     * `next_page_token` as a value for the query parameter `page_token` in the
     * next request. The value will become empty when there are no more 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 array<\Google\Cloud\Container\V1\UsableSubnetwork>|\Google\Protobuf\Internal\RepeatedField $subnetworks
     *           A list of usable subnetworks in the specified network project.
     *     @type string $next_page_token
     *           This token allows you to get the next page of results for list requests.
     *           If the number of results is larger than `page_size`, use the
     *           `next_page_token` as a value for the query parameter `page_token` in the
     *           next request. The value will become empty when there are no more pages.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of usable subnetworks in the specified network project.
     *
     * Generated from protobuf field <code>repeated .google.container.v1.UsableSubnetwork subnetworks = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSubnetworks()
    {
        return $this->subnetworks;
    }

    /**
     * A list of usable subnetworks in the specified network project.
     *
     * Generated from protobuf field <code>repeated .google.container.v1.UsableSubnetwork subnetworks = 1;</code>
     * @param array<\Google\Cloud\Container\V1\UsableSubnetwork>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSubnetworks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Container\V1\UsableSubnetwork::class);
        $this->subnetworks = $arr;

        return $this;
    }

    /**
     * This token allows you to get the next page of results for list requests.
     * If the number of results is larger than `page_size`, use the
     * `next_page_token` as a value for the query parameter `page_token` in the
     * next request. The value will become empty when there are no more pages.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * This token allows you to get the next page of results for list requests.
     * If the number of results is larger than `page_size`, use the
     * `next_page_token` as a value for the query parameter `page_token` in the
     * next request. The value will become empty when there are no more 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;
    }

}

