#[non_exhaustive]pub struct DataPolicy {
pub name: String,
pub data_policy_id: String,
pub etag: Option<String>,
pub data_policy_type: DataPolicyType,
pub policy_tag: String,
pub grantees: Vec<String>,
pub version: Version,
pub policy: Option<Policy>,
/* private fields */
}Expand description
Represents the label-policy binding.
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 this data policy, in the format of
projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}.
data_policy_id: StringOutput only. User-assigned (human readable) ID of the data policy that needs to be unique within a project. Used as {data_policy_id} in part of the resource name.
etag: Option<String>The etag for this Data Policy. This field is used for UpdateDataPolicy calls. If Data Policy exists, this field is required and must match the server’s etag. It will also be populated in the response of GetDataPolicy, CreateDataPolicy, and UpdateDataPolicy calls.
data_policy_type: DataPolicyTypeRequired. Type of data policy.
policy_tag: StringOutput only. Policy tag resource name, in the format of
projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}.
policy_tag is supported only for V1 data policies.
grantees: Vec<String>Optional. The list of IAM principals that have Fine Grained Access to the underlying data goverened by this data policy.
Uses the IAM V2 principal syntax Only supports principal types users, groups, serviceaccounts, cloudidentity. This field is supported in V2 Data Policy only. In case of V1 data policies (i.e. verion = 1 and policy_tag is set), this field is not populated.
version: VersionOutput only. The version of the Data Policy resource.
policy: Option<Policy>The policy that is bound to this data policy.
Implementations§
Source§impl DataPolicy
impl DataPolicy
pub fn new() -> Self
Sourcepub fn set_data_policy_id<T: Into<String>>(self, v: T) -> Self
pub fn set_data_policy_id<T: Into<String>>(self, v: T) -> Self
Sets the value of data_policy_id.
Sourcepub fn set_or_clear_etag<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_etag<T>(self, v: Option<T>) -> Self
Sets or clears the value of etag.
Sourcepub fn set_data_policy_type<T: Into<DataPolicyType>>(self, v: T) -> Self
pub fn set_data_policy_type<T: Into<DataPolicyType>>(self, v: T) -> Self
Sets the value of data_policy_type.
Sourcepub fn set_policy_tag<T: Into<String>>(self, v: T) -> Self
pub fn set_policy_tag<T: Into<String>>(self, v: T) -> Self
Sets the value of policy_tag.
Sourcepub fn set_grantees<T, V>(self, v: T) -> Self
pub fn set_grantees<T, V>(self, v: T) -> Self
Sets the value of grantees.
Sourcepub fn set_version<T: Into<Version>>(self, v: T) -> Self
pub fn set_version<T: Into<Version>>(self, v: T) -> Self
Sets the value of version.
Sourcepub fn set_policy<T: Into<Option<Policy>>>(self, v: T) -> Self
pub fn set_policy<T: Into<Option<Policy>>>(self, v: T) -> Self
Sets the value of policy.
Note that all the setters affecting policy are mutually
exclusive.
Sourcepub fn data_masking_policy(&self) -> Option<&Box<DataMaskingPolicy>>
pub fn data_masking_policy(&self) -> Option<&Box<DataMaskingPolicy>>
The value of policy
if it holds a DataMaskingPolicy, None if the field is not set or
holds a different branch.
Sourcepub fn set_data_masking_policy<T: Into<Box<DataMaskingPolicy>>>(
self,
v: T,
) -> Self
pub fn set_data_masking_policy<T: Into<Box<DataMaskingPolicy>>>( self, v: T, ) -> Self
Sets the value of policy
to hold a DataMaskingPolicy.
Note that all the setters affecting policy are
mutually exclusive.
Trait Implementations§
Source§impl Clone for DataPolicy
impl Clone for DataPolicy
Source§fn clone(&self) -> DataPolicy
fn clone(&self) -> DataPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more