xref: /aosp_15_r20/external/googleapis/google/cloud/pubsublite/v1/common.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2022 Google LLC
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage google.cloud.pubsublite.v1;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workerimport "google/api/field_behavior.proto";
20*d5c09012SAndroid Build Coastguard Workerimport "google/api/resource.proto";
21*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/duration.proto";
22*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto";
23*d5c09012SAndroid Build Coastguard Worker
24*d5c09012SAndroid Build Coastguard Workeroption cc_enable_arenas = true;
25*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.PubSubLite.V1";
26*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/pubsublite/apiv1/pubsublitepb;pubsublitepb";
27*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
28*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "CommonProto";
29*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.cloud.pubsublite.proto";
30*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\PubSubLite\\V1";
31*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::PubSubLite::V1";
32*d5c09012SAndroid Build Coastguard Worker
33*d5c09012SAndroid Build Coastguard Worker// The values associated with a key of an attribute.
34*d5c09012SAndroid Build Coastguard Workermessage AttributeValues {
35*d5c09012SAndroid Build Coastguard Worker  // The list of values associated with a key.
36*d5c09012SAndroid Build Coastguard Worker  repeated bytes values = 1;
37*d5c09012SAndroid Build Coastguard Worker}
38*d5c09012SAndroid Build Coastguard Worker
39*d5c09012SAndroid Build Coastguard Worker// A message that is published by publishers and delivered to subscribers.
40*d5c09012SAndroid Build Coastguard Workermessage PubSubMessage {
41*d5c09012SAndroid Build Coastguard Worker  // The key used for routing messages to partitions or for compaction (e.g.,
42*d5c09012SAndroid Build Coastguard Worker  // keep the last N messages per key). If the key is empty, the message is
43*d5c09012SAndroid Build Coastguard Worker  // routed to an arbitrary partition.
44*d5c09012SAndroid Build Coastguard Worker  bytes key = 1;
45*d5c09012SAndroid Build Coastguard Worker
46*d5c09012SAndroid Build Coastguard Worker  // The payload of the message.
47*d5c09012SAndroid Build Coastguard Worker  bytes data = 2;
48*d5c09012SAndroid Build Coastguard Worker
49*d5c09012SAndroid Build Coastguard Worker  // Optional attributes that can be used for message metadata/headers.
50*d5c09012SAndroid Build Coastguard Worker  map<string, AttributeValues> attributes = 3;
51*d5c09012SAndroid Build Coastguard Worker
52*d5c09012SAndroid Build Coastguard Worker  // An optional, user-specified event time.
53*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Timestamp event_time = 4;
54*d5c09012SAndroid Build Coastguard Worker}
55*d5c09012SAndroid Build Coastguard Worker
56*d5c09012SAndroid Build Coastguard Worker// A cursor that describes the position of a message within a topic partition.
57*d5c09012SAndroid Build Coastguard Workermessage Cursor {
58*d5c09012SAndroid Build Coastguard Worker  // The offset of a message within a topic partition. Must be greater than or
59*d5c09012SAndroid Build Coastguard Worker  // equal 0.
60*d5c09012SAndroid Build Coastguard Worker  int64 offset = 1;
61*d5c09012SAndroid Build Coastguard Worker}
62*d5c09012SAndroid Build Coastguard Worker
63*d5c09012SAndroid Build Coastguard Worker// A message that has been stored and sequenced by the Pub/Sub Lite system.
64*d5c09012SAndroid Build Coastguard Workermessage SequencedMessage {
65*d5c09012SAndroid Build Coastguard Worker  // The position of a message within the partition where it is stored.
66*d5c09012SAndroid Build Coastguard Worker  Cursor cursor = 1;
67*d5c09012SAndroid Build Coastguard Worker
68*d5c09012SAndroid Build Coastguard Worker  // The time when the message was received by the server when it was first
69*d5c09012SAndroid Build Coastguard Worker  // published.
70*d5c09012SAndroid Build Coastguard Worker  google.protobuf.Timestamp publish_time = 2;
71*d5c09012SAndroid Build Coastguard Worker
72*d5c09012SAndroid Build Coastguard Worker  // The user message.
73*d5c09012SAndroid Build Coastguard Worker  PubSubMessage message = 3;
74*d5c09012SAndroid Build Coastguard Worker
75*d5c09012SAndroid Build Coastguard Worker  // The size in bytes of this message for flow control and quota purposes.
76*d5c09012SAndroid Build Coastguard Worker  int64 size_bytes = 4;
77*d5c09012SAndroid Build Coastguard Worker}
78*d5c09012SAndroid Build Coastguard Worker
79*d5c09012SAndroid Build Coastguard Worker// Metadata about a reservation resource.
80*d5c09012SAndroid Build Coastguard Workermessage Reservation {
81*d5c09012SAndroid Build Coastguard Worker  option (google.api.resource) = {
82*d5c09012SAndroid Build Coastguard Worker    type: "pubsublite.googleapis.com/Reservation"
83*d5c09012SAndroid Build Coastguard Worker    pattern: "projects/{project}/locations/{location}/reservations/{reservation}"
84*d5c09012SAndroid Build Coastguard Worker  };
85*d5c09012SAndroid Build Coastguard Worker
86*d5c09012SAndroid Build Coastguard Worker  // The name of the reservation.
87*d5c09012SAndroid Build Coastguard Worker  // Structured like:
88*d5c09012SAndroid Build Coastguard Worker  // projects/{project_number}/locations/{location}/reservations/{reservation_id}
89*d5c09012SAndroid Build Coastguard Worker  string name = 1;
90*d5c09012SAndroid Build Coastguard Worker
91*d5c09012SAndroid Build Coastguard Worker  // The reserved throughput capacity. Every unit of throughput capacity is
92*d5c09012SAndroid Build Coastguard Worker  // equivalent to 1 MiB/s of published messages or 2 MiB/s of subscribed
93*d5c09012SAndroid Build Coastguard Worker  // messages.
94*d5c09012SAndroid Build Coastguard Worker  //
95*d5c09012SAndroid Build Coastguard Worker  // Any topics which are declared as using capacity from a Reservation will
96*d5c09012SAndroid Build Coastguard Worker  // consume resources from this reservation instead of being charged
97*d5c09012SAndroid Build Coastguard Worker  // individually.
98*d5c09012SAndroid Build Coastguard Worker  int64 throughput_capacity = 2;
99*d5c09012SAndroid Build Coastguard Worker}
100*d5c09012SAndroid Build Coastguard Worker
101*d5c09012SAndroid Build Coastguard Worker// Metadata about a topic resource.
102*d5c09012SAndroid Build Coastguard Workermessage Topic {
103*d5c09012SAndroid Build Coastguard Worker  option (google.api.resource) = {
104*d5c09012SAndroid Build Coastguard Worker    type: "pubsublite.googleapis.com/Topic"
105*d5c09012SAndroid Build Coastguard Worker    pattern: "projects/{project}/locations/{location}/topics/{topic}"
106*d5c09012SAndroid Build Coastguard Worker  };
107*d5c09012SAndroid Build Coastguard Worker
108*d5c09012SAndroid Build Coastguard Worker  // The settings for a topic's partitions.
109*d5c09012SAndroid Build Coastguard Worker  message PartitionConfig {
110*d5c09012SAndroid Build Coastguard Worker    // The throughput capacity configuration for each partition.
111*d5c09012SAndroid Build Coastguard Worker    message Capacity {
112*d5c09012SAndroid Build Coastguard Worker      // Publish throughput capacity per partition in MiB/s.
113*d5c09012SAndroid Build Coastguard Worker      // Must be >= 4 and <= 16.
114*d5c09012SAndroid Build Coastguard Worker      int32 publish_mib_per_sec = 1;
115*d5c09012SAndroid Build Coastguard Worker
116*d5c09012SAndroid Build Coastguard Worker      // Subscribe throughput capacity per partition in MiB/s.
117*d5c09012SAndroid Build Coastguard Worker      // Must be >= 4 and <= 32.
118*d5c09012SAndroid Build Coastguard Worker      int32 subscribe_mib_per_sec = 2;
119*d5c09012SAndroid Build Coastguard Worker    }
120*d5c09012SAndroid Build Coastguard Worker
121*d5c09012SAndroid Build Coastguard Worker    // The number of partitions in the topic. Must be at least 1.
122*d5c09012SAndroid Build Coastguard Worker    //
123*d5c09012SAndroid Build Coastguard Worker    // Once a topic has been created the number of partitions can be increased
124*d5c09012SAndroid Build Coastguard Worker    // but not decreased. Message ordering is not guaranteed across a topic
125*d5c09012SAndroid Build Coastguard Worker    // resize. For more information see
126*d5c09012SAndroid Build Coastguard Worker    // https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity
127*d5c09012SAndroid Build Coastguard Worker    int64 count = 1;
128*d5c09012SAndroid Build Coastguard Worker
129*d5c09012SAndroid Build Coastguard Worker    // The throughput dimension of this topic.
130*d5c09012SAndroid Build Coastguard Worker    oneof dimension {
131*d5c09012SAndroid Build Coastguard Worker      // DEPRECATED: Use capacity instead which can express a superset of
132*d5c09012SAndroid Build Coastguard Worker      // configurations.
133*d5c09012SAndroid Build Coastguard Worker      //
134*d5c09012SAndroid Build Coastguard Worker      // Every partition in the topic is allocated throughput equivalent to
135*d5c09012SAndroid Build Coastguard Worker      // `scale` times the standard partition throughput (4 MiB/s). This is also
136*d5c09012SAndroid Build Coastguard Worker      // reflected in the cost of this topic; a topic with `scale` of 2 and
137*d5c09012SAndroid Build Coastguard Worker      // count of 10 is charged for 20 partitions. This value must be in the
138*d5c09012SAndroid Build Coastguard Worker      // range [1,4].
139*d5c09012SAndroid Build Coastguard Worker      int32 scale = 2 [deprecated = true];
140*d5c09012SAndroid Build Coastguard Worker
141*d5c09012SAndroid Build Coastguard Worker      // The capacity configuration.
142*d5c09012SAndroid Build Coastguard Worker      Capacity capacity = 3;
143*d5c09012SAndroid Build Coastguard Worker    }
144*d5c09012SAndroid Build Coastguard Worker  }
145*d5c09012SAndroid Build Coastguard Worker
146*d5c09012SAndroid Build Coastguard Worker  // The settings for a topic's message retention.
147*d5c09012SAndroid Build Coastguard Worker  message RetentionConfig {
148*d5c09012SAndroid Build Coastguard Worker    // The provisioned storage, in bytes, per partition. If the number of bytes
149*d5c09012SAndroid Build Coastguard Worker    // stored in any of the topic's partitions grows beyond this value, older
150*d5c09012SAndroid Build Coastguard Worker    // messages will be dropped to make room for newer ones, regardless of the
151*d5c09012SAndroid Build Coastguard Worker    // value of `period`.
152*d5c09012SAndroid Build Coastguard Worker    int64 per_partition_bytes = 1;
153*d5c09012SAndroid Build Coastguard Worker
154*d5c09012SAndroid Build Coastguard Worker    // How long a published message is retained. If unset, messages will be
155*d5c09012SAndroid Build Coastguard Worker    // retained as long as the bytes retained for each partition is below
156*d5c09012SAndroid Build Coastguard Worker    // `per_partition_bytes`.
157*d5c09012SAndroid Build Coastguard Worker    google.protobuf.Duration period = 2;
158*d5c09012SAndroid Build Coastguard Worker  }
159*d5c09012SAndroid Build Coastguard Worker
160*d5c09012SAndroid Build Coastguard Worker  // The settings for this topic's Reservation usage.
161*d5c09012SAndroid Build Coastguard Worker  message ReservationConfig {
162*d5c09012SAndroid Build Coastguard Worker    // The Reservation to use for this topic's throughput capacity.
163*d5c09012SAndroid Build Coastguard Worker    // Structured like:
164*d5c09012SAndroid Build Coastguard Worker    // projects/{project_number}/locations/{location}/reservations/{reservation_id}
165*d5c09012SAndroid Build Coastguard Worker    string throughput_reservation = 1 [(google.api.resource_reference) = {
166*d5c09012SAndroid Build Coastguard Worker      type: "pubsublite.googleapis.com/Reservation"
167*d5c09012SAndroid Build Coastguard Worker    }];
168*d5c09012SAndroid Build Coastguard Worker  }
169*d5c09012SAndroid Build Coastguard Worker
170*d5c09012SAndroid Build Coastguard Worker  // The name of the topic.
171*d5c09012SAndroid Build Coastguard Worker  // Structured like:
172*d5c09012SAndroid Build Coastguard Worker  // projects/{project_number}/locations/{location}/topics/{topic_id}
173*d5c09012SAndroid Build Coastguard Worker  string name = 1;
174*d5c09012SAndroid Build Coastguard Worker
175*d5c09012SAndroid Build Coastguard Worker  // The settings for this topic's partitions.
176*d5c09012SAndroid Build Coastguard Worker  PartitionConfig partition_config = 2;
177*d5c09012SAndroid Build Coastguard Worker
178*d5c09012SAndroid Build Coastguard Worker  // The settings for this topic's message retention.
179*d5c09012SAndroid Build Coastguard Worker  RetentionConfig retention_config = 3;
180*d5c09012SAndroid Build Coastguard Worker
181*d5c09012SAndroid Build Coastguard Worker  // The settings for this topic's Reservation usage.
182*d5c09012SAndroid Build Coastguard Worker  ReservationConfig reservation_config = 4;
183*d5c09012SAndroid Build Coastguard Worker}
184*d5c09012SAndroid Build Coastguard Worker
185*d5c09012SAndroid Build Coastguard Worker// Metadata about a subscription resource.
186*d5c09012SAndroid Build Coastguard Workermessage Subscription {
187*d5c09012SAndroid Build Coastguard Worker  option (google.api.resource) = {
188*d5c09012SAndroid Build Coastguard Worker    type: "pubsublite.googleapis.com/Subscription"
189*d5c09012SAndroid Build Coastguard Worker    pattern: "projects/{project}/locations/{location}/subscriptions/{subscription}"
190*d5c09012SAndroid Build Coastguard Worker  };
191*d5c09012SAndroid Build Coastguard Worker
192*d5c09012SAndroid Build Coastguard Worker  // The settings for a subscription's message delivery.
193*d5c09012SAndroid Build Coastguard Worker  message DeliveryConfig {
194*d5c09012SAndroid Build Coastguard Worker    // When this subscription should send messages to subscribers relative to
195*d5c09012SAndroid Build Coastguard Worker    // messages persistence in storage. For details, see [Creating Lite
196*d5c09012SAndroid Build Coastguard Worker    // subscriptions](https://cloud.google.com/pubsub/lite/docs/subscriptions#creating_lite_subscriptions).
197*d5c09012SAndroid Build Coastguard Worker    enum DeliveryRequirement {
198*d5c09012SAndroid Build Coastguard Worker      // Default value. This value is unused.
199*d5c09012SAndroid Build Coastguard Worker      DELIVERY_REQUIREMENT_UNSPECIFIED = 0;
200*d5c09012SAndroid Build Coastguard Worker
201*d5c09012SAndroid Build Coastguard Worker      // The server does not wait for a published message to be successfully
202*d5c09012SAndroid Build Coastguard Worker      // written to storage before delivering it to subscribers.
203*d5c09012SAndroid Build Coastguard Worker      DELIVER_IMMEDIATELY = 1;
204*d5c09012SAndroid Build Coastguard Worker
205*d5c09012SAndroid Build Coastguard Worker      // The server will not deliver a published message to subscribers until
206*d5c09012SAndroid Build Coastguard Worker      // the message has been successfully written to storage. This will result
207*d5c09012SAndroid Build Coastguard Worker      // in higher end-to-end latency, but consistent delivery.
208*d5c09012SAndroid Build Coastguard Worker      DELIVER_AFTER_STORED = 2;
209*d5c09012SAndroid Build Coastguard Worker    }
210*d5c09012SAndroid Build Coastguard Worker
211*d5c09012SAndroid Build Coastguard Worker    // The DeliveryRequirement for this subscription.
212*d5c09012SAndroid Build Coastguard Worker    DeliveryRequirement delivery_requirement = 3;
213*d5c09012SAndroid Build Coastguard Worker  }
214*d5c09012SAndroid Build Coastguard Worker
215*d5c09012SAndroid Build Coastguard Worker  // The name of the subscription.
216*d5c09012SAndroid Build Coastguard Worker  // Structured like:
217*d5c09012SAndroid Build Coastguard Worker  // projects/{project_number}/locations/{location}/subscriptions/{subscription_id}
218*d5c09012SAndroid Build Coastguard Worker  string name = 1;
219*d5c09012SAndroid Build Coastguard Worker
220*d5c09012SAndroid Build Coastguard Worker  // The name of the topic this subscription is attached to.
221*d5c09012SAndroid Build Coastguard Worker  // Structured like:
222*d5c09012SAndroid Build Coastguard Worker  // projects/{project_number}/locations/{location}/topics/{topic_id}
223*d5c09012SAndroid Build Coastguard Worker  string topic = 2 [(google.api.resource_reference) = {
224*d5c09012SAndroid Build Coastguard Worker    type: "pubsublite.googleapis.com/Topic"
225*d5c09012SAndroid Build Coastguard Worker  }];
226*d5c09012SAndroid Build Coastguard Worker
227*d5c09012SAndroid Build Coastguard Worker  // The settings for this subscription's message delivery.
228*d5c09012SAndroid Build Coastguard Worker  DeliveryConfig delivery_config = 3;
229*d5c09012SAndroid Build Coastguard Worker
230*d5c09012SAndroid Build Coastguard Worker  // If present, messages are automatically written from the Pub/Sub Lite topic
231*d5c09012SAndroid Build Coastguard Worker  // associated with this subscription to a destination.
232*d5c09012SAndroid Build Coastguard Worker  ExportConfig export_config = 4;
233*d5c09012SAndroid Build Coastguard Worker}
234*d5c09012SAndroid Build Coastguard Worker
235*d5c09012SAndroid Build Coastguard Worker// Configuration for a Pub/Sub Lite subscription that writes messages to a
236*d5c09012SAndroid Build Coastguard Worker// destination. User subscriber clients must not connect to this subscription.
237*d5c09012SAndroid Build Coastguard Workermessage ExportConfig {
238*d5c09012SAndroid Build Coastguard Worker  // The desired export state.
239*d5c09012SAndroid Build Coastguard Worker  enum State {
240*d5c09012SAndroid Build Coastguard Worker    // Default value. This value is unused.
241*d5c09012SAndroid Build Coastguard Worker    STATE_UNSPECIFIED = 0;
242*d5c09012SAndroid Build Coastguard Worker
243*d5c09012SAndroid Build Coastguard Worker    // Messages are being exported.
244*d5c09012SAndroid Build Coastguard Worker    ACTIVE = 1;
245*d5c09012SAndroid Build Coastguard Worker
246*d5c09012SAndroid Build Coastguard Worker    // Exporting messages is suspended.
247*d5c09012SAndroid Build Coastguard Worker    PAUSED = 2;
248*d5c09012SAndroid Build Coastguard Worker
249*d5c09012SAndroid Build Coastguard Worker    // Messages cannot be exported due to permission denied errors. Output only.
250*d5c09012SAndroid Build Coastguard Worker    PERMISSION_DENIED = 3;
251*d5c09012SAndroid Build Coastguard Worker
252*d5c09012SAndroid Build Coastguard Worker    // Messages cannot be exported due to missing resources. Output only.
253*d5c09012SAndroid Build Coastguard Worker    NOT_FOUND = 4;
254*d5c09012SAndroid Build Coastguard Worker  }
255*d5c09012SAndroid Build Coastguard Worker
256*d5c09012SAndroid Build Coastguard Worker  // Configuration for exporting to a Pub/Sub topic.
257*d5c09012SAndroid Build Coastguard Worker  message PubSubConfig {
258*d5c09012SAndroid Build Coastguard Worker    // The name of the Pub/Sub topic.
259*d5c09012SAndroid Build Coastguard Worker    // Structured like: projects/{project_number}/topics/{topic_id}.
260*d5c09012SAndroid Build Coastguard Worker    // The topic may be changed.
261*d5c09012SAndroid Build Coastguard Worker    string topic = 1;
262*d5c09012SAndroid Build Coastguard Worker  }
263*d5c09012SAndroid Build Coastguard Worker
264*d5c09012SAndroid Build Coastguard Worker  // The desired state of this export. Setting this to values other than
265*d5c09012SAndroid Build Coastguard Worker  // `ACTIVE` and `PAUSED` will result in an error.
266*d5c09012SAndroid Build Coastguard Worker  State desired_state = 1;
267*d5c09012SAndroid Build Coastguard Worker
268*d5c09012SAndroid Build Coastguard Worker  // Output only. The current state of the export, which may be different to the
269*d5c09012SAndroid Build Coastguard Worker  // desired state due to errors. This field is output only.
270*d5c09012SAndroid Build Coastguard Worker  State current_state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
271*d5c09012SAndroid Build Coastguard Worker
272*d5c09012SAndroid Build Coastguard Worker  // Optional. The name of an optional Pub/Sub Lite topic to publish messages
273*d5c09012SAndroid Build Coastguard Worker  // that can not be exported to the destination. For example, the message can
274*d5c09012SAndroid Build Coastguard Worker  // not be published to the Pub/Sub service because it does not satisfy the
275*d5c09012SAndroid Build Coastguard Worker  // constraints documented at https://cloud.google.com/pubsub/docs/publisher.
276*d5c09012SAndroid Build Coastguard Worker  //
277*d5c09012SAndroid Build Coastguard Worker  // Structured like:
278*d5c09012SAndroid Build Coastguard Worker  // projects/{project_number}/locations/{location}/topics/{topic_id}.
279*d5c09012SAndroid Build Coastguard Worker  // Must be within the same project and location as the subscription. The topic
280*d5c09012SAndroid Build Coastguard Worker  // may be changed or removed.
281*d5c09012SAndroid Build Coastguard Worker  string dead_letter_topic = 5 [
282*d5c09012SAndroid Build Coastguard Worker    (google.api.field_behavior) = OPTIONAL,
283*d5c09012SAndroid Build Coastguard Worker    (google.api.resource_reference) = {
284*d5c09012SAndroid Build Coastguard Worker      type: "pubsublite.googleapis.com/Topic"
285*d5c09012SAndroid Build Coastguard Worker    }
286*d5c09012SAndroid Build Coastguard Worker  ];
287*d5c09012SAndroid Build Coastguard Worker
288*d5c09012SAndroid Build Coastguard Worker  // The destination to export to. Required.
289*d5c09012SAndroid Build Coastguard Worker  oneof destination {
290*d5c09012SAndroid Build Coastguard Worker    // Messages are automatically written from the Pub/Sub Lite topic associated
291*d5c09012SAndroid Build Coastguard Worker    // with this subscription to a Pub/Sub topic.
292*d5c09012SAndroid Build Coastguard Worker    PubSubConfig pubsub_config = 3;
293*d5c09012SAndroid Build Coastguard Worker  }
294*d5c09012SAndroid Build Coastguard Worker}
295*d5c09012SAndroid Build Coastguard Worker
296*d5c09012SAndroid Build Coastguard Worker// A target publish or event time. Can be used for seeking to or retrieving the
297*d5c09012SAndroid Build Coastguard Worker// corresponding cursor.
298*d5c09012SAndroid Build Coastguard Workermessage TimeTarget {
299*d5c09012SAndroid Build Coastguard Worker  // The type of message time to query.
300*d5c09012SAndroid Build Coastguard Worker  oneof time {
301*d5c09012SAndroid Build Coastguard Worker    // Request the cursor of the first message with publish time greater than or
302*d5c09012SAndroid Build Coastguard Worker    // equal to `publish_time`. All messages thereafter are guaranteed to have
303*d5c09012SAndroid Build Coastguard Worker    // publish times >= `publish_time`.
304*d5c09012SAndroid Build Coastguard Worker    google.protobuf.Timestamp publish_time = 1;
305*d5c09012SAndroid Build Coastguard Worker
306*d5c09012SAndroid Build Coastguard Worker    // Request the cursor of the first message with event time greater than or
307*d5c09012SAndroid Build Coastguard Worker    // equal to `event_time`. If messages are missing an event time, the publish
308*d5c09012SAndroid Build Coastguard Worker    // time is used as a fallback. As event times are user supplied, subsequent
309*d5c09012SAndroid Build Coastguard Worker    // messages may have event times less than `event_time` and should be
310*d5c09012SAndroid Build Coastguard Worker    // filtered by the client, if necessary.
311*d5c09012SAndroid Build Coastguard Worker    google.protobuf.Timestamp event_time = 2;
312*d5c09012SAndroid Build Coastguard Worker  }
313*d5c09012SAndroid Build Coastguard Worker}
314