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

namespace Google\Cloud\Monitoring\V3;

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

/**
 * Contains the region, location, and list of IP
 * addresses where checkers in the location run from.
 *
 * Generated from protobuf message <code>google.monitoring.v3.UptimeCheckIp</code>
 */
class UptimeCheckIp extends \Google\Protobuf\Internal\Message
{
    /**
     * A broad region category in which the IP address is located.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.UptimeCheckRegion region = 1;</code>
     */
    private $region = 0;
    /**
     * A more specific location within the region that typically encodes
     * a particular city/town/metro (and its containing state/province or country)
     * within the broader umbrella region category.
     *
     * Generated from protobuf field <code>string location = 2;</code>
     */
    private $location = '';
    /**
     * The IP address from which the uptime check originates. This is a full
     * IP address (not an IP address range). Most IP addresses, as of this
     * publication, are in IPv4 format; however, one should not rely on the
     * IP addresses being in IPv4 format indefinitely and should support
     * interpreting this field in either IPv4 or IPv6 format.
     *
     * Generated from protobuf field <code>string ip_address = 3;</code>
     */
    private $ip_address = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $region
     *           A broad region category in which the IP address is located.
     *     @type string $location
     *           A more specific location within the region that typically encodes
     *           a particular city/town/metro (and its containing state/province or country)
     *           within the broader umbrella region category.
     *     @type string $ip_address
     *           The IP address from which the uptime check originates. This is a full
     *           IP address (not an IP address range). Most IP addresses, as of this
     *           publication, are in IPv4 format; however, one should not rely on the
     *           IP addresses being in IPv4 format indefinitely and should support
     *           interpreting this field in either IPv4 or IPv6 format.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce();
        parent::__construct($data);
    }

    /**
     * A broad region category in which the IP address is located.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.UptimeCheckRegion region = 1;</code>
     * @return int
     */
    public function getRegion()
    {
        return $this->region;
    }

    /**
     * A broad region category in which the IP address is located.
     *
     * Generated from protobuf field <code>.google.monitoring.v3.UptimeCheckRegion region = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setRegion($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckRegion::class);
        $this->region = $var;

        return $this;
    }

    /**
     * A more specific location within the region that typically encodes
     * a particular city/town/metro (and its containing state/province or country)
     * within the broader umbrella region category.
     *
     * Generated from protobuf field <code>string location = 2;</code>
     * @return string
     */
    public function getLocation()
    {
        return $this->location;
    }

    /**
     * A more specific location within the region that typically encodes
     * a particular city/town/metro (and its containing state/province or country)
     * within the broader umbrella region category.
     *
     * Generated from protobuf field <code>string location = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setLocation($var)
    {
        GPBUtil::checkString($var, True);
        $this->location = $var;

        return $this;
    }

    /**
     * The IP address from which the uptime check originates. This is a full
     * IP address (not an IP address range). Most IP addresses, as of this
     * publication, are in IPv4 format; however, one should not rely on the
     * IP addresses being in IPv4 format indefinitely and should support
     * interpreting this field in either IPv4 or IPv6 format.
     *
     * Generated from protobuf field <code>string ip_address = 3;</code>
     * @return string
     */
    public function getIpAddress()
    {
        return $this->ip_address;
    }

    /**
     * The IP address from which the uptime check originates. This is a full
     * IP address (not an IP address range). Most IP addresses, as of this
     * publication, are in IPv4 format; however, one should not rely on the
     * IP addresses being in IPv4 format indefinitely and should support
     * interpreting this field in either IPv4 or IPv6 format.
     *
     * Generated from protobuf field <code>string ip_address = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setIpAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->ip_address = $var;

        return $this;
    }

}

