google-cloud-pubsub-v1 0.8.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a114f62589c6cf484ea1dee29a1af19ea7bc183f4e16e6c977fb07c7af38784a
4
- data.tar.gz: c6d0cad28ef3625463c8437fea30b0df922f452f163d9f3223c89e1d8440f6d2
3
+ metadata.gz: 443cecafdba18bff1520ec3c62b4348814d02de4b999da3aa68a55b9a08ef44a
4
+ data.tar.gz: d553ef3a8145fd6e15e091f6c6cf400de82f759561db6a7d5ab34f7da62a5ae6
5
5
  SHA512:
6
- metadata.gz: d9fffff210a3a73085b44cd3d37c5613d9b1cccf17d31f9d9064da0ad2cc726b15e7033b8f485564e43381cd17c773fd877d7d53b3f4fe2f6943ea205a4fa06a
7
- data.tar.gz: 43768b047a057742ff99859704855b878a63bf7f93e10d0e241b7ceb2ee133e5809c01737e4c2b155cf3317d4dd87b9e57869cee2a8110c5e2186d4ce137b763
6
+ metadata.gz: b5773a6ae2213a2bcafe136fc61a8f20cf7ec89a6bbfa3603e78d3b8031f3a0d938beff1aee7f821b28cff6dd23295125efd0c70663b96dbf56e5602fa369cd9
7
+ data.tar.gz: b91938f324c8dfd1b475446edc69d7281d51a867c135c75884229dc9f138f5783f6aaee5f2b2eeaeba0c927c9273d46c37b695b283c5a2a859ba9e22c9a3f31a
data/README.md CHANGED
@@ -69,16 +69,21 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
- This library is supported on Ruby 2.5+.
79
+ This library is supported on Ruby 2.6+.
75
80
 
76
81
  Google provides official support for Ruby versions that are actively supported
77
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
- about the Ruby support schedule.
83
+ in security maintenance, and not end of life. Older versions of Ruby _may_
84
+ still work, but are unsupported and not recommended. See
85
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
86
+ support schedule.
82
87
 
83
88
  ## Which client should I use?
84
89
 
@@ -27,7 +27,8 @@ module Google
27
27
  ##
28
28
  # Client for the IAMPolicy service.
29
29
  #
30
- # ## API Overview
30
+ # API Overview
31
+ #
31
32
  #
32
33
  # Manages Identity and Access Management (IAM) policies.
33
34
  #
@@ -170,6 +171,8 @@ module Google
170
171
  # Sets the access control policy on the specified resource. Replaces any
171
172
  # existing policy.
172
173
  #
174
+ # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
175
+ #
173
176
  # @overload set_iam_policy(request, options = nil)
174
177
  # Pass arguments to `set_iam_policy` via a request object, either of type
175
178
  # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
@@ -180,7 +183,7 @@ module Google
180
183
  # @param options [::Gapic::CallOptions, ::Hash]
181
184
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
182
185
  #
183
- # @overload set_iam_policy(resource: nil, policy: nil)
186
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
184
187
  # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
185
188
  # least one keyword argument is required. To specify no parameters, or to keep all
186
189
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -193,6 +196,12 @@ module Google
193
196
  # the policy is limited to a few 10s of KB. An empty policy is a
194
197
  # valid policy but certain Cloud Platform services (such as Projects)
195
198
  # might reject them.
199
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
200
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
201
+ # the fields in the mask will be modified. If no mask is provided, the
202
+ # following default mask is used:
203
+ #
204
+ # `paths: "bindings, etag"`
196
205
  #
197
206
  # @yield [response, operation] Access the result along with the RPC operation
198
207
  # @yieldparam response [::Google::Iam::V1::Policy]
@@ -283,7 +292,7 @@ module Google
283
292
  # See the operation documentation for the appropriate value for this field.
284
293
  # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
285
294
  # OPTIONAL: A `GetPolicyOptions` object for specifying options to
286
- # `GetIamPolicy`. This field is only used by Cloud IAM.
295
+ # `GetIamPolicy`.
287
296
  #
288
297
  # @yield [response, operation] Access the result along with the RPC operation
289
298
  # @yieldparam response [::Google::Iam::V1::Policy]
@@ -352,7 +361,7 @@ module Google
352
361
  ##
353
362
  # Returns permissions that a caller has on the specified resource.
354
363
  # If the resource does not exist, this will return an empty set of
355
- # permissions, not a NOT_FOUND error.
364
+ # permissions, not a `NOT_FOUND` error.
356
365
  #
