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

namespace Google\Cloud\Dataplex\V1;

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

/**
 * Represents a data asset resource that can be packaged and shared via a data
 * product.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.DataAsset</code>
 */
class DataAsset extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. Resource name of the data asset.
     * Format:
     * projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}/dataAssets/{data_asset_id}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Output only. System generated globally unique ID for the data asset.
     * This ID will be different if the data asset is deleted and re-created
     * with the same name.
     *
     * Generated from protobuf field <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {</code>
     */
    protected $uid = '';
    /**
     * Output only. The time at which the data asset was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. The time at which the data asset was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;
    /**
     * Optional. This checksum is computed by the server based on the value of
     * other fields, and may be sent on update and delete requests to ensure the
     * client has an up-to-date value before proceeding.
     *
     * Generated from protobuf field <code>string etag = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $etag = '';
    /**
     * Optional. User-defined labels for the data asset.
     * Example:
     *  ```
     *  {
     *    "environment": "production",
     *    "billing": "marketing-department"
     *  }
     *  ```
     *
     * Generated from protobuf field <code>map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $labels;
    /**
     * Required. Immutable. Full resource name of the cloud resource represented
     * by the data asset. This must follow
     * https://cloud.google.com/iam/docs/full-resource-names. Example:
     * `//bigquery.googleapis.com/projects/my_project_123/datasets/dataset_456/tables/table_789`
     * Only BigQuery tables and datasets are currently supported.
     * Data asset creator must have getIamPolicy and setIamPolicy permissions on
     * the resource. Data asset creator must also have resource specific get
     * permission, for instance, bigquery.tables.get for BigQuery tables.
     *
     * Generated from protobuf field <code>string resource = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $resource = '';
    /**
     * Optional. Access groups configurations for this data asset.
     * The key is `DataProduct.AccessGroup.id` and the value is
     * `AccessGroupConfig`.
     * Example:
     * ```
     *  {
     *    "analyst": {
     *      "iamRoles": ["roles/bigquery.dataViewer"]
     *    }
     *  }
     * ```
     * Currently, at most one IAM role is allowed per access group. For providing
     * multiple predefined IAM roles, wrap them in a custom IAM role as per
     * https://cloud.google.com/iam/docs/creating-custom-roles.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.dataplex.v1.DataAsset.AccessGroupConfig> access_group_configs = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $access_group_configs;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. Resource name of the data asset.
     *           Format:
     *           projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}/dataAssets/{data_asset_id}
     *     @type string $uid
     *           Output only. System generated globally unique ID for the data asset.
     *           This ID will be different if the data asset is deleted and re-created
     *           with the same name.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The time at which the data asset was created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. The time at which the data asset was last updated.
     *     @type string $etag
     *           Optional. This checksum is computed by the server based on the value of
     *           other fields, and may be sent on update and delete requests to ensure the
     *           client has an up-to-date value before proceeding.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Optional. User-defined labels for the data asset.
     *           Example:
     *            ```
     *            {
     *              "environment": "production",
     *              "billing": "marketing-department"
     *            }
     *            ```
     *     @type string $resource
     *           Required. Immutable. Full resource name of the cloud resource represented
     *           by the data asset. This must follow
     *           https://cloud.google.com/iam/docs/full-resource-names. Example:
     *           `//bigquery.googleapis.com/projects/my_project_123/datasets/dataset_456/tables/table_789`
     *           Only BigQuery tables and datasets are currently supported.
     *           Data asset creator must have getIamPolicy and setIamPolicy permissions on
     *           the resource. Data asset creator must also have resource specific get
     *           permission, for instance, bigquery.tables.get for BigQuery tables.
     *     @type array|\Google\Protobuf\Internal\MapField $access_group_configs
     *           Optional. Access groups configurations for this data asset.
     *           The key is `DataProduct.AccessGroup.id` and the value is
     *           `AccessGroupConfig`.
     *           Example:
     *           ```
     *            {
     *              "analyst": {
     *                "iamRoles": ["roles/bigquery.dataViewer"]
     *              }
     *            }
     *           ```
     *           Currently, at most one IAM role is allowed per access group. For providing
     *           multiple predefined IAM roles, wrap them in a custom IAM role as per
     *           https://cloud.google.com/iam/docs/creating-custom-roles.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\DataProducts::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. Resource name of the data asset.
     * Format:
     * projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}/dataAssets/{data_asset_id}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. Resource name of the data asset.
     * Format:
     * projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}/dataAssets/{data_asset_id}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. System generated globally unique ID for the data asset.
     * This ID will be different if the data asset is deleted and re-created
     * with the same name.
     *
     * Generated from protobuf field <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {</code>
     * @return string
     */
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * Output only. System generated globally unique ID for the data asset.
     * This ID will be different if the data asset is deleted and re-created
     * with the same name.
     *
     * Generated from protobuf field <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {</code>
     * @param string $var
     * @return $this
     */
    public function setUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->uid = $var;

        return $this;
    }

    /**
     * Output only. The time at which the data asset was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.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 at which the data asset was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.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 at which the data asset was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 4 [(.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 at which the data asset was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 4 [(.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. This checksum is computed by the server based on the value of
     * other fields, and may be sent on update and delete requests to ensure the
     * client has an up-to-date value before proceeding.
     *
     * Generated from protobuf field <code>string etag = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * Optional. This checksum is computed by the server based on the value of
     * other fields, and may be sent on update and delete requests to ensure the
     * client has an up-to-date value before proceeding.
     *
     * Generated from protobuf field <code>string etag = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

    /**
     * Optional. User-defined labels for the data asset.
     * Example:
     *  ```
     *  {
     *    "environment": "production",
     *    "billing": "marketing-department"
     *  }
     *  ```
     *
     * 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 data asset.
     * Example:
     *  ```
     *  {
     *    "environment": "production",
     *    "billing": "marketing-department"
     *  }
     *  ```
     *
     * 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;
    }

    /**
     * Required. Immutable. Full resource name of the cloud resource represented
     * by the data asset. This must follow
     * https://cloud.google.com/iam/docs/full-resource-names. Example:
     * `//bigquery.googleapis.com/projects/my_project_123/datasets/dataset_456/tables/table_789`
     * Only BigQuery tables and datasets are currently supported.
     * Data asset creator must have getIamPolicy and setIamPolicy permissions on
     * the resource. Data asset creator must also have resource specific get
     * permission, for instance, bigquery.tables.get for BigQuery tables.
     *
     * Generated from protobuf field <code>string resource = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getResource()
    {
        return $this->resource;
    }

    /**
     * Required. Immutable. Full resource name of the cloud resource represented
     * by the data asset. This must follow
     * https://cloud.google.com/iam/docs/full-resource-names. Example:
     * `//bigquery.googleapis.com/projects/my_project_123/datasets/dataset_456/tables/table_789`
     * Only BigQuery tables and datasets are currently supported.
     * Data asset creator must have getIamPolicy and setIamPolicy permissions on
     * the resource. Data asset creator must also have resource specific get
     * permission, for instance, bigquery.tables.get for BigQuery tables.
     *
     * Generated from protobuf field <code>string resource = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setResource($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource = $var;

        return $this;
    }

    /**
     * Optional. Access groups configurations for this data asset.
     * The key is `DataProduct.AccessGroup.id` and the value is
     * `AccessGroupConfig`.
     * Example:
     * ```
     *  {
     *    "analyst": {
     *      "iamRoles": ["roles/bigquery.dataViewer"]
     *    }
     *  }
     * ```
     * Currently, at most one IAM role is allowed per access group. For providing
     * multiple predefined IAM roles, wrap them in a custom IAM role as per
     * https://cloud.google.com/iam/docs/creating-custom-roles.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.dataplex.v1.DataAsset.AccessGroupConfig> access_group_configs = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getAccessGroupConfigs()
    {
        return $this->access_group_configs;
    }

    /**
     * Optional. Access groups configurations for this data asset.
     * The key is `DataProduct.AccessGroup.id` and the value is
     * `AccessGroupConfig`.
     * Example:
     * ```
     *  {
     *    "analyst": {
     *      "iamRoles": ["roles/bigquery.dataViewer"]
     *    }
     *  }
     * ```
     * Currently, at most one IAM role is allowed per access group. For providing
     * multiple predefined IAM roles, wrap them in a custom IAM role as per
     * https://cloud.google.com/iam/docs/creating-custom-roles.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.dataplex.v1.DataAsset.AccessGroupConfig> access_group_configs = 9 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setAccessGroupConfigs($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataplex\V1\DataAsset\AccessGroupConfig::class);
        $this->access_group_configs = $arr;

        return $this;
    }

}

