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

namespace Google\Cloud\BeyondCorp\AppConnectors\V1;

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

/**
 * A BeyondCorp connector resource that represents an application facing
 * component deployed proximal to and with direct access to the application
 * instances. It is used to establish connectivity between the remote enterprise
 * environment and GCP. It initiates connections to the applications and can
 * proxy the data from users over the connection.
 *
 * Generated from protobuf message <code>google.cloud.beyondcorp.appconnectors.v1.AppConnector</code>
 */
class AppConnector extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Unique resource name of the AppConnector.
     * The name is ignored when creating a AppConnector.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $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>
     */
    protected $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>
     */
    protected $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 AppConnector. Cannot
     * exceed 64 characters.
     *
     * Generated from protobuf field <code>string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $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>
     */
    protected $uid = '';
    /**
     * Output only. The current state of the AppConnector.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appconnectors.v1.AppConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $state = 0;
    /**
     * Required. Principal information about the Identity of the AppConnector.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo principal_info = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $principal_info = null;
    /**
     * Optional. Resource info of the connector.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $resource_info = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Unique resource name of the AppConnector.
     *           The name is ignored when creating a AppConnector.
     *     @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 AppConnector. Cannot
     *           exceed 64 characters.
     *     @type string $uid
     *           Output only. A unique identifier for the instance generated by the
     *           system.
     *     @type int $state
     *           Output only. The current state of the AppConnector.
     *     @type \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo $principal_info
     *           Required. Principal information about the Identity of the AppConnector.
     *     @type \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $resource_info
     *           Optional. Resource info of the connector.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Beyondcorp\Appconnectors\V1\AppConnectorsService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Unique resource name of the AppConnector.
     * The name is ignored when creating a AppConnector.
     *
     * 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 AppConnector.
     * The name is ignored when creating a AppConnector.
     *
     * 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 AppConnector. 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 AppConnector. 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;
    }

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

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

        return $this;
    }

    /**
     * Required. Principal information about the Identity of the AppConnector.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo principal_info = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo|null
     */
    public function getPrincipalInfo()
    {
        return $this->principal_info;
    }

    public function hasPrincipalInfo()
    {
        return isset($this->principal_info);
    }

    public function clearPrincipalInfo()
    {
        unset($this->principal_info);
    }

    /**
     * Required. Principal information about the Identity of the AppConnector.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appconnectors.v1.AppConnector.PrincipalInfo principal_info = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo $var
     * @return $this
     */
    public function setPrincipalInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\AppConnector\PrincipalInfo::class);
        $this->principal_info = $var;

        return $this;
    }

    /**
     * Optional. Resource info of the connector.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo|null
     */
    public function getResourceInfo()
    {
        return $this->resource_info;
    }

    public function hasResourceInfo()
    {
        return isset($this->resource_info);
    }

    public function clearResourceInfo()
    {
        unset($this->resource_info);
    }

    /**
     * Optional. Resource info of the connector.
     *
     * Generated from protobuf field <code>.google.cloud.beyondcorp.appconnectors.v1.ResourceInfo resource_info = 11 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo $var
     * @return $this
     */
    public function setResourceInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BeyondCorp\AppConnectors\V1\ResourceInfo::class);
        $this->resource_info = $var;

        return $this;
    }

}