357
366
  # Note: This operation is designed to be used for building permission-aware
358
367
  # UIs and command-line tools, not for authorization checking. This operation
@@ -30,7 +30,8 @@ module Google
30
30
  module PubSub
31
31
  module V1
32
32
  ##
33
- # ## API Overview
33
+ # API Overview
34
+ #
34
35
  #
35
36
  # Manages Identity and Access Management (IAM) policies.
36
37
  #
@@ -249,7 +249,7 @@ module Google
249
249
  # @param options [::Gapic::CallOptions, ::Hash]
250
250
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
251
251
  #
252
- # @overload create_subscription(name: nil, topic: nil, push_config: nil, ack_deadline_seconds: nil, retain_acked_messages: nil, message_retention_duration: nil, labels: nil, enable_message_ordering: nil, expiration_policy: nil, filter: nil, dead_letter_policy: nil, retry_policy: nil, detached: nil, enable_exactly_once_delivery: nil)
252
+ # @overload create_subscription(name: nil, topic: nil, push_config: nil, bigquery_config: nil, ack_deadline_seconds: nil, retain_acked_messages: nil, message_retention_duration: nil, labels: nil, enable_message_ordering: nil, expiration_policy: nil, filter: nil, dead_letter_policy: nil, retry_policy: nil, detached: nil, enable_exactly_once_delivery: nil)
253
253
  # Pass arguments to `create_subscription` via keyword arguments. Note that at
254
254
  # least one keyword argument is required. To specify no parameters, or to keep all
255
255
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -267,8 +267,14 @@ module Google
267
267
  # field will be `_deleted-topic_` if the topic has been deleted.
268
268
  # @param push_config [::Google::Cloud::PubSub::V1::PushConfig, ::Hash]
269
269
  # If push delivery is used with this subscription, this field is
270
- # used to configure it. An empty `pushConfig` signifies that the subscriber
271
- # will pull and ack messages using API methods.
270
+ # used to configure it. Either `pushConfig` or `bigQueryConfig` can be set,
271
+ # but not both. If both are empty, then the subscriber will pull and ack
272
+ # messages using API methods.
273
+ # @param bigquery_config [::Google::Cloud::PubSub::V1::BigQueryConfig, ::Hash]
274
+ # If delivery to BigQuery is used with this subscription, this field is
275
+ # used to configure it. Either `pushConfig` or `bigQueryConfig` can be set,
276
+ # but not both. If both are empty, then the subscriber will pull and ack
277
+ # messages using API methods.
272
278
  # @param ack_deadline_seconds [::Integer]
273
279
  # The approximate amount of time (on a best-effort basis) Pub/Sub waits for
274
280
  # the subscriber to acknowledge receipt before resending the message. In the
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module PubSub
23
23
  module V1
24
- VERSION = "0.8.0"
24
+ VERSION = "0.11.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/pubsub/v1/pubsub.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
@@ -10,7 +12,6 @@ require 'google/protobuf/empty_pb'
10
12
  require 'google/protobuf/field_mask_pb'
11
13
  require 'google/protobuf/timestamp_pb'
12
14
  require 'google/pubsub/v1/schema_pb'
13
- require 'google/protobuf'
14
15
 
15
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
17
  add_file("google/pubsub/v1/pubsub.proto", :syntax => :proto3) do
@@ -90,6 +91,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
90
91
  optional :name, :string, 1
91
92
  optional :topic, :string, 2
92
93
  optional :push_config, :message, 4, "google.pubsub.v1.PushConfig"
94
+ optional :bigquery_config, :message, 18, "google.pubsub.v1.BigQueryConfig"
93
95
  optional :ack_deadline_seconds, :int32, 5
94
96
  optional :retain_acked_messages, :bool, 7
95
97
  optional :message_retention_duration, :message, 8, "google.protobuf.Duration"
@@ -102,6 +104,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
102
104
  optional :detached, :bool, 15
103
105
  optional :enable_exactly_once_delivery, :bool, 16
104
106
  optional :topic_message_retention_duration, :message, 17, "google.protobuf.Duration"
107
+ optional :state, :enum, 19, "google.pubsub.v1.Subscription.State"
108
+ end
109
+ add_enum "google.pubsub.v1.Subscription.State" do
110
+ value :STATE_UNSPECIFIED, 0
111
+ value :ACTIVE, 1
112
+ value :RESOURCE_ERROR, 2
105
113
  end
106
114
  add_message "google.pubsub.v1.RetryPolicy" do
