Skip to content

Commit 36809dc

Browse files
yoshi-automationsofisl
authored andcommitted
feat(pubsub): update the API
#### pubsub:v1 The following keys were added: - schemas.AvroFormat.description - schemas.AvroFormat.id - schemas.AvroFormat.type - schemas.CloudStorage.description - schemas.CloudStorage.id - schemas.CloudStorage.properties.avroFormat.$ref - schemas.CloudStorage.properties.avroFormat.description - schemas.CloudStorage.properties.bucket.description - schemas.CloudStorage.properties.bucket.type - schemas.CloudStorage.properties.matchGlob.description - schemas.CloudStorage.properties.matchGlob.type - schemas.CloudStorage.properties.minimumObjectCreateTime.description - schemas.CloudStorage.properties.minimumObjectCreateTime.format - schemas.CloudStorage.properties.minimumObjectCreateTime.type - schemas.CloudStorage.properties.pubsubAvroFormat.$ref - schemas.CloudStorage.properties.pubsubAvroFormat.description - schemas.CloudStorage.properties.state.description - schemas.CloudStorage.properties.state.enum - schemas.CloudStorage.properties.state.enumDescriptions - schemas.CloudStorage.properties.state.readOnly - schemas.CloudStorage.properties.state.type - schemas.CloudStorage.properties.textFormat.$ref - schemas.CloudStorage.properties.textFormat.description - schemas.CloudStorage.type - schemas.IngestionDataSourceSettings.properties.cloudStorage.$ref - schemas.IngestionDataSourceSettings.properties.cloudStorage.description - schemas.IngestionDataSourceSettings.properties.platformLogsSettings.$ref - schemas.IngestionDataSourceSettings.properties.platformLogsSettings.description - schemas.PlatformLogsSettings.description - schemas.PlatformLogsSettings.id - schemas.PlatformLogsSettings.properties.severity.description - schemas.PlatformLogsSettings.properties.severity.enum - schemas.PlatformLogsSettings.properties.severity.enumDescriptions - schemas.PlatformLogsSettings.properties.severity.type - schemas.PlatformLogsSettings.type - schemas.PubSubAvroFormat.description - schemas.PubSubAvroFormat.id - schemas.PubSubAvroFormat.type - schemas.TextFormat.description - schemas.TextFormat.id - schemas.TextFormat.properties.delimiter.description - schemas.TextFormat.properties.delimiter.type - schemas.TextFormat.type The following keys were changed: - schemas.Subscription.properties.messageRetentionDuration.description
1 parent ecf5c60 commit 36809dc

File tree

2 files changed

+181
-3
lines changed

2 files changed

+181
-3
lines changed

discovery/pubsub-v1.json

