gcp_bigquery_client/model/
row_access_policy.rs

1//! Represents access on a subset of rows on the specified table, defined by its filter predicate. Access to the subset of rows is controlled by its IAM policy.
2use crate::model::row_access_policy_reference::RowAccessPolicyReference;
3use time::OffsetDateTime;
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
6#[serde(rename_all = "camelCase")]
7pub struct RowAccessPolicy {
8    /// Output only. The time when this row access policy was created, in milliseconds since the epoch.
9    #[serde(with = "time::serde::rfc3339")]
10    pub creation_time: OffsetDateTime,
11    /// Output only. A hash of this resource.
12    pub etag: Option<String>,
13    /// Required. Reference describing the ID of this row access policy.
14    pub row_access_policy_reference: RowAccessPolicyReference,
15    /// Output only. The time when this row access policy was last modified, in milliseconds since the epoch.
16    #[serde(with = "time::serde::rfc3339")]
17    pub last_modified_time: OffsetDateTime,
18    /// Required. A SQL boolean expression that represents the rows defined by this row access policy, similar to the boolean expression in a WHERE clause of a SELECT query on a table. References to other tables, routines, and temporary functions are not supported. Examples: region="EU" date_field = CAST('2019-9-27' as DATE) nullable_field is not NULL numeric_field BETWEEN 1.0 AND 5.0
19    pub filter_predicate: String,
20}
21
22impl Default for RowAccessPolicy {
23    fn default() -> Self {
24        Self {
25            creation_time: OffsetDateTime::now_utc(),
26            etag: None,
27            row_access_policy_reference: RowAccessPolicyReference {
28                dataset_id: None,
29                policy_id: None,
30                project_id: None,
31                table_id: None,
32            },
33            last_modified_time: OffsetDateTime::now_utc(),
34            filter_predicate: "".to_string(),
35        }
36    }
37}