107
115
  optional :minimum_backoff, :message, 1, "google.protobuf.Duration"
@@ -125,6 +133,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
125
133
  optional :service_account_email, :string, 1
126
134
  optional :audience, :string, 2
127
135
  end
136
+ add_message "google.pubsub.v1.BigQueryConfig" do
137
+ optional :table, :string, 1
138
+ optional :use_topic_schema, :bool, 2
139
+ optional :write_metadata, :bool, 3
140
+ optional :drop_unknown_fields, :bool, 4
141
+ optional :state, :enum, 5, "google.pubsub.v1.BigQueryConfig.State"
142
+ end
143
+ add_enum "google.pubsub.v1.BigQueryConfig.State" do
144
+ value :STATE_UNSPECIFIED, 0
145
+ value :ACTIVE, 1
146
+ value :PERMISSION_DENIED, 2
147
+ value :NOT_FOUND, 3
148
+ value :SCHEMA_MISMATCH, 4
149
+ end
128
150
  add_message "google.pubsub.v1.ReceivedMessage" do
129
151
  optional :ack_id, :string, 1
130
152
  optional :message, :message, 2, "google.pubsub.v1.PubsubMessage"
@@ -263,11 +285,14 @@ module Google
263
285
  DetachSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DetachSubscriptionRequest").msgclass
264
286
  DetachSubscriptionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DetachSubscriptionResponse").msgclass
265
287
  Subscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Subscription").msgclass
288
+ Subscription::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.Subscription.State").enummodule
266
289
  RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.RetryPolicy").msgclass
267
290
  DeadLetterPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.DeadLetterPolicy").msgclass
268
291
  ExpirationPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ExpirationPolicy").msgclass
269
292
  PushConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig").msgclass
270
293
  PushConfig::OidcToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.PushConfig.OidcToken").msgclass
294
+ BigQueryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.BigQueryConfig").msgclass
295
+ BigQueryConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.BigQueryConfig.State").enummodule
271
296
  ReceivedMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.ReceivedMessage").msgclass
272
297
  GetSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.GetSubscriptionRequest").msgclass
273
298
  UpdateSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v1.UpdateSubscriptionRequest").msgclass
@@ -1,12 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/pubsub/v1/schema.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
7
9
  require 'google/api/resource_pb'
8
10
  require 'google/protobuf/empty_pb'
9
- require 'google/protobuf'
10
11
 
11
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
13
  add_file("google/pubsub/v1/schema.proto", :syntax => :proto3) do
@@ -31,6 +31,13 @@ module Google
31
31
  # the policy is limited to a few 10s of KB. An empty policy is a
32
32
  # valid policy but certain Cloud Platform services (such as Projects)
33
33
  # might reject them.
34
+ # @!attribute [rw] update_mask
35
+ # @return [::Google::Protobuf::FieldMask]
36
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
37
+ # the fields in the mask will be modified. If no mask is provided, the
38
+ # following default mask is used:
39
+ #
40
+ # `paths: "bindings, etag"`
34
41
  class SetIamPolicyRequest
35
42
  include ::Google::Protobuf::MessageExts
36
43
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -44,7 +51,7 @@ module Google
44
51
  # @!attribute [rw] options
45
52
  # @return [::Google::Iam::V1::GetPolicyOptions]
46
53
  # OPTIONAL: A `GetPolicyOptions` object for specifying options to
47
- # `GetIamPolicy`. This field is only used by Cloud IAM.
54
+ # `GetIamPolicy`.
48
55
  class GetIamPolicyRequest
49
56
  include ::Google::Protobuf::MessageExts
50
57
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -23,14 +23,24 @@ module Google
23
23
  # Encapsulates settings provided to GetIamPolicy.
24
24
  # @!attribute [rw] requested_policy_version
25
25
  # @return [::Integer]
26
- # Optional. The policy format version to be returned.
26
+ # Optional. The maximum policy version that will be used to format the
27
+ # policy.
27
28
  #
28
29
  # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
29
30
  # rejected.
30
31
  #
31
- # Requests for policies with any conditional bindings must specify version 3.
32
- # Policies without any conditional bindings may specify any valid value or
33
- # leave the field unset.
32
+ # Requests for policies with any conditional role bindings must specify
33
+ # version 3. Policies with no conditional role bindings may specify any valid
34
+ # value or leave the field unset.
35
+ #
36
+ # The policy in the response might use the policy version that you specified,
37
+ # or it might use a lower policy version. For example, if you specify version
38
+ # 3, but the policy has no conditional role bindings, the response uses
39
+ # version 1.
40
+ #
41
+ # To learn which resources support conditions in their IAM policies, see the
42
+ # [IAM
43
+ # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
34
44
  class GetPolicyOptions
