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

namespace Google\Cloud\Monitoring\V3\UptimeCheckConfig;

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

/**
 * The resource submessage for group checks. It can be used instead of a
 * monitored resource, when multiple resources are being monitored.
 *
 * Generated from protobuf message <code>google.monitoring.v3.UptimeCheckConfig.ResourceGroup</code>
 */
class ResourceGroup extends \Google\Protobuf\Internal\Message
{
    /**
     * The group of resources being monitored. Should be only the
     * group_id, not projects/<project_id>/groups/<group_id>.
     *
     * Generated from protobuf field <code>string group_id = 1;</code>
     */
    private $group_id = '';
    /**
     * The resource type of the group members.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.GroupResourceType resource_type = 2;</code>
     */
    private $resource_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $group_id
     *           The group of resources being monitored. Should be only the
     *           group_id, not projects/<project_id>/groups/<group_id>.
     *     @type int $resource_type
     *           The resource type of the group members.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce();
        parent::__construct($data);
    }

    /**
     * The group of resources being monitored. Should be only the
     * group_id, not projects/<project_id>/groups/<group_id>.
     *
     * Generated from protobuf field <code>string group_id = 1;</code>
     * @return string
     */
    public function getGroupId()
    {
        return $this->group_id;
    }

    /**
     * The group of resources being monitored. Should be only the
     * group_id, not projects/<project_id>/groups/<group_id>.
     *
     * Generated from protobuf field <code>string group_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setGroupId($var)
    {
        GPBUtil::checkString($var, True);
        $this->group_id = $var;

        return $this;
    }

    /**
     * The resource type of the group members.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.GroupResourceType resource_type = 2;</code>
     * @return int
     */
    public function getResourceType()
    {
        return $this->resource_type;
    }

    /**
     * The resource type of the group members.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.GroupResourceType resource_type = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setResourceType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\GroupResourceType::class);
        $this->resource_type = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ResourceGroup::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ResourceGroup::class);

