Struct google_api_proto::google::api::FieldPolicy
source · pub struct FieldPolicy {
pub selector: String,
pub resource_permission: String,
pub resource_type: String,
}
Expand description
Google API Policy Annotation
This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.
Fields§
§selector: String
Selects one or more request or response message fields to apply this
FieldPolicy
.
When a FieldPolicy
is used in proto annotation, the selector must
be left as empty. The service config generator will automatically fill
the correct value.
When a FieldPolicy
is used in service config, the selector must be a
comma-separated string with valid request or response field paths,
such as “foo.bar” or “foo.bar,foo.baz”.
resource_permission: String
Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, “resourcemanager.projects.get”.
resource_type: String
Specifies the resource type for the resource referred to by the field.
Trait Implementations§
source§impl Clone for FieldPolicy
impl Clone for FieldPolicy
source§fn clone(&self) -> FieldPolicy
fn clone(&self) -> FieldPolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FieldPolicy
impl Debug for FieldPolicy
source§impl Default for FieldPolicy
impl Default for FieldPolicy
source§impl Message for FieldPolicy
impl Message for FieldPolicy
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 FieldPolicy
impl PartialEq for FieldPolicy
source§fn eq(&self, other: &FieldPolicy) -> bool
fn eq(&self, other: &FieldPolicy) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for FieldPolicy
Auto Trait Implementations§
impl Freeze for FieldPolicy
impl RefUnwindSafe for FieldPolicy
impl Send for FieldPolicy
impl Sync for FieldPolicy
impl Unpin for FieldPolicy
impl UnwindSafe for FieldPolicy
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