Struct google_api_proto::google::cloud::functions::v1::EventTrigger
source · pub struct EventTrigger {
pub event_type: String,
pub resource: String,
pub service: String,
pub failure_policy: Option<FailurePolicy>,
}
Expand description
Describes EventTrigger, used to request events be sent from another service.
Fields§
§event_type: String
Required. The type of event to observe. For example:
providers/cloud.storage/eventTypes/object.change
and
providers/cloud.pubsub/eventTypes/topic.publish
.
Event types match pattern providers/*/eventTypes/*.*
.
The pattern contains:
- namespace: For example,
cloud.storage
andgoogle.firebase.analytics
. - resource type: The type of resource on which event occurs. For
example, the Google Cloud Storage API includes the type
object
. - action: The action that generates the event. For example, action for a Google Cloud Storage Object is ‘change’. These parts are lower case.
resource: String
Required. The resource(s) from which to observe events, for example,
projects/_/buckets/myBucket
.
Not all syntactically correct values are accepted by all services. For example:
- The authorization model must support it. Google Cloud Functions
only allows EventTriggers to be deployed that observe resources in the
same project as the
CloudFunction
. - The resource type must match the pattern expected for an
event_type
. For example, anEventTrigger
that has anevent_type
of “google.pubsub.topic.publish” should have a resource that matches Google Cloud Pub/Sub topics.
Additionally, some services may support short names when creating an
EventTrigger
. These will always be returned in the normalized “long”
format.
See each service’s documentation for supported formats.
service: String
The hostname of the service that should be observed.
If no string is provided, the default service implementing the API will
be used. For example, storage.googleapis.com
is the default for all
event types in the google.storage
namespace.
failure_policy: Option<FailurePolicy>
Specifies policy for failed executions.
Trait Implementations§
source§impl Clone for EventTrigger
impl Clone for EventTrigger
source§fn clone(&self) -> EventTrigger
fn clone(&self) -> EventTrigger
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EventTrigger
impl Debug for EventTrigger
source§impl Default for EventTrigger
impl Default for EventTrigger
source§impl Message for EventTrigger
impl Message for EventTrigger
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 EventTrigger
impl PartialEq for EventTrigger
source§fn eq(&self, other: &EventTrigger) -> bool
fn eq(&self, other: &EventTrigger) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for EventTrigger
Auto Trait Implementations§
impl Freeze for EventTrigger
impl RefUnwindSafe for EventTrigger
impl Send for EventTrigger
impl Sync for EventTrigger
impl Unpin for EventTrigger
impl UnwindSafe for EventTrigger
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