Skip to content

Commit

Permalink
fix(pubsub): replace IAMPolicy in API config (#1373)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 389961627

Source-Link: googleapis/googleapis@e41be60

Source-Link: googleapis/googleapis-gen@68372a8
  • Loading branch information
gcf-owl-bot[bot] committed Aug 11, 2021
1 parent bed738f commit 435a181
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 5 deletions.
24 changes: 22 additions & 2 deletions protos/google/pubsub/v1/pubsub.proto
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,16 @@ message Topic {
// Reserved for future use. This field is set only in responses from the
// server; it is ignored if it is set in any requests.
bool satisfies_pzs = 7;

// Indicates the minimum duration to retain a message after it is published to
// the topic. If this field is set, messages published to the topic in the
// last `message_retention_duration` are always available to subscribers. For
// instance, it allows any attached subscription to [seek to a
// timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
// that is up to `message_retention_duration` in the past. If this field is
// not set, message retention is controlled by settings on individual
// subscriptions. Cannot be more than 7 days or less than 10 minutes.
google.protobuf.Duration message_retention_duration = 8;
}

// A message that is published by publishers and consumed by subscribers. The
Expand Down Expand Up @@ -678,8 +688,9 @@ message Subscription {
// Indicates whether to retain acknowledged messages. If true, then
// messages are not expunged from the subscription'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 [Seek to a timestamp]
// (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).
// window. This must be true if you would like to [`Seek` to a timestamp]
// (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
// the past to replay previously-acknowledged messages.
bool retain_acked_messages = 7;

// How long to retain unacknowledged messages in the subscription's backlog,
Expand Down Expand Up @@ -740,6 +751,15 @@ message Subscription {
// FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
// the endpoint will not be made.
bool detached = 15;

// Output only. Indicates the minimum duration for which a message is retained
// after it is published to the subscription's topic. If this field is set,
// messages published to the subscription's topic in the last
// `topic_message_retention_duration` are always available to subscribers. See
// the `message_retention_duration` field in `Topic`. This field is set only
// in responses from the server; it is ignored if it is set in any requests.
google.protobuf.Duration topic_message_retention_duration = 17
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// A policy that specifies how Cloud Pub/Sub retries message delivery.
Expand Down
4 changes: 3 additions & 1 deletion protos/google/pubsub/v1/schema.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -237,6 +237,7 @@ message ValidateSchemaRequest {
}

// Response for the `ValidateSchema` method.
// Empty for now.
message ValidateSchemaResponse {}

// Request for the `ValidateMessage` method.
Expand Down Expand Up @@ -270,6 +271,7 @@ message ValidateMessageRequest {
}

// Response for the `ValidateMessage` method.
// Empty for now.
message ValidateMessageResponse {}

// Possible encoding types for messages.
Expand Down
12 changes: 12 additions & 0 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/v1/publisher_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,15 @@ export class PublisherClient {
* @param {boolean} request.satisfiesPzs
* Reserved for future use. This field is set only in responses from the
* server; it is ignored if it is set in any requests.
* @param {google.protobuf.Duration} request.messageRetentionDuration
* Indicates the minimum duration to retain a message after it is published to
* the topic. If this field is set, messages published to the topic in the
* last `message_retention_duration` are always available to subscribers. For
* instance, it allows any attached subscription to [seek to a
* timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
* that is up to `message_retention_duration` in the past. If this field is
* not set, message retention is controlled by settings on individual
* subscriptions. Cannot be more than 7 days or less than 10 minutes.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
Expand Down
12 changes: 10 additions & 2 deletions src/v1/subscriber_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,9 @@ export class SubscriberClient {
* Indicates whether to retain acknowledged messages. If true, then
* messages are not expunged from the subscription'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 [Seek to a timestamp]
* (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time).
* window. This must be true if you would like to [`Seek` to a timestamp]
* (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in
* the past to replay previously-acknowledged messages.
* @param {google.protobuf.Duration} request.messageRetentionDuration
* How long to retain unacknowledged messages in the subscription's backlog,
* from the moment a message is published.
Expand Down Expand Up @@ -494,6 +495,13 @@ export class SubscriberClient {
* backlog. `Pull` and `StreamingPull` requests will return
* FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
* the endpoint will not be made.
* @param {google.protobuf.Duration} request.topicMessageRetentionDuration
* Output only. Indicates the minimum duration for which a message is retained
* after it is published to the subscription's topic. If this field is set,
* messages published to the subscription's topic in the last
* `topic_message_retention_duration` are always available to subscribers. See
* the `message_retention_duration` field in `Topic`. This field is set only
* in responses from the server; it is ignored if it is set in any requests.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
Expand Down

0 comments on commit 435a181

Please sign in to comment.