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

namespace Google\Cloud\Asset\V1;

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

/**
 * Search all IAM policies response.
 *
 * Generated from protobuf message <code>google.cloud.asset.v1.SearchAllIamPoliciesResponse</code>
 */
class SearchAllIamPoliciesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of IamPolicy that match the search query. Related information such
     * as the associated resource is returned along with the policy.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1;</code>
     */
    private $results;
    /**
     * Set if there are more results than those appearing in this response; to get
     * the next set of results, call this method again, using this value as the
     * `page_token`.
     *
     * 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\Asset\V1\IamPolicySearchResult[]|\Google\Protobuf\Internal\RepeatedField $results
     *           A list of IamPolicy that match the search query. Related information such
     *           as the associated resource is returned along with the policy.
     *     @type string $next_page_token
     *           Set if there are more results than those appearing in this response; to get
     *           the next set of results, call this method again, using this value as the
     *           `page_token`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Asset\V1\AssetService::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of IamPolicy that match the search query. Related information such
     * as the associated resource is returned along with the policy.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getResults()
    {
        return $this->results;
    }

    /**
     * A list of IamPolicy that match the search query. Related information such
     * as the associated resource is returned along with the policy.
     *
     * Generated from protobuf field <code>repeated .google.cloud.asset.v1.IamPolicySearchResult results = 1;</code>
     * @param \Google\Cloud\Asset\V1\IamPolicySearchResult[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setResults($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Asset\V1\IamPolicySearchResult::class);
        $this->results = $arr;

        return $this;
    }

    /**
     * Set if there are more results than those appearing in this response; to get
     * the next set of results, call this method again, using this value as the
     * `page_token`.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * Set if there are more results than those appearing in this response; to get
     * the next set of results, call this method again, using this value as the
     * `page_token`.
     *
     * 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;
    }

}

