<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/compute/v1/compute.proto

namespace Google\Cloud\Compute\V1;

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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.BfdStatusPacketCounts</code>
 */
class BfdStatusPacketCounts extends \Google\Protobuf\Internal\Message
{
    /**
     * Number of packets received since the beginning of the current BFD session.
     *
     * Generated from protobuf field <code>optional uint32 num_rx = 39375263;</code>
     */
    private $num_rx = null;
    /**
     * Number of packets received that were rejected because of errors since the beginning of the current BFD session.
     *
     * Generated from protobuf field <code>optional uint32 num_rx_rejected = 281007902;</code>
     */
    private $num_rx_rejected = null;
    /**
     * Number of packets received that were successfully processed since the beginning of the current BFD session.
     *
     * Generated from protobuf field <code>optional uint32 num_rx_successful = 455361850;</code>
     */
    private $num_rx_successful = null;
    /**
     * Number of packets transmitted since the beginning of the current BFD session.
     *
     * Generated from protobuf field <code>optional uint32 num_tx = 39375325;</code>
     */
    private $num_tx = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $num_rx
     *           Number of packets received since the beginning of the current BFD session.
     *     @type int $num_rx_rejected
     *           Number of packets received that were rejected because of errors since the beginning of the current BFD session.
     *     @type int $num_rx_successful
     *           Number of packets received that were successfully processed since the beginning of the current BFD session.
     *     @type int $num_tx
     *           Number of packets transmitted since the beginning of the current BFD session.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Number of packets received since the beginning of the current BFD session.
     *
     * Generated from protobuf field <code>optional uint32 num_rx = 39375263;</code>
     * @return int
     */
    public function getNumRx()
    {
        return isset($this->num_rx) ? $this->num_rx : 0;
    }

    public function hasNumRx()
    {
        return isset($this->num_rx);
    }

    public function clearNumRx()
    {
        unset($this->num_rx);
    }

    /**
     * Number of packets received since the beginning of the current BFD session.
     *
     * Generated from protobuf field <code>optional uint32 num_rx = 39375263;</code>
     * @param int $var
     * @return $this
     */
    public function setNumRx($var)
    {
        GPBUtil::checkUint32($var);
        $this->num_rx = $var;

        return $this;
    }

    /**
     * Number of packets received that were rejected because of errors since the beginning of the current BFD session.
     *
     * Generated from protobuf field <code>optional uint32 num_rx_rejected = 281007902;</code>
     * @return int
     */
    public function getNumRxRejected()
    {
        return isset($this->num_rx_rejected) ? $this->num_rx_rejected : 0;
    }

    public function hasNumRxRejected()
    {
        return isset($this->num_rx_rejected);
    }

    public function clearNumRxRejected()
    {
        unset($this->num_rx_rejected);
    }

    /**
     * Number of packets received that were rejected because of errors since the beginning of the current BFD session.
     *
     * Generated from protobuf field <code>optional uint32 num_rx_rejected = 281007902;</code>
     * @param int $var
     * @return $this
     */
    public function setNumRxRejected($var)
    {
        GPBUtil::checkUint32($var);
        $this->num_rx_rejected = $var;

        return $this;
    }

    /**
     * Number of packets received that were successfully processed since the beginning of the current BFD session.
     *
     * Generated from protobuf field <code>optional uint32 num_rx_successful = 455361850;</code>
     * @return int
     */
    public function getNumRxSuccessful()
    {
        return isset($this->num_rx_successful) ? $this->num_rx_successful : 0;
    }

    public function hasNumRxSuccessful()
    {
        return isset($this->num_rx_successful);
    }

    public function clearNumRxSuccessful()
    {
        unset($this->num_rx_successful);
    }

    /**
     * Number of packets received that were successfully processed since the beginning of the current BFD session.
     *
     * Generated from protobuf field <code>optional uint32 num_rx_successful = 455361850;</code>
     * @param int $var
     * @return $this
     */
    public function setNumRxSuccessful($var)
    {
        GPBUtil::checkUint32($var);
        $this->num_rx_successful = $var;

        return $this;
    }

    /**
     * Number of packets transmitted since the beginning of the current BFD session.
     *
     * Generated from protobuf field <code>optional uint32 num_tx = 39375325;</code>
     * @return int
     */
    public function getNumTx()
    {
        return isset($this->num_tx) ? $this->num_tx : 0;
    }

    public function hasNumTx()
    {
        return isset($this->num_tx);
    }

    public function clearNumTx()
    {
        unset($this->num_tx);
    }

    /**
     * Number of packets transmitted since the beginning of the current BFD session.
     *
     * Generated from protobuf field <code>optional uint32 num_tx = 39375325;</code>
     * @param int $var
     * @return $this
     */
    public function setNumTx($var)
    {
        GPBUtil::checkUint32($var);
        $this->num_tx = $var;

        return $this;
    }

}