35
45
  include ::Google::Protobuf::MessageExts
36
46
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -20,19 +20,24 @@
20
20
  module Google
21
21
  module Iam
22
22
  module V1
23
- # Defines an Identity and Access Management (IAM) policy. It is used to
24
- # specify access control policies for Cloud Platform resources.
23
+ # An Identity and Access Management (IAM) policy, which specifies access
24
+ # controls for Google Cloud resources.
25
25
  #
26
26
  #
27
27
  # A `Policy` is a collection of `bindings`. A `binding` binds one or more
28
- # `members` to a single `role`. Members can be user accounts, service accounts,
29
- # Google groups, and domains (such as G Suite). A `role` is a named list of
30
- # permissions (defined by IAM or configured by users). A `binding` can
31
- # optionally specify a `condition`, which is a logic expression that further
32
- # constrains the role binding based on attributes about the request and/or
33
- # target resource.
28
+ # `members`, or principals, to a single `role`. Principals can be user
29
+ # accounts, service accounts, Google groups, and domains (such as G Suite). A
30
+ # `role` is a named list of permissions; each `role` can be an IAM predefined
31
+ # role or a user-created custom role.
34
32
  #
35
- # **JSON Example**
33
+ # For some types of Google Cloud resources, a `binding` can also specify a
34
+ # `condition`, which is a logical expression that allows access to a resource
35
+ # only if the expression evaluates to `true`. A condition can add constraints
36
+ # based on attributes of the request, the resource, or both. To learn which
37
+ # resources support conditions in their IAM policies, see the
38
+ # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
39
+ #
40
+ # **JSON example:**
36
41
  #
37
42
  # {
38
43
  # "bindings": [
@@ -47,18 +52,21 @@ module Google
47
52
  # },
48
53
  # {
49
54
  # "role": "roles/resourcemanager.organizationViewer",
50
- # "members": ["user:eve@example.com"],
55
+ # "members": [
56
+ # "user:eve@example.com"
57
+ # ],
51
58
  # "condition": {
52
59
  # "title": "expirable access",
53
60
  # "description": "Does not grant access after Sep 2020",
54
- # "expression": "request.time <
55
- # timestamp('2020-10-01T00:00:00.000Z')",
61
+ # "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')",
56
62
  # }
57
63
  # }
58
- # ]
64
+ # ],
65
+ # "etag": "BwWWja0YfJA=",
66
+ # "version": 3
59
67
  # }
60
68
  #
61
- # **YAML Example**
69
+ # **YAML example:**
62
70
  #
63
71
  # bindings:
64
72
  # - members:
@@ -74,30 +82,52 @@ module Google
74
82
  # title: expirable access
75
83
  # description: Does not grant access after Sep 2020
76
84
  # expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
85
+ # etag: BwWWja0YfJA=
86
+ # version: 3
77
87
  #
78
88
  # For a description of IAM and its features, see the
79
- # [IAM developer's guide](https://cloud.google.com/iam/docs).
89
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
80
90
  # @!attribute [rw] version
81
91
  # @return [::Integer]
82
92
  # Specifies the format of the policy.
83
93
  #
84
- # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
85
- # rejected.
94
+ # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
95
+ # are rejected.
96
+ #
97
+ # Any operation that affects conditional role bindings must specify version
98
+ # `3`. This requirement applies to the following operations:
86
99
  #
87
- # Operations affecting conditional bindings must specify version 3. This can
88
- # be either setting a conditional policy, modifying a conditional binding,
89
- # or removing a binding (conditional or unconditional) from the stored
90
- # conditional policy.
91
- # Operations on non-conditional policies may specify any valid value or
92
- # leave the field unset.
100
+ # * Getting a policy that includes a conditional role binding
101
+ # * Adding a conditional role binding to a policy
102
+ # * Changing a conditional role binding in a policy
103
+ # * Removing any role binding, with or without a condition, from a policy
104
+ # that includes conditions
93
105
  #
