google-cloud-pubsub-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-pubsub-v1.rb +21 -0
- data/lib/google/cloud/pubsub/v1.rb +37 -0
- data/lib/google/cloud/pubsub/v1/iam_policy.rb +72 -0
- data/lib/google/cloud/pubsub/v1/iam_policy/client.rb +562 -0
- data/lib/google/cloud/pubsub/v1/iam_policy/credentials.rb +52 -0
- data/lib/google/cloud/pubsub/v1/publisher.rb +50 -0
- data/lib/google/cloud/pubsub/v1/publisher/client.rb +1093 -0
- data/lib/google/cloud/pubsub/v1/publisher/credentials.rb +52 -0
- data/lib/google/cloud/pubsub/v1/publisher/helpers.rb +23 -0
- data/lib/google/cloud/pubsub/v1/publisher/paths.rb +98 -0
- data/lib/google/cloud/pubsub/v1/subscriber.rb +51 -0
- data/lib/google/cloud/pubsub/v1/subscriber/client.rb +1861 -0
- data/lib/google/cloud/pubsub/v1/subscriber/credentials.rb +52 -0
- data/lib/google/cloud/pubsub/v1/subscriber/helpers.rb +23 -0
- data/lib/google/cloud/pubsub/v1/subscriber/paths.rb +115 -0
- data/lib/google/cloud/pubsub/v1/version.rb +28 -0
- data/lib/google/iam/v1/iam_policy_services_pb.rb +81 -0
- data/lib/google/pubsub/v1/pubsub_pb.rb +269 -0
- data/lib/google/pubsub/v1/pubsub_services_pb.rb +213 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
- data/proto_docs/google/iam/v1/options.rb +40 -0
- data/proto_docs/google/iam/v1/policy.rb +248 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/pubsub/v1/pubsub.rb +1023 -0
- data/proto_docs/google/type/expr.rb +52 -0
- metadata +238 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A generic empty message that you can re-use to avoid defining duplicated
|
23
|
+
# empty messages in your APIs. A typical example is to use it as the request
|
24
|
+
# or the response type of an API method. For instance:
|
25
|
+
#
|
26
|
+
# service Foo {
|
27
|
+
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
28
|
+
# }
|
29
|
+
#
|
30
|
+
# The JSON representation for `Empty` is empty JSON object `{}`.
|
31
|
+
class Empty
|
32
|
+
include ::Google::Protobuf::MessageExts
|
33
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# `FieldMask` represents a set of symbolic field paths, for example:
|
23
|
+
#
|
24
|
+
# paths: "f.a"
|
25
|
+
# paths: "f.b.d"
|
26
|
+
#
|
27
|
+
# Here `f` represents a field in some root message, `a` and `b`
|
28
|
+
# fields in the message found in `f`, and `d` a field found in the
|
29
|
+
# message in `f.b`.
|
30
|
+
#
|
31
|
+
# Field masks are used to specify a subset of fields that should be
|
32
|
+
# returned by a get operation or modified by an update operation.
|
33
|
+
# Field masks also have a custom JSON encoding (see below).
|
34
|
+
#
|
35
|
+
# # Field Masks in Projections
|
36
|
+
#
|
37
|
+
# When used in the context of a projection, a response message or
|
38
|
+
# sub-message is filtered by the API to only contain those fields as
|
39
|
+
# specified in the mask. For example, if the mask in the previous
|
40
|
+
# example is applied to a response message as follows:
|
41
|
+
#
|
42
|
+
# f {
|
43
|
+
# a : 22
|
44
|
+
# b {
|
45
|
+
# d : 1
|
46
|
+
# x : 2
|
47
|
+
# }
|
48
|
+
# y : 13
|
49
|
+
# }
|
50
|
+
# z: 8
|
51
|
+
#
|
52
|
+
# The result will not contain specific values for fields x,y and z
|
53
|
+
# (their value will be set to the default, and omitted in proto text
|
54
|
+
# output):
|
55
|
+
#
|
56
|
+
#
|
57
|
+
# f {
|
58
|
+
# a : 22
|
59
|
+
# b {
|
60
|
+
# d : 1
|
61
|
+
# }
|
62
|
+
# }
|
63
|
+
#
|
64
|
+
# A repeated field is not allowed except at the last position of a
|
65
|
+
# paths string.
|
66
|
+
#
|
67
|
+
# If a FieldMask object is not present in a get operation, the
|
68
|
+
# operation applies to all fields (as if a FieldMask of all fields
|
69
|
+
# had been specified).
|
70
|
+
#
|
71
|
+
# Note that a field mask does not necessarily apply to the
|
72
|
+
# top-level response message. In case of a REST get operation, the
|
73
|
+
# field mask applies directly to the response, but in case of a REST
|
74
|
+
# list operation, the mask instead applies to each individual message
|
75
|
+
# in the returned resource list. In case of a REST custom method,
|
76
|
+
# other definitions may be used. Where the mask applies will be
|
77
|
+
# clearly documented together with its declaration in the API. In
|
78
|
+
# any case, the effect on the returned resource/resources is required
|
79
|
+
# behavior for APIs.
|
80
|
+
#
|
81
|
+
# # Field Masks in Update Operations
|
82
|
+
#
|
83
|
+
# A field mask in update operations specifies which fields of the
|
84
|
+
# targeted resource are going to be updated. The API is required
|
85
|
+
# to only change the values of the fields as specified in the mask
|
86
|
+
# and leave the others untouched. If a resource is passed in to
|
87
|
+
# describe the updated values, the API ignores the values of all
|
88
|
+
# fields not covered by the mask.
|
89
|
+
#
|
90
|
+
# If a repeated field is specified for an update operation, new values will
|
91
|
+
# be appended to the existing repeated field in the target resource. Note that
|
92
|
+
# a repeated field is only allowed in the last position of a `paths` string.
|
93
|
+
#
|
94
|
+
# If a sub-message is specified in the last position of the field mask for an
|
95
|
+
# update operation, then new value will be merged into the existing sub-message
|
96
|
+
# in the target resource.
|
97
|
+
#
|
98
|
+
# For example, given the target message:
|
99
|
+
#
|
100
|
+
# f {
|
101
|
+
# b {
|
102
|
+
# d: 1
|
103
|
+
# x: 2
|
104
|
+
# }
|
105
|
+
# c: [1]
|
106
|
+
# }
|
107
|
+
#
|
108
|
+
# And an update message:
|
109
|
+
#
|
110
|
+
# f {
|
111
|
+
# b {
|
112
|
+
# d: 10
|
113
|
+
# }
|
114
|
+
# c: [2]
|
115
|
+
# }
|
116
|
+
#
|
117
|
+
# then if the field mask is:
|
118
|
+
#
|
119
|
+
# paths: ["f.b", "f.c"]
|
120
|
+
#
|
121
|
+
# then the result will be:
|
122
|
+
#
|
123
|
+
# f {
|
124
|
+
# b {
|
125
|
+
# d: 10
|
126
|
+
# x: 2
|
127
|
+
# }
|
128
|
+
# c: [1, 2]
|
129
|
+
# }
|
130
|
+
#
|
131
|
+
# An implementation may provide options to override this default behavior for
|
132
|
+
# repeated and message fields.
|
133
|
+
#
|
134
|
+
# In order to reset a field's value to the default, the field must
|
135
|
+
# be in the mask and set to the default value in the provided resource.
|
136
|
+
# Hence, in order to reset all fields of a resource, provide a default
|
137
|
+
# instance of the resource and set all fields in the mask, or do
|
138
|
+
# not provide a mask as described below.
|
139
|
+
#
|
140
|
+
# If a field mask is not present on update, the operation applies to
|
141
|
+
# all fields (as if a field mask of all fields has been specified).
|
142
|
+
# Note that in the presence of schema evolution, this may mean that
|
143
|
+
# fields the client does not know and has therefore not filled into
|
144
|
+
# the request will be reset to their default. If this is unwanted
|
145
|
+
# behavior, a specific service may require a client to always specify
|
146
|
+
# a field mask, producing an error if not.
|
147
|
+
#
|
148
|
+
# As with get operations, the location of the resource which
|
149
|
+
# describes the updated values in the request message depends on the
|
150
|
+
# operation kind. In any case, the effect of the field mask is
|
151
|
+
# required to be honored by the API.
|
152
|
+
#
|
153
|
+
# ## Considerations for HTTP REST
|
154
|
+
#
|
155
|
+
# The HTTP kind of an update operation which uses a field mask must
|
156
|
+
# be set to PATCH instead of PUT in order to satisfy HTTP semantics
|
157
|
+
# (PUT must only be used for full updates).
|
158
|
+
#
|
159
|
+
# # JSON Encoding of Field Masks
|
160
|
+
#
|
161
|
+
# In JSON, a field mask is encoded as a single string where paths are
|
162
|
+
# separated by a comma. Fields name in each path are converted
|
163
|
+
# to/from lower-camel naming conventions.
|
164
|
+
#
|
165
|
+
# As an example, consider the following message declarations:
|
166
|
+
#
|
167
|
+
# message Profile {
|
168
|
+
# User user = 1;
|
169
|
+
# Photo photo = 2;
|
170
|
+
# }
|
171
|
+
# message User {
|
172
|
+
# string display_name = 1;
|
173
|
+
# string address = 2;
|
174
|
+
# }
|
175
|
+
#
|
176
|
+
# In proto a field mask for `Profile` may look as such:
|
177
|
+
#
|
178
|
+
# mask {
|
179
|
+
# paths: "user.display_name"
|
180
|
+
# paths: "photo"
|
181
|
+
# }
|
182
|
+
#
|
183
|
+
# In JSON, the same mask is represented as below:
|
184
|
+
#
|
185
|
+
# {
|
186
|
+
# mask: "user.displayName,photo"
|
187
|
+
# }
|
188
|
+
#
|
189
|
+
# # Field Masks and Oneof Fields
|
190
|
+
#
|
191
|
+
# Field masks treat fields in oneofs just as regular fields. Consider the
|
192
|
+
# following message:
|
193
|
+
#
|
194
|
+
# message SampleMessage {
|
195
|
+
# oneof test_oneof {
|
196
|
+
# string name = 4;
|
197
|
+
# SubMessage sub_message = 9;
|
198
|
+
# }
|
199
|
+
# }
|
200
|
+
#
|
201
|
+
# The field mask can be:
|
202
|
+
#
|
203
|
+
# mask {
|
204
|
+
# paths: "name"
|
205
|
+
# }
|
206
|
+
#
|
207
|
+
# Or:
|
208
|
+
#
|
209
|
+
# mask {
|
210
|
+
# paths: "sub_message"
|
211
|
+
# }
|
212
|
+
#
|
213
|
+
# Note that oneof type names ("test_oneof" in this case) cannot be used in
|
214
|
+
# paths.
|
215
|
+
#
|
216
|
+
# ## Field Mask Verification
|
217
|
+
#
|
218
|
+
# The implementation of any API method which has a FieldMask type field in the
|
219
|
+
# request should verify the included field paths, and return an
|
220
|
+
# `INVALID_ARGUMENT` error if any path is unmappable.
|
221
|
+
# @!attribute [rw] paths
|
222
|
+
# @return [::Array<::String>]
|
223
|
+
# The set of field mask paths.
|
224
|
+
class FieldMask
|
225
|
+
include ::Google::Protobuf::MessageExts
|
226
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A Timestamp represents a point in time independent of any time zone or local
|
23
|
+
# calendar, encoded as a count of seconds and fractions of seconds at
|
24
|
+
# nanosecond resolution. The count is relative to an epoch at UTC midnight on
|
25
|
+
# January 1, 1970, in the proleptic Gregorian calendar which extends the
|
26
|
+
# Gregorian calendar backwards to year one.
|
27
|
+
#
|
28
|
+
# All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
|
29
|
+
# second table is needed for interpretation, using a [24-hour linear
|
30
|
+
# smear](https://developers.google.com/time/smear).
|
31
|
+
#
|
32
|
+
# The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
|
33
|
+
# restricting to that range, we ensure that we can convert to and from [RFC
|
34
|
+
# 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
|
35
|
+
#
|
36
|
+
# # Examples
|
37
|
+
#
|
38
|
+
# Example 1: Compute Timestamp from POSIX `time()`.
|
39
|
+
#
|
40
|
+
# Timestamp timestamp;
|
41
|
+
# timestamp.set_seconds(time(NULL));
|
42
|
+
# timestamp.set_nanos(0);
|
43
|
+
#
|
44
|
+
# Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
45
|
+
#
|
46
|
+
# struct timeval tv;
|
47
|
+
# gettimeofday(&tv, NULL);
|
48
|
+
#
|
49
|
+
# Timestamp timestamp;
|
50
|
+
# timestamp.set_seconds(tv.tv_sec);
|
51
|
+
# timestamp.set_nanos(tv.tv_usec * 1000);
|
52
|
+
#
|
53
|
+
# Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
54
|
+
#
|
55
|
+
# FILETIME ft;
|
56
|
+
# GetSystemTimeAsFileTime(&ft);
|
57
|
+
# UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
58
|
+
#
|
59
|
+
# // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
60
|
+
# // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
61
|
+
# Timestamp timestamp;
|
62
|
+
# timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
63
|
+
# timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
64
|
+
#
|
65
|
+
# Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
66
|
+
#
|
67
|
+
# long millis = System.currentTimeMillis();
|
68
|
+
#
|
69
|
+
# Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
70
|
+
# .setNanos((int) ((millis % 1000) * 1000000)).build();
|
71
|
+
#
|
72
|
+
#
|
73
|
+
# Example 5: Compute Timestamp from current time in Python.
|
74
|
+
#
|
75
|
+
# timestamp = Timestamp()
|
76
|
+
# timestamp.GetCurrentTime()
|
77
|
+
#
|
78
|
+
# # JSON Mapping
|
79
|
+
#
|
80
|
+
# In JSON format, the Timestamp type is encoded as a string in the
|
81
|
+
# [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
82
|
+
# format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z"
|
83
|
+
# where \\{year} is always expressed using four digits while \\{month}, \\{day},
|
84
|
+
# \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional
|
85
|
+
# seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
86
|
+
# are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
87
|
+
# is required. A proto3 JSON serializer should always use UTC (as indicated by
|
88
|
+
# "Z") when printing the Timestamp type and a proto3 JSON parser should be
|
89
|
+
# able to accept both UTC and other timezones (as indicated by an offset).
|
90
|
+
#
|
91
|
+
# For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
92
|
+
# 01:30 UTC on January 15, 2017.
|
93
|
+
#
|
94
|
+
# In JavaScript, one can convert a Date object to this format using the
|
95
|
+
# standard
|
96
|
+
# [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
97
|
+
# method. In Python, a standard `datetime.datetime` object can be converted
|
98
|
+
# to this format using
|
99
|
+
# [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
100
|
+
# the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
101
|
+
# the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
102
|
+
# http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
|
103
|
+
# ) to obtain a formatter capable of generating timestamps in this format.
|
104
|
+
# @!attribute [rw] seconds
|
105
|
+
# @return [::Integer]
|
106
|
+
# Represents seconds of UTC time since Unix epoch
|
107
|
+
# 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
108
|
+
# 9999-12-31T23:59:59Z inclusive.
|
109
|
+
# @!attribute [rw] nanos
|
110
|
+
# @return [::Integer]
|
111
|
+
# Non-negative fractions of a second at nanosecond resolution. Negative
|
112
|
+
# second values with fractions must still have non-negative nanos values
|
113
|
+
# that count forward in time. Must be from 0 to 999,999,999
|
114
|
+
# inclusive.
|
115
|
+
class Timestamp
|
116
|
+
include ::Google::Protobuf::MessageExts
|
117
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,1023 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module PubSub
|
23
|
+
module V1
|
24
|
+
# A policy constraining the storage of messages published to the topic.
|
25
|
+
# @!attribute [rw] allowed_persistence_regions
|
26
|
+
# @return [::Array<::String>]
|
27
|
+
# A list of IDs of GCP regions where messages that are published to the topic
|
28
|
+
# may be persisted in storage. Messages published by publishers running in
|
29
|
+
# non-allowed GCP regions (or running outside of GCP altogether) will be
|
30
|
+
# routed for storage in one of the allowed regions. An empty list means that
|
31
|
+
# no regions are allowed, and is not a valid configuration.
|
32
|
+
class MessageStoragePolicy
|
33
|
+
include ::Google::Protobuf::MessageExts
|
34
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
35
|
+
end
|
36
|
+
|
37
|
+
# A topic resource.
|
38
|
+
# @!attribute [rw] name
|
39
|
+
# @return [::String]
|
40
|
+
# Required. The name of the topic. It must have the format
|
41
|
+
# `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
|
42
|
+
# and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
|
43
|
+
# underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
|
44
|
+
# signs (`%`). It must be between 3 and 255 characters in length, and it
|
45
|
+
# must not start with `"goog"`.
|
46
|
+
# @!attribute [rw] labels
|
47
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
48
|
+
# See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
|
49
|
+
# managing labels</a>.
|
50
|
+
# @!attribute [rw] message_storage_policy
|
51
|
+
# @return [::Google::Cloud::PubSub::V1::MessageStoragePolicy]
|
52
|
+
# Policy constraining the set of Google Cloud Platform regions where messages
|
53
|
+
# published to the topic may be stored. If not present, then no constraints
|
54
|
+
# are in effect.
|
55
|
+
# @!attribute [rw] kms_key_name
|
56
|
+
# @return [::String]
|
57
|
+
# The resource name of the Cloud KMS CryptoKey to be used to protect access
|
58
|
+
# to messages published on this topic.
|
59
|
+
#
|
60
|
+
# The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
|
61
|
+
class Topic
|
62
|
+
include ::Google::Protobuf::MessageExts
|
63
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
64
|
+
|
65
|
+
# @!attribute [rw] key
|
66
|
+
# @return [::String]
|
67
|
+
# @!attribute [rw] value
|
68
|
+
# @return [::String]
|
69
|
+
class LabelsEntry
|
70
|
+
include ::Google::Protobuf::MessageExts
|
71
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# A message that is published by publishers and consumed by subscribers. The
|
76
|
+
# message must contain either a non-empty data field or at least one attribute.
|
77
|
+
# Note that client libraries represent this object differently
|
78
|
+
# depending on the language. See the corresponding
|
79
|
+
# <a href="https://cloud.google.com/pubsub/docs/reference/libraries">client
|
80
|
+
# library documentation</a> for more information. See
|
81
|
+
# <a href="https://cloud.google.com/pubsub/quotas">Quotas and limits</a>
|
82
|
+
# for more information about message limits.
|
83
|
+
# @!attribute [rw] data
|
84
|
+
# @return [::String]
|
85
|
+
# The message data field. If this field is empty, the message must contain
|
86
|
+
# at least one attribute.
|
87
|
+
# @!attribute [rw] attributes
|
88
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
89
|
+
# Attributes for this message. If this field is empty, the message must
|
90
|
+
# contain non-empty data. This can be used to filter messages on the
|
91
|
+
# subscription.
|
92
|
+
# @!attribute [rw] message_id
|
93
|
+
# @return [::String]
|
94
|
+
# ID of this message, assigned by the server when the message is published.
|
95
|
+
# Guaranteed to be unique within the topic. This value may be read by a
|
96
|
+
# subscriber that receives a `PubsubMessage` via a `Pull` call or a push
|
97
|
+
# delivery. It must not be populated by the publisher in a `Publish` call.
|
98
|
+
# @!attribute [rw] publish_time
|
99
|
+
# @return [::Google::Protobuf::Timestamp]
|
100
|
+
# The time at which the message was published, populated by the server when
|
101
|
+
# it receives the `Publish` call. It must not be populated by the
|
102
|
+
# publisher in a `Publish` call.
|
103
|
+
# @!attribute [rw] ordering_key
|
104
|
+
# @return [::String]
|
105
|
+
# If non-empty, identifies related messages for which publish order should be
|
106
|
+
# respected. If a `Subscription` has `enable_message_ordering` set to `true`,
|
107
|
+
# messages published with the same non-empty `ordering_key` value will be
|
108
|
+
# delivered to subscribers in the order in which they are received by the
|
109
|
+
# Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest`
|
110
|
+
# must specify the same `ordering_key` value.
|
111
|
+
# <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
112
|
+
# API might be changed in backward-incompatible ways and is not recommended
|
113
|
+
# for production use. It is not subject to any SLA or deprecation policy.
|
114
|
+
class PubsubMessage
|
115
|
+
include ::Google::Protobuf::MessageExts
|
116
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
117
|
+
|
118
|
+
# @!attribute [rw] key
|
119
|
+
# @return [::String]
|
120
|
+
# @!attribute [rw] value
|
121
|
+
# @return [::String]
|
122
|
+
class AttributesEntry
|
123
|
+
include ::Google::Protobuf::MessageExts
|
124
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
# Request for the GetTopic method.
|
129
|
+
# @!attribute [rw] topic
|
130
|
+
# @return [::String]
|
131
|
+
# Required. The name of the topic to get.
|
132
|
+
# Format is `projects/{project}/topics/{topic}`.
|
133
|
+
class GetTopicRequest
|
134
|
+
include ::Google::Protobuf::MessageExts
|
135
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
136
|
+
end
|
137
|
+
|
138
|
+
# Request for the UpdateTopic method.
|
139
|
+
# @!attribute [rw] topic
|
140
|
+
# @return [::Google::Cloud::PubSub::V1::Topic]
|
141
|
+
# Required. The updated topic object.
|
142
|
+
# @!attribute [rw] update_mask
|
143
|
+
# @return [::Google::Protobuf::FieldMask]
|
144
|
+
# Required. Indicates which fields in the provided topic to update. Must be
|
145
|
+
# specified and non-empty. Note that if `update_mask` contains
|
146
|
+
# "message_storage_policy" but the `message_storage_policy` is not set in
|
147
|
+
# the `topic` provided above, then the updated value is determined by the
|
148
|
+
# policy configured at the project or organization level.
|
149
|
+
class UpdateTopicRequest
|
150
|
+
include ::Google::Protobuf::MessageExts
|
151
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
152
|
+
end
|
153
|
+
|
154
|
+
# Request for the Publish method.
|
155
|
+
# @!attribute [rw] topic
|
156
|
+
# @return [::String]
|
157
|
+
# Required. The messages in the request will be published on this topic.
|
158
|
+
# Format is `projects/{project}/topics/{topic}`.
|
159
|
+
# @!attribute [rw] messages
|
160
|
+
# @return [::Array<::Google::Cloud::PubSub::V1::PubsubMessage>]
|
161
|
+
# Required. The messages to publish.
|
162
|
+
class PublishRequest
|
163
|
+
include ::Google::Protobuf::MessageExts
|
164
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
165
|
+
end
|
166
|
+
|
167
|
+
# Response for the `Publish` method.
|
168
|
+
# @!attribute [rw] message_ids
|
169
|
+
# @return [::Array<::String>]
|
170
|
+
# The server-assigned ID of each published message, in the same order as
|
171
|
+
# the messages in the request. IDs are guaranteed to be unique within
|
172
|
+
# the topic.
|
173
|
+
class PublishResponse
|
174
|
+
include ::Google::Protobuf::MessageExts
|
175
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
176
|
+
end
|
177
|
+
|
178
|
+
# Request for the `ListTopics` method.
|
179
|
+
# @!attribute [rw] project
|
180
|
+
# @return [::String]
|
181
|
+
# Required. The name of the project in which to list topics.
|
182
|
+
# Format is `projects/{project-id}`.
|
183
|
+
# @!attribute [rw] page_size
|
184
|
+
# @return [::Integer]
|
185
|
+
# Maximum number of topics to return.
|
186
|
+
# @!attribute [rw] page_token
|
187
|
+
# @return [::String]
|
188
|
+
# The value returned by the last `ListTopicsResponse`; indicates that this is
|
189
|
+
# a continuation of a prior `ListTopics` call, and that the system should
|
190
|
+
# return the next page of data.
|
191
|
+
class ListTopicsRequest
|
192
|
+
include ::Google::Protobuf::MessageExts
|
193
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
194
|
+
end
|
195
|
+
|
196
|
+
# Response for the `ListTopics` method.
|
197
|
+
# @!attribute [rw] topics
|
198
|
+
# @return [::Array<::Google::Cloud::PubSub::V1::Topic>]
|
199
|
+
# The resulting topics.
|
200
|
+
# @!attribute [rw] next_page_token
|
201
|
+
# @return [::String]
|
202
|
+
# If not empty, indicates that there may be more topics that match the
|
203
|
+
# request; this value should be passed in a new `ListTopicsRequest`.
|
204
|
+
class ListTopicsResponse
|
205
|
+
include ::Google::Protobuf::MessageExts
|
206
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
207
|
+
end
|
208
|
+
|
209
|
+
# Request for the `ListTopicSubscriptions` method.
|
210
|
+
# @!attribute [rw] topic
|
211
|
+
# @return [::String]
|
212
|
+
# Required. The name of the topic that subscriptions are attached to.
|
213
|
+
# Format is `projects/{project}/topics/{topic}`.
|
214
|
+
# @!attribute [rw] page_size
|
215
|
+
# @return [::Integer]
|
216
|
+
# Maximum number of subscription names to return.
|
217
|
+
# @!attribute [rw] page_token
|
218
|
+
# @return [::String]
|
219
|
+
# The value returned by the last `ListTopicSubscriptionsResponse`; indicates
|
220
|
+
# that this is a continuation of a prior `ListTopicSubscriptions` call, and
|
221
|
+
# that the system should return the next page of data.
|
222
|
+
class ListTopicSubscriptionsRequest
|
223
|
+
include ::Google::Protobuf::MessageExts
|
224
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
225
|
+
end
|
226
|
+
|
227
|
+
# Response for the `ListTopicSubscriptions` method.
|
228
|
+
# @!attribute [rw] subscriptions
|
229
|
+
# @return [::Array<::String>]
|
230
|
+
# The names of subscriptions attached to the topic specified in the request.
|
231
|
+
# @!attribute [rw] next_page_token
|
232
|
+
# @return [::String]
|
233
|
+
# If not empty, indicates that there may be more subscriptions that match
|
234
|
+
# the request; this value should be passed in a new
|
235
|
+
# `ListTopicSubscriptionsRequest` to get more subscriptions.
|
236
|
+
class ListTopicSubscriptionsResponse
|
237
|
+
include ::Google::Protobuf::MessageExts
|
238
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
239
|
+
end
|
240
|
+
|
241
|
+
# Request for the `ListTopicSnapshots` method.
|
242
|
+
# @!attribute [rw] topic
|
243
|
+
# @return [::String]
|
244
|
+
# Required. The name of the topic that snapshots are attached to.
|
245
|
+
# Format is `projects/{project}/topics/{topic}`.
|
246
|
+
# @!attribute [rw] page_size
|
247
|
+
# @return [::Integer]
|
248
|
+
# Maximum number of snapshot names to return.
|
249
|
+
# @!attribute [rw] page_token
|
250
|
+
# @return [::String]
|
251
|
+
# The value returned by the last `ListTopicSnapshotsResponse`; indicates
|
252
|
+
# that this is a continuation of a prior `ListTopicSnapshots` call, and
|
253
|
+
# that the system should return the next page of data.
|
254
|
+
class ListTopicSnapshotsRequest
|
255
|
+
include ::Google::Protobuf::MessageExts
|
256
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
257
|
+
end
|
258
|
+
|
259
|
+
# Response for the `ListTopicSnapshots` method.
|
260
|
+
# @!attribute [rw] snapshots
|
261
|
+
# @return [::Array<::String>]
|
262
|
+
# The names of the snapshots that match the request.
|
263
|
+
# @!attribute [rw] next_page_token
|
264
|
+
# @return [::String]
|
265
|
+
# If not empty, indicates that there may be more snapshots that match
|
266
|
+
# the request; this value should be passed in a new
|
267
|
+
# `ListTopicSnapshotsRequest` to get more snapshots.
|
268
|
+
class ListTopicSnapshotsResponse
|
269
|
+
include ::Google::Protobuf::MessageExts
|
270
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
271
|
+
end
|
272
|
+
|
273
|
+
# Request for the `DeleteTopic` method.
|
274
|
+
# @!attribute [rw] topic
|
275
|
+
# @return [::String]
|
276
|
+
# Required. Name of the topic to delete.
|
277
|
+
# Format is `projects/{project}/topics/{topic}`.
|
278
|
+
class DeleteTopicRequest
|
279
|
+
include ::Google::Protobuf::MessageExts
|
280
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
281
|
+
end
|
282
|
+
|
283
|
+
# Request for the DetachSubscription method.
|
284
|
+
# @!attribute [rw] subscription
|
285
|
+
# @return [::String]
|
286
|
+
# Required. The subscription to detach.
|
287
|
+
# Format is `projects/{project}/subscriptions/{subscription}`.
|
288
|
+
class DetachSubscriptionRequest
|
289
|
+
include ::Google::Protobuf::MessageExts
|
290
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
291
|
+
end
|
292
|
+
|
293
|
+
# Response for the DetachSubscription method.
|
294
|
+
# Reserved for future use.
|
295
|
+
class DetachSubscriptionResponse
|
296
|
+
include ::Google::Protobuf::MessageExts
|
297
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
298
|
+
end
|
299
|
+
|
300
|
+
# A subscription resource.
|
301
|
+
# @!attribute [rw] name
|
302
|
+
# @return [::String]
|
303
|
+
# Required. The name of the subscription. It must have the format
|
304
|
+
# `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
|
305
|
+
# start with a letter, and contain only letters (`[A-Za-z]`), numbers
|
306
|
+
# (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
|
307
|
+
# plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
|
308
|
+
# in length, and it must not start with `"goog"`.
|
309
|
+
# @!attribute [rw] topic
|
310
|
+
# @return [::String]
|
311
|
+
# Required. The name of the topic from which this subscription is receiving
|
312
|
+
# messages. Format is `projects/{project}/topics/{topic}`. The value of this
|
313
|
+
# field will be `_deleted-topic_` if the topic has been deleted.
|
314
|
+
# @!attribute [rw] push_config
|
315
|
+
# @return [::Google::Cloud::PubSub::V1::PushConfig]
|
316
|
+
# If push delivery is used with this subscription, this field is
|
317
|
+
# used to configure it. An empty `pushConfig` signifies that the subscriber
|
318
|
+
# will pull and ack messages using API methods.
|
319
|
+
# @!attribute [rw] ack_deadline_seconds
|
320
|
+
# @return [::Integer]
|
321
|
+
# The approximate amount of time (on a best-effort basis) Pub/Sub waits for
|
322
|
+
# the subscriber to acknowledge receipt before resending the message. In the
|
323
|
+
# interval after the message is delivered and before it is acknowledged, it
|
324
|
+
# is considered to be <i>outstanding</i>. During that time period, the
|
325
|
+
# message will not be redelivered (on a best-effort basis).
|
326
|
+
#
|
327
|
+
# For pull subscriptions, this value is used as the initial value for the ack
|
328
|
+
# deadline. To override this value for a given message, call
|
329
|
+
# `ModifyAckDeadline` with the corresponding `ack_id` if using
|
330
|
+
# non-streaming pull or send the `ack_id` in a
|
331
|
+
# `StreamingModifyAckDeadlineRequest` if using streaming pull.
|
332
|
+
# The minimum custom deadline you can specify is 10 seconds.
|
333
|
+
# The maximum custom deadline you can specify is 600 seconds (10 minutes).
|
334
|
+
# If this parameter is 0, a default value of 10 seconds is used.
|
335
|
+
#
|
336
|
+
# For push delivery, this value is also used to set the request timeout for
|
337
|
+
# the call to the push endpoint.
|
338
|
+
#
|
339
|
+
# If the subscriber never acknowledges the message, the Pub/Sub
|
340
|
+
# system will eventually redeliver the message.
|
341
|
+
# @!attribute [rw] retain_acked_messages
|
342
|
+
# @return [::Boolean]
|
343
|
+
# Indicates whether to retain acknowledged messages. If true, then
|
344
|
+
# messages are not expunged from the subscription's backlog, even if they are
|
345
|
+
# acknowledged, until they fall out of the `message_retention_duration`
|
346
|
+
# window. This must be true if you would like to
|
347
|
+
# <a
|
348
|
+
# href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time">
|
349
|
+
# Seek to a timestamp</a>.
|
350
|
+
# @!attribute [rw] message_retention_duration
|
351
|
+
# @return [::Google::Protobuf::Duration]
|
352
|
+
# How long to retain unacknowledged messages in the subscription's backlog,
|
353
|
+
# from the moment a message is published.
|
354
|
+
# If `retain_acked_messages` is true, then this also configures the retention
|
355
|
+
# of acknowledged messages, and thus configures how far back in time a `Seek`
|
356
|
+
# can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10
|
357
|
+
# minutes.
|
358
|
+
# @!attribute [rw] labels
|
359
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
360
|
+
# See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
|
361
|
+
# managing labels</a>.
|
362
|
+
# @!attribute [rw] enable_message_ordering
|
363
|
+
# @return [::Boolean]
|
364
|
+
# If true, messages published with the same `ordering_key` in `PubsubMessage`
|
365
|
+
# will be delivered to the subscribers in the order in which they
|
366
|
+
# are received by the Pub/Sub system. Otherwise, they may be delivered in
|
367
|
+
# any order.
|
368
|
+
# <b>EXPERIMENTAL:</b> This feature is part of a closed alpha release. This
|
369
|
+
# API might be changed in backward-incompatible ways and is not recommended
|
370
|
+
# for production use. It is not subject to any SLA or deprecation policy.
|
371
|
+
# @!attribute [rw] expiration_policy
|
372
|
+
# @return [::Google::Cloud::PubSub::V1::ExpirationPolicy]
|
373
|
+
# A policy that specifies the conditions for this subscription's expiration.
|
374
|
+
# A subscription is considered active as long as any connected subscriber is
|
375
|
+
# successfully consuming messages from the subscription or is issuing
|
376
|
+
# operations on the subscription. If `expiration_policy` is not set, a
|
377
|
+
# *default policy* with `ttl` of 31 days will be used. The minimum allowed
|
378
|
+
# value for `expiration_policy.ttl` is 1 day.
|
379
|
+
# @!attribute [rw] filter
|
380
|
+
# @return [::String]
|
381
|
+
# An expression written in the Pub/Sub [filter
|
382
|
+
# language](https://cloud.google.com/pubsub/docs/filtering). If non-empty,
|
383
|
+
# then only `PubsubMessage`s whose `attributes` field matches the filter are
|
384
|
+
# delivered on this subscription. If empty, then no messages are filtered
|
385
|
+
# out.
|
386
|
+
# @!attribute [rw] dead_letter_policy
|
387
|
+
# @return [::Google::Cloud::PubSub::V1::DeadLetterPolicy]
|
388
|
+
# A policy that specifies the conditions for dead lettering messages in
|
389
|
+
# this subscription. If dead_letter_policy is not set, dead lettering
|
390
|
+
# is disabled.
|
391
|
+
#
|
392
|
+
# The Cloud Pub/Sub service account associated with this subscriptions's
|
393
|
+
# parent project (i.e.,
|
394
|
+
# service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
|
395
|
+
# permission to Acknowledge() messages on this subscription.
|
396
|
+
# @!attribute [rw] retry_policy
|
397
|
+
# @return [::Google::Cloud::PubSub::V1::RetryPolicy]
|
398
|
+
# A policy that specifies how Pub/Sub retries message delivery for this
|
399
|
+
# subscription.
|
400
|
+
#
|
401
|
+
# If not set, the default retry policy is applied. This generally implies
|
402
|
+
# that messages will be retried as soon as possible for healthy subscribers.
|
403
|
+
# RetryPolicy will be triggered on NACKs or acknowledgement deadline
|
404
|
+
# exceeded events for a given message.
|
405
|
+
# @!attribute [rw] detached
|
406
|
+
# @return [::Boolean]
|
407
|
+
# Indicates whether the subscription is detached from its topic. Detached
|
408
|
+
# subscriptions don't receive messages from their topic and don't retain any
|
409
|
+
# backlog. `Pull` and `StreamingPull` requests will return
|
410
|
+
# FAILED_PRECONDITION. If the subscription is a push subscription, pushes to
|
411
|
+
# the endpoint will not be made.
|
412
|
+
class Subscription
|
413
|
+
include ::Google::Protobuf::MessageExts
|
414
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
415
|
+
|
416
|
+
# @!attribute [rw] key
|
417
|
+
# @return [::String]
|
418
|
+
# @!attribute [rw] value
|
419
|
+
# @return [::String]
|
420
|
+
class LabelsEntry
|
421
|
+
include ::Google::Protobuf::MessageExts
|
422
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
423
|
+
end
|
424
|
+
end
|
425
|
+
|
426
|
+
# A policy that specifies how Cloud Pub/Sub retries message delivery.
|
427
|
+
#
|
428
|
+
# Retry delay will be exponential based on provided minimum and maximum
|
429
|
+
# backoffs. https://en.wikipedia.org/wiki/Exponential_backoff.
|
430
|
+
#
|
431
|
+
# RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded
|
432
|
+
# events for a given message.
|
433
|
+
#
|
434
|
+
# Retry Policy is implemented on a best effort basis. At times, the delay
|
435
|
+
# between consecutive deliveries may not match the configuration. That is,
|
436
|
+
# delay can be more or less than configured backoff.
|
437
|
+
# @!attribute [rw] minimum_backoff
|
438
|
+
# @return [::Google::Protobuf::Duration]
|
439
|
+
# The minimum delay between consecutive deliveries of a given message.
|
440
|
+
# Value should be between 0 and 600 seconds. Defaults to 10 seconds.
|
441
|
+
# @!attribute [rw] maximum_backoff
|
442
|
+
# @return [::Google::Protobuf::Duration]
|
443
|
+
# The maximum delay between consecutive deliveries of a given message.
|
444
|
+
# Value should be between 0 and 600 seconds. Defaults to 600 seconds.
|
445
|
+
class RetryPolicy
|
446
|
+
include ::Google::Protobuf::MessageExts
|
447
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
448
|
+
end
|
449
|
+
|
450
|
+
# Dead lettering is done on a best effort basis. The same message might be
|
451
|
+
# dead lettered multiple times.
|
452
|
+
#
|
453
|
+
# If validation on any of the fields fails at subscription creation/updation,
|
454
|
+
# the create/update subscription request will fail.
|
455
|
+
# @!attribute [rw] dead_letter_topic
|
456
|
+
# @return [::String]
|
457
|
+
# The name of the topic to which dead letter messages should be published.
|
458
|
+
# Format is `projects/{project}/topics/{topic}`.The Cloud Pub/Sub service
|
459
|
+
# account associated with the enclosing subscription's parent project (i.e.,
|
460
|
+
# service-\\{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have
|
461
|
+
# permission to Publish() to this topic.
|
462
|
+
#
|
463
|
+
# The operation will fail if the topic does not exist.
|
464
|
+
# Users should ensure that there is a subscription attached to this topic
|
465
|
+
# since messages published to a topic with no subscriptions are lost.
|
466
|
+
# @!attribute [rw] max_delivery_attempts
|
467
|
+
# @return [::Integer]
|
468
|
+
# The maximum number of delivery attempts for any message. The value must be
|
469
|
+
# between 5 and 100.
|
470
|
+
#
|
471
|
+
# The number of delivery attempts is defined as 1 + (the sum of number of
|
472
|
+
# NACKs and number of times the acknowledgement deadline has been exceeded
|
473
|
+
# for the message).
|
474
|
+
#
|
475
|
+
# A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that
|
476
|
+
# client libraries may automatically extend ack_deadlines.
|
477
|
+
#
|
478
|
+
# This field will be honored on a best effort basis.
|
479
|
+
#
|
480
|
+
# If this parameter is 0, a default value of 5 is used.
|
481
|
+
class DeadLetterPolicy
|
482
|
+
include ::Google::Protobuf::MessageExts
|
483
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
484
|
+
end
|
485
|
+
|
486
|
+
# A policy that specifies the conditions for resource expiration (i.e.,
|
487
|
+
# automatic resource deletion).
|
488
|
+
# @!attribute [rw] ttl
|
489
|
+
# @return [::Google::Protobuf::Duration]
|
490
|
+
# Specifies the "time-to-live" duration for an associated resource. The
|
491
|
+
# resource expires if it is not active for a period of `ttl`. The definition
|
492
|
+
# of "activity" depends on the type of the associated resource. The minimum
|
493
|
+
# and maximum allowed values for `ttl` depend on the type of the associated
|
494
|
+
# resource, as well. If `ttl` is not set, the associated resource never
|
495
|
+
# expires.
|
496
|
+
class ExpirationPolicy
|
497
|
+
include ::Google::Protobuf::MessageExts
|
498
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
499
|
+
end
|
500
|
+
|
501
|
+
# Configuration for a push delivery endpoint.
|
502
|
+
# @!attribute [rw] push_endpoint
|
503
|
+
# @return [::String]
|
504
|
+
# A URL locating the endpoint to which messages should be pushed.
|
505
|
+
# For example, a Webhook endpoint might use `https://example.com/push`.
|
506
|
+
# @!attribute [rw] attributes
|
507
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
508
|
+
# Endpoint configuration attributes that can be used to control different
|
509
|
+
# aspects of the message delivery.
|
510
|
+
#
|
511
|
+
# The only currently supported attribute is `x-goog-version`, which you can
|
512
|
+
# use to change the format of the pushed message. This attribute
|
513
|
+
# indicates the version of the data expected by the endpoint. This
|
514
|
+
# controls the shape of the pushed message (i.e., its fields and metadata).
|
515
|
+
#
|
516
|
+
# If not present during the `CreateSubscription` call, it will default to
|
517
|
+
# the version of the Pub/Sub API used to make such call. If not present in a
|
518
|
+
# `ModifyPushConfig` call, its value will not be changed. `GetSubscription`
|
519
|
+
# calls will always return a valid version, even if the subscription was
|
520
|
+
# created without this attribute.
|
521
|
+
#
|
522
|
+
# The only supported values for the `x-goog-version` attribute are:
|
523
|
+
#
|
524
|
+
# * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
|
525
|
+
# * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
|
526
|
+
#
|
527
|
+
# For example:
|
528
|
+
# <pre><code>attributes { "x-goog-version": "v1" } </code></pre>
|
529
|
+
# @!attribute [rw] oidc_token
|
530
|
+
# @return [::Google::Cloud::PubSub::V1::PushConfig::OidcToken]
|
531
|
+
# If specified, Pub/Sub will generate and attach an OIDC JWT token as an
|
532
|
+
# `Authorization` header in the HTTP request for every pushed message.
|
533
|
+
class PushConfig
|
534
|
+
include ::Google::Protobuf::MessageExts
|
535
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
536
|
+
|
537
|
+
# Contains information needed for generating an
|
538
|
+
# [OpenID Connect
|
539
|
+
# token](https://developers.google.com/identity/protocols/OpenIDConnect).
|
540
|
+
# @!attribute [rw] service_account_email
|
541
|
+
# @return [::String]
|
542
|
+
# [Service account
|
543
|
+
# email](https://cloud.google.com/iam/docs/service-accounts)
|
544
|
+
# to be used for generating the OIDC token. The caller (for
|
545
|
+
# CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must
|
546
|
+
# have the iam.serviceAccounts.actAs permission for the service account.
|
547
|
+
# @!attribute [rw] audience
|
548
|
+
# @return [::String]
|
549
|
+
# Audience to be used when generating OIDC token. The audience claim
|
550
|
+
# identifies the recipients that the JWT is intended for. The audience
|
551
|
+
# value is a single case-sensitive string. Having multiple values (array)
|
552
|
+
# for the audience field is not supported. More info about the OIDC JWT
|
553
|
+
# token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3
|
554
|
+
# Note: if not specified, the Push endpoint URL will be used.
|
555
|
+
class OidcToken
|
556
|
+
include ::Google::Protobuf::MessageExts
|
557
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
558
|
+
end
|
559
|
+
|
560
|
+
# @!attribute [rw] key
|
561
|
+
# @return [::String]
|
562
|
+
# @!attribute [rw] value
|
563
|
+
# @return [::String]
|
564
|
+
class AttributesEntry
|
565
|
+
include ::Google::Protobuf::MessageExts
|
566
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
567
|
+
end
|
568
|
+
end
|
569
|
+
|
570
|
+
# A message and its corresponding acknowledgment ID.
|
571
|
+
# @!attribute [rw] ack_id
|
572
|
+
# @return [::String]
|
573
|
+
# This ID can be used to acknowledge the received message.
|
574
|
+
# @!attribute [rw] message
|
575
|
+
# @return [::Google::Cloud::PubSub::V1::PubsubMessage]
|
576
|
+
# The message.
|
577
|
+
# @!attribute [rw] delivery_attempt
|
578
|
+
# @return [::Integer]
|
579
|
+
# The approximate number of times that Cloud Pub/Sub has attempted to deliver
|
580
|
+
# the associated message to a subscriber.
|
581
|
+
#
|
582
|
+
# More precisely, this is 1 + (number of NACKs) +
|
583
|
+
# (number of ack_deadline exceeds) for this message.
|
584
|
+
#
|
585
|
+
# A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
|
586
|
+
# exceeds event is whenever a message is not acknowledged within
|
587
|
+
# ack_deadline. Note that ack_deadline is initially
|
588
|
+
# Subscription.ackDeadlineSeconds, but may get extended automatically by
|
589
|
+
# the client library.
|
590
|
+
#
|
591
|
+
# Upon the first delivery of a given message, `delivery_attempt` will have a
|
592
|
+
# value of 1. The value is calculated at best effort and is approximate.
|
593
|
+
#
|
594
|
+
# If a DeadLetterPolicy is not set on the subscription, this will be 0.
|
595
|
+
class ReceivedMessage
|
596
|
+
include ::Google::Protobuf::MessageExts
|
597
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
598
|
+
end
|
599
|
+
|
600
|
+
# Request for the GetSubscription method.
|
601
|
+
# @!attribute [rw] subscription
|
602
|
+
# @return [::String]
|
603
|
+
# Required. The name of the subscription to get.
|
604
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
605
|
+
class GetSubscriptionRequest
|
606
|
+
include ::Google::Protobuf::MessageExts
|
607
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
608
|
+
end
|
609
|
+
|
610
|
+
# Request for the UpdateSubscription method.
|
611
|
+
# @!attribute [rw] subscription
|
612
|
+
# @return [::Google::Cloud::PubSub::V1::Subscription]
|
613
|
+
# Required. The updated subscription object.
|
614
|
+
# @!attribute [rw] update_mask
|
615
|
+
# @return [::Google::Protobuf::FieldMask]
|
616
|
+
# Required. Indicates which fields in the provided subscription to update.
|
617
|
+
# Must be specified and non-empty.
|
618
|
+
class UpdateSubscriptionRequest
|
619
|
+
include ::Google::Protobuf::MessageExts
|
620
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
621
|
+
end
|
622
|
+
|
623
|
+
# Request for the `ListSubscriptions` method.
|
624
|
+
# @!attribute [rw] project
|
625
|
+
# @return [::String]
|
626
|
+
# Required. The name of the project in which to list subscriptions.
|
627
|
+
# Format is `projects/{project-id}`.
|
628
|
+
# @!attribute [rw] page_size
|
629
|
+
# @return [::Integer]
|
630
|
+
# Maximum number of subscriptions to return.
|
631
|
+
# @!attribute [rw] page_token
|
632
|
+
# @return [::String]
|
633
|
+
# The value returned by the last `ListSubscriptionsResponse`; indicates that
|
634
|
+
# this is a continuation of a prior `ListSubscriptions` call, and that the
|
635
|
+
# system should return the next page of data.
|
636
|
+
class ListSubscriptionsRequest
|
637
|
+
include ::Google::Protobuf::MessageExts
|
638
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
639
|
+
end
|
640
|
+
|
641
|
+
# Response for the `ListSubscriptions` method.
|
642
|
+
# @!attribute [rw] subscriptions
|
643
|
+
# @return [::Array<::Google::Cloud::PubSub::V1::Subscription>]
|
644
|
+
# The subscriptions that match the request.
|
645
|
+
# @!attribute [rw] next_page_token
|
646
|
+
# @return [::String]
|
647
|
+
# If not empty, indicates that there may be more subscriptions that match
|
648
|
+
# the request; this value should be passed in a new
|
649
|
+
# `ListSubscriptionsRequest` to get more subscriptions.
|
650
|
+
class ListSubscriptionsResponse
|
651
|
+
include ::Google::Protobuf::MessageExts
|
652
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
653
|
+
end
|
654
|
+
|
655
|
+
# Request for the DeleteSubscription method.
|
656
|
+
# @!attribute [rw] subscription
|
657
|
+
# @return [::String]
|
658
|
+
# Required. The subscription to delete.
|
659
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
660
|
+
class DeleteSubscriptionRequest
|
661
|
+
include ::Google::Protobuf::MessageExts
|
662
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
663
|
+
end
|
664
|
+
|
665
|
+
# Request for the ModifyPushConfig method.
|
666
|
+
# @!attribute [rw] subscription
|
667
|
+
# @return [::String]
|
668
|
+
# Required. The name of the subscription.
|
669
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
670
|
+
# @!attribute [rw] push_config
|
671
|
+
# @return [::Google::Cloud::PubSub::V1::PushConfig]
|
672
|
+
# Required. The push configuration for future deliveries.
|
673
|
+
#
|
674
|
+
# An empty `pushConfig` indicates that the Pub/Sub system should
|
675
|
+
# stop pushing messages from the given subscription and allow
|
676
|
+
# messages to be pulled and acknowledged - effectively pausing
|
677
|
+
# the subscription if `Pull` or `StreamingPull` is not called.
|
678
|
+
class ModifyPushConfigRequest
|
679
|
+
include ::Google::Protobuf::MessageExts
|
680
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
681
|
+
end
|
682
|
+
|
683
|
+
# Request for the `Pull` method.
|
684
|
+
# @!attribute [rw] subscription
|
685
|
+
# @return [::String]
|
686
|
+
# Required. The subscription from which messages should be pulled.
|
687
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
688
|
+
# @!attribute [rw] return_immediately
|
689
|
+
# @return [::Boolean]
|
690
|
+
# Optional. If this field set to true, the system will respond immediately
|
691
|
+
# even if it there are no messages available to return in the `Pull`
|
692
|
+
# response. Otherwise, the system may wait (for a bounded amount of time)
|
693
|
+
# until at least one message is available, rather than returning no messages.
|
694
|
+
# Warning: setting this field to `true` is discouraged because it adversely
|
695
|
+
# impacts the performance of `Pull` operations. We recommend that users do
|
696
|
+
# not set this field.
|
697
|
+
# @!attribute [rw] max_messages
|
698
|
+
# @return [::Integer]
|
699
|
+
# Required. The maximum number of messages to return for this request. Must
|
700
|
+
# be a positive integer. The Pub/Sub system may return fewer than the number
|
701
|
+
# specified.
|
702
|
+
class PullRequest
|
703
|
+
include ::Google::Protobuf::MessageExts
|
704
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
705
|
+
end
|
706
|
+
|
707
|
+
# Response for the `Pull` method.
|
708
|
+
# @!attribute [rw] received_messages
|
709
|
+
# @return [::Array<::Google::Cloud::PubSub::V1::ReceivedMessage>]
|
710
|
+
# Received Pub/Sub messages. The list will be empty if there are no more
|
711
|
+
# messages available in the backlog. For JSON, the response can be entirely
|
712
|
+
# empty. The Pub/Sub system may return fewer than the `maxMessages` requested
|
713
|
+
# even if there are more messages available in the backlog.
|
714
|
+
class PullResponse
|
715
|
+
include ::Google::Protobuf::MessageExts
|
716
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
717
|
+
end
|
718
|
+
|
719
|
+
# Request for the ModifyAckDeadline method.
|
720
|
+
# @!attribute [rw] subscription
|
721
|
+
# @return [::String]
|
722
|
+
# Required. The name of the subscription.
|
723
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
724
|
+
# @!attribute [rw] ack_ids
|
725
|
+
# @return [::Array<::String>]
|
726
|
+
# Required. List of acknowledgment IDs.
|
727
|
+
# @!attribute [rw] ack_deadline_seconds
|
728
|
+
# @return [::Integer]
|
729
|
+
# Required. The new ack deadline with respect to the time this request was
|
730
|
+
# sent to the Pub/Sub system. For example, if the value is 10, the new ack
|
731
|
+
# deadline will expire 10 seconds after the `ModifyAckDeadline` call was
|
732
|
+
# made. Specifying zero might immediately make the message available for
|
733
|
+
# delivery to another subscriber client. This typically results in an
|
734
|
+
# increase in the rate of message redeliveries (that is, duplicates).
|
735
|
+
# The minimum deadline you can specify is 0 seconds.
|
736
|
+
# The maximum deadline you can specify is 600 seconds (10 minutes).
|
737
|
+
class ModifyAckDeadlineRequest
|
738
|
+
include ::Google::Protobuf::MessageExts
|
739
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
740
|
+
end
|
741
|
+
|
742
|
+
# Request for the Acknowledge method.
|
743
|
+
# @!attribute [rw] subscription
|
744
|
+
# @return [::String]
|
745
|
+
# Required. The subscription whose message is being acknowledged.
|
746
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
747
|
+
# @!attribute [rw] ack_ids
|
748
|
+
# @return [::Array<::String>]
|
749
|
+
# Required. The acknowledgment ID for the messages being acknowledged that
|
750
|
+
# was returned by the Pub/Sub system in the `Pull` response. Must not be
|
751
|
+
# empty.
|
752
|
+
class AcknowledgeRequest
|
753
|
+
include ::Google::Protobuf::MessageExts
|
754
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
755
|
+
end
|
756
|
+
|
757
|
+
# Request for the `StreamingPull` streaming RPC method. This request is used to
|
758
|
+
# establish the initial stream as well as to stream acknowledgements and ack
|
759
|
+
# deadline modifications from the client to the server.
|
760
|
+
# @!attribute [rw] subscription
|
761
|
+
# @return [::String]
|
762
|
+
# Required. The subscription for which to initialize the new stream. This
|
763
|
+
# must be provided in the first request on the stream, and must not be set in
|
764
|
+
# subsequent requests from client to server.
|
765
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
766
|
+
# @!attribute [rw] ack_ids
|
767
|
+
# @return [::Array<::String>]
|
768
|
+
# List of acknowledgement IDs for acknowledging previously received messages
|
769
|
+
# (received on this stream or a different stream). If an ack ID has expired,
|
770
|
+
# the corresponding message may be redelivered later. Acknowledging a message
|
771
|
+
# more than once will not result in an error. If the acknowledgement ID is
|
772
|
+
# malformed, the stream will be aborted with status `INVALID_ARGUMENT`.
|
773
|
+
# @!attribute [rw] modify_deadline_seconds
|
774
|
+
# @return [::Array<::Integer>]
|
775
|
+
# The list of new ack deadlines for the IDs listed in
|
776
|
+
# `modify_deadline_ack_ids`. The size of this list must be the same as the
|
777
|
+
# size of `modify_deadline_ack_ids`. If it differs the stream will be aborted
|
778
|
+
# with `INVALID_ARGUMENT`. Each element in this list is applied to the
|
779
|
+
# element in the same position in `modify_deadline_ack_ids`. The new ack
|
780
|
+
# deadline is with respect to the time this request was sent to the Pub/Sub
|
781
|
+
# system. Must be >= 0. For example, if the value is 10, the new ack deadline
|
782
|
+
# will expire 10 seconds after this request is received. If the value is 0,
|
783
|
+
# the message is immediately made available for another streaming or
|
784
|
+
# non-streaming pull request. If the value is < 0 (an error), the stream will
|
785
|
+
# be aborted with status `INVALID_ARGUMENT`.
|
786
|
+
# @!attribute [rw] modify_deadline_ack_ids
|
787
|
+
# @return [::Array<::String>]
|
788
|
+
# List of acknowledgement IDs whose deadline will be modified based on the
|
789
|
+
# corresponding element in `modify_deadline_seconds`. This field can be used
|
790
|
+
# to indicate that more time is needed to process a message by the
|
791
|
+
# subscriber, or to make the message available for redelivery if the
|
792
|
+
# processing was interrupted.
|
793
|
+
# @!attribute [rw] stream_ack_deadline_seconds
|
794
|
+
# @return [::Integer]
|
795
|
+
# Required. The ack deadline to use for the stream. This must be provided in
|
796
|
+
# the first request on the stream, but it can also be updated on subsequent
|
797
|
+
# requests from client to server. The minimum deadline you can specify is 10
|
798
|
+
# seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
|
799
|
+
# @!attribute [rw] client_id
|
800
|
+
# @return [::String]
|
801
|
+
# A unique identifier that is used to distinguish client instances from each
|
802
|
+
# other. Only needs to be provided on the initial request. When a stream
|
803
|
+
# disconnects and reconnects for the same stream, the client_id should be set
|
804
|
+
# to the same value so that state associated with the old stream can be
|
805
|
+
# transferred to the new stream. The same client_id should not be used for
|
806
|
+
# different client instances.
|
807
|
+
# @!attribute [rw] max_outstanding_messages
|
808
|
+
# @return [::Integer]
|
809
|
+
# Flow control settings for the maximum number of outstanding messages. When
|
810
|
+
# there are `max_outstanding_messages` or more currently sent to the
|
811
|
+
# streaming pull client that have not yet been acked or nacked, the server
|
812
|
+
# stops sending more messages. The sending of messages resumes once the
|
813
|
+
# number of outstanding messages is less than this value. If the value is
|
814
|
+
# <= 0, there is no limit to the number of outstanding messages. This
|
815
|
+
# property can only be set on the initial StreamingPullRequest. If it is set
|
816
|
+
# on a subsequent request, the stream will be aborted with status
|
817
|
+
# `INVALID_ARGUMENT`.
|
818
|
+
# @!attribute [rw] max_outstanding_bytes
|
819
|
+
# @return [::Integer]
|
820
|
+
# Flow control settings for the maximum number of outstanding bytes. When
|
821
|
+
# there are `max_outstanding_bytes` or more worth of messages currently sent
|
822
|
+
# to the streaming pull client that have not yet been acked or nacked, the
|
823
|
+
# server will stop sending more messages. The sending of messages resumes
|
824
|
+
# once the number of outstanding bytes is less than this value. If the value
|
825
|
+
# is <= 0, there is no limit to the number of outstanding bytes. This
|
826
|
+
# property can only be set on the initial StreamingPullRequest. If it is set
|
827
|
+
# on a subsequent request, the stream will be aborted with status
|
828
|
+
# `INVALID_ARGUMENT`.
|
829
|
+
class StreamingPullRequest
|
830
|
+
include ::Google::Protobuf::MessageExts
|
831
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
832
|
+
end
|
833
|
+
|
834
|
+
# Response for the `StreamingPull` method. This response is used to stream
|
835
|
+
# messages from the server to the client.
|
836
|
+
# @!attribute [rw] received_messages
|
837
|
+
# @return [::Array<::Google::Cloud::PubSub::V1::ReceivedMessage>]
|
838
|
+
# Received Pub/Sub messages. This will not be empty.
|
839
|
+
class StreamingPullResponse
|
840
|
+
include ::Google::Protobuf::MessageExts
|
841
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
842
|
+
end
|
843
|
+
|
844
|
+
# Request for the `CreateSnapshot` method.
|
845
|
+
# @!attribute [rw] name
|
846
|
+
# @return [::String]
|
847
|
+
# Required. User-provided name for this snapshot. If the name is not provided
|
848
|
+
# in the request, the server will assign a random name for this snapshot on
|
849
|
+
# the same project as the subscription. Note that for REST API requests, you
|
850
|
+
# must specify a name. See the <a
|
851
|
+
# href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource
|
852
|
+
# name rules</a>. Format is `projects/{project}/snapshots/{snap}`.
|
853
|
+
# @!attribute [rw] subscription
|
854
|
+
# @return [::String]
|
855
|
+
# Required. The subscription whose backlog the snapshot retains.
|
856
|
+
# Specifically, the created snapshot is guaranteed to retain:
|
857
|
+
# (a) The existing backlog on the subscription. More precisely, this is
|
858
|
+
# defined as the messages in the subscription's backlog that are
|
859
|
+
# unacknowledged upon the successful completion of the
|
860
|
+
# `CreateSnapshot` request; as well as:
|
861
|
+
# (b) Any messages published to the subscription's topic following the
|
862
|
+
# successful completion of the CreateSnapshot request.
|
863
|
+
# Format is `projects/{project}/subscriptions/{sub}`.
|
864
|
+
# @!attribute [rw] labels
|
865
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
866
|
+
# See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
|
867
|
+
# managing labels</a>.
|
868
|
+
class CreateSnapshotRequest
|
869
|
+
include ::Google::Protobuf::MessageExts
|
870
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
871
|
+
|
872
|
+
# @!attribute [rw] key
|
873
|
+
# @return [::String]
|
874
|
+
# @!attribute [rw] value
|
875
|
+
# @return [::String]
|
876
|
+
class LabelsEntry
|
877
|
+
include ::Google::Protobuf::MessageExts
|
878
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
879
|
+
end
|
880
|
+
end
|
881
|
+
|
882
|
+
# Request for the UpdateSnapshot method.
|
883
|
+
# @!attribute [rw] snapshot
|
884
|
+
# @return [::Google::Cloud::PubSub::V1::Snapshot]
|
885
|
+
# Required. The updated snapshot object.
|
886
|
+
# @!attribute [rw] update_mask
|
887
|
+
# @return [::Google::Protobuf::FieldMask]
|
888
|
+
# Required. Indicates which fields in the provided snapshot to update.
|
889
|
+
# Must be specified and non-empty.
|
890
|
+
class UpdateSnapshotRequest
|
891
|
+
include ::Google::Protobuf::MessageExts
|
892
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
893
|
+
end
|
894
|
+
|
895
|
+
# A snapshot resource. Snapshots are used in
|
896
|
+
# <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
|
897
|
+
# operations, which allow
|
898
|
+
# you to manage message acknowledgments in bulk. That is, you can set the
|
899
|
+
# acknowledgment state of messages in an existing subscription to the state
|
900
|
+
# captured by a snapshot.
|
901
|
+
# @!attribute [rw] name
|
902
|
+
# @return [::String]
|
903
|
+
# The name of the snapshot.
|
904
|
+
# @!attribute [rw] topic
|
905
|
+
# @return [::String]
|
906
|
+
# The name of the topic from which this snapshot is retaining messages.
|
907
|
+
# @!attribute [rw] expire_time
|
908
|
+
# @return [::Google::Protobuf::Timestamp]
|
909
|
+
# The snapshot is guaranteed to exist up until this time.
|
910
|
+
# A newly-created snapshot expires no later than 7 days from the time of its
|
911
|
+
# creation. Its exact lifetime is determined at creation by the existing
|
912
|
+
# backlog in the source subscription. Specifically, the lifetime of the
|
913
|
+
# snapshot is `7 days - (age of oldest unacked message in the subscription)`.
|
914
|
+
# For example, consider a subscription whose oldest unacked message is 3 days
|
915
|
+
# old. If a snapshot is created from this subscription, the snapshot -- which
|
916
|
+
# will always capture this 3-day-old backlog as long as the snapshot
|
917
|
+
# exists -- will expire in 4 days. The service will refuse to create a
|
918
|
+
# snapshot that would expire in less than 1 hour after creation.
|
919
|
+
# @!attribute [rw] labels
|
920
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
921
|
+
# See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
|
922
|
+
# managing labels</a>.
|
923
|
+
class Snapshot
|
924
|
+
include ::Google::Protobuf::MessageExts
|
925
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
926
|
+
|
927
|
+
# @!attribute [rw] key
|
928
|
+
# @return [::String]
|
929
|
+
# @!attribute [rw] value
|
930
|
+
# @return [::String]
|
931
|
+
class LabelsEntry
|
932
|
+
include ::Google::Protobuf::MessageExts
|
933
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
934
|
+
end
|
935
|
+
end
|
936
|
+
|
937
|
+
# Request for the GetSnapshot method.
|
938
|
+
# @!attribute [rw] snapshot
|
939
|
+
# @return [::String]
|
940
|
+
# Required. The name of the snapshot to get.
|
941
|
+
# Format is `projects/{project}/snapshots/{snap}`.
|
942
|
+
class GetSnapshotRequest
|
943
|
+
include ::Google::Protobuf::MessageExts
|
944
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
945
|
+
end
|
946
|
+
|
947
|
+
# Request for the `ListSnapshots` method.
|
948
|
+
# @!attribute [rw] project
|
949
|
+
# @return [::String]
|
950
|
+
# Required. The name of the project in which to list snapshots.
|
951
|
+
# Format is `projects/{project-id}`.
|
952
|
+
# @!attribute [rw] page_size
|
953
|
+
# @return [::Integer]
|
954
|
+
# Maximum number of snapshots to return.
|
955
|
+
# @!attribute [rw] page_token
|
956
|
+
# @return [::String]
|
957
|
+
# The value returned by the last `ListSnapshotsResponse`; indicates that this
|
958
|
+
# is a continuation of a prior `ListSnapshots` call, and that the system
|
959
|
+
# should return the next page of data.
|
960
|
+
class ListSnapshotsRequest
|
961
|
+
include ::Google::Protobuf::MessageExts
|
962
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
963
|
+
end
|
964
|
+
|
965
|
+
# Response for the `ListSnapshots` method.
|
966
|
+
# @!attribute [rw] snapshots
|
967
|
+
# @return [::Array<::Google::Cloud::PubSub::V1::Snapshot>]
|
968
|
+
# The resulting snapshots.
|
969
|
+
# @!attribute [rw] next_page_token
|
970
|
+
# @return [::String]
|
971
|
+
# If not empty, indicates that there may be more snapshot that match the
|
972
|
+
# request; this value should be passed in a new `ListSnapshotsRequest`.
|
973
|
+
class ListSnapshotsResponse
|
974
|
+
include ::Google::Protobuf::MessageExts
|
975
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
976
|
+
end
|
977
|
+
|
978
|
+
# Request for the `DeleteSnapshot` method.
|
979
|
+
# @!attribute [rw] snapshot
|
980
|
+
# @return [::String]
|
981
|
+
# Required. The name of the snapshot to delete.
|
982
|
+
# Format is `projects/{project}/snapshots/{snap}`.
|
983
|
+
class DeleteSnapshotRequest
|
984
|
+
include ::Google::Protobuf::MessageExts
|
985
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
986
|
+
end
|
987
|
+
|
988
|
+
# Request for the `Seek` method.
|
989
|
+
# @!attribute [rw] subscription
|
990
|
+
# @return [::String]
|
991
|
+
# Required. The subscription to affect.
|
992
|
+
# @!attribute [rw] time
|
993
|
+
# @return [::Google::Protobuf::Timestamp]
|
994
|
+
# The time to seek to.
|
995
|
+
# Messages retained in the subscription that were published before this
|
996
|
+
# time are marked as acknowledged, and messages retained in the
|
997
|
+
# subscription that were published after this time are marked as
|
998
|
+
# unacknowledged. Note that this operation affects only those messages
|
999
|
+
# retained in the subscription (configured by the combination of
|
1000
|
+
# `message_retention_duration` and `retain_acked_messages`). For example,
|
1001
|
+
# if `time` corresponds to a point before the message retention
|
1002
|
+
# window (or to a point before the system's notion of the subscription
|
1003
|
+
# creation time), only retained messages will be marked as unacknowledged,
|
1004
|
+
# and already-expunged messages will not be restored.
|
1005
|
+
# @!attribute [rw] snapshot
|
1006
|
+
# @return [::String]
|
1007
|
+
# The snapshot to seek to. The snapshot's topic must be the same as that of
|
1008
|
+
# the provided subscription.
|
1009
|
+
# Format is `projects/{project}/snapshots/{snap}`.
|
1010
|
+
class SeekRequest
|
1011
|
+
include ::Google::Protobuf::MessageExts
|
1012
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
# Response for the `Seek` method (this response is empty).
|
1016
|
+
class SeekResponse
|
1017
|
+
include ::Google::Protobuf::MessageExts
|
1018
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1019
|
+
end
|
1020
|
+
end
|
1021
|
+
end
|
1022
|
+
end
|
1023
|
+
end
|