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

/**
 * Gateway represents a user facing component that serves as an entrance to
 * enable connectivity.
 *
 * Generated from protobuf message <code>google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway</code>
 */
class Gateway extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The type of hosting used by the gateway.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $type = 0;
    /**
     * Output only. Server-defined URI for this resource.
     *
     * Generated from protobuf field <code>string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $uri = '';
    /**
     * Output only. Ingress port reserved on the gateways for this
     * AppConnection, if not specified or zero, the default port is 19443.
     *
     * Generated from protobuf field <code>int32 ingress_port = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $ingress_port = 0;
    /**
     * Required. AppGateway name in following format:
     * `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}`
     *
     * Generated from protobuf field <code>string app_gateway = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $app_gateway = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *           Required. The type of hosting used by the gateway.
     *     @type string $uri
     *           Output only. Server-defined URI for this resource.
     *     @type int $ingress_port
     *           Output only. Ingress port reserved on the gateways for this
     *           AppConnection, if not specified or zero, the default port is 19443.
     *     @type string $app_gateway
     *           Required. AppGateway name in following format:
     *           `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}`
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Beyondcorp\Appconnections\V1\AppConnectionsService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The type of hosting used by the gateway.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Required. The type of hosting used by the gateway.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appconnections.v1.AppConnection.Gateway.Type type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppConnections\V1\AppConnection\Gateway\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Output only. Server-defined URI for this resource.
     *
     * Generated from protobuf field <code>string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getUri()
    {
        return $this->uri;
    }

    /**
     * Output only. Server-defined URI for this resource.
     *
     * Generated from protobuf field <code>string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->uri = $var;

        return $this;
    }

    /**
     * Output only. Ingress port reserved on the gateways for this
     * AppConnection, if not specified or zero, the default port is 19443.
     *
     * Generated from protobuf field <code>int32 ingress_port = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getIngressPort()
    {
        return $this->ingress_port;
    }

    /**
     * Output only. Ingress port reserved on the gateways for this
     * AppConnection, if not specified or zero, the default port is 19443.
     *
     * Generated from protobuf field <code>int32 ingress_port = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setIngressPort($var)
    {
        GPBUtil::checkInt32($var);
        $this->ingress_port = $var;

        return $this;
    }

    /**
     * Required. AppGateway name in following format:
     * `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}`
     *
     * Generated from protobuf field <code>string app_gateway = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getAppGateway()
    {
        return $this->app_gateway;
    }

    /**
     * Required. AppGateway name in following format:
     * `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}`
     *
     * Generated from protobuf field <code>string app_gateway = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setAppGateway($var)
    {
        GPBUtil::checkString($var, True);
        $this->app_gateway = $var;

        return $this;
    }

}


