Struct google_api_proto::google::storagetransfer::v1::NotificationConfig
source · pub struct NotificationConfig {
pub pubsub_topic: String,
pub event_types: Vec<i32>,
pub payload_format: i32,
}
Expand description
Specification to configure notifications published to Pub/Sub.
Notifications are published to the customer-provided topic using the
following PubsubMessage.attributes
:
"eventType"
: one of the [EventType][google.storagetransfer.v1.NotificationConfig.EventType] values"payloadFormat"
: one of the [PayloadFormat][google.storagetransfer.v1.NotificationConfig.PayloadFormat] values"projectId"
: the [project_id][google.storagetransfer.v1.TransferOperation.project_id] of theTransferOperation
"transferJobName"
: the [transfer_job_name][google.storagetransfer.v1.TransferOperation.transfer_job_name] of theTransferOperation
"transferOperationName"
: the [name][google.storagetransfer.v1.TransferOperation.name] of theTransferOperation
The PubsubMessage.data
contains a
[TransferOperation][google.storagetransfer.v1.TransferOperation] resource
formatted according to the specified PayloadFormat
.
Fields§
§pubsub_topic: String
Required. The Topic.name
of the Pub/Sub topic to which to publish
notifications. Must be of the format: projects/{project}/topics/{topic}
.
Not matching this format results in an
[INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
event_types: Vec<i32>
Event types for which a notification is desired. If empty, send notifications for all event types.
payload_format: i32
Required. The desired format of the notification message payloads.
Implementations§
source§impl NotificationConfig
impl NotificationConfig
sourcepub fn event_types(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<EventType>>
pub fn event_types( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<EventType>>
Returns an iterator which yields the valid enum values contained in event_types
.
sourcepub fn push_event_types(&mut self, value: EventType)
pub fn push_event_types(&mut self, value: EventType)
Appends the provided enum value to event_types
.
sourcepub fn payload_format(&self) -> PayloadFormat
pub fn payload_format(&self) -> PayloadFormat
Returns the enum value of payload_format
, or the default if the field is set to an invalid enum value.
sourcepub fn set_payload_format(&mut self, value: PayloadFormat)
pub fn set_payload_format(&mut self, value: PayloadFormat)
Sets payload_format
to the provided enum value.
Trait Implementations§
source§impl Clone for NotificationConfig
impl Clone for NotificationConfig
source§fn clone(&self) -> NotificationConfig
fn clone(&self) -> NotificationConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NotificationConfig
impl Debug for NotificationConfig
source§impl Default for NotificationConfig
impl Default for NotificationConfig
source§impl Message for NotificationConfig
impl Message for NotificationConfig
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 NotificationConfig
impl PartialEq for NotificationConfig
source§fn eq(&self, other: &NotificationConfig) -> bool
fn eq(&self, other: &NotificationConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for NotificationConfig
Auto Trait Implementations§
impl Freeze for NotificationConfig
impl RefUnwindSafe for NotificationConfig
impl Send for NotificationConfig
impl Sync for NotificationConfig
impl Unpin for NotificationConfig
impl UnwindSafe for NotificationConfig
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