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
/// Represents an immutable event within a stream
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Event {
    /// The unique ID of the event
    #[prost(string, tag="1")]
    pub event_id: std::string::String,
    /// ID of the stream in which this event occurred
    #[prost(string, tag="2")]
    pub stream: std::string::String,
    /// Map of key-value pairs representing the event data
    #[prost(map="string, string", tag="3")]
    pub values: ::std::collections::HashMap<std::string::String, std::string::String>,
}
/// The response from the provider after writing an event to a stream
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteResponse {
    #[prost(string, tag="1")]
    pub event_id: std::string::String,
}
/// A query against a given stream
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamQuery {
    /// The stream to query
    #[prost(string, tag="1")]
    pub stream_id: std::string::String,
    /// An optional time slice range to limit results
    #[prost(message, optional, tag="2")]
    pub range: ::std::option::Option<TimeRange>,
    /// Optional (0 == unlimited) limit on result size
    #[prost(uint64, tag="3")]
    pub count: u64,
}
/// Results of a stream query
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamResults {
    #[prost(message, repeated, tag="2")]
    pub events: ::std::vec::Vec<Event>,
}
/// Represents a timeslice range for a stream
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeRange {
    /// Millisecond-resolution Unix timestamp indicating start time
    #[prost(uint64, tag="1")]
    pub min_time: u64,
    /// Millisecond-resolution Unix timestamp indicating end time
    #[prost(uint64, tag="2")]
    pub max_time: u64,
}