<?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;

/**
 * Information involved in sending ICMP pings alongside public HTTP/TCP
 * checks. For HTTP, the pings are performed for each part of the redirect
 * chain.
 *
 * Generated from protobuf message <code>google.monitoring.v3.UptimeCheckConfig.PingConfig</code>
 */
class PingConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Number of ICMP pings. A maximum of 3 ICMP pings is currently supported.
     *
     * Generated from protobuf field <code>int32 pings_count = 1;</code>
     */
    private $pings_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $pings_count
     *           Number of ICMP pings. A maximum of 3 ICMP pings is currently supported.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce();
        parent::__construct($data);
    }

    /**
     * Number of ICMP pings. A maximum of 3 ICMP pings is currently supported.
     *
     * Generated from protobuf field <code>int32 pings_count = 1;</code>
     * @return int
     */
    public function getPingsCount()
    {
        return $this->pings_count;
    }

    /**
     * Number of ICMP pings. A maximum of 3 ICMP pings is currently supported.
     *
     * Generated from protobuf field <code>int32 pings_count = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setPingsCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->pings_count = $var;

        return $this;
    }

}

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

