<?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\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Message describing InterconnectAttachment object
 *
 * Generated from protobuf message <code>google.cloud.edgenetwork.v1.InterconnectAttachment</code>
 */
class InterconnectAttachment extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The canonical resource name of the interconnect attachment.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * Output only. The time when the interconnect attachment was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. The time when the interconnect attachment was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;
    /**
     * Labels associated with this resource.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4;</code>
     */
    private $labels;
    /**
     * Optional. A free-text description of the resource. Max length 1024
     * characters.
     *
     * Generated from protobuf field <code>string description = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $description = '';
    /**
     * Required. The canonical name of underlying Interconnect object that this
     * attachment's traffic will traverse through. The name is in the form of
     * `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
     *
     * Generated from protobuf field <code>string interconnect = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $interconnect = '';
    /**
     * Optional. The canonical Network name in the form of
     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
     *
     * Generated from protobuf field <code>string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     */
    protected $network = '';
    /**
     * Required. VLAN id provided by user. Must be site-wise unique.
     *
     * Generated from protobuf field <code>int32 vlan_id = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $vlan_id = 0;
    /**
     * IP (L3) MTU value of the virtual edge cloud.
     * Valid values are: 1500 and 9000.
     * Default to 1500 if not set.
     *
     * Generated from protobuf field <code>int32 mtu = 9;</code>
     */
    protected $mtu = 0;
    /**
     * Output only. Current stage of the resource to the device by config push.
     *
     * Generated from protobuf field <code>.google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The canonical resource name of the interconnect attachment.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The time when the interconnect attachment was created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. The time when the interconnect attachment was last updated.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Labels associated with this resource.
     *     @type string $description
     *           Optional. A free-text description of the resource. Max length 1024
     *           characters.
     *     @type string $interconnect
     *           Required. The canonical name of underlying Interconnect object that this
     *           attachment's traffic will traverse through. The name is in the form of
     *           `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
     *     @type string $network
     *           Optional. The canonical Network name in the form of
     *           `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
     *     @type int $vlan_id
     *           Required. VLAN id provided by user. Must be site-wise unique.
     *     @type int $mtu
     *           IP (L3) MTU value of the virtual edge cloud.
     *           Valid values are: 1500 and 9000.
     *           Default to 1500 if not set.
     *     @type int $state
     *           Output only. Current stage of the resource to the device by config push.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Edgenetwork\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The canonical resource name of the interconnect attachment.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The canonical resource name of the interconnect attachment.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. The time when the interconnect attachment was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. The time when the interconnect attachment was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. The time when the interconnect attachment was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. The time when the interconnect attachment was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Labels associated with this resource.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Labels associated with this resource.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }

    /**
     * Optional. A free-text description of the resource. Max length 1024
     * characters.
     *
     * Generated from protobuf field <code>string description = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Optional. A free-text description of the resource. Max length 1024
     * characters.
     *
     * Generated from protobuf field <code>string description = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Required. The canonical name of underlying Interconnect object that this
     * attachment's traffic will traverse through. The name is in the form of
     * `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
     *
     * Generated from protobuf field <code>string interconnect = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getInterconnect()
    {
        return $this->interconnect;
    }

    /**
     * Required. The canonical name of underlying Interconnect object that this
     * attachment's traffic will traverse through. The name is in the form of
     * `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
     *
     * Generated from protobuf field <code>string interconnect = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setInterconnect($var)
    {
        GPBUtil::checkString($var, True);
        $this->interconnect = $var;

        return $this;
    }

    /**
     * Optional. The canonical Network name in the form of
     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
     *
     * Generated from protobuf field <code>string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getNetwork()
    {
        return $this->network;
    }

    /**
     * Optional. The canonical Network name in the form of
     * `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
     *
     * Generated from protobuf field <code>string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setNetwork($var)
    {
        GPBUtil::checkString($var, True);
        $this->network = $var;

        return $this;
    }

    /**
     * Required. VLAN id provided by user. Must be site-wise unique.
     *
     * Generated from protobuf field <code>int32 vlan_id = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getVlanId()
    {
        return $this->vlan_id;
    }

    /**
     * Required. VLAN id provided by user. Must be site-wise unique.
     *
     * Generated from protobuf field <code>int32 vlan_id = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setVlanId($var)
    {
        GPBUtil::checkInt32($var);
        $this->vlan_id = $var;

        return $this;
    }

    /**
     * IP (L3) MTU value of the virtual edge cloud.
     * Valid values are: 1500 and 9000.
     * Default to 1500 if not set.
     *
     * Generated from protobuf field <code>int32 mtu = 9;</code>
     * @return int
     */
    public function getMtu()
    {
        return $this->mtu;
    }

    /**
     * IP (L3) MTU value of the virtual edge cloud.
     * Valid values are: 1500 and 9000.
     * Default to 1500 if not set.
     *
     * Generated from protobuf field <code>int32 mtu = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setMtu($var)
    {
        GPBUtil::checkInt32($var);
        $this->mtu = $var;

        return $this;
    }

    /**
     * Output only. Current stage of the resource to the device by config push.
     *
     * Generated from protobuf field <code>.google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. Current stage of the resource to the device by config push.
     *
     * Generated from protobuf field <code>.google.cloud.edgenetwork.v1.ResourceState state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\EdgeNetwork\V1\ResourceState::class);
        $this->state = $var;

        return $this;
    }

}

