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

namespace Google\Cloud\Monitoring\V3;

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

/**
 * The `ListGroupMembers` request.
 *
 * Generated from protobuf message <code>google.monitoring.v3.ListGroupMembersRequest</code>
 */
class ListGroupMembersRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The group whose members are listed. The format is:
     *     projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
     *
     * Generated from protobuf field <code>string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * A positive number that is the maximum number of results to return.
     *
     * Generated from protobuf field <code>int32 page_size = 3;</code>
     */
    private $page_size = 0;
    /**
     * If this field is not empty then it must contain the `next_page_token` value
     * returned by a previous call to this method.  Using this field causes the
     * method to return additional results from the previous method call.
     *
     * Generated from protobuf field <code>string page_token = 4;</code>
     */
    private $page_token = '';
    /**
     * An optional [list
     * filter](https://cloud.google.com/monitoring/api/learn_more#filtering)
     * describing the members to be returned.  The filter may reference the type,
     * labels, and metadata of monitored resources that comprise the group. For
     * example, to return only resources representing Compute Engine VM instances,
     * use this filter:
     *     `resource.type = "gce_instance"`
     *
     * Generated from protobuf field <code>string filter = 5;</code>
     */
    private $filter = '';
    /**
     * An optional time interval for which results should be returned. Only
     * members that were part of the group during the specified interval are
     * included in the response.  If no interval is provided then the group
     * membership over the last minute is returned.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.TimeInterval interval = 6;</code>
     */
    private $interval = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The group whose members are listed. The format is:
     *               projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
     *     @type int $page_size
     *           A positive number that is the maximum number of results to return.
     *     @type string $page_token
     *           If this field is not empty then it must contain the `next_page_token` value
     *           returned by a previous call to this method.  Using this field causes the
     *           method to return additional results from the previous method call.
     *     @type string $filter
     *           An optional [list
     *           filter](https://cloud.google.com/monitoring/api/learn_more#filtering)
     *           describing the members to be returned.  The filter may reference the type,
     *           labels, and metadata of monitored resources that comprise the group. For
     *           example, to return only resources representing Compute Engine VM instances,
     *           use this filter:
     *               `resource.type = "gce_instance"`
     *     @type \Google\Cloud\Monitoring\V3\TimeInterval $interval
     *           An optional time interval for which results should be returned. Only
     *           members that were part of the group during the specified interval are
     *           included in the response.  If no interval is provided then the group
     *           membership over the last minute is returned.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The group whose members are listed. The format is:
     *     projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
     *
     * Generated from protobuf field <code>string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The group whose members are listed. The format is:
     *     projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
     *
     * Generated from protobuf field <code>string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * A positive number that is the maximum number of results to return.
     *
     * Generated from protobuf field <code>int32 page_size = 3;</code>
     * @return int
     */
    public function getPageSize()
    {
        return $this->page_size;
    }

    /**
     * A positive number that is the maximum number of results to return.
     *
     * Generated from protobuf field <code>int32 page_size = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setPageSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->page_size = $var;

        return $this;
    }

    /**
     * If this field is not empty then it must contain the `next_page_token` value
     * returned by a previous call to this method.  Using this field causes the
     * method to return additional results from the previous method call.
     *
     * Generated from protobuf field <code>string page_token = 4;</code>
     * @return string
     */
    public function getPageToken()
    {
        return $this->page_token;
    }

    /**
     * If this field is not empty then it must contain the `next_page_token` value
     * returned by a previous call to this method.  Using this field causes the
     * method to return additional results from the previous method call.
     *
     * Generated from protobuf field <code>string page_token = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->page_token = $var;

        return $this;
    }

    /**
     * An optional [list
     * filter](https://cloud.google.com/monitoring/api/learn_more#filtering)
     * describing the members to be returned.  The filter may reference the type,
     * labels, and metadata of monitored resources that comprise the group. For
     * example, to return only resources representing Compute Engine VM instances,
     * use this filter:
     *     `resource.type = "gce_instance"`
     *
     * Generated from protobuf field <code>string filter = 5;</code>
     * @return string
     */
    public function getFilter()
    {
        return $this->filter;
    }

    /**
     * An optional [list
     * filter](https://cloud.google.com/monitoring/api/learn_more#filtering)
     * describing the members to be returned.  The filter may reference the type,
     * labels, and metadata of monitored resources that comprise the group. For
     * example, to return only resources representing Compute Engine VM instances,
     * use this filter:
     *     `resource.type = "gce_instance"`
     *
     * Generated from protobuf field <code>string filter = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setFilter($var)
    {
        GPBUtil::checkString($var, True);
        $this->filter = $var;

        return $this;
    }

    /**
     * An optional time interval for which results should be returned. Only
     * members that were part of the group during the specified interval are
     * included in the response.  If no interval is provided then the group
     * membership over the last minute is returned.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.TimeInterval interval = 6;</code>
     * @return \Google\Cloud\Monitoring\V3\TimeInterval|null
     */
    public function getInterval()
    {
        return $this->interval;
    }

    public function hasInterval()
    {
        return isset($this->interval);
    }

    public function clearInterval()
    {
        unset($this->interval);
    }

    /**
     * An optional time interval for which results should be returned. Only
     * members that were part of the group during the specified interval are
     * included in the response.  If no interval is provided then the group
     * membership over the last minute is returned.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.TimeInterval interval = 6;</code>
     * @param \Google\Cloud\Monitoring\V3\TimeInterval $var
     * @return $this
     */
    public function setInterval($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeInterval::class);
        $this->interval = $var;

        return $this;
    }

}

