You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: discovery/pubsub-v1.json
+50-6Lines changed: 50 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1638,7 +1638,7 @@
1638
1638
}
1639
1639
}
1640
1640
},
1641
-
"revision": "20241231",
1641
+
"revision": "20250218",
1642
1642
"rootUrl": "https://pubsub.googleapis.com/",
1643
1643
"schemas": {
1644
1644
"AcknowledgeRequest": {
@@ -1996,7 +1996,7 @@
1996
1996
"type": "string"
1997
1997
},
1998
1998
"maxDuration": {
1999
-
"description": "Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.",
1999
+
"description": "Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgment deadline.",
2000
2000
"format": "google-duration",
2001
2001
"type": "string"
2002
2002
},
@@ -2125,7 +2125,7 @@
2125
2125
"type": "string"
2126
2126
},
2127
2127
"maxDeliveryAttempts": {
2128
-
"description": "Optional. The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.",
2128
+
"description": "Optional. The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgment deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.",
2129
2129
"format": "int32",
2130
2130
"type": "integer"
2131
2131
}
@@ -2210,6 +2210,21 @@
2210
2210
},
2211
2211
"type": "object"
2212
2212
},
2213
+
"JavaScriptUDF": {
2214
+
"description": "User-defined JavaScript function that can transform or filter a Pub/Sub message.",
2215
+
"id": "JavaScriptUDF",
2216
+
"properties": {
2217
+
"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) { } ```",
2219
+
"type": "string"
2220
+
},
2221
+
"functionName": {
2222
+
"description": "Required. Name of the JavasScript function that should applied to Pub/Sub messages.",
2223
+
"type": "string"
2224
+
}
2225
+
},
2226
+
"type": "object"
2227
+
},
2213
2228
"ListSchemaRevisionsResponse": {
2214
2229
"description": "Response for the `ListSchemaRevisions` method.",
2215
2230
"id": "ListSchemaRevisionsResponse",
@@ -2354,6 +2369,21 @@
2354
2369
},
2355
2370
"type": "object"
2356
2371
},
2372
+
"MessageTransform": {
2373
+
"description": "All supported message transforms types.",
2374
+
"id": "MessageTransform",
2375
+
"properties": {
2376
+
"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`.",
2378
+
"type": "boolean"
2379
+
},
2380
+
"javascriptUdf": {
2381
+
"$ref": "JavaScriptUDF",
2382
+
"description": "Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's are specified on a resource, each must have a unique `function_name`."
2383
+
}
2384
+
},
2385
+
"type": "object"
2386
+
},
2357
2387
"ModifyAckDeadlineRequest": {
2358
2388
"description": "Request for the ModifyAckDeadline method.",
2359
2389
"id": "ModifyAckDeadlineRequest",
@@ -2615,7 +2645,7 @@
2615
2645
"type": "object"
2616
2646
},
2617
2647
"RetryPolicy": {
2618
-
"description": "A policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.",
2648
+
"description": "A policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.",
2619
2649
"id": "RetryPolicy",
2620
2650
"properties": {
2621
2651
"maximumBackoff": {
@@ -2806,7 +2836,7 @@
2806
2836
"type": "boolean"
2807
2837
},
2808
2838
"enableExactlyOnceDelivery": {
2809
-
"description": "Optional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: * The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires. * An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values.",
2839
+
"description": "Optional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: * The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgment deadline expires. * An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values.",
2810
2840
"type": "boolean"
2811
2841
},
2812
2842
"enableMessageOrdering": {
@@ -2833,6 +2863,13 @@
2833
2863
"format": "google-duration",
2834
2864
"type": "string"
2835
2865
},
2866
+
"messageTransforms": {
2867
+
"description": "Optional. Transforms to be applied to messages before they are delivered to subscribers. Transforms are applied in the order specified.",
2868
+
"items": {
2869
+
"$ref": "MessageTransform"
2870
+
},
2871
+
"type": "array"
2872
+
},
2836
2873
"name": {
2837
2874
"description": "Required. The name of the subscription. It must have the format `\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.",
2838
2875
"type": "string"
@@ -2847,7 +2884,7 @@
2847
2884
},
2848
2885
"retryPolicy": {
2849
2886
"$ref": "RetryPolicy",
2850
-
"description": "Optional. A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message."
2887
+
"description": "Optional. A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded events for a given message."
2851
2888
},
2852
2889
"state": {
2853
2890
"description": "Output only. An output-only field indicating whether or not the subscription can receive messages.",
@@ -2950,6 +2987,13 @@
2950
2987
"$ref": "MessageStoragePolicy",
2951
2988
"description": "Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect."
2952
2989
},
2990
+
"messageTransforms": {
2991
+
"description": "Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified.",
2992
+
"items": {
2993
+
"$ref": "MessageTransform"
2994
+
},
2995
+
"type": "array"
2996
+
},
2953
2997
"name": {
2954
2998
"description": "Required. The name of the topic. It must have the format `\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.",
Copy file name to clipboardExpand all lines: src/apis/pubsub/v1.ts
+39-5Lines changed: 39 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -362,7 +362,7 @@ export namespace pubsub_v1 {
362
362
*/
363
363
maxBytes?: string|null;
364
364
/**
365
-
* Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.
365
+
* Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgment deadline.
366
366
*/
367
367
maxDuration?: string|null;
368
368
/**
@@ -442,7 +442,7 @@ export namespace pubsub_v1 {
442
442
*/
443
443
deadLetterTopic?: string|null;
444
444
/**
445
-
* Optional. The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.
445
+
* Optional. The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgment deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.
* User-defined JavaScript function that can transform or filter a Pub/Sub message.
518
+
*/
519
+
exportinterfaceSchema$JavaScriptUDF{
520
+
/**
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) { \} ```
522
+
*/
523
+
code?: string|null;
524
+
/**
525
+
* Required. Name of the JavasScript function that should applied to Pub/Sub messages.
526
+
*/
527
+
functionName?: string|null;
528
+
}
516
529
/**
517
530
* Response for the `ListSchemaRevisions` method.
518
531
*/
@@ -617,6 +630,19 @@ export namespace pubsub_v1 {
617
630
*/
618
631
enforceInTransit?: boolean|null;
619
632
}
633
+
/**
634
+
* All supported message transforms types.
635
+
*/
636
+
exportinterfaceSchema$MessageTransform{
637
+
/**
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`.
639
+
*/
640
+
enabled?: boolean|null;
641
+
/**
642
+
* Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's are specified on a resource, each must have a unique `function_name`.
643
+
*/
644
+
javascriptUdf?: Schema$JavaScriptUDF;
645
+
}
620
646
/**
621
647
* Request for the ModifyAckDeadline method.
622
648
*/
@@ -803,7 +829,7 @@ export namespace pubsub_v1 {
803
829
message?: Schema$PubsubMessage;
804
830
}
805
831
/**
806
-
* A policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.
832
+
* A policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.
807
833
*/
808
834
exportinterfaceSchema$RetryPolicy{
809
835
/**
@@ -946,7 +972,7 @@ export namespace pubsub_v1 {
946
972
*/
947
973
detached?: boolean|null;
948
974
/**
949
-
* Optional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: * The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires. * An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values.
975
+
* Optional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: * The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgment deadline expires. * An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values.
950
976
*/
951
977
enableExactlyOnceDelivery?: boolean|null;
952
978
/**
@@ -969,6 +995,10 @@ export namespace pubsub_v1 {
969
995
* 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.
970
996
*/
971
997
messageRetentionDuration?: string|null;
998
+
/**
999
+
* Optional. Transforms to be applied to messages before they are delivered to subscribers. Transforms are applied in the order specified.
1000
+
*/
1001
+
messageTransforms?: Schema$MessageTransform[];
972
1002
/**
973
1003
* Required. The name of the subscription. It must have the format `"projects/{project\}/subscriptions/{subscription\}"`. `{subscription\}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
974
1004
*/
@@ -982,7 +1012,7 @@ export namespace pubsub_v1 {
982
1012
*/
983
1013
retainAckedMessages?: boolean|null;
984
1014
/**
985
-
* Optional. A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.
1015
+
* Optional. A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgment deadline exceeded events for a given message.
* Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.
* Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified.
1088
+
*/
1089
+
messageTransforms?: Schema$MessageTransform[];
1056
1090
/**
1057
1091
* Required. The name of the topic. It must have the format `"projects/{project\}/topics/{topic\}"`. `{topic\}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
0 commit comments