#[non_exhaustive]pub struct DataAccessScope {
pub name: String,
pub allowed_data_access_labels: Vec<DataAccessLabelReference>,
pub denied_data_access_labels: Vec<DataAccessLabelReference>,
pub display_name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub author: String,
pub last_editor: String,
pub description: String,
pub allow_all: bool,
/* private fields */
}Expand description
A DataAccessScope is a boolean expression of data access labels used to restrict access to data for users.
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: StringRequired. The unique full name of the data access scope. The name should comply with https://google.aip.dev/122 standards.
allowed_data_access_labels: Vec<DataAccessLabelReference>Optional. The allowed labels for the scope. Either allow_all or allowed_data_access_labels needs to be provided. When provided, there has to be at least one label allowed for the scope to be valid. The logical operator for evaluation of the allowed labels is OR. E.g.: A customer with scope with allowed labels A and B will be able to see data with labeled with A or B or (A and B).
denied_data_access_labels: Vec<DataAccessLabelReference>Optional. The denied labels for the scope. The logical operator for evaluation of the denied labels is AND. E.g.: A customer with scope with denied labels A and B won’t be able to see data labeled with A and data labeled with B and data with labels A and B.
display_name: StringOutput only. The name to be used for display to customers of the data access scope.
create_time: Option<Timestamp>Output only. The time at which the data access scope was created.
update_time: Option<Timestamp>Output only. The time at which the data access scope was last updated.
Output only. The user who created the data access scope.
last_editor: StringOutput only. The user who last updated the data access scope.
description: StringOptional. A description of the data access scope for a human reader.
allow_all: boolOptional. Whether or not the scope allows all labels, allow_all and allowed_data_access_labels are mutually exclusive and one of them must be present. denied_data_access_labels can still be used along with allow_all. When combined with denied_data_access_labels, access will be granted to all data that doesn’t have labels mentioned in denied_data_access_labels. E.g.: A customer with scope with denied labels A and B and allow_all will be able to see all data except data labeled with A and data labeled with B and data with labels A and B.
Implementations§
Source§impl DataAccessScope
impl DataAccessScope
Sourcepub fn set_allowed_data_access_labels<T, V>(self, v: T) -> Self
pub fn set_allowed_data_access_labels<T, V>(self, v: T) -> Self
Sets the value of allowed_data_access_labels.
§Example
use google_cloud_chronicle_v1::model::DataAccessLabelReference;
let x = DataAccessScope::new()
.set_allowed_data_access_labels([
DataAccessLabelReference::default()/* use setters */,
DataAccessLabelReference::default()/* use (different) setters */,
]);Sourcepub fn set_denied_data_access_labels<T, V>(self, v: T) -> Self
pub fn set_denied_data_access_labels<T, V>(self, v: T) -> Self
Sets the value of denied_data_access_labels.
§Example
use google_cloud_chronicle_v1::model::DataAccessLabelReference;
let x = DataAccessScope::new()
.set_denied_data_access_labels([
DataAccessLabelReference::default()/* use setters */,
DataAccessLabelReference::default()/* use (different) setters */,
]);Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
§Example
let x = DataAccessScope::new().set_display_name("example");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 = DataAccessScope::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 = DataAccessScope::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = DataAccessScope::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 = DataAccessScope::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 = DataAccessScope::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = DataAccessScope::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_last_editor<T: Into<String>>(self, v: T) -> Self
pub fn set_last_editor<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for DataAccessScope
impl Clone for DataAccessScope
Source§fn clone(&self) -> DataAccessScope
fn clone(&self) -> DataAccessScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataAccessScope
impl Debug for DataAccessScope
Source§impl Default for DataAccessScope
impl Default for DataAccessScope
Source§fn default() -> DataAccessScope
fn default() -> DataAccessScope
Source§impl Message for DataAccessScope
impl Message for DataAccessScope
Source§impl PartialEq for DataAccessScope
impl PartialEq for DataAccessScope
Source§fn eq(&self, other: &DataAccessScope) -> bool
fn eq(&self, other: &DataAccessScope) -> bool
self and other values to be equal, and is used by ==.