pub struct Policy {
pub version: i32,
pub constraint: String,
pub etag: Bytes,
pub update_time: Option<Timestamp>,
pub policy_type: Option<PolicyType>,
}
Expand description
Defines a Cloud Organization Policy
which is used to specify Constraints
for configurations of Cloud Platform resources.
Fields§
§version: i32
Version of the Policy
. Default version is 0;
constraint: String
The name of the Constraint
the Policy
is configuring, for example,
constraints/serviceuser.services
.
Immutable after creation.
etag: Bytes
An opaque tag indicating the current version of the Policy
, used for
concurrency control.
When the Policy
is returned from either a GetPolicy
or a
ListOrgPolicy
request, this etag
indicates the version of the current
Policy
to use when executing a read-modify-write loop.
When the Policy
is returned from a GetEffectivePolicy
request, the
etag
will be unset.
When the Policy
is used in a SetOrgPolicy
method, use the etag
value
that was returned from a GetOrgPolicy
request as part of a
read-modify-write loop for concurrency control. Not setting the etag
in a
SetOrgPolicy
request will result in an unconditional write of the
Policy
.
update_time: Option<Timestamp>
The time stamp the Policy
was previously updated. This is set by the
server, not specified by the caller, and represents the last time a call to
SetOrgPolicy
was made for that Policy
. Any value set by the client will
be ignored.
policy_type: Option<PolicyType>
The field to populate is based on the constraint_type
value in the
Constraint
.
list_constraint
=> list_policy
boolean_constraint
=> boolean_policy
A restore_default
message may be used with any Constraint
type.
Providing a *_policy that is incompatible with the constraint_type
will
result in an invalid_argument
error.
Attempting to set a Policy
with a policy_type
not set will result in an
invalid_argument
error.
Trait Implementations§
source§impl Message for Policy
impl Message for Policy
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Policy
impl PartialEq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl !Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnwindSafe for Policy
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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