94
- # If no etag is provided in the call to `setIamPolicy`, version compliance
95
- # checks against the stored policy is skipped.
106
+ # **Important:** If you use IAM Conditions, you must include the `etag` field
107
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
108
+ # you to overwrite a version `3` policy with a version `1` policy, and all of
109
+ # the conditions in the version `3` policy are lost.
110
+ #
111
+ # If a policy does not include any conditions, operations on that policy may
112
+ # specify any valid version or leave the field unset.
113
+ #
114
+ # To learn which resources support conditions in their IAM policies, see the
115
+ # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
96
116
  # @!attribute [rw] bindings
97
117
  # @return [::Array<::Google::Iam::V1::Binding>]
98
- # Associates a list of `members` to a `role`. Optionally may specify a
99
- # `condition` that determines when binding is in effect.
100
- # `bindings` with no members will result in an error.
118
+ # Associates a list of `members`, or principals, with a `role`. Optionally,
119
+ # may specify a `condition` that determines how and when the `bindings` are
120
+ # applied. Each of the `bindings` must contain at least one principal.
121
+ #
122
+ # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250
123
+ # of these principals can be Google groups. Each occurrence of a principal
124
+ # counts towards these limits. For example, if the `bindings` grant 50
125
+ # different roles to `user:alice@example.com`, and not to any other
126
+ # principal, then you can add another 1,450 principals to the `bindings` in
127
+ # the `Policy`.
128
+ # @!attribute [rw] audit_configs
129
+ # @return [::Array<::Google::Iam::V1::AuditConfig>]
130
+ # Specifies cloud audit logging configuration for this policy.
101
131
  # @!attribute [rw] etag
102
132
  # @return [::String]
103
133
  # `etag` is used for optimistic concurrency control as a way to help
@@ -108,23 +138,23 @@ module Google
108
138
  # systems are expected to put that etag in the request to `setIamPolicy` to
109
139
  # ensure that their change will be applied to the same version of the policy.
110
140
  #
111
- # If no `etag` is provided in the call to `setIamPolicy`, then the existing
112
- # policy is overwritten. Due to blind-set semantics of an etag-less policy,
113
- # 'setIamPolicy' will not fail even if the incoming policy version does not
114
- # meet the requirements for modifying the stored policy.
141
+ # **Important:** If you use IAM Conditions, you must include the `etag` field
142
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
143
+ # you to overwrite a version `3` policy with a version `1` policy, and all of
144
+ # the conditions in the version `3` policy are lost.
115
145
  class Policy
116
146
  include ::Google::Protobuf::MessageExts
117
147
  extend ::Google::Protobuf::MessageExts::ClassMethods
118
148
  end
119
149
 
120
- # Associates `members` with a `role`.
150
+ # Associates `members`, or principals, with a `role`.
121
151
  # @!attribute [rw] role
122
152
  # @return [::String]
123
- # Role that is assigned to `members`.
153
+ # Role that is assigned to the list of `members`, or principals.
124
154
  # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
125
155
  # @!attribute [rw] members
126
156
  # @return [::Array<::String>]
127
- # Specifies the identities requesting access for a Cloud Platform resource.
157
+ # Specifies the principals requesting access for a Cloud Platform resource.
128
158
  # `members` can have the following values:
129
159
  #
130
160
  # * `allUsers`: A special identifier that represents anyone who is
@@ -143,20 +173,160 @@ module Google
143
173
  # * `group:{emailid}`: An email address that represents a Google group.
144
174
  # For example, `admins@example.com`.
145
175
  #
176
+ # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
177
+ # identifier) representing a user that has been recently deleted. For
178
+ # example, `alice@example.com?uid=123456789012345678901`. If the user is
179
+ # recovered, this value reverts to `user:{emailid}` and the recovered user
180
+ # retains the role in the binding.
181
+ #
182
+ # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
183
+ # unique identifier) representing a service account that has been recently
184
+ # deleted. For example,
185
+ # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
186
+ # If the service account is undeleted, this value reverts to
187
+ # `serviceAccount:{emailid}` and the undeleted service account retains the
188
+ # role in the binding.
189
+ #
190
+ # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
191
+ # identifier) representing a Google group that has been recently
192
+ # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
193
+ # the group is recovered, this value reverts to `group:{emailid}` and the
194
+ # recovered group retains the role in the binding.
195
+ #
146
196
  #
147
197
  # * `domain:{domain}`: The G Suite domain (primary) that represents all the
148
198
  # users of that domain. For example, `google.com` or `example.com`.
149
199
  # @!attribute [rw] condition
150
200
  # @return [::Google::Type::Expr]
151
201
  # The condition that is associated with this binding.