Lines changed: 113 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,7 +1638,7 @@
16381638
}
16391639
}
16401640
},
1641-
"revision": "20240730",
1641+
"revision": "20240918",
16421642
"rootUrl": "https://pubsub.googleapis.com/",
16431643
"schemas": {
16441644
"AcknowledgeRequest": {
@@ -1685,6 +1685,12 @@
16851685
},
16861686
"type": "object"
16871687
},
1688+
"AvroFormat": {
1689+
"description": "Configuration for reading Cloud Storage data in Avro binary format. The bytes of each object will be set to the `data` field of a Pub/Sub message.",
1690+
"id": "AvroFormat",
1691+
"properties": {},
1692+
"type": "object"
1693+
},
16881694
"AwsKinesis": {
16891695
"description": "Ingestion settings for Amazon Kinesis Data Streams.",
16901696
"id": "AwsKinesis",
@@ -1803,6 +1809,59 @@
18031809
},
18041810
"type": "object"
18051811
},
1812+
"CloudStorage": {
1813+
"description": "Ingestion settings for Cloud Storage.",
1814+
"id": "CloudStorage",
1815+
"properties": {
1816+
"avroFormat": {
1817+
"$ref": "AvroFormat",
1818+
"description": "Optional. Data from Cloud Storage will be interpreted in Avro format."
1819+
},
1820+
"bucket": {
1821+
"description": "Optional. Cloud Storage bucket. The bucket name must be without any prefix like \"gs://\". See the [bucket naming requirements] (https://cloud.google.com/storage/docs/buckets#naming).",
1822+
"type": "string"
1823+
},
1824+
"matchGlob": {
1825+
"description": "Optional. Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the [supported patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).",
1826+
"type": "string"
1827+
},
1828+
"minimumObjectCreateTime": {
1829+
"description": "Optional. Only objects with a larger or equal creation timestamp will be ingested.",
1830+
"format": "google-datetime",
1831+
"type": "string"
1832+
},
1833+
"pubsubAvroFormat": {
1834+
"$ref": "PubSubAvroFormat",
1835+
"description": "Optional. It will be assumed data from Cloud Storage was written via [Cloud Storage subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage)."
1836+
},
1837+
"state": {
1838+
"description": "Output only. An output-only field that indicates the state of the Cloud Storage ingestion source.",
1839+
"enum": [
1840+
"STATE_UNSPECIFIED",
1841+
"ACTIVE",
1842+
"CLOUD_STORAGE_PERMISSION_DENIED",
1843+
"PUBLISH_PERMISSION_DENIED",
1844+
"BUCKET_NOT_FOUND",
1845+
"TOO_MANY_OBJECTS"
1846+
],
1847+
"enumDescriptions": [
1848+
"Default value. This value is unused.",
1849+
"Ingestion is active.",
1850+
"Permission denied encountered while calling the Cloud Storage API. This can happen if the Pub/Sub SA has not been granted the [appropriate permissions](https://cloud.google.com/storage/docs/access-control/iam-permissions): - storage.objects.list: to list the objects in a bucket. - storage.objects.get: to read the objects in a bucket. - storage.buckets.get: to verify the bucket exists.",
1851+
"Permission denied encountered while publishing to the topic. This can happen if the Pub/Sub SA has not been granted the [appropriate publish permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)",
1852+
"The provided Cloud Storage bucket doesn't exist.",
1853+
"The Cloud Storage bucket has too many objects, ingestion will be paused."
1854+
],
1855+
"readOnly": true,
1856+
"type": "string"
1857+
},
1858+
"textFormat": {
1859+
"$ref": "TextFormat",
1860+
"description": "Optional. Data from Cloud Storage will be interpreted as text."
1861+
}
1862+
},
1863+
"type": "object"
1864+
},
18061865
"CloudStorageConfig": {
18071866
"description": "Configuration for a Cloud Storage subscription.",
18081867
"id": "CloudStorageConfig",
@@ -1973,6 +2032,14 @@
19732032
"awsKinesis": {
19742033
"$ref": "AwsKinesis",
19752034
"description": "Optional. Amazon Kinesis Data Streams."
2035+
},
2036+
"cloudStorage": {
2037+
"$ref": "CloudStorage",
2038+
"description": "Optional. Cloud Storage."
2039+
},
2040+
"platformLogsSettings": {
2041+
"$ref": "PlatformLogsSettings",
2042+
"description": "Optional. Platform Logs settings. If unset, no Platform Logs will be generated."
19762043
}
19772044
},
19782045
"type": "object"
@@ -2177,6 +2244,33 @@
21772244
},
21782245
"type": "object"
21792246
},
2247+
"PlatformLogsSettings": {
2248+
"description": "Settings for Platform Logs produced by Pub/Sub.",
2249+
"id": "PlatformLogsSettings",
2250+
"properties": {
2251+
"severity": {
2252+
"description": "Optional. The minimum severity level of Platform Logs that will be written.",
2253+
"enum": [
2254+
"SEVERITY_UNSPECIFIED",
2255+
"DISABLED",
2256+
"DEBUG",
2257+
"INFO",
2258+
"WARNING",
2259+
"ERROR"
2260+
],
2261+
"enumDescriptions": [
2262+
"Default value. Logs level is unspecified. Logs will be disabled.",
2263+
"Logs will be disabled.",
2264+
"Debug logs and higher-severity logs will be written.",
2265+
"Info logs and higher-severity logs will be written.",
2266+
"Warning logs and higher-severity logs will be written.",
2267+
"Only error logs will be written."
2268+
],
2269+
"type": "string"
2270+
}
2271+
},
2272+
"type": "object"
2273+
},
21802274
"Policy": {
21812275
"description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:[email protected]\", \"group:[email protected]\", \"domain:google.com\", \"serviceAccount:[email protected]\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:[email protected]\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).",
21822276
"id": "Policy",
@@ -2201,6 +2295,12 @@
22012295
},
22022296
"type": "object"
22032297
},
2298+
"PubSubAvroFormat": {
2299+
"description": "Configuration for reading Cloud Storage data written via [Cloud Storage subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). The data and attributes fields of the originally exported Pub/Sub message will be restored when publishing.",
2300+
"id": "PubSubAvroFormat",
2301+
"properties": {},
2302+
"type": "object"
2303+
},
22042304
"PublishRequest": {
22052305
"description": "Request for the Publish method.",
22062306
"id": "PublishRequest",
@@ -2563,7 +2663,7 @@
25632663
"type": "object"
25642664
},
25652665
"messageRetentionDuration": {
2566-
"description": "Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 minutes.",
2666+
"description": "Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 31 days or less than 10 minutes.",
25672667
"format": "google-duration",
25682668
"type": "string"
25692669
},
@@ -2645,6 +2745,17 @@
26452745
"properties": {},
26462746
"type": "object"
26472747
},
2748+
"TextFormat": {
2749+
"description": "Configuration for reading Cloud Storage data in text format. Each line of text as specified by the delimiter will be set to the `data` field of a Pub/Sub message.",
2750+
"id": "TextFormat",
2751+
"properties": {
2752+
"delimiter": {
2753+
"description": "Optional. When unset, '\\n' is used.",
2754+
"type": "string"
2755+
}
2756+
},
2757+
"type": "object"
2758+
},
26482759
"Topic": {
26492760
"description": "A topic resource.",
26502761
"id": "Topic",

src/apis/pubsub/v1.ts

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ export namespace pubsub_v1 {
159159
*/
160160
writeMetadata?: boolean | null;
161161
}
162+
/**
163+
* Configuration for reading Cloud Storage data in Avro binary format. The bytes of each object will be set to the `data` field of a Pub/Sub message.
164+
*/
165+
export interface Schema$AvroFormat {}
162166
/**
163167
* Ingestion settings for Amazon Kinesis Data Streams.
164168
*/
@@ -234,6 +238,39 @@ export namespace pubsub_v1 {
234238
*/
235239
role?: string | null;
236240
}
241+
/**
242+
* Ingestion settings for Cloud Storage.
243+
*/
244+
export interface Schema$CloudStorage {
245+
/**
246+
* Optional. Data from Cloud Storage will be interpreted in Avro format.
247+
*/
248+
avroFormat?: Schema$AvroFormat;
249+
/**
250+
* Optional. Cloud Storage bucket. The bucket name must be without any prefix like "gs://". See the [bucket naming requirements] (https://cloud.google.com/storage/docs/buckets#naming).
251+
*/
252+
bucket?: string | null;
253+
/**
254+
* Optional. Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the [supported patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).
255+
*/
256+
matchGlob?: string | null;
257+
/**
258+
* Optional. Only objects with a larger or equal creation timestamp will be ingested.
259+
*/
260+
minimumObjectCreateTime?: string | null;
261+
/**
262+
* Optional. It will be assumed data from Cloud Storage was written via [Cloud Storage subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).
263+
*/
264+
pubsubAvroFormat?: Schema$PubSubAvroFormat;
265+
/**
266+
* Output only. An output-only field that indicates the state of the Cloud Storage ingestion source.
267+
*/
268+
state?: string | null;
269+
/**
270+
* Optional. Data from Cloud Storage will be interpreted as text.
271+
*/
272+
textFormat?: Schema$TextFormat;
273+
}
237274
/**
238275
* Configuration for a Cloud Storage subscription.
239276
*/
@@ -364,6 +401,14 @@ export namespace pubsub_v1 {
364401
* Optional. Amazon Kinesis Data Streams.
365402
*/
366403
awsKinesis?: Schema$AwsKinesis;
404+
/**
405+
* Optional. Cloud Storage.
406+
*/
407+
cloudStorage?: Schema$CloudStorage;
408+
/**
409+
* Optional. Platform Logs settings. If unset, no Platform Logs will be generated.
410+
*/
411+
platformLogsSettings?: Schema$PlatformLogsSettings;
367412
}
368413
/**
369414
* Response for the `ListSchemaRevisions` method.
@@ -513,6 +558,15 @@ export namespace pubsub_v1 {
513558
*/
514559
serviceAccountEmail?: string | null;
515560
}
561+
/**
562+
* Settings for Platform Logs produced by Pub/Sub.
563+
*/
564+
export interface Schema$PlatformLogsSettings {
565+
/**
566+
* Optional. The minimum severity level of Platform Logs that will be written.
567+
*/
568+
severity?: string | null;
569+
}
516570
/**
517571
* An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] \}, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", \} \} ], "etag": "BwWWja0YfJA=", "version": 3 \} ``` **YAML example:** ``` bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).
518572
*/
@@ -548,6 +602,10 @@ export namespace pubsub_v1 {
548602
*/
549603
messageIds?: string[] | null;
550604
}
605+
/**
606+
* Configuration for reading Cloud Storage data written via [Cloud Storage subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). The data and attributes fields of the originally exported Pub/Sub message will be restored when publishing.
607+
*/
608+
export interface Schema$PubSubAvroFormat {}
551609
/**
552610
* A message that is published by publishers and consumed by subscribers. The message must contain either a non-empty data field or at least one attribute. Note that client libraries represent this object differently depending on the language. See the corresponding [client library documentation](https://cloud.google.com/pubsub/docs/reference/libraries) for more information. See [quotas and limits] (https://cloud.google.com/pubsub/quotas) for more information about message limits.
553611
*/
@@ -805,7 +863,7 @@ export namespace pubsub_v1 {
805863
*/
806864
labels?: {[key: string]: string} | null;
807865
/**
808-
* Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 minutes.
866+
* Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 31 days or less than 10 minutes.
809867
*/
810868
messageRetentionDuration?: string | null;
811869
/**
@@ -859,6 +917,15 @@ export namespace pubsub_v1 {
859917
* Configuration for writing message data in text format. Message payloads will be written to files as raw text, separated by a newline.
860918
*/
861919
export interface Schema$TextConfig {}
920+
/**
921+
* Configuration for reading Cloud Storage data in text format. Each line of text as specified by the delimiter will be set to the `data` field of a Pub/Sub message.
922+
*/
923+
export interface Schema$TextFormat {
924+
/**
925+
* Optional. When unset, '\n' is used.
926+
*/
927+
delimiter?: string | null;
928+
}
862929
/**
863930
* A topic resource.
864931
*/

0 commit comments

Comments
 (0)