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

namespace Google\Cloud\Dataplex\V1;

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

/**
 * An asset represents a cloud resource that is being managed within a lake as a
 * member of a zone.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.Asset</code>
 */
class Asset extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The relative resource name of the asset, of the form:
     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * Optional. User friendly display name.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $display_name = '';
    /**
     * Output only. System generated globally unique ID for the asset. This ID
     * will be different if the asset is deleted and re-created with the same
     * name.
     *
     * Generated from protobuf field <code>string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $uid = '';
    /**
     * Output only. The time when the asset was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Output only. The time when the asset was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;
    /**
     * Optional. User defined labels for the asset.
     *
     * Generated from protobuf field <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $labels;
    /**
     * Optional. Description of the asset.
     *
     * Generated from protobuf field <code>string description = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $description = '';
    /**
     * Output only. Current state of the asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $state = 0;
    /**
     * Required. Specification of the resource that is referenced by this asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $resource_spec = null;
    /**
     * Output only. Status of the resource referenced by this asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.ResourceStatus resource_status = 101 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $resource_status = null;
    /**
     * Output only. Status of the security policy applied to resource referenced
     * by this asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $security_status = null;
    /**
     * Optional. Specification of the discovery feature applied to data referenced
     * by this asset. When this spec is left unset, the asset will use the spec
     * set on the parent zone.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $discovery_spec = null;
    /**
     * Output only. Status of the discovery feature applied to data referenced by
     * this asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $discovery_status = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. The relative resource name of the asset, of the form:
     *           `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
     *     @type string $display_name
     *           Optional. User friendly display name.
     *     @type string $uid
     *           Output only. System generated globally unique ID for the asset. This ID
     *           will be different if the asset is deleted and re-created with the same
     *           name.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The time when the asset was created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. The time when the asset was last updated.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Optional. User defined labels for the asset.
     *     @type string $description
     *           Optional. Description of the asset.
     *     @type int $state
     *           Output only. Current state of the asset.
     *     @type \Google\Cloud\Dataplex\V1\Asset\ResourceSpec $resource_spec
     *           Required. Specification of the resource that is referenced by this asset.
     *     @type \Google\Cloud\Dataplex\V1\Asset\ResourceStatus $resource_status
     *           Output only. Status of the resource referenced by this asset.
     *     @type \Google\Cloud\Dataplex\V1\Asset\SecurityStatus $security_status
     *           Output only. Status of the security policy applied to resource referenced
     *           by this asset.
     *     @type \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec $discovery_spec
     *           Optional. Specification of the discovery feature applied to data referenced
     *           by this asset. When this spec is left unset, the asset will use the spec
     *           set on the parent zone.
     *     @type \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus $discovery_status
     *           Output only. Status of the discovery feature applied to data referenced by
     *           this asset.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The relative resource name of the asset, of the form:
     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. The relative resource name of the asset, of the form:
     * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. User friendly display name.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Optional. User friendly display name.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.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. System generated globally unique ID for the asset. This ID
     * will be different if the asset is deleted and re-created with the same
     * name.
     *
     * Generated from protobuf field <code>string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * Output only. System generated globally unique ID for the asset. This ID
     * will be different if the asset is deleted and re-created with the same
     * name.
     *
     * Generated from protobuf field <code>string uid = 3 [(.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 time when the asset was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.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. The time when the asset was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4 [(.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. The time when the asset was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.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. The time when the asset was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 5 [(.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. User defined labels for the asset.
     *
     * Generated from protobuf field <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Optional. User defined labels for the asset.
     *
     * Generated from protobuf field <code>map<string, string> labels = 6 [(.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. Description of the asset.
     *
     * Generated from protobuf field <code>string description = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Optional. Description of the asset.
     *
     * Generated from protobuf field <code>string description = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Required. Specification of the resource that is referenced by this asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dataplex\V1\Asset\ResourceSpec|null
     */
    public function getResourceSpec()
    {
        return $this->resource_spec;
    }

    public function hasResourceSpec()
    {
        return isset($this->resource_spec);
    }

    public function clearResourceSpec()
    {
        unset($this->resource_spec);
    }

    /**
     * Required. Specification of the resource that is referenced by this asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.ResourceSpec resource_spec = 100 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dataplex\V1\Asset\ResourceSpec $var
     * @return $this
     */
    public function setResourceSpec($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\ResourceSpec::class);
        $this->resource_spec = $var;

        return $this;
    }

    /**
     * Output only. Status of the resource referenced by this asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.ResourceStatus resource_status = 101 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Dataplex\V1\Asset\ResourceStatus|null
     */
    public function getResourceStatus()
    {
        return $this->resource_status;
    }

    public function hasResourceStatus()
    {
        return isset($this->resource_status);
    }

    public function clearResourceStatus()
    {
        unset($this->resource_status);
    }

    /**
     * Output only. Status of the resource referenced by this asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.ResourceStatus resource_status = 101 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dataplex\V1\Asset\ResourceStatus $var
     * @return $this
     */
    public function setResourceStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\ResourceStatus::class);
        $this->resource_status = $var;

        return $this;
    }

    /**
     * Output only. Status of the security policy applied to resource referenced
     * by this asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Dataplex\V1\Asset\SecurityStatus|null
     */
    public function getSecurityStatus()
    {
        return $this->security_status;
    }

    public function hasSecurityStatus()
    {
        return isset($this->security_status);
    }

    public function clearSecurityStatus()
    {
        unset($this->security_status);
    }

    /**
     * Output only. Status of the security policy applied to resource referenced
     * by this asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.SecurityStatus security_status = 103 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dataplex\V1\Asset\SecurityStatus $var
     * @return $this
     */
    public function setSecurityStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\SecurityStatus::class);
        $this->security_status = $var;

        return $this;
    }

    /**
     * Optional. Specification of the discovery feature applied to data referenced
     * by this asset. When this spec is left unset, the asset will use the spec
     * set on the parent zone.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec|null
     */
    public function getDiscoverySpec()
    {
        return $this->discovery_spec;
    }

    public function hasDiscoverySpec()
    {
        return isset($this->discovery_spec);
    }

    public function clearDiscoverySpec()
    {
        unset($this->discovery_spec);
    }

    /**
     * Optional. Specification of the discovery feature applied to data referenced
     * by this asset. When this spec is left unset, the asset will use the spec
     * set on the parent zone.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.DiscoverySpec discovery_spec = 106 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec $var
     * @return $this
     */
    public function setDiscoverySpec($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoverySpec::class);
        $this->discovery_spec = $var;

        return $this;
    }

    /**
     * Output only. Status of the discovery feature applied to data referenced by
     * this asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus|null
     */
    public function getDiscoveryStatus()
    {
        return $this->discovery_status;
    }

    public function hasDiscoveryStatus()
    {
        return isset($this->discovery_status);
    }

    public function clearDiscoveryStatus()
    {
        unset($this->discovery_status);
    }

    /**
     * Output only. Status of the discovery feature applied to data referenced by
     * this asset.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Asset.DiscoveryStatus discovery_status = 107 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus $var
     * @return $this
     */
    public function setDiscoveryStatus($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Asset\DiscoveryStatus::class);
        $this->discovery_status = $var;

        return $this;
    }

}

