#[non_exhaustive]pub struct Trigger {Show 14 fields
pub name: String,
pub uid: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub event_filters: Vec<EventFilter>,
pub service_account: String,
pub destination: Option<Destination>,
pub transport: Option<Transport>,
pub labels: HashMap<String, String>,
pub channel: String,
pub conditions: HashMap<String, StateCondition>,
pub event_data_content_type: String,
pub satisfies_pzs: bool,
pub etag: String,
/* private fields */
}Expand description
A representation of the trigger resource.
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. The resource name of the trigger. Must be unique within the
location of the project and must be in
projects/{project}/locations/{location}/triggers/{trigger} format.
uid: StringOutput only. Server-assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.
create_time: Option<Timestamp>Output only. The creation time.
update_time: Option<Timestamp>Output only. The last-modified time.
event_filters: Vec<EventFilter>Required. Unordered list. The list of filters that applies to event attributes. Only events that match all the provided filters are sent to the destination.
service_account: StringOptional. The IAM service account email associated with the trigger. The service account represents the identity of the trigger.
The iam.serviceAccounts.actAs permission must be granted on the service
account to allow a principal to impersonate the service account. For more
information, see the
Roles and permissions page specific
to the trigger destination.
destination: Option<Destination>Required. Destination specifies where the events should be sent to.
transport: Option<Transport>Optional. To deliver messages, Eventarc might use other Google Cloud products as a transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.
labels: HashMap<String, String>Optional. User labels attached to the triggers that can be used to group resources.
channel: StringOptional. The name of the channel associated with the trigger in
projects/{project}/locations/{location}/channels/{channel} format.
You must provide a channel to receive events from Eventarc SaaS partners.
conditions: HashMap<String, StateCondition>Output only. The reason(s) why a trigger is in FAILED state.
event_data_content_type: StringOptional. EventDataContentType specifies the type of payload in MIME
format that is expected from the CloudEvent data field. This is set to
application/json if the value is not defined.
satisfies_pzs: boolOutput only. Whether or not this Trigger satisfies the requirements of physical zone separation
etag: StringOutput only. This checksum is computed by the server based on the value of other fields, and might be sent only on create requests to ensure that the client has an up-to-date value before proceeding.
Implementations§
Source§impl Trigger
impl Trigger
pub fn new() -> 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.
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.
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.
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.
Sourcepub fn set_event_filters<T, V>(self, v: T) -> Self
pub fn set_event_filters<T, V>(self, v: T) -> Self
Sets the value of event_filters.
Sourcepub fn set_service_account<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account.
Sourcepub fn set_destination<T>(self, v: T) -> Selfwhere
T: Into<Destination>,
pub fn set_destination<T>(self, v: T) -> Selfwhere
T: Into<Destination>,
Sets the value of destination.
Sourcepub fn set_or_clear_destination<T>(self, v: Option<T>) -> Selfwhere
T: Into<Destination>,
pub fn set_or_clear_destination<T>(self, v: Option<T>) -> Selfwhere
T: Into<Destination>,
Sets or clears the value of destination.
Sourcepub fn set_transport<T>(self, v: T) -> Self
pub fn set_transport<T>(self, v: T) -> Self
Sets the value of transport.
Sourcepub fn set_or_clear_transport<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_transport<T>(self, v: Option<T>) -> Self
Sets or clears the value of transport.
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_channel<T: Into<String>>(self, v: T) -> Self
pub fn set_channel<T: Into<String>>(self, v: T) -> Self
Sets the value of channel.
Sourcepub fn set_conditions<T, K, V>(self, v: T) -> Self
pub fn set_conditions<T, K, V>(self, v: T) -> Self
Sets the value of conditions.
Sourcepub fn set_event_data_content_type<T: Into<String>>(self, v: T) -> Self
pub fn set_event_data_content_type<T: Into<String>>(self, v: T) -> Self
Sets the value of event_data_content_type.
Sourcepub fn set_satisfies_pzs<T: Into<bool>>(self, v: T) -> Self
pub fn set_satisfies_pzs<T: Into<bool>>(self, v: T) -> Self
Sets the value of satisfies_pzs.