#[non_exhaustive]pub struct DataAsset {
pub name: String,
pub uid: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub etag: String,
pub labels: HashMap<String, String>,
pub resource: String,
pub access_group_configs: HashMap<String, AccessGroupConfig>,
/* private fields */
}Expand description
Represents a data asset resource that can be packaged and shared via a data product.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringIdentifier. Resource name of the data asset. Format: projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}/dataAssets/{data_asset_id}
uid: StringOutput 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.
create_time: Option<Timestamp>Output only. The time at which the data asset was created.
update_time: Option<Timestamp>Output only. The time at which the data asset was last updated.
etag: StringOptional. 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.
labels: HashMap<String, String>Optional. User-defined labels for the data asset.
Example:
{
"environment": "production",
"billing": "marketing-department"
}resource: StringRequired. 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.
access_group_configs: HashMap<String, AccessGroupConfig>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.
Implementations§
Source§impl DataAsset
impl DataAsset
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = DataAsset::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = DataAsset::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = DataAsset::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = DataAsset::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = DataAsset::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = DataAsset::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_resource<T: Into<String>>(self, v: T) -> Self
pub fn set_resource<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_access_group_configs<T, K, V>(self, v: T) -> Self
pub fn set_access_group_configs<T, K, V>(self, v: T) -> Self
Sets the value of access_group_configs.
§Example
use google_cloud_dataplex_v1::model::data_asset::AccessGroupConfig;
let x = DataAsset::new().set_access_group_configs([
("key0", AccessGroupConfig::default()/* use setters */),
("key1", AccessGroupConfig::default()/* use (different) setters */),
]);