google_cloudevents/google/events/cloud/pubsub/v1/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// This file is @generated by prost-build.
/// The event data when a message is published to a topic.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessagePublishedData {
    /// The message that was published.
    #[prost(message, optional, tag = "1")]
    pub message: ::core::option::Option<PubsubMessage>,
    /// The resource name of the subscription for which this event was
    /// generated. The format of the value is
    /// `projects/{project-id}/subscriptions/{subscription-id}`.
    #[prost(string, tag = "2")]
    pub subscription: ::prost::alloc::string::String,
    /// The approximate number of times that Pub/Sub has attempted to deliver
    /// the associated message to a subscriber.
    ///
    /// More precisely, this is 1 + (number of NACKs) +
    /// (number of ack_deadline exceeds) for this message.
    ///
    /// Upon the first delivery of a given message, `delivery_attempt` will have a
    /// value of 1. The value is calculated at best effort and is approximate.
    ///
    /// If a DeadLetterPolicy is not set on the subscription, this will be 0.
    #[prost(int32, tag = "3")]
    pub delivery_attempt: i32,
}
/// A message published to a topic.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PubsubMessage {
    /// The binary data in the message.
    #[prost(bytes = "vec", tag = "1")]
    pub data: ::prost::alloc::vec::Vec<u8>,
    /// Attributes for this message.
    #[prost(map = "string, string", tag = "2")]
    pub attributes:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// ID of this message, assigned by the server when the message is published.
    /// Guaranteed to be unique within the topic.
    #[prost(string, tag = "3")]
    pub message_id: ::prost::alloc::string::String,
    /// The time at which the message was published, populated by the server when
    /// it receives the `Publish` call.
    #[prost(message, optional, tag = "4")]
    pub publish_time: ::core::option::Option<::prost_types::Timestamp>,
    /// If non-empty, identifies related messages for which publish order should be
    /// respected.
    #[prost(string, tag = "5")]
    pub ordering_key: ::prost::alloc::string::String,
}
/// The CloudEvent raised when a PubSub message is published for a topic.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessagePublishedEvent {
    /// The data associated with the event.
    #[prost(message, optional, tag = "1")]
    pub data: ::core::option::Option<MessagePublishedData>,
}