<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/bigtable/v2/peer_info.proto

namespace Google\Cloud\Bigtable\V2;

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

/**
 * PeerInfo contains information about the peer that the client is
 * connecting to.
 *
 * Generated from protobuf message <code>google.bigtable.v2.PeerInfo</code>
 */
class PeerInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * An opaque identifier for the Google Frontend which serviced this request.
     * Only set when not using DirectAccess.
     *
     * Generated from protobuf field <code>int64 google_frontend_id = 1;</code>
     */
    protected $google_frontend_id = 0;
    /**
     * An opaque identifier for the application frontend which serviced this
     * request.
     *
     * Generated from protobuf field <code>int64 application_frontend_id = 2;</code>
     */
    protected $application_frontend_id = 0;
    /**
     * The Cloud zone of the application frontend that served this request.
     *
     * Generated from protobuf field <code>string application_frontend_zone = 3;</code>
     */
    protected $application_frontend_zone = '';
    /**
     * The subzone of the application frontend that served this request, e.g. an
     * identifier for where within the zone the application frontend is.
     *
     * Generated from protobuf field <code>string application_frontend_subzone = 4;</code>
     */
    protected $application_frontend_subzone = '';
    /**
     * Generated from protobuf field <code>.google.bigtable.v2.PeerInfo.TransportType transport_type = 5;</code>
     */
    protected $transport_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $google_frontend_id
     *           An opaque identifier for the Google Frontend which serviced this request.
     *           Only set when not using DirectAccess.
     *     @type int|string $application_frontend_id
     *           An opaque identifier for the application frontend which serviced this
     *           request.
     *     @type string $application_frontend_zone
     *           The Cloud zone of the application frontend that served this request.
     *     @type string $application_frontend_subzone
     *           The subzone of the application frontend that served this request, e.g. an
     *           identifier for where within the zone the application frontend is.
     *     @type int $transport_type
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\V2\PeerInfo::initOnce();
        parent::__construct($data);
    }

    /**
     * An opaque identifier for the Google Frontend which serviced this request.
     * Only set when not using DirectAccess.
     *
     * Generated from protobuf field <code>int64 google_frontend_id = 1;</code>
     * @return int|string
     */
    public function getGoogleFrontendId()
    {
        return $this->google_frontend_id;
    }

    /**
     * An opaque identifier for the Google Frontend which serviced this request.
     * Only set when not using DirectAccess.
     *
     * Generated from protobuf field <code>int64 google_frontend_id = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setGoogleFrontendId($var)
    {
        GPBUtil::checkInt64($var);
        $this->google_frontend_id = $var;

        return $this;
    }

    /**
     * An opaque identifier for the application frontend which serviced this
     * request.
     *
     * Generated from protobuf field <code>int64 application_frontend_id = 2;</code>
     * @return int|string
     */
    public function getApplicationFrontendId()
    {
        return $this->application_frontend_id;
    }

    /**
     * An opaque identifier for the application frontend which serviced this
     * request.
     *
     * Generated from protobuf field <code>int64 application_frontend_id = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setApplicationFrontendId($var)
    {
        GPBUtil::checkInt64($var);
        $this->application_frontend_id = $var;

        return $this;
    }

    /**
     * The Cloud zone of the application frontend that served this request.
     *
     * Generated from protobuf field <code>string application_frontend_zone = 3;</code>
     * @return string
     */
    public function getApplicationFrontendZone()
    {
        return $this->application_frontend_zone;
    }

    /**
     * The Cloud zone of the application frontend that served this request.
     *
     * Generated from protobuf field <code>string application_frontend_zone = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setApplicationFrontendZone($var)
    {
        GPBUtil::checkString($var, True);
        $this->application_frontend_zone = $var;

        return $this;
    }

    /**
     * The subzone of the application frontend that served this request, e.g. an
     * identifier for where within the zone the application frontend is.
     *
     * Generated from protobuf field <code>string application_frontend_subzone = 4;</code>
     * @return string
     */
    public function getApplicationFrontendSubzone()
    {
        return $this->application_frontend_subzone;
    }

    /**
     * The subzone of the application frontend that served this request, e.g. an
     * identifier for where within the zone the application frontend is.
     *
     * Generated from protobuf field <code>string application_frontend_subzone = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setApplicationFrontendSubzone($var)
    {
        GPBUtil::checkString($var, True);
        $this->application_frontend_subzone = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.bigtable.v2.PeerInfo.TransportType transport_type = 5;</code>
     * @return int
     */
    public function getTransportType()
    {
        return $this->transport_type;
    }

    /**
     * Generated from protobuf field <code>.google.bigtable.v2.PeerInfo.TransportType transport_type = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setTransportType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\V2\PeerInfo\TransportType::class);
        $this->transport_type = $var;

        return $this;
    }

}

