Skip to content

Commit bde826a

Browse files
feat(pubsub): update the API
#### pubsub:v1 The following keys were added: - schemas.MessageTransform.properties.disabled.description - schemas.MessageTransform.properties.disabled.type - schemas.MessageTransform.properties.enabled.deprecated The following keys were changed: - schemas.JavaScriptUDF.properties.code.description - schemas.MessageTransform.properties.enabled.description
1 parent 16927db commit bde826a

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

‎discovery/pubsub-v1.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,7 +1638,7 @@
16381638
}
16391639
}
16401640
},
1641-
"revision": "20250218",
1641+
"revision": "20250414",
16421642
"rootUrl": "https://pubsub.googleapis.com/",
16431643
"schemas": {
16441644
"AcknowledgeRequest": {
@@ -2215,7 +2215,7 @@
22152215
"id": "JavaScriptUDF",
22162216
"properties": {
22172217
"code": {
2218-
"description": "Required. JavaScript code that contains a function `function_name` with the below signature: ``` /** * Transforms a Pub/Sub message. * @return {(Object)>|null)} - To * filter a message, return `null`. To transform a message return a map * with the following keys: * - (required) 'data' : {string} * - (optional) 'attributes' : {Object} * Returning empty `attributes` will remove all attributes from the * message. * * @param {(Object)>} Pub/Sub * message. Keys: * - (required) 'data' : {string} * - (required) 'attributes' : {Object} * * @param {Object} metadata - Pub/Sub message metadata. * Keys: * - (required) 'message_id' : {string} * - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string} */ function (message, metadata) { } ```",
2218+
"description": "Required. JavaScript code that contains a function `function_name` with the below signature: ``` /** * Transforms a Pub/Sub message. * @return {(Object)>|null)} - To * filter a message, return `null`. To transform a message return a map * with the following keys: * - (required) 'data' : {string} * - (optional) 'attributes' : {Object} * Returning empty `attributes` will remove all attributes from the * message. * * @param {(Object)>} Pub/Sub * message. Keys: * - (required) 'data' : {string} * - (required) 'attributes' : {Object} * * @param {Object} metadata - Pub/Sub message metadata. * Keys: * - (optional) 'message_id' : {string} * - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string} */ function (message, metadata) { } ```",
22192219
"type": "string"
22202220
},
22212221
"functionName": {
@@ -2373,8 +2373,13 @@
23732373
"description": "All supported message transforms types.",
23742374
"id": "MessageTransform",
23752375
"properties": {
2376+
"disabled": {
2377+
"description": "Optional. If true, the transform is disabled and will not be applied to messages. Defaults to `false`.",
2378+
"type": "boolean"
2379+
},
23762380
"enabled": {
2377-
"description": "Optional. If set to true, the transform is enabled. If false, the transform is disabled and will not be applied to messages. Defaults to `true`.",
2381+
"deprecated": true,
2382+
"description": "Optional. This field is deprecated, use the `disabled` field to disable transforms.",
23782383
"type": "boolean"
23792384
},
23802385
"javascriptUdf": {

‎src/apis/pubsub/v1.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ export namespace pubsub_v1 {
518518
*/
519519
export interface Schema$JavaScriptUDF {
520520
/**
521-
* Required. JavaScript code that contains a function `function_name` with the below signature: ``` /x* * Transforms a Pub/Sub message. * @return {(Object)\>|null)\} - To * filter a message, return `null`. To transform a message return a map * with the following keys: * - (required) 'data' : {string\} * - (optional) 'attributes' : {Object\} * Returning empty `attributes` will remove all attributes from the * message. * * @param {(Object)\>\} Pub/Sub * message. Keys: * - (required) 'data' : {string\} * - (required) 'attributes' : {Object\} * * @param {Object\} metadata - Pub/Sub message metadata. * Keys: * - (required) 'message_id' : {string\} * - (optional) 'publish_time': {string\} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string\} x/ function (message, metadata) { \} ```
521+
* Required. JavaScript code that contains a function `function_name` with the below signature: ``` /x* * Transforms a Pub/Sub message. * @return {(Object)\>|null)\} - To * filter a message, return `null`. To transform a message return a map * with the following keys: * - (required) 'data' : {string\} * - (optional) 'attributes' : {Object\} * Returning empty `attributes` will remove all attributes from the * message. * * @param {(Object)\>\} Pub/Sub * message. Keys: * - (required) 'data' : {string\} * - (required) 'attributes' : {Object\} * * @param {Object\} metadata - Pub/Sub message metadata. * Keys: * - (optional) 'message_id' : {string\} * - (optional) 'publish_time': {string\} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string\} x/ function (message, metadata) { \} ```
522522
*/
523523
code?: string | null;
524524
/**
@@ -635,7 +635,11 @@ export namespace pubsub_v1 {
635635
*/
636636
export interface Schema$MessageTransform {
637637
/**
638-
* Optional. If set to true, the transform is enabled. If false, the transform is disabled and will not be applied to messages. Defaults to `true`.
638+
* Optional. If true, the transform is disabled and will not be applied to messages. Defaults to `false`.
639+
*/
640+
disabled?: boolean | null;
641+
/**
642+
* Optional. This field is deprecated, use the `disabled` field to disable transforms.
639643
*/
640644
enabled?: boolean | null;
641645
/**

0 commit comments

Comments
 (0)