#[non_exhaustive]pub struct DataPolicy {
pub name: String,
pub data_policy_type: DataPolicyType,
pub data_policy_id: String,
pub matching_label: Option<MatchingLabel>,
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: StringOutput only. Resource name of this data policy, in the format of
projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}.
data_policy_type: DataPolicyTypeType of data policy.
data_policy_id: StringUser-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.
matching_label: Option<MatchingLabel>Label that is bound to this data policy.
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_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_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_matching_label<T: Into<Option<MatchingLabel>>>(self, v: T) -> Self
pub fn set_matching_label<T: Into<Option<MatchingLabel>>>(self, v: T) -> Self
Sets the value of matching_label.
Note that all the setters affecting matching_label are mutually
exclusive.
Sourcepub fn policy_tag(&self) -> Option<&String>
pub fn policy_tag(&self) -> Option<&String>
The value of matching_label
if it holds a PolicyTag, None if the field is not set or
holds a different branch.
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 matching_label
to hold a PolicyTag.
Note that all the setters affecting matching_label are
mutually exclusive.
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