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

namespace Google\Cloud\EdgeNetwork\V1;

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

/**
 * Diagnostics information about interconnect, contains detailed and current
 * technical information about Google's side of the connection.
 *
 * Generated from protobuf message <code>google.cloud.edgenetwork.v1.InterconnectDiagnostics</code>
 */
class InterconnectDiagnostics extends \Google\Protobuf\Internal\Message
{
    /**
     * The MAC address of the Interconnect's bundle interface.
     *
     * Generated from protobuf field <code>string mac_address = 1;</code>
     */
    protected $mac_address = '';
    /**
     * A list of LinkLayerAddress, describing the ip address and corresponding
     * link-layer address of the neighbors for this interconnect.
     *
     * Generated from protobuf field <code>repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2;</code>
     */
    private $link_layer_addresses;
    /**
     * A list of LinkStatus objects, used to describe the status for each link on
     * the Interconnect.
     *
     * Generated from protobuf field <code>repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3;</code>
     */
    private $links;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $mac_address
     *           The MAC address of the Interconnect's bundle interface.
     *     @type \Google\Cloud\EdgeNetwork\V1\LinkLayerAddress[] $link_layer_addresses
     *           A list of LinkLayerAddress, describing the ip address and corresponding
     *           link-layer address of the neighbors for this interconnect.
     *     @type \Google\Cloud\EdgeNetwork\V1\InterconnectDiagnostics\LinkStatus[] $links
     *           A list of LinkStatus objects, used to describe the status for each link on
     *           the Interconnect.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Edgenetwork\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * The MAC address of the Interconnect's bundle interface.
     *
     * Generated from protobuf field <code>string mac_address = 1;</code>
     * @return string
     */
    public function getMacAddress()
    {
        return $this->mac_address;
    }

    /**
     * The MAC address of the Interconnect's bundle interface.
     *
     * Generated from protobuf field <code>string mac_address = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setMacAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->mac_address = $var;

        return $this;
    }

    /**
     * A list of LinkLayerAddress, describing the ip address and corresponding
     * link-layer address of the neighbors for this interconnect.
     *
     * Generated from protobuf field <code>repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2;</code>
     * @return RepeatedField<\Google\Cloud\EdgeNetwork\V1\LinkLayerAddress>
     */
    public function getLinkLayerAddresses()
    {
        return $this->link_layer_addresses;
    }

    /**
     * A list of LinkLayerAddress, describing the ip address and corresponding
     * link-layer address of the neighbors for this interconnect.
     *
     * Generated from protobuf field <code>repeated .google.cloud.edgenetwork.v1.LinkLayerAddress link_layer_addresses = 2;</code>
     * @param \Google\Cloud\EdgeNetwork\V1\LinkLayerAddress[] $var
     * @return $this
     */
    public function setLinkLayerAddresses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\EdgeNetwork\V1\LinkLayerAddress::class);
        $this->link_layer_addresses = $arr;

        return $this;
    }

    /**
     * A list of LinkStatus objects, used to describe the status for each link on
     * the Interconnect.
     *
     * Generated from protobuf field <code>repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3;</code>
     * @return RepeatedField<\Google\Cloud\EdgeNetwork\V1\InterconnectDiagnostics\LinkStatus>
     */
    public function getLinks()
    {
        return $this->links;
    }

    /**
     * A list of LinkStatus objects, used to describe the status for each link on
     * the Interconnect.
     *
     * Generated from protobuf field <code>repeated .google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus links = 3;</code>
     * @param \Google\Cloud\EdgeNetwork\V1\InterconnectDiagnostics\LinkStatus[] $var
     * @return $this
     */
    public function setLinks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\EdgeNetwork\V1\InterconnectDiagnostics\LinkStatus::class);
        $this->links = $arr;

        return $this;
    }

}

