<?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.RouterStatusBgpPeerStatus</code>
 */
class RouterStatusBgpPeerStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * Routes that were advertised to the remote BGP peer
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.Route advertised_routes = 64957612;</code>
     */
    private $advertised_routes;
    /**
     * IP address of the local BGP interface.
     *
     * Generated from protobuf field <code>string ip_address = 137836764;</code>
     */
    private $ip_address = '';
    /**
     * URL of the VPN tunnel that this BGP peer controls.
     *
     * Generated from protobuf field <code>string linked_vpn_tunnel = 83861497;</code>
     */
    private $linked_vpn_tunnel = '';
    /**
     * Name of this BGP peer. Unique within the Routers resource.
     *
     * Generated from protobuf field <code>string name = 3373707;</code>
     */
    private $name = '';
    /**
     * Number of routes learned from the remote BGP Peer.
     *
     * Generated from protobuf field <code>uint32 num_learned_routes = 135457535;</code>
     */
    private $num_learned_routes = 0;
    /**
     * IP address of the remote BGP interface.
     *
     * Generated from protobuf field <code>string peer_ip_address = 207735769;</code>
     */
    private $peer_ip_address = '';
    /**
     * BGP state as specified in RFC1771.
     *
     * Generated from protobuf field <code>string state = 109757585;</code>
     */
    private $state = '';
    /**
     * Status of the BGP peer: {UP, DOWN}
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.RouterStatusBgpPeerStatus.Status status = 181260274;</code>
     */
    private $status = 0;
    /**
     * Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
     *
     * Generated from protobuf field <code>string uptime = 235379688;</code>
     */
    private $uptime = '';
    /**
     * Time this session has been up, in seconds. Format: 145
     *
     * Generated from protobuf field <code>string uptime_seconds = 104736040;</code>
     */
    private $uptime_seconds = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Compute\V1\Route[]|\Google\Protobuf\Internal\RepeatedField $advertised_routes
     *           Routes that were advertised to the remote BGP peer
     *     @type string $ip_address
     *           IP address of the local BGP interface.
     *     @type string $linked_vpn_tunnel
     *           URL of the VPN tunnel that this BGP peer controls.
     *     @type string $name
     *           Name of this BGP peer. Unique within the Routers resource.
     *     @type int $num_learned_routes
     *           Number of routes learned from the remote BGP Peer.
     *     @type string $peer_ip_address
     *           IP address of the remote BGP interface.
     *     @type string $state
     *           BGP state as specified in RFC1771.
     *     @type int $status
     *           Status of the BGP peer: {UP, DOWN}
     *     @type string $uptime
     *           Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
     *     @type string $uptime_seconds
     *           Time this session has been up, in seconds. Format: 145
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Routes that were advertised to the remote BGP peer
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.Route advertised_routes = 64957612;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAdvertisedRoutes()
    {
        return $this->advertised_routes;
    }

    /**
     * Routes that were advertised to the remote BGP peer
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.Route advertised_routes = 64957612;</code>
     * @param \Google\Cloud\Compute\V1\Route[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAdvertisedRoutes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\Route::class);
        $this->advertised_routes = $arr;

        return $this;
    }

    /**
     * IP address of the local BGP interface.
     *
     * Generated from protobuf field <code>string ip_address = 137836764;</code>
     * @return string
     */
    public function getIpAddress()
    {
        return $this->ip_address;
    }

    /**
     * IP address of the local BGP interface.
     *
     * Generated from protobuf field <code>string ip_address = 137836764;</code>
     * @param string $var
     * @return $this
     */
    public function setIpAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->ip_address = $var;

        return $this;
    }

    /**
     * URL of the VPN tunnel that this BGP peer controls.
     *
     * Generated from protobuf field <code>string linked_vpn_tunnel = 83861497;</code>
     * @return string
     */
    public function getLinkedVpnTunnel()
    {
        return $this->linked_vpn_tunnel;
    }

    /**
     * URL of the VPN tunnel that this BGP peer controls.
     *
     * Generated from protobuf field <code>string linked_vpn_tunnel = 83861497;</code>
     * @param string $var
     * @return $this
     */
    public function setLinkedVpnTunnel($var)
    {
        GPBUtil::checkString($var, True);
        $this->linked_vpn_tunnel = $var;

        return $this;
    }

    /**
     * Name of this BGP peer. Unique within the Routers resource.
     *
     * Generated from protobuf field <code>string name = 3373707;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Name of this BGP peer. Unique within the Routers resource.
     *
     * Generated from protobuf field <code>string name = 3373707;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Number of routes learned from the remote BGP Peer.
     *
     * Generated from protobuf field <code>uint32 num_learned_routes = 135457535;</code>
     * @return int
     */
    public function getNumLearnedRoutes()
    {
        return $this->num_learned_routes;
    }

    /**
     * Number of routes learned from the remote BGP Peer.
     *
     * Generated from protobuf field <code>uint32 num_learned_routes = 135457535;</code>
     * @param int $var
     * @return $this
     */
    public function setNumLearnedRoutes($var)
    {
        GPBUtil::checkUint32($var);
        $this->num_learned_routes = $var;

        return $this;
    }

    /**
     * IP address of the remote BGP interface.
     *
     * Generated from protobuf field <code>string peer_ip_address = 207735769;</code>
     * @return string
     */
    public function getPeerIpAddress()
    {
        return $this->peer_ip_address;
    }

    /**
     * IP address of the remote BGP interface.
     *
     * Generated from protobuf field <code>string peer_ip_address = 207735769;</code>
     * @param string $var
     * @return $this
     */
    public function setPeerIpAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->peer_ip_address = $var;

        return $this;
    }

    /**
     * BGP state as specified in RFC1771.
     *
     * Generated from protobuf field <code>string state = 109757585;</code>
     * @return string
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * BGP state as specified in RFC1771.
     *
     * Generated from protobuf field <code>string state = 109757585;</code>
     * @param string $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkString($var, True);
        $this->state = $var;

        return $this;
    }

    /**
     * Status of the BGP peer: {UP, DOWN}
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.RouterStatusBgpPeerStatus.Status status = 181260274;</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Status of the BGP peer: {UP, DOWN}
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.RouterStatusBgpPeerStatus.Status status = 181260274;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Compute\V1\RouterStatusBgpPeerStatus\Status::class);
        $this->status = $var;

        return $this;
    }

    /**
     * Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
     *
     * Generated from protobuf field <code>string uptime = 235379688;</code>
     * @return string
     */
    public function getUptime()
    {
        return $this->uptime;
    }

    /**
     * Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
     *
     * Generated from protobuf field <code>string uptime = 235379688;</code>
     * @param string $var
     * @return $this
     */
    public function setUptime($var)
    {
        GPBUtil::checkString($var, True);
        $this->uptime = $var;

        return $this;
    }

    /**
     * Time this session has been up, in seconds. Format: 145
     *
     * Generated from protobuf field <code>string uptime_seconds = 104736040;</code>
     * @return string
     */
    public function getUptimeSeconds()
    {
        return $this->uptime_seconds;
    }

    /**
     * Time this session has been up, in seconds. Format: 145
     *
     * Generated from protobuf field <code>string uptime_seconds = 104736040;</code>
     * @param string $var
     * @return $this
     */
    public function setUptimeSeconds($var)
    {
        GPBUtil::checkString($var, True);
        $this->uptime_seconds = $var;

        return $this;
    }

}

