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

namespace Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection;

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

/**
 * ApplicationEndpoint represents a remote application endpoint.
 *
 * Generated from protobuf message <code>google.cloud.beyondcorp.appconnections.v1.AppConnection.ApplicationEndpoint</code>
 */
class ApplicationEndpoint extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Hostname or IP address of the remote application endpoint.
     *
     * Generated from protobuf field <code>string host = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $host = '';
    /**
     * Required. Port of the remote application endpoint.
     *
     * Generated from protobuf field <code>int32 port = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $port = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $host
     *           Required. Hostname or IP address of the remote application endpoint.
     *     @type int $port
     *           Required. Port of the remote application endpoint.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Hostname or IP address of the remote application endpoint.
     *
     * Generated from protobuf field <code>string host = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getHost()
    {
        return $this->host;
    }

    /**
     * Required. Hostname or IP address of the remote application endpoint.
     *
     * Generated from protobuf field <code>string host = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setHost($var)
    {
        GPBUtil::checkString($var, True);
        $this->host = $var;

        return $this;
    }

    /**
     * Required. Port of the remote application endpoint.
     *
     * Generated from protobuf field <code>int32 port = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getPort()
    {
        return $this->port;
    }

    /**
     * Required. Port of the remote application endpoint.
     *
     * Generated from protobuf field <code>int32 port = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setPort($var)
    {
        GPBUtil::checkInt32($var);
        $this->port = $var;

        return $this;
    }

}

