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

namespace Google\Cloud\ResourceManager\V3;

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

/**
 * The response returned from the `SearchOrganizations` method.
 *
 * Generated from protobuf message <code>google.cloud.resourcemanager.v3.SearchOrganizationsResponse</code>
 */
class SearchOrganizationsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of Organizations that matched the search query, possibly
     * paginated.
     *
     * Generated from protobuf field <code>repeated .google.cloud.resourcemanager.v3.Organization organizations = 1;</code>
     */
    private $organizations;
    /**
     * A pagination token to be used to retrieve the next page of results. If the
     * result is too large to fit within the page size specified in the request,
     * this field will be set with a token that can be used to fetch the next page
     * of results. If this field is empty, it indicates that this response
     * contains the last page of results.
     *
     * 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\ResourceManager\V3\Organization[]|\Google\Protobuf\Internal\RepeatedField $organizations
     *           The list of Organizations that matched the search query, possibly
     *           paginated.
     *     @type string $next_page_token
     *           A pagination token to be used to retrieve the next page of results. If the
     *           result is too large to fit within the page size specified in the request,
     *           this field will be set with a token that can be used to fetch the next page
     *           of results. If this field is empty, it indicates that this response
     *           contains the last page of results.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Resourcemanager\V3\Organizations::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of Organizations that matched the search query, possibly
     * paginated.
     *
     * Generated from protobuf field <code>repeated .google.cloud.resourcemanager.v3.Organization organizations = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getOrganizations()
    {
        return $this->organizations;
    }

    /**
     * The list of Organizations that matched the search query, possibly
     * paginated.
     *
     * Generated from protobuf field <code>repeated .google.cloud.resourcemanager.v3.Organization organizations = 1;</code>
     * @param \Google\Cloud\ResourceManager\V3\Organization[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setOrganizations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ResourceManager\V3\Organization::class);
        $this->organizations = $arr;

        return $this;
    }

    /**
     * A pagination token to be used to retrieve the next page of results. If the
     * result is too large to fit within the page size specified in the request,
     * this field will be set with a token that can be used to fetch the next page
     * of results. If this field is empty, it indicates that this response
     * contains the last page of results.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * A pagination token to be used to retrieve the next page of results. If the
     * result is too large to fit within the page size specified in the request,
     * this field will be set with a token that can be used to fetch the next page
     * of results. If this field is empty, it indicates that this response
     * contains the last page of results.
     *
     * 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;
    }

}