152
- # NOTE: An unsatisfied condition will not allow user access via current
153
- # binding. Different bindings, including their conditions, are examined
154
- # independently.
202
+ #
203
+ # If the condition evaluates to `true`, then this binding applies to the
204
+ # current request.
205
+ #
206
+ # If the condition evaluates to `false`, then this binding does not apply to
207
+ # the current request. However, a different role binding might grant the same
208
+ # role to one or more of the principals in this binding.
209
+ #
210
+ # To learn which resources support conditions in their IAM policies, see the
211
+ # [IAM
212
+ # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
155
213
  class Binding
156
214
  include ::Google::Protobuf::MessageExts
157
215
  extend ::Google::Protobuf::MessageExts::ClassMethods
158
216
  end
159
217
 
218
+ # Specifies the audit configuration for a service.
219
+ # The configuration determines which permission types are logged, and what
220
+ # identities, if any, are exempted from logging.
221
+ # An AuditConfig must have one or more AuditLogConfigs.
222
+ #
223
+ # If there are AuditConfigs for both `allServices` and a specific service,
224
+ # the union of the two AuditConfigs is used for that service: the log_types
225
+ # specified in each AuditConfig are enabled, and the exempted_members in each
226
+ # AuditLogConfig are exempted.
227
+ #
228
+ # Example Policy with multiple AuditConfigs:
229
+ #
230
+ # {
231
+ # "audit_configs": [
232
+ # {
233
+ # "service": "allServices",
234
+ # "audit_log_configs": [
235
+ # {
236
+ # "log_type": "DATA_READ",
237
+ # "exempted_members": [
238
+ # "user:jose@example.com"
239
+ # ]
240
+ # },
241
+ # {
242
+ # "log_type": "DATA_WRITE"
243
+ # },
244
+ # {
245
+ # "log_type": "ADMIN_READ"
246
+ # }
247
+ # ]
248
+ # },
249
+ # {
250
+ # "service": "sampleservice.googleapis.com",
251
+ # "audit_log_configs": [
252
+ # {
253
+ # "log_type": "DATA_READ"
254
+ # },
255
+ # {
256
+ # "log_type": "DATA_WRITE",
257
+ # "exempted_members": [
258
+ # "user:aliya@example.com"
259
+ # ]
260
+ # }
261
+ # ]
262
+ # }
263
+ # ]
264
+ # }
265
+ #
266
+ # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
267
+ # logging. It also exempts jose@example.com from DATA_READ logging, and
268
+ # aliya@example.com from DATA_WRITE logging.
269
+ # @!attribute [rw] service
270
+ # @return [::String]
271
+ # Specifies a service that will be enabled for audit logging.
272
+ # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
273
+ # `allServices` is a special value that covers all services.
274
+ # @!attribute [rw] audit_log_configs
275
+ # @return [::Array<::Google::Iam::V1::AuditLogConfig>]
276
+ # The configuration for logging of each type of permission.
277
+ class AuditConfig
278
+ include ::Google::Protobuf::MessageExts
279
+ extend ::Google::Protobuf::MessageExts::ClassMethods
280
+ end
281
+
282
+ # Provides the configuration for logging a type of permissions.
283
+ # Example:
284
+ #
285
+ # {
286
+ # "audit_log_configs": [
287
+ # {
288
+ # "log_type": "DATA_READ",
289
+ # "exempted_members": [
290
+ # "user:jose@example.com"
291
+ # ]
292
+ # },
293
+ # {
294
+ # "log_type": "DATA_WRITE"
295
+ # }
296
+ # ]
297
+ # }
298
+ #
299
+ # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
300
+ # jose@example.com from DATA_READ logging.
301
+ # @!attribute [rw] log_type
302
+ # @return [::Google::Iam::V1::AuditLogConfig::LogType]
303
+ # The log type that this config enables.
304
+ # @!attribute [rw] exempted_members
305
+ # @return [::Array<::String>]
306
+ # Specifies the identities that do not cause logging for this type of
307
+ # permission.
308
+ # Follows the same format of {::Google::Iam::V1::Binding#members Binding.members}.
309
+ class AuditLogConfig
310
+ include ::Google::Protobuf::MessageExts
311
+ extend ::Google::Protobuf::MessageExts::ClassMethods
312
+
313
+ # The list of valid permission types for which logging can be configured.
314
+ # Admin writes are always logged, and are not configurable.
315
+ module LogType
316
+ # Default case. Should never be this.
317
+ LOG_TYPE_UNSPECIFIED = 0
318
+
319
+ # Admin reads. Example: CloudIAM getIamPolicy
320
+ ADMIN_READ = 1
321
+
322
+ # Data writes. Example: CloudSQL Users create
323
+ DATA_WRITE = 2
324
+
325
+ # Data reads. Example: CloudSQL Users list
326
+ DATA_READ = 3
327
+ end
328
+ end
329
+
160
330
  # The difference delta between two policies.
