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

namespace Google\Cloud\NetworkManagement\V1\ProbingDetails;

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

/**
 * Probing results for a single edge device.
 *
 * Generated from protobuf message <code>google.cloud.networkmanagement.v1.ProbingDetails.SingleEdgeResponse</code>
 */
class SingleEdgeResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The overall result of active probing for this egress device.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult result = 1;</code>
     */
    protected $result = 0;
    /**
     * Number of probes sent.
     *
     * Generated from protobuf field <code>int32 sent_probe_count = 2;</code>
     */
    protected $sent_probe_count = 0;
    /**
     * Number of probes that reached the destination.
     *
     * Generated from protobuf field <code>int32 successful_probe_count = 3;</code>
     */
    protected $successful_probe_count = 0;
    /**
     * Latency as measured by active probing in one direction: from the source
     * to the destination endpoint.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.LatencyDistribution probing_latency = 4;</code>
     */
    protected $probing_latency = null;
    /**
     * The EdgeLocation from which a packet, destined to the internet, will
     * egress the Google network.
     * This will only be populated for a connectivity test which has an internet
     * destination address.
     * The absence of this field *must not* be used as an indication that the
     * destination is part of the Google network.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation destination_egress_location = 5;</code>
     */
    protected $destination_egress_location = null;
    /**
     * Router name in the format '{router}.{metroshard}'. For example:
     * pf01.aaa01, pr02.aaa01.
     *
     * Generated from protobuf field <code>string destination_router = 6;</code>
     */
    protected $destination_router = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $result
     *           The overall result of active probing for this egress device.
     *     @type int $sent_probe_count
     *           Number of probes sent.
     *     @type int $successful_probe_count
     *           Number of probes that reached the destination.
     *     @type \Google\Cloud\NetworkManagement\V1\LatencyDistribution $probing_latency
     *           Latency as measured by active probing in one direction: from the source
     *           to the destination endpoint.
     *     @type \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation $destination_egress_location
     *           The EdgeLocation from which a packet, destined to the internet, will
     *           egress the Google network.
     *           This will only be populated for a connectivity test which has an internet
     *           destination address.
     *           The absence of this field *must not* be used as an indication that the
     *           destination is part of the Google network.
     *     @type string $destination_router
     *           Router name in the format '{router}.{metroshard}'. For example:
     *           pf01.aaa01, pr02.aaa01.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce();
        parent::__construct($data);
    }

    /**
     * The overall result of active probing for this egress device.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult result = 1;</code>
     * @return int
     */
    public function getResult()
    {
        return $this->result;
    }

    /**
     * The overall result of active probing for this egress device.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult result = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setResult($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails\ProbingResult::class);
        $this->result = $var;

        return $this;
    }

    /**
     * Number of probes sent.
     *
     * Generated from protobuf field <code>int32 sent_probe_count = 2;</code>
     * @return int
     */
    public function getSentProbeCount()
    {
        return $this->sent_probe_count;
    }

    /**
     * Number of probes sent.
     *
     * Generated from protobuf field <code>int32 sent_probe_count = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setSentProbeCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->sent_probe_count = $var;

        return $this;
    }

    /**
     * Number of probes that reached the destination.
     *
     * Generated from protobuf field <code>int32 successful_probe_count = 3;</code>
     * @return int
     */
    public function getSuccessfulProbeCount()
    {
        return $this->successful_probe_count;
    }

    /**
     * Number of probes that reached the destination.
     *
     * Generated from protobuf field <code>int32 successful_probe_count = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setSuccessfulProbeCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->successful_probe_count = $var;

        return $this;
    }

    /**
     * Latency as measured by active probing in one direction: from the source
     * to the destination endpoint.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.LatencyDistribution probing_latency = 4;</code>
     * @return \Google\Cloud\NetworkManagement\V1\LatencyDistribution|null
     */
    public function getProbingLatency()
    {
        return $this->probing_latency;
    }

    public function hasProbingLatency()
    {
        return isset($this->probing_latency);
    }

    public function clearProbingLatency()
    {
        unset($this->probing_latency);
    }

    /**
     * Latency as measured by active probing in one direction: from the source
     * to the destination endpoint.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.LatencyDistribution probing_latency = 4;</code>
     * @param \Google\Cloud\NetworkManagement\V1\LatencyDistribution $var
     * @return $this
     */
    public function setProbingLatency($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\LatencyDistribution::class);
        $this->probing_latency = $var;

        return $this;
    }

    /**
     * The EdgeLocation from which a packet, destined to the internet, will
     * egress the Google network.
     * This will only be populated for a connectivity test which has an internet
     * destination address.
     * The absence of this field *must not* be used as an indication that the
     * destination is part of the Google network.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation destination_egress_location = 5;</code>
     * @return \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation|null
     */
    public function getDestinationEgressLocation()
    {
        return $this->destination_egress_location;
    }

    public function hasDestinationEgressLocation()
    {
        return isset($this->destination_egress_location);
    }

    public function clearDestinationEgressLocation()
    {
        unset($this->destination_egress_location);
    }

    /**
     * The EdgeLocation from which a packet, destined to the internet, will
     * egress the Google network.
     * This will only be populated for a connectivity test which has an internet
     * destination address.
     * The absence of this field *must not* be used as an indication that the
     * destination is part of the Google network.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation destination_egress_location = 5;</code>
     * @param \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation $var
     * @return $this
     */
    public function setDestinationEgressLocation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation::class);
        $this->destination_egress_location = $var;

        return $this;
    }

    /**
     * Router name in the format '{router}.{metroshard}'. For example:
     * pf01.aaa01, pr02.aaa01.
     *
     * Generated from protobuf field <code>string destination_router = 6;</code>
     * @return string
     */
    public function getDestinationRouter()
    {
        return $this->destination_router;
    }

    /**
     * Router name in the format '{router}.{metroshard}'. For example:
     * pf01.aaa01, pr02.aaa01.
     *
     * Generated from protobuf field <code>string destination_router = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setDestinationRouter($var)
    {
        GPBUtil::checkString($var, True);
        $this->destination_router = $var;

        return $this;
    }

}


