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

namespace Google\Cloud\BeyondCorp\AppGateways\V1;

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

/**
 * A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway
 * to a remote application. It creates all the necessary GCP components needed
 * for creating a BeyondCorp protected AppGateway. Multiple connectors can be
 * authorised for a single AppGateway.
 *
 * Generated from protobuf message <code>google.cloud.beyondcorp.appgateways.v1.AppGateway</code>
 */
class AppGateway extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Unique resource name of the AppGateway.
     * The name is ignored when creating an AppGateway.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $name = '';
    /**
     * Output only. Timestamp when the resource was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Output only. Timestamp when the resource was last modified.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;
    /**
     * Optional. Resource labels to represent user provided metadata.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $labels;
    /**
     * Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed
     * 64 characters.
     *
     * Generated from protobuf field <code>string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $display_name = '';
    /**
     * Output only. A unique identifier for the instance generated by the
     * system.
     *
     * Generated from protobuf field <code>string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $uid = '';
    /**
     * Required. The type of network connectivity used by the AppGateway.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appgateways.v1.AppGateway.Type type = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $type = 0;
    /**
     * Output only. The current state of the AppGateway.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appgateways.v1.AppGateway.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $state = 0;
    /**
     * Output only. Server-defined URI for this resource.
     *
     * Generated from protobuf field <code>string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $uri = '';
    /**
     * Output only. A list of connections allocated for the Gateway
     *
     * Generated from protobuf field <code>repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection allocated_connections = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $allocated_connections;
    /**
     * Required. The type of hosting used by the AppGateway.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType host_type = 11 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $host_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Unique resource name of the AppGateway.
     *           The name is ignored when creating an AppGateway.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Timestamp when the resource was created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Timestamp when the resource was last modified.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Optional. Resource labels to represent user provided metadata.
     *     @type string $display_name
     *           Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed
     *           64 characters.
     *     @type string $uid
     *           Output only. A unique identifier for the instance generated by the
     *           system.
     *     @type int $type
     *           Required. The type of network connectivity used by the AppGateway.
     *     @type int $state
     *           Output only. The current state of the AppGateway.
     *     @type string $uri
     *           Output only. Server-defined URI for this resource.
     *     @type array<\Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\AllocatedConnection>|\Google\Protobuf\Internal\RepeatedField $allocated_connections
     *           Output only. A list of connections allocated for the Gateway
     *     @type int $host_type
     *           Required. The type of hosting used by the AppGateway.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Beyondcorp\Appgateways\V1\AppGatewaysService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Unique resource name of the AppGateway.
     * The name is ignored when creating an AppGateway.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. Unique resource name of the AppGateway.
     * The name is ignored when creating an AppGateway.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. Timestamp when the resource was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. Timestamp when the resource was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. Timestamp when the resource was last modified.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. Timestamp when the resource was last modified.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Optional. Resource labels to represent user provided metadata.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Optional. Resource labels to represent user provided metadata.
     *
     * Generated from protobuf field <code>map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }

    /**
     * Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed
     * 64 characters.
     *
     * Generated from protobuf field <code>string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed
     * 64 characters.
     *
     * Generated from protobuf field <code>string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Output only. A unique identifier for the instance generated by the
     * system.
     *
     * Generated from protobuf field <code>string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * Output only. A unique identifier for the instance generated by the
     * system.
     *
     * Generated from protobuf field <code>string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->uid = $var;

        return $this;
    }

    /**
     * Required. The type of network connectivity used by the AppGateway.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appgateways.v1.AppGateway.Type type = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

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

        return $this;
    }

    /**
     * Output only. The current state of the AppGateway.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appgateways.v1.AppGateway.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. The current state of the AppGateway.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appgateways.v1.AppGateway.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Output only. Server-defined URI for this resource.
     *
     * Generated from protobuf field <code>string uri = 9 [(.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 = 9 [(.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. A list of connections allocated for the Gateway
     *
     * Generated from protobuf field <code>repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection allocated_connections = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAllocatedConnections()
    {
        return $this->allocated_connections;
    }

    /**
     * Output only. A list of connections allocated for the Gateway
     *
     * Generated from protobuf field <code>repeated .google.cloud.beyondcorp.appgateways.v1.AppGateway.AllocatedConnection allocated_connections = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\AllocatedConnection>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAllocatedConnections($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\AllocatedConnection::class);
        $this->allocated_connections = $arr;

        return $this;
    }

    /**
     * Required. The type of hosting used by the AppGateway.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType host_type = 11 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getHostType()
    {
        return $this->host_type;
    }

    /**
     * Required. The type of hosting used by the AppGateway.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appgateways.v1.AppGateway.HostType host_type = 11 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setHostType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BeyondCorp\AppGateways\V1\AppGateway\HostType::class);
        $this->host_type = $var;

        return $this;
    }

}

