google-cloud-pubsub 0.33.2 → 0.34.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +4 -4
- data/CHANGELOG.md +45 -0
- data/EMULATOR.md +2 -2
- data/OVERVIEW.md +81 -43
- data/lib/google-cloud-pubsub.rb +10 -7
- data/lib/google/cloud/pubsub.rb +38 -21
- data/lib/google/cloud/pubsub/async_publisher.rb +8 -6
- data/lib/google/cloud/pubsub/batch_publisher.rb +7 -5
- data/lib/google/cloud/pubsub/convert.rb +5 -3
- data/lib/google/cloud/pubsub/credentials.rb +6 -4
- data/lib/google/cloud/pubsub/message.rb +9 -6
- data/lib/google/cloud/pubsub/policy.rb +12 -10
- data/lib/google/cloud/pubsub/project.rb +30 -28
- data/lib/google/cloud/pubsub/publish_result.rb +3 -1
- data/lib/google/cloud/pubsub/received_message.rb +11 -10
- data/lib/google/cloud/pubsub/service.rb +47 -37
- data/lib/google/cloud/pubsub/snapshot.rb +11 -9
- data/lib/google/cloud/pubsub/snapshot/list.rb +10 -8
- data/lib/google/cloud/pubsub/subscriber.rb +32 -6
- data/lib/google/cloud/pubsub/subscriber/enumerator_queue.rb +3 -1
- data/lib/google/cloud/pubsub/subscriber/inventory.rb +4 -2
- data/lib/google/cloud/pubsub/subscriber/stream.rb +23 -43
- data/lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb +221 -0
- data/lib/google/cloud/pubsub/subscription.rb +157 -80
- data/lib/google/cloud/pubsub/subscription/list.rb +12 -10
- data/lib/google/cloud/pubsub/topic.rb +79 -51
- data/lib/google/cloud/pubsub/topic/list.rb +10 -8
- data/lib/google/cloud/pubsub/v1/credentials.rb +4 -2
- data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/iam_policy.rb +1 -43
- data/lib/google/cloud/pubsub/v1/doc/google/iam/v1/policy.rb +1 -108
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/duration.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/empty.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/field_mask.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb +1 -1
- data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +107 -61
- data/lib/google/cloud/pubsub/v1/publisher_client.rb +58 -55
- data/lib/google/cloud/pubsub/v1/publisher_client_config.json +0 -4
- data/lib/google/cloud/pubsub/v1/subscriber_client.rb +177 -128
- data/lib/google/cloud/pubsub/v1/subscriber_client_config.json +0 -4
- data/lib/google/cloud/pubsub/version.rb +4 -2
- data/lib/google/pubsub/v1/pubsub_pb.rb +48 -40
- data/lib/google/pubsub/v1/pubsub_services_pb.rb +201 -161
- metadata +6 -7
- data/lib/google/cloud/pubsub/subscriber/async_stream_pusher.rb +0 -223
- data/lib/google/cloud/pubsub/subscriber/async_unary_pusher.rb +0 -271
@@ -17,7 +17,7 @@ require "delegate"
|
|
17
17
|
|
18
18
|
module Google
|
19
19
|
module Cloud
|
20
|
-
module
|
20
|
+
module PubSub
|
21
21
|
class Topic
|
22
22
|
##
|
23
23
|
# Topic::List is a special case Array with additional values.
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
##
|
26
26
|
# If not empty, indicates that there are more topics
|
27
27
|
# that match the request and this value should be passed to
|
28
|
-
# the next {Google::Cloud::
|
28
|
+
# the next {Google::Cloud::PubSub::Project#topics} to continue.
|
29
29
|
attr_accessor :token
|
30
30
|
|
31
31
|
##
|
@@ -42,7 +42,7 @@ module Google
|
|
42
42
|
# @example
|
43
43
|
# require "google/cloud/pubsub"
|
44
44
|
#
|
45
|
-
# pubsub = Google::Cloud::
|
45
|
+
# pubsub = Google::Cloud::PubSub.new
|
46
46
|
#
|
47
47
|
# topics = pubsub.topics
|
48
48
|
# if topics.next?
|
@@ -61,7 +61,7 @@ module Google
|
|
61
61
|
# @example
|
62
62
|
# require "google/cloud/pubsub"
|
63
63
|
#
|
64
|
-
# pubsub = Google::Cloud::
|
64
|
+
# pubsub = Google::Cloud::PubSub.new
|
65
65
|
#
|
66
66
|
# topics = pubsub.topics
|
67
67
|
# if topics.next?
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
# @example Iterating each topic by passing a block:
|
98
98
|
# require "google/cloud/pubsub"
|
99
99
|
#
|
100
|
-
# pubsub = Google::Cloud::
|
100
|
+
# pubsub = Google::Cloud::PubSub.new
|
101
101
|
#
|
102
102
|
# topics = pubsub.topics
|
103
103
|
# topics.all do |topic|
|
@@ -107,7 +107,7 @@ module Google
|
|
107
107
|
# @example Using the enumerator by not passing a block:
|
108
108
|
# require "google/cloud/pubsub"
|
109
109
|
#
|
110
|
-
# pubsub = Google::Cloud::
|
110
|
+
# pubsub = Google::Cloud::PubSub.new
|
111
111
|
#
|
112
112
|
# topics = pubsub.topics
|
113
113
|
# all_names = topics.all.map do |topic|
|
@@ -117,7 +117,7 @@ module Google
|
|
117
117
|
# @example Limit the number of API calls made:
|
118
118
|
# require "google/cloud/pubsub"
|
119
119
|
#
|
120
|
-
# pubsub = Google::Cloud::
|
120
|
+
# pubsub = Google::Cloud::PubSub.new
|
121
121
|
#
|
122
122
|
# topics = pubsub.topics
|
123
123
|
# topics.all(request_limit: 10) do |topic|
|
@@ -143,7 +143,7 @@ module Google
|
|
143
143
|
|
144
144
|
##
|
145
145
|
# @private New Topic::List from a
|
146
|
-
# Google::
|
146
|
+
# Google::Cloud::PubSub::V1::ListTopicsResponse object.
|
147
147
|
def self.from_grpc grpc_list, service, max = nil
|
148
148
|
topics = new(Array(grpc_list.topics).map do |grpc|
|
149
149
|
Topic.from_grpc grpc, service
|
@@ -167,5 +167,7 @@ module Google
|
|
167
167
|
end
|
168
168
|
end
|
169
169
|
end
|
170
|
+
|
171
|
+
Pubsub = PubSub unless const_defined? :Pubsub
|
170
172
|
end
|
171
173
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -17,7 +17,7 @@ require "googleauth"
|
|
17
17
|
|
18
18
|
module Google
|
19
19
|
module Cloud
|
20
|
-
module
|
20
|
+
module PubSub
|
21
21
|
module V1
|
22
22
|
class Credentials < Google::Auth::Credentials
|
23
23
|
SCOPE = ["https://www.googleapis.com/auth/pubsub"].freeze
|
@@ -35,5 +35,7 @@ module Google
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
38
|
+
|
39
|
+
Pubsub = PubSub unless const_defined? :Pubsub
|
38
40
|
end
|
39
41
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -16,48 +16,6 @@
|
|
16
16
|
module Google
|
17
17
|
module Iam
|
18
18
|
module V1
|
19
|
-
# Request message for `SetIamPolicy` method.
|
20
|
-
# @!attribute [rw] resource
|
21
|
-
# @return [String]
|
22
|
-
# REQUIRED: The resource for which the policy is being specified.
|
23
|
-
# `resource` is usually specified as a path. For example, a Project
|
24
|
-
# resource is specified as `projects/{project}`.
|
25
|
-
# @!attribute [rw] policy
|
26
|
-
# @return [Google::Iam::V1::Policy]
|
27
|
-
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
28
|
-
# the policy is limited to a few 10s of KB. An empty policy is a
|
29
|
-
# valid policy but certain Cloud Platform services (such as Projects)
|
30
|
-
# might reject them.
|
31
|
-
class SetIamPolicyRequest; end
|
32
|
-
|
33
|
-
# Request message for `GetIamPolicy` method.
|
34
|
-
# @!attribute [rw] resource
|
35
|
-
# @return [String]
|
36
|
-
# REQUIRED: The resource for which the policy is being requested.
|
37
|
-
# `resource` is usually specified as a path. For example, a Project
|
38
|
-
# resource is specified as `projects/{project}`.
|
39
|
-
class GetIamPolicyRequest; end
|
40
|
-
|
41
|
-
# Request message for `TestIamPermissions` method.
|
42
|
-
# @!attribute [rw] resource
|
43
|
-
# @return [String]
|
44
|
-
# REQUIRED: The resource for which the policy detail is being requested.
|
45
|
-
# `resource` is usually specified as a path. For example, a Project
|
46
|
-
# resource is specified as `projects/{project}`.
|
47
|
-
# @!attribute [rw] permissions
|
48
|
-
# @return [Array<String>]
|
49
|
-
# The set of permissions to check for the `resource`. Permissions with
|
50
|
-
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
51
|
-
# information see
|
52
|
-
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
53
|
-
class TestIamPermissionsRequest; end
|
54
|
-
|
55
|
-
# Response message for `TestIamPermissions` method.
|
56
|
-
# @!attribute [rw] permissions
|
57
|
-
# @return [Array<String>]
|
58
|
-
# A subset of `TestPermissionsRequest.permissions` that the caller is
|
59
|
-
# allowed.
|
60
|
-
class TestIamPermissionsResponse; end
|
61
19
|
end
|
62
20
|
end
|
63
21
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -16,113 +16,6 @@
|
|
16
16
|
module Google
|
17
17
|
module Iam
|
18
18
|
module V1
|
19
|
-
# Defines an Identity and Access Management (IAM) policy. It is used to
|
20
|
-
# specify access control policies for Cloud Platform resources.
|
21
|
-
#
|
22
|
-
#
|
23
|
-
# A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
|
24
|
-
# `members` to a `role`, where the members can be user accounts, Google groups,
|
25
|
-
# Google domains, and service accounts. A `role` is a named list of permissions
|
26
|
-
# defined by IAM.
|
27
|
-
#
|
28
|
-
# **Example**
|
29
|
-
#
|
30
|
-
# {
|
31
|
-
# "bindings": [
|
32
|
-
# {
|
33
|
-
# "role": "roles/owner",
|
34
|
-
# "members": [
|
35
|
-
# "user:mike@example.com",
|
36
|
-
# "group:admins@example.com",
|
37
|
-
# "domain:google.com",
|
38
|
-
# "serviceAccount:my-other-app@appspot.gserviceaccount.com",
|
39
|
-
# ]
|
40
|
-
# },
|
41
|
-
# {
|
42
|
-
# "role": "roles/viewer",
|
43
|
-
# "members": ["user:sean@example.com"]
|
44
|
-
# }
|
45
|
-
# ]
|
46
|
-
# }
|
47
|
-
#
|
48
|
-
# For a description of IAM and its features, see the
|
49
|
-
# [IAM developer's guide](https://cloud.google.com/iam).
|
50
|
-
# @!attribute [rw] version
|
51
|
-
# @return [Integer]
|
52
|
-
# Version of the `Policy`. The default version is 0.
|
53
|
-
# @!attribute [rw] bindings
|
54
|
-
# @return [Array<Google::Iam::V1::Binding>]
|
55
|
-
# Associates a list of `members` to a `role`.
|
56
|
-
# Multiple `bindings` must not be specified for the same `role`.
|
57
|
-
# `bindings` with no members will result in an error.
|
58
|
-
# @!attribute [rw] etag
|
59
|
-
# @return [String]
|
60
|
-
# `etag` is used for optimistic concurrency control as a way to help
|
61
|
-
# prevent simultaneous updates of a policy from overwriting each other.
|
62
|
-
# It is strongly suggested that systems make use of the `etag` in the
|
63
|
-
# read-modify-write cycle to perform policy updates in order to avoid race
|
64
|
-
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
|
65
|
-
# systems are expected to put that etag in the request to `setIamPolicy` to
|
66
|
-
# ensure that their change will be applied to the same version of the policy.
|
67
|
-
#
|
68
|
-
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
|
69
|
-
# policy is overwritten blindly.
|
70
|
-
class Policy; end
|
71
|
-
|
72
|
-
# Associates `members` with a `role`.
|
73
|
-
# @!attribute [rw] role
|
74
|
-
# @return [String]
|
75
|
-
# Role that is assigned to `members`.
|
76
|
-
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
77
|
-
# Required
|
78
|
-
# @!attribute [rw] members
|
79
|
-
# @return [Array<String>]
|
80
|
-
# Specifies the identities requesting access for a Cloud Platform resource.
|
81
|
-
# `members` can have the following values:
|
82
|
-
#
|
83
|
-
# * `allUsers`: A special identifier that represents anyone who is
|
84
|
-
# on the internet; with or without a Google account.
|
85
|
-
#
|
86
|
-
# * `allAuthenticatedUsers`: A special identifier that represents anyone
|
87
|
-
# who is authenticated with a Google account or a service account.
|
88
|
-
#
|
89
|
-
# * `user:{emailid}`: An email address that represents a specific Google
|
90
|
-
# account. For example, `alice@gmail.com` or `joe@example.com`.
|
91
|
-
#
|
92
|
-
#
|
93
|
-
# * `serviceAccount:{emailid}`: An email address that represents a service
|
94
|
-
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
|
95
|
-
#
|
96
|
-
# * `group:{emailid}`: An email address that represents a Google group.
|
97
|
-
# For example, `admins@example.com`.
|
98
|
-
#
|
99
|
-
# * `domain:{domain}`: A Google Apps domain name that represents all the
|
100
|
-
# users of that domain. For example, `google.com` or `example.com`.
|
101
|
-
class Binding; end
|
102
|
-
|
103
|
-
# The difference delta between two policies.
|
104
|
-
# @!attribute [rw] binding_deltas
|
105
|
-
# @return [Array<Google::Iam::V1::BindingDelta>]
|
106
|
-
# The delta for Bindings between two policies.
|
107
|
-
class PolicyDelta; end
|
108
|
-
|
109
|
-
# One delta entry for Binding. Each individual change (only one member in each
|
110
|
-
# entry) to a binding will be a separate entry.
|
111
|
-
# @!attribute [rw] action
|
112
|
-
# @return [Google::Iam::V1::BindingDelta::Action]
|
113
|
-
# The action that was performed on a Binding.
|
114
|
-
# Required
|
115
|
-
# @!attribute [rw] role
|
116
|
-
# @return [String]
|
117
|
-
# Role that is assigned to `members`.
|
118
|
-
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
|
119
|
-
# Required
|
120
|
-
# @!attribute [rw] member
|
121
|
-
# @return [String]
|
122
|
-
# A single identity requesting access for a Cloud Platform resource.
|
123
|
-
# Follows the same format of Binding.members.
|
124
|
-
# Required
|
125
|
-
class BindingDelta; end
|
126
19
|
end
|
127
20
|
end
|
128
21
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -14,12 +14,13 @@
|
|
14
14
|
|
15
15
|
|
16
16
|
module Google
|
17
|
-
module
|
17
|
+
module Cloud
|
18
|
+
module PubSub
|
18
19
|
module V1
|
19
20
|
# @!attribute [rw] allowed_persistence_regions
|
20
21
|
# @return [Array<String>]
|
21
|
-
# The list of GCP
|
22
|
-
# be persisted in storage. Messages published by publishers running in
|
22
|
+
# The list of GCP region IDs where messages that are published to the topic
|
23
|
+
# may be persisted in storage. Messages published by publishers running in
|
23
24
|
# non-allowed GCP regions (or running outside of GCP altogether) will be
|
24
25
|
# routed for storage in one of the allowed regions. An empty list indicates a
|
25
26
|
# misconfiguration at the project or organization level, which will result in
|
@@ -37,9 +38,10 @@ module Google
|
|
37
38
|
# must not start with `"goog"`.
|
38
39
|
# @!attribute [rw] labels
|
39
40
|
# @return [Hash{String => String}]
|
40
|
-
#
|
41
|
+
# See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
|
42
|
+
# managing labels</a>.
|
41
43
|
# @!attribute [rw] message_storage_policy
|
42
|
-
# @return [Google::
|
44
|
+
# @return [Google::Cloud::PubSub::V1::MessageStoragePolicy]
|
43
45
|
# Policy constraining how messages published to the topic may be stored. It
|
44
46
|
# is determined when the topic is created based on the policy configured at
|
45
47
|
# the project level. It must not be set by the caller in the request to
|
@@ -48,11 +50,18 @@ module Google
|
|
48
50
|
# response, then no constraints are in effect.
|
49
51
|
class Topic; end
|
50
52
|
|
51
|
-
# A message
|
52
|
-
#
|
53
|
+
# A message that is published by publishers and consumed by subscribers. The
|
54
|
+
# message must contain either a non-empty data field or at least one attribute.
|
55
|
+
# Note that client libraries represent this object differently
|
56
|
+
# depending on the language. See the corresponding
|
57
|
+
# <a href="https://cloud.google.com/pubsub/docs/reference/libraries">client
|
58
|
+
# library documentation</a> for more information. See
|
59
|
+
# <a href="https://cloud.google.com/pubsub/quotas">Quotas and limits</a>
|
60
|
+
# for more information about message limits.
|
53
61
|
# @!attribute [rw] data
|
54
62
|
# @return [String]
|
55
|
-
# The message
|
63
|
+
# The message data field. If this field is empty, the message must contain
|
64
|
+
# at least one attribute.
|
56
65
|
# @!attribute [rw] attributes
|
57
66
|
# @return [Hash{String => String}]
|
58
67
|
# Optional attributes for this message.
|
@@ -78,7 +87,7 @@ module Google
|
|
78
87
|
|
79
88
|
# Request for the UpdateTopic method.
|
80
89
|
# @!attribute [rw] topic
|
81
|
-
# @return [Google::
|
90
|
+
# @return [Google::Cloud::PubSub::V1::Topic]
|
82
91
|
# The updated topic object.
|
83
92
|
# @!attribute [rw] update_mask
|
84
93
|
# @return [Google::Protobuf::FieldMask]
|
@@ -95,7 +104,7 @@ module Google
|
|
95
104
|
# The messages in the request will be published on this topic.
|
96
105
|
# Format is `projects/{project}/topics/{topic}`.
|
97
106
|
# @!attribute [rw] messages
|
98
|
-
# @return [Array<Google::
|
107
|
+
# @return [Array<Google::Cloud::PubSub::V1::PubsubMessage>]
|
99
108
|
# The messages to publish.
|
100
109
|
class PublishRequest; end
|
101
110
|
|
@@ -110,8 +119,8 @@ module Google
|
|
110
119
|
# Request for the `ListTopics` method.
|
111
120
|
# @!attribute [rw] project
|
112
121
|
# @return [String]
|
113
|
-
# The name of the
|
114
|
-
# Format is `projects/{project}`.
|
122
|
+
# The name of the project in which to list topics.
|
123
|
+
# Format is `projects/{project-id}`.
|
115
124
|
# @!attribute [rw] page_size
|
116
125
|
# @return [Integer]
|
117
126
|
# Maximum number of topics to return.
|
@@ -124,7 +133,7 @@ module Google
|
|
124
133
|
|
125
134
|
# Response for the `ListTopics` method.
|
126
135
|
# @!attribute [rw] topics
|
127
|
-
# @return [Array<Google::
|
136
|
+
# @return [Array<Google::Cloud::PubSub::V1::Topic>]
|
128
137
|
# The resulting topics.
|
129
138
|
# @!attribute [rw] next_page_token
|
130
139
|
# @return [String]
|
@@ -158,8 +167,8 @@ module Google
|
|
158
167
|
# `ListTopicSubscriptionsRequest` to get more subscriptions.
|
159
168
|
class ListTopicSubscriptionsResponse; end
|
160
169
|
|
161
|
-
# Request for the `ListTopicSnapshots` method
|
162
|
-
# <b>
|
170
|
+
# Request for the `ListTopicSnapshots` method. <br><br>
|
171
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
163
172
|
# changed in backward-incompatible ways and is not recommended for production
|
164
173
|
# use. It is not subject to any SLA or deprecation policy.
|
165
174
|
# @!attribute [rw] topic
|
@@ -177,7 +186,7 @@ module Google
|
|
177
186
|
class ListTopicSnapshotsRequest; end
|
178
187
|
|
179
188
|
# Response for the `ListTopicSnapshots` method.<br><br>
|
180
|
-
# <b>
|
189
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
181
190
|
# changed in backward-incompatible ways and is not recommended for production
|
182
191
|
# use. It is not subject to any SLA or deprecation policy.
|
183
192
|
# @!attribute [rw] snapshots
|
@@ -213,17 +222,17 @@ module Google
|
|
213
222
|
# The value of this field will be `_deleted-topic_` if the topic has been
|
214
223
|
# deleted.
|
215
224
|
# @!attribute [rw] push_config
|
216
|
-
# @return [Google::
|
225
|
+
# @return [Google::Cloud::PubSub::V1::PushConfig]
|
217
226
|
# If push delivery is used with this subscription, this field is
|
218
227
|
# used to configure it. An empty `pushConfig` signifies that the subscriber
|
219
228
|
# will pull and ack messages using API methods.
|
220
229
|
# @!attribute [rw] ack_deadline_seconds
|
221
230
|
# @return [Integer]
|
222
|
-
#
|
223
|
-
#
|
224
|
-
#
|
225
|
-
#
|
226
|
-
#
|
231
|
+
# The approximate amount of time (on a best-effort basis) Pub/Sub waits for
|
232
|
+
# the subscriber to acknowledge receipt before resending the message. In the
|
233
|
+
# interval after the message is delivered and before it is acknowledged, it
|
234
|
+
# is considered to be <i>outstanding</i>. During that time period, the
|
235
|
+
# message will not be redelivered (on a best-effort basis).
|
227
236
|
#
|
228
237
|
# For pull subscriptions, this value is used as the initial value for the ack
|
229
238
|
# deadline. To override this value for a given message, call
|
@@ -244,8 +253,11 @@ module Google
|
|
244
253
|
# Indicates whether to retain acknowledged messages. If true, then
|
245
254
|
# messages are not expunged from the subscription's backlog, even if they are
|
246
255
|
# acknowledged, until they fall out of the `message_retention_duration`
|
247
|
-
# window
|
248
|
-
# <
|
256
|
+
# window. This must be true if you would like to
|
257
|
+
# <a href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time">
|
258
|
+
# Seek to a timestamp</a>.
|
259
|
+
# <br><br>
|
260
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
249
261
|
# changed in backward-incompatible ways and is not recommended for production
|
250
262
|
# use. It is not subject to any SLA or deprecation policy.
|
251
263
|
# @!attribute [rw] message_retention_duration
|
@@ -256,14 +268,38 @@ module Google
|
|
256
268
|
# of acknowledged messages, and thus configures how far back in time a `Seek`
|
257
269
|
# can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
|
258
270
|
# minutes.<br><br>
|
259
|
-
# <b>
|
271
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
260
272
|
# changed in backward-incompatible ways and is not recommended for production
|
261
273
|
# use. It is not subject to any SLA or deprecation policy.
|
262
274
|
# @!attribute [rw] labels
|
263
275
|
# @return [Hash{String => String}]
|
264
|
-
#
|
276
|
+
# See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
|
277
|
+
# managing labels</a>.
|
278
|
+
# @!attribute [rw] expiration_policy
|
279
|
+
# @return [Google::Cloud::PubSub::V1::ExpirationPolicy]
|
280
|
+
# A policy that specifies the conditions for this subscription's expiration.
|
281
|
+
# A subscription is considered active as long as any connected subscriber is
|
282
|
+
# successfully consuming messages from the subscription or is issuing
|
283
|
+
# operations on the subscription. If `expiration_policy` is not set, a
|
284
|
+
# *default policy* with `ttl` of 31 days will be used. The minimum allowed
|
285
|
+
# value for `expiration_policy.ttl` is 1 day.
|
286
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
287
|
+
# changed in backward-incompatible ways and is not recommended for production
|
288
|
+
# use. It is not subject to any SLA or deprecation policy.
|
265
289
|
class Subscription; end
|
266
290
|
|
291
|
+
# A policy that specifies the conditions for resource expiration (i.e.,
|
292
|
+
# automatic resource deletion).
|
293
|
+
# @!attribute [rw] ttl
|
294
|
+
# @return [Google::Protobuf::Duration]
|
295
|
+
# Specifies the "time-to-live" duration for an associated resource. The
|
296
|
+
# resource expires if it is not active for a period of `ttl`. The definition
|
297
|
+
# of "activity" depends on the type of the associated resource. The minimum
|
298
|
+
# and maximum allowed values for `ttl` depend on the type of the associated
|
299
|
+
# resource, as well. If `ttl` is not set, the associated resource never
|
300
|
+
# expires.
|
301
|
+
class ExpirationPolicy; end
|
302
|
+
|
267
303
|
# Configuration for a push delivery endpoint.
|
268
304
|
# @!attribute [rw] push_endpoint
|
269
305
|
# @return [String]
|
@@ -299,7 +335,7 @@ module Google
|
|
299
335
|
# @return [String]
|
300
336
|
# This ID can be used to acknowledge the received message.
|
301
337
|
# @!attribute [rw] message
|
302
|
-
# @return [Google::
|
338
|
+
# @return [Google::Cloud::PubSub::V1::PubsubMessage]
|
303
339
|
# The message.
|
304
340
|
class ReceivedMessage; end
|
305
341
|
|
@@ -312,7 +348,7 @@ module Google
|
|
312
348
|
|
313
349
|
# Request for the UpdateSubscription method.
|
314
350
|
# @!attribute [rw] subscription
|
315
|
-
# @return [Google::
|
351
|
+
# @return [Google::Cloud::PubSub::V1::Subscription]
|
316
352
|
# The updated subscription object.
|
317
353
|
# @!attribute [rw] update_mask
|
318
354
|
# @return [Google::Protobuf::FieldMask]
|
@@ -323,8 +359,8 @@ module Google
|
|
323
359
|
# Request for the `ListSubscriptions` method.
|
324
360
|
# @!attribute [rw] project
|
325
361
|
# @return [String]
|
326
|
-
# The name of the
|
327
|
-
# Format is `projects/{project}`.
|
362
|
+
# The name of the project in which to list subscriptions.
|
363
|
+
# Format is `projects/{project-id}`.
|
328
364
|
# @!attribute [rw] page_size
|
329
365
|
# @return [Integer]
|
330
366
|
# Maximum number of subscriptions to return.
|
@@ -337,7 +373,7 @@ module Google
|
|
337
373
|
|
338
374
|
# Response for the `ListSubscriptions` method.
|
339
375
|
# @!attribute [rw] subscriptions
|
340
|
-
# @return [Array<Google::
|
376
|
+
# @return [Array<Google::Cloud::PubSub::V1::Subscription>]
|
341
377
|
# The subscriptions that match the request.
|
342
378
|
# @!attribute [rw] next_page_token
|
343
379
|
# @return [String]
|
@@ -359,7 +395,7 @@ module Google
|
|
359
395
|
# The name of the subscription.
|
360
396
|
# Format is `projects/{project}/subscriptions/{sub}`.
|
361
397
|
# @!attribute [rw] push_config
|
362
|
-
# @return [Google::
|
398
|
+
# @return [Google::Cloud::PubSub::V1::PushConfig]
|
363
399
|
# The push configuration for future deliveries.
|
364
400
|
#
|
365
401
|
# An empty `pushConfig` indicates that the Pub/Sub system should
|
@@ -378,9 +414,7 @@ module Google
|
|
378
414
|
# If this field set to true, the system will respond immediately even if
|
379
415
|
# it there are no messages available to return in the `Pull` response.
|
380
416
|
# Otherwise, the system may wait (for a bounded amount of time) until at
|
381
|
-
# least one message is available, rather than returning no messages.
|
382
|
-
# client may cancel the request if it does not wish to wait any longer for
|
383
|
-
# the response.
|
417
|
+
# least one message is available, rather than returning no messages.
|
384
418
|
# @!attribute [rw] max_messages
|
385
419
|
# @return [Integer]
|
386
420
|
# The maximum number of messages returned for this request. The Pub/Sub
|
@@ -389,11 +423,11 @@ module Google
|
|
389
423
|
|
390
424
|
# Response for the `Pull` method.
|
391
425
|
# @!attribute [rw] received_messages
|
392
|
-
# @return [Array<Google::
|
393
|
-
# Received Pub/Sub messages. The
|
394
|
-
#
|
395
|
-
# fewer than the `maxMessages` requested
|
396
|
-
# available in the backlog.
|
426
|
+
# @return [Array<Google::Cloud::PubSub::V1::ReceivedMessage>]
|
427
|
+
# Received Pub/Sub messages. The list will be empty if there are no more
|
428
|
+
# messages available in the backlog. For JSON, the response can be entirely
|
429
|
+
# empty. The Pub/Sub system may return fewer than the `maxMessages` requested
|
430
|
+
# even if there are more messages available in the backlog.
|
397
431
|
class PullResponse; end
|
398
432
|
|
399
433
|
# Request for the ModifyAckDeadline method.
|
@@ -409,8 +443,9 @@ module Google
|
|
409
443
|
# The new ack deadline with respect to the time this request was sent to
|
410
444
|
# the Pub/Sub system. For example, if the value is 10, the new
|
411
445
|
# ack deadline will expire 10 seconds after the `ModifyAckDeadline` call
|
412
|
-
# was made. Specifying zero
|
413
|
-
# another
|
446
|
+
# was made. Specifying zero might immediately make the message available for
|
447
|
+
# delivery to another subscriber client. This typically results in an
|
448
|
+
# increase in the rate of message redeliveries (that is, duplicates).
|
414
449
|
# The minimum deadline you can specify is 0 seconds.
|
415
450
|
# The maximum deadline you can specify is 600 seconds (10 minutes).
|
416
451
|
class ModifyAckDeadlineRequest; end
|
@@ -473,12 +508,12 @@ module Google
|
|
473
508
|
# Response for the `StreamingPull` method. This response is used to stream
|
474
509
|
# messages from the server to the client.
|
475
510
|
# @!attribute [rw] received_messages
|
476
|
-
# @return [Array<Google::
|
511
|
+
# @return [Array<Google::Cloud::PubSub::V1::ReceivedMessage>]
|
477
512
|
# Received Pub/Sub messages. This will not be empty.
|
478
513
|
class StreamingPullResponse; end
|
479
514
|
|
480
515
|
# Request for the `CreateSnapshot` method.<br><br>
|
481
|
-
# <b>
|
516
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be changed in
|
482
517
|
# backward-incompatible ways and is not recommended for production use.
|
483
518
|
# It is not subject to any SLA or deprecation policy.
|
484
519
|
# @!attribute [rw] name
|
@@ -486,7 +521,9 @@ module Google
|
|
486
521
|
# Optional user-provided name for this snapshot.
|
487
522
|
# If the name is not provided in the request, the server will assign a random
|
488
523
|
# name for this snapshot on the same project as the subscription.
|
489
|
-
# Note that for REST API requests, you must specify a name.
|
524
|
+
# Note that for REST API requests, you must specify a name. See the
|
525
|
+
# <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">
|
526
|
+
# resource name rules</a>.
|
490
527
|
# Format is `projects/{project}/snapshots/{snap}`.
|
491
528
|
# @!attribute [rw] subscription
|
492
529
|
# @return [String]
|
@@ -501,15 +538,16 @@ module Google
|
|
501
538
|
# Format is `projects/{project}/subscriptions/{sub}`.
|
502
539
|
# @!attribute [rw] labels
|
503
540
|
# @return [Hash{String => String}]
|
504
|
-
#
|
541
|
+
# See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
|
542
|
+
# managing labels</a>.
|
505
543
|
class CreateSnapshotRequest; end
|
506
544
|
|
507
545
|
# Request for the UpdateSnapshot method.<br><br>
|
508
|
-
# <b>
|
546
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
509
547
|
# changed in backward-incompatible ways and is not recommended for production
|
510
548
|
# use. It is not subject to any SLA or deprecation policy.
|
511
549
|
# @!attribute [rw] snapshot
|
512
|
-
# @return [Google::
|
550
|
+
# @return [Google::Cloud::PubSub::V1::Snapshot]
|
513
551
|
# The updated snapshot object.
|
514
552
|
# @!attribute [rw] update_mask
|
515
553
|
# @return [Google::Protobuf::FieldMask]
|
@@ -517,8 +555,13 @@ module Google
|
|
517
555
|
# Must be specified and non-empty.
|
518
556
|
class UpdateSnapshotRequest; end
|
519
557
|
|
520
|
-
# A snapshot resource
|
521
|
-
# <
|
558
|
+
# A snapshot resource. Snapshots are used in
|
559
|
+
# <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
|
560
|
+
# operations, which allow
|
561
|
+
# you to manage message acknowledgments in bulk. That is, you can set the
|
562
|
+
# acknowledgment state of messages in an existing subscription to the state
|
563
|
+
# captured by a snapshot.<br><br>
|
564
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
522
565
|
# changed in backward-incompatible ways and is not recommended for production
|
523
566
|
# use. It is not subject to any SLA or deprecation policy.
|
524
567
|
# @!attribute [rw] name
|
@@ -541,11 +584,12 @@ module Google
|
|
541
584
|
# snapshot that would expire in less than 1 hour after creation.
|
542
585
|
# @!attribute [rw] labels
|
543
586
|
# @return [Hash{String => String}]
|
544
|
-
#
|
587
|
+
# See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
|
588
|
+
# managing labels</a>.
|
545
589
|
class Snapshot; end
|
546
590
|
|
547
591
|
# Request for the GetSnapshot method.<br><br>
|
548
|
-
# <b>
|
592
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
549
593
|
# changed in backward-incompatible ways and is not recommended for production
|
550
594
|
# use. It is not subject to any SLA or deprecation policy.
|
551
595
|
# @!attribute [rw] snapshot
|
@@ -555,13 +599,13 @@ module Google
|
|
555
599
|
class GetSnapshotRequest; end
|
556
600
|
|
557
601
|
# Request for the `ListSnapshots` method.<br><br>
|
558
|
-
# <b>
|
602
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
559
603
|
# changed in backward-incompatible ways and is not recommended for production
|
560
604
|
# use. It is not subject to any SLA or deprecation policy.
|
561
605
|
# @!attribute [rw] project
|
562
606
|
# @return [String]
|
563
|
-
# The name of the
|
564
|
-
# Format is `projects/{project}`.
|
607
|
+
# The name of the project in which to list snapshots.
|
608
|
+
# Format is `projects/{project-id}`.
|
565
609
|
# @!attribute [rw] page_size
|
566
610
|
# @return [Integer]
|
567
611
|
# Maximum number of snapshots to return.
|
@@ -573,11 +617,11 @@ module Google
|
|
573
617
|
class ListSnapshotsRequest; end
|
574
618
|
|
575
619
|
# Response for the `ListSnapshots` method.<br><br>
|
576
|
-
# <b>
|
620
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
577
621
|
# changed in backward-incompatible ways and is not recommended for production
|
578
622
|
# use. It is not subject to any SLA or deprecation policy.
|
579
623
|
# @!attribute [rw] snapshots
|
580
|
-
# @return [Array<Google::
|
624
|
+
# @return [Array<Google::Cloud::PubSub::V1::Snapshot>]
|
581
625
|
# The resulting snapshots.
|
582
626
|
# @!attribute [rw] next_page_token
|
583
627
|
# @return [String]
|
@@ -586,7 +630,7 @@ module Google
|
|
586
630
|
class ListSnapshotsResponse; end
|
587
631
|
|
588
632
|
# Request for the `DeleteSnapshot` method.<br><br>
|
589
|
-
# <b>
|
633
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
590
634
|
# changed in backward-incompatible ways and is not recommended for production
|
591
635
|
# use. It is not subject to any SLA or deprecation policy.
|
592
636
|
# @!attribute [rw] snapshot
|
@@ -595,8 +639,8 @@ module Google
|
|
595
639
|
# Format is `projects/{project}/snapshots/{snap}`.
|
596
640
|
class DeleteSnapshotRequest; end
|
597
641
|
|
598
|
-
# Request for the `Seek` method
|
599
|
-
# <b>
|
642
|
+
# Request for the `Seek` method. <br><br>
|
643
|
+
# <b>BETA:</b> This feature is part of a beta release. This API might be
|
600
644
|
# changed in backward-incompatible ways and is not recommended for production
|
601
645
|
# use. It is not subject to any SLA or deprecation policy.
|
602
646
|
# @!attribute [rw] subscription
|
@@ -622,7 +666,9 @@ module Google
|
|
622
666
|
# Format is `projects/{project}/snapshots/{snap}`.
|
623
667
|
class SeekRequest; end
|
624
668
|
|
669
|
+
# Response for the `Seek` method (this response is empty).
|
625
670
|
class SeekResponse; end
|
626
671
|
end
|
627
672
|
end
|
673
|
+
end
|
628
674
|
end
|