161
331
  # @!attribute [rw] binding_deltas
162
332
  # @return [::Array<::Google::Iam::V1::BindingDelta>]
@@ -343,8 +343,15 @@ module Google
343
343
  # @!attribute [rw] push_config
344
344
  # @return [::Google::Cloud::PubSub::V1::PushConfig]
345
345
  # If push delivery is used with this subscription, this field is
346
- # used to configure it. An empty `pushConfig` signifies that the subscriber
347
- # will pull and ack messages using API methods.
346
+ # used to configure it. Either `pushConfig` or `bigQueryConfig` can be set,
347
+ # but not both. If both are empty, then the subscriber will pull and ack
348
+ # messages using API methods.
349
+ # @!attribute [rw] bigquery_config
350
+ # @return [::Google::Cloud::PubSub::V1::BigQueryConfig]
351
+ # If delivery to BigQuery is used with this subscription, this field is
352
+ # used to configure it. Either `pushConfig` or `bigQueryConfig` can be set,
353
+ # but not both. If both are empty, then the subscriber will pull and ack
354
+ # messages using API methods.
348
355
  # @!attribute [rw] ack_deadline_seconds
349
356
  # @return [::Integer]
350
357
  # The approximate amount of time (on a best-effort basis) Pub/Sub waits for
@@ -455,6 +462,10 @@ module Google
455
462
  # `topic_message_retention_duration` are always available to subscribers. See
456
463
  # the `message_retention_duration` field in `Topic`. This field is set only
457
464
  # in responses from the server; it is ignored if it is set in any requests.
465
+ # @!attribute [r] state
466
+ # @return [::Google::Cloud::PubSub::V1::Subscription::State]
467
+ # Output only. An output-only field indicating whether or not the subscription can receive
468
+ # messages.
458
469
  class Subscription
459
470
  include ::Google::Protobuf::MessageExts
460
471
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -467,6 +478,20 @@ module Google
467
478
  include ::Google::Protobuf::MessageExts
468
479
  extend ::Google::Protobuf::MessageExts::ClassMethods
469
480
  end
481
+
482
+ # Possible states for a subscription.
483
+ module State
484
+ # Default value. This value is unused.
485
+ STATE_UNSPECIFIED = 0
486
+
487
+ # The subscription can actively receive messages
488
+ ACTIVE = 1
489
+
490
+ # The subscription cannot receive messages because of an error with the
491
+ # resource to which it pushes messages. See the more detailed error state
492
+ # in the corresponding configuration.
493
+ RESOURCE_ERROR = 2
494
+ end
470
495
  end
471
496
 
472
497
  # A policy that specifies how Cloud Pub/Sub retries message delivery.
@@ -613,6 +638,56 @@ module Google
613
638
  end
614
639
  end
615
640
 
641
+ # Configuration for a BigQuery subscription.
642
+ # @!attribute [rw] table
643
+ # @return [::String]
644
+ # The name of the table to which to write data, of the form
645
+ # \\{projectId}:\\{datasetId}.\\{tableId}
646
+ # @!attribute [rw] use_topic_schema
647
+ # @return [::Boolean]
648
+ # When true, use the topic's schema as the columns to write to in BigQuery,
649
+ # if it exists.
650
+ # @!attribute [rw] write_metadata
651
+ # @return [::Boolean]
652
+ # When true, write the subscription name, message_id, publish_time,
653
+ # attributes, and ordering_key to additional columns in the table. The
654
+ # subscription name, message_id, and publish_time fields are put in their own
655
+ # columns while all other message properties (other than data) are written to
656
+ # a JSON object in the attributes column.
657
+ # @!attribute [rw] drop_unknown_fields
658
+ # @return [::Boolean]
659
+ # When true and use_topic_schema is true, any fields that are a part of the
660
+ # topic schema that are not part of the BigQuery table schema are dropped
661
+ # when writing to BigQuery. Otherwise, the schemas must be kept in sync and
662
+ # any messages with extra fields are not written and remain in the
663
+ # subscription's backlog.
664
+ # @!attribute [r] state
665
+ # @return [::Google::Cloud::PubSub::V1::BigQueryConfig::State]
666
+ # Output only. An output-only field that indicates whether or not the subscription can
667
+ # receive messages.
668
+ class BigQueryConfig
669
+ include ::Google::Protobuf::MessageExts
670
+ extend ::Google::Protobuf::MessageExts::ClassMethods
671
+
672
+ # Possible states for a BigQuery subscription.
673
+ module State
674
+ # Default value. This value is unused.
675
+ STATE_UNSPECIFIED = 0
676
+
677
+ # The subscription can actively send messages to BigQuery
678
+ ACTIVE = 1
679
+
680
+ # Cannot write to the BigQuery table because of permission denied errors.
681
+ PERMISSION_DENIED = 2
682
+
683
+ # Cannot write to the BigQuery table because it does not exist.
684
+ NOT_FOUND = 3
685
+
686
+ # Cannot write to the BigQuery table due to a schema mismatch.
687
+ SCHEMA_MISMATCH = 4
688
+ end
689
+ end
690
+
616
691
  # A message and its corresponding acknowledgment ID.
