#[non_exhaustive]pub struct Posture {
pub name: String,
pub state: State,
pub revision_id: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub description: String,
pub policy_sets: Vec<PolicySet>,
pub etag: String,
pub annotations: HashMap<String, String>,
pub reconciling: bool,
/* private fields */
}Expand description
Postures Definition of a Posture.
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. Identifier. The name of this Posture resource, in the format of organizations/{org_id}/locations/{location_id}/postures/{posture}.
state: StateRequired. State of Posture resource.
revision_id: StringOutput only. Immutable. The revision ID of the posture. The format is an 8-character hexadecimal string. https://google.aip.dev/162
create_time: Option<Timestamp>Output only. The timestamp that the posture was created.
update_time: Option<Timestamp>Output only. The timestamp that the posture was updated.
description: StringOptional. User provided description of the posture.
policy_sets: Vec<PolicySet>Required. List of Policy sets.
etag: StringOptional. An opaque tag indicating the current version of the Posture, used
for concurrency control. When the Posture is returned from either a
GetPosture or a ListPostures request, this etag indicates the version
of the current Posture to use when executing a read-modify-write loop.
When the Posture is used in a UpdatePosture method, use the etag
value that was returned from a GetPosture request as part of a
read-modify-write loop for concurrency control. Not setting the etag in a
UpdatePosture request will result in an unconditional write of the
Posture.
annotations: HashMap<String, String>Optional. User annotations. These attributes can only be set and used by the user, and not by Google Security Postures. .
reconciling: boolOutput only. Whether or not this Posture is in the process of being updated.
Implementations§
Source§impl Posture
impl Posture
pub fn new() -> Self
Sourcepub fn set_revision_id<T: Into<String>>(self, v: T) -> Self
pub fn set_revision_id<T: Into<String>>(self, v: T) -> 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 = Posture::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 = Posture::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Posture::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 = Posture::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 = Posture::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Posture::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_policy_sets<T, V>(self, v: T) -> Self
pub fn set_policy_sets<T, V>(self, v: T) -> Self
Sets the value of policy_sets.
§Example
use google_cloud_securityposture_v1::model::PolicySet;
let x = Posture::new()
.set_policy_sets([
PolicySet::default()/* use setters */,
PolicySet::default()/* use (different) setters */,
]);Sourcepub fn set_annotations<T, K, V>(self, v: T) -> Self
pub fn set_annotations<T, K, V>(self, v: T) -> Self
Sets the value of annotations.
§Example
let x = Posture::new().set_annotations([
("key0", "abc"),
("key1", "xyz"),
]);