<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/devtools/cloudprofiler/v2/profiler.proto

namespace Google\Cloud\Profiler\V2;

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

/**
 * ListProfileResponse contains the list of collected profiles for deployments
 * in projects which the user has permissions to view.
 *
 * Generated from protobuf message <code>google.devtools.cloudprofiler.v2.ListProfilesResponse</code>
 */
class ListProfilesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * List of profiles fetched.
     *
     * Generated from protobuf field <code>repeated .google.devtools.cloudprofiler.v2.Profile profiles = 1;</code>
     */
    private $profiles;
    /**
     * Token to receive the next page of results.
     * This field maybe empty if there are no more profiles to fetch.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    private $next_page_token = '';
    /**
     * Number of profiles that were skipped in the current page since they were
     * not able to be fetched successfully. This should typically be zero. A
     * non-zero value may indicate a transient failure, in which case if the
     * number is too high for your use case, the call may be retried.
     *
     * Generated from protobuf field <code>int32 skipped_profiles = 3;</code>
     */
    private $skipped_profiles = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Profiler\V2\Profile>|\Google\Protobuf\Internal\RepeatedField $profiles
     *           List of profiles fetched.
     *     @type string $next_page_token
     *           Token to receive the next page of results.
     *           This field maybe empty if there are no more profiles to fetch.
     *     @type int $skipped_profiles
     *           Number of profiles that were skipped in the current page since they were
     *           not able to be fetched successfully. This should typically be zero. A
     *           non-zero value may indicate a transient failure, in which case if the
     *           number is too high for your use case, the call may be retried.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Cloudprofiler\V2\Profiler::initOnce();
        parent::__construct($data);
    }

    /**
     * List of profiles fetched.
     *
     * Generated from protobuf field <code>repeated .google.devtools.cloudprofiler.v2.Profile profiles = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getProfiles()
    {
        return $this->profiles;
    }

    /**
     * List of profiles fetched.
     *
     * Generated from protobuf field <code>repeated .google.devtools.cloudprofiler.v2.Profile profiles = 1;</code>
     * @param array<\Google\Cloud\Profiler\V2\Profile>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setProfiles($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Profiler\V2\Profile::class);
        $this->profiles = $arr;

        return $this;
    }

    /**
     * Token to receive the next page of results.
     * This field maybe empty if there are no more profiles to fetch.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * Token to receive the next page of results.
     * This field maybe empty if there are no more profiles to fetch.
     *
     * 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;
    }

    /**
     * Number of profiles that were skipped in the current page since they were
     * not able to be fetched successfully. This should typically be zero. A
     * non-zero value may indicate a transient failure, in which case if the
     * number is too high for your use case, the call may be retried.
     *
     * Generated from protobuf field <code>int32 skipped_profiles = 3;</code>
     * @return int
     */
    public function getSkippedProfiles()
    {
        return $this->skipped_profiles;
    }

    /**
     * Number of profiles that were skipped in the current page since they were
     * not able to be fetched successfully. This should typically be zero. A
     * non-zero value may indicate a transient failure, in which case if the
     * number is too high for your use case, the call may be retried.
     *
     * Generated from protobuf field <code>int32 skipped_profiles = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setSkippedProfiles($var)
    {
        GPBUtil::checkInt32($var);
        $this->skipped_profiles = $var;

        return $this;
    }

}

