<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/orchestration/airflow/service/v1/environments.proto

namespace Google\Cloud\Orchestration\Airflow\Service\V1;

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

/**
 * Response to ListWorkloadsRequest.
 *
 * Generated from protobuf message <code>google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse</code>
 */
class ListWorkloadsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of environment workloads.
     *
     * Generated from protobuf field <code>repeated .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload workloads = 1;</code>
     */
    private $workloads;
    /**
     * The page token used to query for the next page if one exists.
     *
     * 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\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkload>|\Google\Protobuf\Internal\RepeatedField $workloads
     *           The list of environment workloads.
     *     @type string $next_page_token
     *           The page token used to query for the next page if one exists.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of environment workloads.
     *
     * Generated from protobuf field <code>repeated .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload workloads = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getWorkloads()
    {
        return $this->workloads;
    }

    /**
     * The list of environment workloads.
     *
     * Generated from protobuf field <code>repeated .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload workloads = 1;</code>
     * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkload>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setWorkloads($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkload::class);
        $this->workloads = $arr;

        return $this;
    }

    /**
     * The page token used to query for the next page if one exists.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * The page token used to query for the next page if one exists.
     *
     * 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;
    }

}

