Skip to content

Commit c307b9b

Browse files
feat: add ingestion Cloud Storage fields and Platform Logging fields to Topic
PiperOrigin-RevId: 678307181 Source-Link: googleapis/googleapis@69e9dff Source-Link: googleapis/googleapis-gen@11a52e5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTFhNTJlNTI3MjMyMjdkM2I2MTIwZjg4ZjFhNTgwZTM5NThlMGNkNSJ9
1 parent bcc2735 commit c307b9b

File tree

4 files changed

+2171
-4
lines changed

4 files changed

+2171
-4
lines changed

owl-bot-staging/v1/protos/google/pubsub/v1/pubsub.proto

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,132 @@ message IngestionDataSourceSettings {
237237
string gcp_service_account = 5 [(google.api.field_behavior) = REQUIRED];
238238
}
239239

240+
// Ingestion settings for Cloud Storage.
241+
message CloudStorage {
242+
// Possible states for ingestion from Cloud Storage.
243+
enum State {
244+
// Default value. This value is unused.
245+
STATE_UNSPECIFIED = 0;
246+
247+
// Ingestion is active.
248+
ACTIVE = 1;
249+
250+
// Permission denied encountered while calling the Cloud Storage API. This
251+
// can happen if the Pub/Sub SA has not been granted the
252+
// [appropriate
253+
// permissions](https://cloud.google.com/storage/docs/access-control/iam-permissions):
254+
// - storage.objects.list: to list the objects in a bucket.
255+
// - storage.objects.get: to read the objects in a bucket.
256+
// - storage.buckets.get: to verify the bucket exists.
257+
CLOUD_STORAGE_PERMISSION_DENIED = 2;
258+
259+
// Permission denied encountered while publishing to the topic. This can
260+
// happen if the Pub/Sub SA has not been granted the [appropriate publish
261+
// permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)
262+
PUBLISH_PERMISSION_DENIED = 3;
263+
264+
// The provided Cloud Storage bucket doesn't exist.
265+
BUCKET_NOT_FOUND = 4;
266+
267+
// The Cloud Storage bucket has too many objects, ingestion will be
268+
// paused.
269+
TOO_MANY_OBJECTS = 5;
270+
}
271+
272+
// Configuration for reading Cloud Storage data in text format. Each line of
273+
// text as specified by the delimiter will be set to the `data` field of a
274+
// Pub/Sub message.
275+
message TextFormat {
276+
// Optional. When unset, '\n' is used.
277+
optional string delimiter = 1 [(google.api.field_behavior) = OPTIONAL];
278+
}
279+
280+
// Configuration for reading Cloud Storage data in Avro binary format. The
281+
// bytes of each object will be set to the `data` field of a Pub/Sub
282+
// message.
283+
message AvroFormat {}
284+
285+
// Configuration for reading Cloud Storage data written via [Cloud Storage
286+
// subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). The
287+
// data and attributes fields of the originally exported Pub/Sub message
288+
// will be restored when publishing.
289+
message PubSubAvroFormat {}
290+
291+
// Output only. An output-only field that indicates the state of the Cloud
292+
// Storage ingestion source.
293+
State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
294+
295+
// Optional. Cloud Storage bucket. The bucket name must be without any
296+
// prefix like "gs://". See the [bucket naming requirements]
297+
// (https://cloud.google.com/storage/docs/buckets#naming).
298+
string bucket = 2 [(google.api.field_behavior) = OPTIONAL];
299+
300+
// Defaults to text format.
301+
oneof input_format {
302+
// Optional. Data from Cloud Storage will be interpreted as text.
303+
TextFormat text_format = 3 [(google.api.field_behavior) = OPTIONAL];
304+
305+
// Optional. Data from Cloud Storage will be interpreted in Avro format.
306+
AvroFormat avro_format = 4 [(google.api.field_behavior) = OPTIONAL];
307+
308+
// Optional. It will be assumed data from Cloud Storage was written via
309+
// [Cloud Storage
310+
// subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
311+
PubSubAvroFormat pubsub_avro_format = 5
312+
[(google.api.field_behavior) = OPTIONAL];
313+
}
314+
315+
// Optional. Only objects with a larger or equal creation timestamp will be
316+
// ingested.
317+
google.protobuf.Timestamp minimum_object_create_time = 6
318+
[(google.api.field_behavior) = OPTIONAL];
319+
320+
// Optional. Glob pattern used to match objects that will be ingested. If
321+
// unset, all objects will be ingested. See the [supported
322+
// patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
323+
string match_glob = 9 [(google.api.field_behavior) = OPTIONAL];
324+
}
325+
240326
// Only one source type can have settings set.
241327
oneof source {
242328
// Optional. Amazon Kinesis Data Streams.
243329
AwsKinesis aws_kinesis = 1 [(google.api.field_behavior) = OPTIONAL];
330+
331+
// Optional. Cloud Storage.
332+
CloudStorage cloud_storage = 2 [(google.api.field_behavior) = OPTIONAL];
244333
}
334+
335+
// Optional. Platform Logs settings. If unset, no Platform Logs will be
336+
// generated.
337+
PlatformLogsSettings platform_logs_settings = 4
338+
[(google.api.field_behavior) = OPTIONAL];
339+
}
340+
341+
// Settings for Platform Logs produced by Pub/Sub.
342+
message PlatformLogsSettings {
343+
// Severity levels of Platform Logs.
344+
enum Severity {
345+
// Default value. Logs level is unspecified. Logs will be disabled.
346+
SEVERITY_UNSPECIFIED = 0;
347+
348+
// Logs will be disabled.
349+
DISABLED = 1;
350+
351+
// Debug logs and higher-severity logs will be written.
352+
DEBUG = 2;
353+
354+
// Info logs and higher-severity logs will be written.
355+
INFO = 3;
356+
357+
// Warning logs and higher-severity logs will be written.
358+
WARNING = 4;
359+
360+
// Only error logs will be written.
361+
ERROR = 5;
362+
}
363+
364+
// Optional. The minimum severity level of Platform Logs that will be written.
365+
Severity severity = 1 [(google.api.field_behavior) = OPTIONAL];
245366
}
246367

247368
// A topic resource.

0 commit comments

Comments
 (0)