#[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
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"),
]);Sourcepub fn set_reconciling<T: Into<bool>>(self, v: T) -> Self
pub fn set_reconciling<T: Into<bool>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Posture
Auto Trait Implementations§
impl Freeze for Posture
impl RefUnwindSafe for Posture
impl Send for Posture
impl Sync for Posture
impl Unpin for Posture
impl UnsafeUnpin for Posture
impl UnwindSafe for Posture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request