<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.proto

namespace Google\Cloud\AssuredWorkloads\V1beta1;

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

/**
 * Response of ListWorkloads endpoint.
 *
 * Generated from protobuf message <code>google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse</code>
 */
class ListWorkloadsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * List of Workloads under a given parent.
     *
     * Generated from protobuf field <code>repeated .google.cloud.assuredworkloads.v1beta1.Workload workloads = 1;</code>
     */
    private $workloads;
    /**
     * The next page token. Return empty if reached the last page.
     *
     * 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 \Google\Cloud\AssuredWorkloads\V1beta1\Workload[]|\Google\Protobuf\Internal\RepeatedField $workloads
     *           List of Workloads under a given parent.
     *     @type string $next_page_token
     *           The next page token. Return empty if reached the last page.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Assuredworkloads\V1Beta1\AssuredworkloadsV1Beta1::initOnce();
        parent::__construct($data);
    }

    /**
     * List of Workloads under a given parent.
     *
     * Generated from protobuf field <code>repeated .google.cloud.assuredworkloads.v1beta1.Workload workloads = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getWorkloads()
    {
        return $this->workloads;
    }

    /**
     * List of Workloads under a given parent.
     *
     * Generated from protobuf field <code>repeated .google.cloud.assuredworkloads.v1beta1.Workload workloads = 1;</code>
     * @param \Google\Cloud\AssuredWorkloads\V1beta1\Workload[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setWorkloads($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AssuredWorkloads\V1beta1\Workload::class);
        $this->workloads = $arr;

        return $this;
    }

    /**
     * The next page token. Return empty if reached the last page.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * The next page token. Return empty if reached the last page.
     *
     * 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;
    }

}

