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

namespace Google\Cloud\EdgeNetwork\V1\Router;

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

/**
 * BGP information specific to this router.
 *
 * Generated from protobuf message <code>google.cloud.edgenetwork.v1.Router.Bgp</code>
 */
class Bgp extends \Google\Protobuf\Internal\Message
{
    /**
     * Locally assigned BGP ASN.
     *
     * Generated from protobuf field <code>uint32 asn = 1;</code>
     */
    protected $asn = 0;
    /**
     * The interval in seconds between BGP keepalive messages that are
     * sent to the peer. Default is 20 with value between 20 and 60.
     *
     * Generated from protobuf field <code>uint32 keepalive_interval_in_seconds = 2;</code>
     */
    protected $keepalive_interval_in_seconds = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $asn
     *           Locally assigned BGP ASN.
     *     @type int $keepalive_interval_in_seconds
     *           The interval in seconds between BGP keepalive messages that are
     *           sent to the peer. Default is 20 with value between 20 and 60.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Edgenetwork\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Locally assigned BGP ASN.
     *
     * Generated from protobuf field <code>uint32 asn = 1;</code>
     * @return int
     */
    public function getAsn()
    {
        return $this->asn;
    }

    /**
     * Locally assigned BGP ASN.
     *
     * Generated from protobuf field <code>uint32 asn = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setAsn($var)
    {
        GPBUtil::checkUint32($var);
        $this->asn = $var;

        return $this;
    }

    /**
     * The interval in seconds between BGP keepalive messages that are
     * sent to the peer. Default is 20 with value between 20 and 60.
     *
     * Generated from protobuf field <code>uint32 keepalive_interval_in_seconds = 2;</code>
     * @return int
     */
    public function getKeepaliveIntervalInSeconds()
    {
        return $this->keepalive_interval_in_seconds;
    }

    /**
     * The interval in seconds between BGP keepalive messages that are
     * sent to the peer. Default is 20 with value between 20 and 60.
     *
     * Generated from protobuf field <code>uint32 keepalive_interval_in_seconds = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setKeepaliveIntervalInSeconds($var)
    {
        GPBUtil::checkUint32($var);
        $this->keepalive_interval_in_seconds = $var;

        return $this;
    }

}