617
692
  # @!attribute [rw] ack_id
618
693
  # @return [::String]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-pubsub-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-01 00:00:00.000000000 Z
11
+ date: 2022-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: '0.10'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.7'
29
+ version: '0.10'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -48,50 +48,44 @@ dependencies:
48
48
  name: grpc-google-iam-v1
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: 0.6.10
54
- - - "<"
51
+ - - "~>"
55
52
  - !ruby/object:Gem::Version
56
- version: 2.a
53
+ version: '1.1'
57
54
  type: :runtime
58
55
  prerelease: false
59
56
  version_requirements: !ruby/object:Gem::Requirement
60
57
  requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: 0.6.10
64
- - - "<"
58
+ - - "~>"
65
59
  - !ruby/object:Gem::Version
66
- version: 2.a
60
+ version: '1.1'
67
61
  - !ruby/object:Gem::Dependency
68
62
  name: google-style
69
63
  requirement: !ruby/object:Gem::Requirement
70
64
  requirements:
71
65
  - - "~>"
72
66
  - !ruby/object:Gem::Version
73
- version: 1.25.1
67
+ version: 1.26.1
74
68
  type: :development
75
69
  prerelease: false
76
70
  version_requirements: !ruby/object:Gem::Requirement
77
71
  requirements:
78
72
  - - "~>"
79
73
  - !ruby/object:Gem::Version
80
- version: 1.25.1
74
+ version: 1.26.1
81
75
  - !ruby/object:Gem::Dependency
82
76
  name: minitest
83
77
  requirement: !ruby/object:Gem::Requirement
84
78
  requirements:
85
79
  - - "~>"
86
80
  - !ruby/object:Gem::Version
87
- version: '5.14'
81
+ version: '5.16'
88
82
  type: :development
89
83
  prerelease: false
90
84
  version_requirements: !ruby/object:Gem::Requirement
91
85
  requirements:
92
86
  - - "~>"
93
87
  - !ruby/object:Gem::Version
94
- version: '5.14'
88
+ version: '5.16'
95
89
  - !ruby/object:Gem::Dependency
96
90
  name: minitest-focus
97
91
  requirement: !ruby/object:Gem::Requirement
@@ -126,14 +120,14 @@ dependencies:
126
120
  requirements:
127
121
  - - ">="
128
122
  - !ruby/object:Gem::Version
129
- version: '12.0'
123
+ version: '13.0'
130
124
  type: :development
131
125
  prerelease: false
132
126
  version_requirements: !ruby/object:Gem::Requirement
133
127
  requirements:
134
128
  - - ">="
135
129
  - !ruby/object:Gem::Version
136
- version: '12.0'
130
+ version: '13.0'
137
131
  - !ruby/object:Gem::Dependency
138
132
  name: redcarpet
139
133
  requirement: !ruby/object:Gem::Requirement
@@ -238,14 +232,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
238
232
  requirements:
239
233
  - - ">="
240
234
  - !ruby/object:Gem::Version
241
- version: '2.5'
235
+ version: '2.6'
242
236
  required_rubygems_version: !ruby/object:Gem::Requirement
243
237
  requirements:
244
238
  - - ">="
245
239
  - !ruby/object:Gem::Version
246
240
  version: '0'
247
241
  requirements: []
248
- rubygems_version: 3.3.5
242
+ rubygems_version: 3.3.14
249
243
  signing_key:
250
244
  specification_version: 4
251
245
  summary: API Client library for the Cloud Pub/Sub V1 API