Skip to content

Commit

Permalink
feat(pubsub): update the API
Browse files Browse the repository at this point in the history
#### pubsub:v1
The following keys were added:
- schemas.MessageStoragePolicy.description
- schemas.RetryPolicy.description
- schemas.RetryPolicy.id
- schemas.RetryPolicy.properties.maximumBackoff.description
- schemas.RetryPolicy.properties.maximumBackoff.format
- schemas.RetryPolicy.properties.maximumBackoff.type
- schemas.RetryPolicy.properties.minimumBackoff.description
- schemas.RetryPolicy.properties.minimumBackoff.format
- schemas.RetryPolicy.properties.minimumBackoff.type
- schemas.RetryPolicy.type
- schemas.Subscription.properties.retryPolicy.$ref
- schemas.Subscription.properties.retryPolicy.description

The following keys were changed:
- schemas.Subscription.properties.filter.description
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jun 12, 2020
1 parent ab1285e commit 92ae41c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
26 changes: 24 additions & 2 deletions discovery/pubsub-v1.json
Expand Up @@ -1119,7 +1119,7 @@
}
}
},
"revision": "20200525",
"revision": "20200603",
"rootUrl": "https://pubsub.googleapis.com/",
"schemas": {
"AcknowledgeRequest": {
Expand Down Expand Up @@ -1330,6 +1330,7 @@
"type": "object"
},
"MessageStoragePolicy": {
"description": "A policy constraining the storage of messages published to the topic.",
"id": "MessageStoragePolicy",
"properties": {
"allowedPersistenceRegions": {
Expand Down Expand Up @@ -1539,6 +1540,23 @@
},
"type": "object"
},
"RetryPolicy": {
"description": "A policy that specifies how Cloud Pub/Sub retries message delivery.\n\nRetry delay will be exponential based on provided minimum and maximum\nbackoffs. https://en.wikipedia.org/wiki/Exponential_backoff.\n\nRetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded\nevents for a given message.\n\nRetry Policy is implemented on a best effort basis. At times, the delay\nbetween consecutive deliveries may not match the configuration. That is,\ndelay can be more or less than configured backoff.",
"id": "RetryPolicy",
"properties": {
"maximumBackoff": {
"description": "The maximum delay between consecutive deliveries of a given message.\nValue should be between 0 and 600 seconds. Defaults to 600 seconds.",
"format": "google-duration",
"type": "string"
},
"minimumBackoff": {
"description": "The minimum delay between consecutive deliveries of a given message.\nValue should be between 0 and 600 seconds. Defaults to 10 seconds.",
"format": "google-duration",
"type": "string"
}
},
"type": "object"
},
"SeekRequest": {
"description": "Request for the `Seek` method.",
"id": "SeekRequest",
Expand Down Expand Up @@ -1617,7 +1635,7 @@
"description": "A policy that specifies the conditions for this subscription's expiration.\nA subscription is considered active as long as any connected subscriber is\nsuccessfully consuming messages from the subscription or is issuing\noperations on the subscription. If `expiration_policy` is not set, a\n*default policy* with `ttl` of 31 days will be used. The minimum allowed\nvalue for `expiration_policy.ttl` is 1 day."
},
"filter": {
"description": "An expression written in the Cloud Pub/Sub filter language. If non-empty,\nthen only `PubsubMessage`s whose `attributes` field matches the filter are\ndelivered on this subscription. If empty, then no messages are filtered\nout.\n<b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This\nAPI might be changed in backward-incompatible ways and is not recommended\nfor production use. It is not subject to any SLA or deprecation policy.",
"description": "An expression written in the Cloud Pub/Sub filter language. If non-empty,\nthen only `PubsubMessage`s whose `attributes` field matches the filter are\ndelivered on this subscription. If empty, then no messages are filtered\nout.",
"type": "string"
},
"labels": {
Expand All @@ -1644,6 +1662,10 @@
"description": "Indicates whether to retain acknowledged messages. If true, then\nmessages are not expunged from the subscription's backlog, even if they are\nacknowledged, until they fall out of the `message_retention_duration`\nwindow. This must be true if you would like to\n<a\nhref=\"https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time\">\nSeek to a timestamp</a>.",
"type": "boolean"
},
"retryPolicy": {
"$ref": "RetryPolicy",
"description": "A policy that specifies how Pub/Sub retries message delivery for this\nsubscription.\n\nIf not set, the default retry policy is applied. This generally implies\nthat messages will be retried as soon as possible for healthy subscribers.\nRetryPolicy will be triggered on NACKs or acknowledgement deadline\nexceeded events for a given message."
},
"topic": {
"description": "Required. The name of the topic from which this subscription is receiving messages.\nFormat is `projects/{project}/topics/{topic}`.\nThe value of this field will be `_deleted-topic_` if the topic has been\ndeleted.",
"type": "string"
Expand Down
26 changes: 25 additions & 1 deletion src/apis/pubsub/v1.ts
Expand Up @@ -282,6 +282,9 @@ export namespace pubsub_v1 {
*/
subscriptions?: string[] | null;
}
/**
* A policy constraining the storage of messages published to the topic.
*/
export interface Schema$MessageStoragePolicy {
/**
* A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
Expand Down Expand Up @@ -435,6 +438,19 @@ export namespace pubsub_v1 {
*/
message?: Schema$PubsubMessage;
}
/**
* A policy that specifies how Cloud 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.
*/
export interface Schema$RetryPolicy {
/**
* The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.
*/
maximumBackoff?: string | null;
/**
* The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.
*/
minimumBackoff?: string | null;
}
/**
* Request for the `Seek` method.
*/
Expand Down Expand Up @@ -499,7 +515,7 @@ export namespace pubsub_v1 {
*/
expirationPolicy?: Schema$ExpirationPolicy;
/**
* An expression written in the Cloud Pub/Sub filter language. If non-empty, then only `PubsubMessage`s whose `attributes` field matches the filter are delivered on this subscription. If empty, then no messages are filtered out. &lt;b&gt;EXPERIMENTAL:&lt;/b&gt; This feature is part of a closed alpha release. This API might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
* An expression written in the Cloud Pub/Sub filter language. If non-empty, then only `PubsubMessage`s whose `attributes` field matches the filter are delivered on this subscription. If empty, then no messages are filtered out.
*/
filter?: string | null;
/**
Expand All @@ -522,6 +538,10 @@ export namespace pubsub_v1 {
* Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription&#39;s backlog, even if they are acknowledged, until they fall out of the `message_retention_duration` window. This must be true if you would like to &lt;a href=&quot;https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time&quot;&gt; Seek to a timestamp&lt;/a&gt;.
*/
retainAckedMessages?: boolean | null;
/**
* 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.
*/
retryPolicy?: Schema$RetryPolicy;
/**
* Required. The name of the topic from which this subscription is receiving messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be `_deleted-topic_` if the topic has been deleted.
*/
Expand Down Expand Up @@ -2069,6 +2089,7 @@ export namespace pubsub_v1 {
* // "name": "my_name",
* // "pushConfig": {},
* // "retainAckedMessages": false,
* // "retryPolicy": {},
* // "topic": "my_topic"
* // }
* },
Expand All @@ -2086,6 +2107,7 @@ export namespace pubsub_v1 {
* // "name": "my_name",
* // "pushConfig": {},
* // "retainAckedMessages": false,
* // "retryPolicy": {},
* // "topic": "my_topic"
* // }
* }
Expand Down Expand Up @@ -2501,6 +2523,7 @@ export namespace pubsub_v1 {
* // "name": "my_name",
* // "pushConfig": {},
* // "retainAckedMessages": false,
* // "retryPolicy": {},
* // "topic": "my_topic"
* // }
* }
Expand Down Expand Up @@ -3245,6 +3268,7 @@ export namespace pubsub_v1 {
* // "name": "my_name",
* // "pushConfig": {},
* // "retainAckedMessages": false,
* // "retryPolicy": {},
* // "topic": "my_topic"
* // }
* }
Expand Down

0 comments on commit 92ae41c

Please sign in to comment.