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

/**
 * 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 region of the application frontend that served this request.
     *
     * Generated from protobuf field <code>string application_frontend_region = 6;</code>
     */
    protected $application_frontend_region = '';
    /**
     * The Cloud zone of the application frontend that served this request.
     *
     * Generated from protobuf field <code>string application_frontend_zone = 3 [deprecated = true];</code>
     * @deprecated
     */
    protected $application_frontend_zone = '';
    /**
     * The subzone of the application frontend that served this request, e.g. an
     * identifier for where within a zone (within the reported region) 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_region
     *           The Cloud region of the application frontend that served 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 a zone (within the reported region) 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 region of the application frontend that served this request.
     *
     * Generated from protobuf field <code>string application_frontend_region = 6;</code>
     * @return string
     */
    public function getApplicationFrontendRegion()
    {
        return $this->application_frontend_region;
    }

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

        return $this;
    }

    /**
     * The Cloud zone of the application frontend that served this request.
     *
     * Generated from protobuf field <code>string application_frontend_zone = 3 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getApplicationFrontendZone()
    {
        if ($this->application_frontend_zone !== '') {
            @trigger_error('application_frontend_zone is deprecated.', E_USER_DEPRECATED);
        }
        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 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setApplicationFrontendZone($var)
    {
        @trigger_error('application_frontend_zone is deprecated.', E_USER_DEPRECATED);
        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 a zone (within the reported region) 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 a zone (within the reported region) 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;
    }

}

