google-cloud-policy_troubleshooter-iam-v3 0.a → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/client.rb +400 -0
  6. data/lib/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/credentials.rb +49 -0
  7. data/lib/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest/client.rb +372 -0
  8. data/lib/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest/service_stub.rb +108 -0
  9. data/lib/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest.rb +55 -0
  10. data/lib/google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter.rb +58 -0
  11. data/lib/google/cloud/policy_troubleshooter/iam/v3/rest.rb +39 -0
  12. data/lib/google/cloud/policy_troubleshooter/iam/v3/version.rb +7 -2
  13. data/lib/google/cloud/policy_troubleshooter/iam/v3.rb +47 -0
  14. data/lib/google/cloud/policytroubleshooter/iam/v3/troubleshooter_pb.rb +86 -0
  15. data/lib/google/cloud/policytroubleshooter/iam/v3/troubleshooter_services_pb.rb +51 -0
  16. data/lib/google-cloud-policy_troubleshooter-iam-v3.rb +21 -0
  17. data/proto_docs/README.md +4 -0
  18. data/proto_docs/google/api/client.rb +381 -0
  19. data/proto_docs/google/api/field_behavior.rb +85 -0
  20. data/proto_docs/google/api/launch_stage.rb +71 -0
  21. data/proto_docs/google/api/resource.rb +222 -0
  22. data/proto_docs/google/cloud/policytroubleshooter/iam/v3/troubleshooter.rb +826 -0
  23. data/proto_docs/google/iam/v1/policy.rb +426 -0
  24. data/proto_docs/google/iam/v2/deny.rb +110 -0
  25. data/proto_docs/google/iam/v2/policy.rb +241 -0
  26. data/proto_docs/google/longrunning/operations.rb +164 -0
  27. data/proto_docs/google/protobuf/any.rb +144 -0
  28. data/proto_docs/google/protobuf/duration.rb +98 -0
  29. data/proto_docs/google/protobuf/empty.rb +34 -0
  30. data/proto_docs/google/protobuf/struct.rb +96 -0
  31. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  32. data/proto_docs/google/rpc/status.rb +48 -0
  33. data/proto_docs/google/type/expr.rb +75 -0
  34. metadata +229 -13
@@ -0,0 +1,372 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "google/cloud/errors"
20
+ require "google/cloud/policytroubleshooter/iam/v3/troubleshooter_pb"
21
+ require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module PolicyTroubleshooter
26
+ module Iam
27
+ module V3
28
+ module PolicyTroubleshooter
29
+ module Rest
30
+ ##
31
+ # REST client for the PolicyTroubleshooter service.
32
+ #
33
+ # IAM Policy Troubleshooter service.
34
+ #
35
+ # This service helps you troubleshoot access issues for Google Cloud resources.
36
+ #
37
+ class Client
38
+ # @private
39
+ attr_reader :policy_troubleshooter_stub
40
+
41
+ ##
42
+ # Configure the PolicyTroubleshooter Client class.
43
+ #
44
+ # See {::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::Client::Configuration}
45
+ # for a description of the configuration fields.
46
+ #
47
+ # @example
48
+ #
49
+ # # Modify the configuration for all PolicyTroubleshooter clients
50
+ # ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::Client.configure do |config|
51
+ # config.timeout = 10.0
52
+ # end
53
+ #
54
+ # @yield [config] Configure the Client client.
55
+ # @yieldparam config [Client::Configuration]
56
+ #
57
+ # @return [Client::Configuration]
58
+ #
59
+ def self.configure
60
+ @configure ||= begin
61
+ namespace = ["Google", "Cloud", "PolicyTroubleshooter", "Iam", "V3"]
62
+ parent_config = while namespace.any?
63
+ parent_name = namespace.join "::"
64
+ parent_const = const_get parent_name
65
+ break parent_const.configure if parent_const.respond_to? :configure
66
+ namespace.pop
67
+ end
68
+ default_config = Client::Configuration.new parent_config
69
+
70
+ default_config.rpcs.troubleshoot_iam_policy.timeout = 60.0
71
+ default_config.rpcs.troubleshoot_iam_policy.retry_policy = {
72
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
73
+ }
74
+
75
+ default_config
76
+ end
77
+ yield @configure if block_given?
78
+ @configure
79
+ end
80
+
81
+ ##
82
+ # Configure the PolicyTroubleshooter Client instance.
83
+ #
84
+ # The configuration is set to the derived mode, meaning that values can be changed,
85
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
86
+ # should be made on {Client.configure}.
87
+ #
88
+ # See {::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::Client::Configuration}
89
+ # for a description of the configuration fields.
90
+ #
91
+ # @yield [config] Configure the Client client.
92
+ # @yieldparam config [Client::Configuration]
93
+ #
94
+ # @return [Client::Configuration]
95
+ #
96
+ def configure
97
+ yield @config if block_given?
98
+ @config
99
+ end
100
+
101
+ ##
102
+ # Create a new PolicyTroubleshooter REST client object.
103
+ #
104
+ # @example
105
+ #
106
+ # # Create a client using the default configuration
107
+ # client = ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::Client.new
108
+ #
109
+ # # Create a client using a custom configuration
110
+ # client = ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::Client.new do |config|
111
+ # config.timeout = 10.0
112
+ # end
113
+ #
114
+ # @yield [config] Configure the PolicyTroubleshooter client.
115
+ # @yieldparam config [Client::Configuration]
116
+ #
117
+ def initialize
118
+ # Create the configuration object
119
+ @config = Configuration.new Client.configure
120
+
121
+ # Yield the configuration if needed
122
+ yield @config if block_given?
123
+
124
+ # Create credentials
125
+ credentials = @config.credentials
126
+ # Use self-signed JWT if the endpoint is unchanged from default,
127
+ # but only if the default endpoint does not have a region prefix.
128
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
129
+ !@config.endpoint.split(".").first.include?("-")
130
+ credentials ||= Credentials.default scope: @config.scope,
131
+ enable_self_signed_jwt: enable_self_signed_jwt
132
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
133
+ credentials = Credentials.new credentials, scope: @config.scope
134
+ end
135
+
136
+ @quota_project_id = @config.quota_project
137
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
138
+
139
+ @policy_troubleshooter_stub = ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
140
+ end
141
+
142
+ # Service calls
143
+
144
+ ##
145
+ # Checks whether a principal has a specific permission for a specific
146
+ # resource, and explains why the principal does or doesn't have that
147
+ # permission.
148
+ #
149
+ # @overload troubleshoot_iam_policy(request, options = nil)
150
+ # Pass arguments to `troubleshoot_iam_policy` via a request object, either of type
151
+ # {::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyRequest} or an equivalent Hash.
152
+ #
153
+ # @param request [::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyRequest, ::Hash]
154
+ # A request object representing the call parameters. Required. To specify no
155
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
156
+ # @param options [::Gapic::CallOptions, ::Hash]
157
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
158
+ #
159
+ # @overload troubleshoot_iam_policy(access_tuple: nil)
160
+ # Pass arguments to `troubleshoot_iam_policy` via keyword arguments. Note that at
161
+ # least one keyword argument is required. To specify no parameters, or to keep all
162
+ # the default parameter values, pass an empty Hash as a request object (see above).
163
+ #
164
+ # @param access_tuple [::Google::Cloud::PolicyTroubleshooter::Iam::V3::AccessTuple, ::Hash]
165
+ # The information to use for checking whether a principal has a permission
166
+ # for a resource.
167
+ # @yield [result, operation] Access the result along with the TransportOperation object
168
+ # @yieldparam result [::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyResponse]
169
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
170
+ #
171
+ # @return [::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyResponse]
172
+ #
173
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
174
+ #
175
+ # @example Basic example
176
+ # require "google/cloud/policy_troubleshooter/iam/v3"
177
+ #
178
+ # # Create a client object. The client can be reused for multiple calls.
179
+ # client = Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::Client.new
180
+ #
181
+ # # Create a request. To set request fields, pass in keyword arguments.
182
+ # request = Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyRequest.new
183
+ #
184
+ # # Call the troubleshoot_iam_policy method.
185
+ # result = client.troubleshoot_iam_policy request
186
+ #
187
+ # # The returned object is of type Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyResponse.
188
+ # p result
189
+ #
190
+ def troubleshoot_iam_policy request, options = nil
191
+ raise ::ArgumentError, "request must be provided" if request.nil?
192
+
193
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyRequest
194
+
195
+ # Converts hash and nil to an options object
196
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
197
+
198
+ # Customize the options with defaults
199
+ call_metadata = @config.rpcs.troubleshoot_iam_policy.metadata.to_h
200
+
201
+ # Set x-goog-api-client and x-goog-user-project headers
202
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
203
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
204
+ gapic_version: ::Google::Cloud::PolicyTroubleshooter::Iam::V3::VERSION,
205
+ transports_version_send: [:rest]
206
+
207
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
208
+
209
+ options.apply_defaults timeout: @config.rpcs.troubleshoot_iam_policy.timeout,
210
+ metadata: call_metadata,
211
+ retry_policy: @config.rpcs.troubleshoot_iam_policy.retry_policy
212
+
213
+ options.apply_defaults timeout: @config.timeout,
214
+ metadata: @config.metadata,
215
+ retry_policy: @config.retry_policy
216
+
217
+ @policy_troubleshooter_stub.troubleshoot_iam_policy request, options do |result, operation|
218
+ yield result, operation if block_given?
219
+ return result
220
+ end
221
+ rescue ::Gapic::Rest::Error => e
222
+ raise ::Google::Cloud::Error.from_error(e)
223
+ end
224
+
225
+ ##
226
+ # Configuration class for the PolicyTroubleshooter REST API.
227
+ #
228
+ # This class represents the configuration for PolicyTroubleshooter REST,
229
+ # providing control over timeouts, retry behavior, logging, transport
230
+ # parameters, and other low-level controls. Certain parameters can also be
231
+ # applied individually to specific RPCs. See
232
+ # {::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::Client::Configuration::Rpcs}
233
+ # for a list of RPCs that can be configured independently.
234
+ #
235
+ # Configuration can be applied globally to all clients, or to a single client
236
+ # on construction.
237
+ #
238
+ # @example
239
+ #
240
+ # # Modify the global config, setting the timeout for
241
+ # # troubleshoot_iam_policy to 20 seconds,
242
+ # # and all remaining timeouts to 10 seconds.
243
+ # ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::Client.configure do |config|
244
+ # config.timeout = 10.0
245
+ # config.rpcs.troubleshoot_iam_policy.timeout = 20.0
246
+ # end
247
+ #
248
+ # # Apply the above configuration only to a new client.
249
+ # client = ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::Client.new do |config|
250
+ # config.timeout = 10.0
251
+ # config.rpcs.troubleshoot_iam_policy.timeout = 20.0
252
+ # end
253
+ #
254
+ # @!attribute [rw] endpoint
255
+ # The hostname or hostname:port of the service endpoint.
256
+ # Defaults to `"policytroubleshooter.googleapis.com"`.
257
+ # @return [::String]
258
+ # @!attribute [rw] credentials
259
+ # Credentials to send with calls. You may provide any of the following types:
260
+ # * (`String`) The path to a service account key file in JSON format
261
+ # * (`Hash`) A service account key as a Hash
262
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
263
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
264
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
265
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
266
+ # * (`nil`) indicating no credentials
267
+ # @return [::Object]
268
+ # @!attribute [rw] scope
269
+ # The OAuth scopes
270
+ # @return [::Array<::String>]
271
+ # @!attribute [rw] lib_name
272
+ # The library name as recorded in instrumentation and logging
273
+ # @return [::String]
274
+ # @!attribute [rw] lib_version
275
+ # The library version as recorded in instrumentation and logging
276
+ # @return [::String]
277
+ # @!attribute [rw] timeout
278
+ # The call timeout in seconds.
279
+ # @return [::Numeric]
280
+ # @!attribute [rw] metadata
281
+ # Additional headers to be sent with the call.
282
+ # @return [::Hash{::Symbol=>::String}]
283
+ # @!attribute [rw] retry_policy
284
+ # The retry policy. The value is a hash with the following keys:
285
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
286
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
287
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
288
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
289
+ # trigger a retry.
290
+ # @return [::Hash]
291
+ # @!attribute [rw] quota_project
292
+ # A separate project against which to charge quota.
293
+ # @return [::String]
294
+ #
295
+ class Configuration
296
+ extend ::Gapic::Config
297
+
298
+ DEFAULT_ENDPOINT = "policytroubleshooter.googleapis.com"
299
+
300
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
301
+ config_attr :credentials, nil do |value|
302
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
303
+ allowed.any? { |klass| klass === value }
304
+ end
305
+ config_attr :scope, nil, ::String, ::Array, nil
306
+ config_attr :lib_name, nil, ::String, nil
307
+ config_attr :lib_version, nil, ::String, nil
308
+ config_attr :timeout, nil, ::Numeric, nil
309
+ config_attr :metadata, nil, ::Hash, nil
310
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
311
+ config_attr :quota_project, nil, ::String, nil
312
+
313
+ # @private
314
+ def initialize parent_config = nil
315
+ @parent_config = parent_config unless parent_config.nil?
316
+
317
+ yield self if block_given?
318
+ end
319
+
320
+ ##
321
+ # Configurations for individual RPCs
322
+ # @return [Rpcs]
323
+ #
324
+ def rpcs
325
+ @rpcs ||= begin
326
+ parent_rpcs = nil
327
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
328
+ Rpcs.new parent_rpcs
329
+ end
330
+ end
331
+
332
+ ##
333
+ # Configuration RPC class for the PolicyTroubleshooter API.
334
+ #
335
+ # Includes fields providing the configuration for each RPC in this service.
336
+ # Each configuration object is of type `Gapic::Config::Method` and includes
337
+ # the following configuration fields:
338
+ #
339
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
340
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
341
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
342
+ # include the following keys:
343
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
344
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
345
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
346
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
347
+ # trigger a retry.
348
+ #
349
+ class Rpcs
350
+ ##
351
+ # RPC-specific configuration for `troubleshoot_iam_policy`
352
+ # @return [::Gapic::Config::Method]
353
+ #
354
+ attr_reader :troubleshoot_iam_policy
355
+
356
+ # @private
357
+ def initialize parent_rpcs = nil
358
+ troubleshoot_iam_policy_config = parent_rpcs.troubleshoot_iam_policy if parent_rpcs.respond_to? :troubleshoot_iam_policy
359
+ @troubleshoot_iam_policy = ::Gapic::Config::Method.new troubleshoot_iam_policy_config
360
+
361
+ yield self if block_given?
362
+ end
363
+ end
364
+ end
365
+ end
366
+ end
367
+ end
368
+ end
369
+ end
370
+ end
371
+ end
372
+ end
@@ -0,0 +1,108 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "google/cloud/policytroubleshooter/iam/v3/troubleshooter_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module PolicyTroubleshooter
24
+ module Iam
25
+ module V3
26
+ module PolicyTroubleshooter
27
+ module Rest
28
+ ##
29
+ # REST service stub for the PolicyTroubleshooter service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
40
+ numeric_enums: true,
41
+ raise_faraday_errors: false
42
+ end
43
+
44
+ ##
45
+ # Baseline implementation for the troubleshoot_iam_policy REST call
46
+ #
47
+ # @param request_pb [::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyRequest]
48
+ # A request object representing the call parameters. Required.
49
+ # @param options [::Gapic::CallOptions]
50
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
51
+ #
52
+ # @yield [result, operation] Access the result along with the TransportOperation object
53
+ # @yieldparam result [::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyResponse]
54
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
55
+ #
56
+ # @return [::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyResponse]
57
+ # A result object deserialized from the server's reply
58
+ def troubleshoot_iam_policy request_pb, options = nil
59
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
60
+
61
+ verb, uri, query_string_params, body = ServiceStub.transcode_troubleshoot_iam_policy_request request_pb
62
+ query_string_params = if query_string_params.any?
63
+ query_string_params.to_h { |p| p.split "=", 2 }
64
+ else
65
+ {}
66
+ end
67
+
68
+ response = @client_stub.make_http_request(
69
+ verb,
70
+ uri: uri,
71
+ body: body || "",
72
+ params: query_string_params,
73
+ options: options
74
+ )
75
+ operation = ::Gapic::Rest::TransportOperation.new response
76
+ result = ::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyResponse.decode_json response.body, ignore_unknown_fields: true
77
+
78
+ yield result, operation if block_given?
79
+ result
80
+ end
81
+
82
+ ##
83
+ # @private
84
+ #
85
+ # GRPC transcoding helper method for the troubleshoot_iam_policy REST call
86
+ #
87
+ # @param request_pb [::Google::Cloud::PolicyTroubleshooter::Iam::V3::TroubleshootIamPolicyRequest]
88
+ # A request object representing the call parameters. Required.
89
+ # @return [Array(String, [String, nil], Hash{String => String})]
90
+ # Uri, Body, Query string parameters
91
+ def self.transcode_troubleshoot_iam_policy_request request_pb
92
+ transcoder = Gapic::Rest::GrpcTranscoder.new
93
+ .with_bindings(
94
+ uri_method: :post,
95
+ uri_template: "/v3/iam:troubleshoot",
96
+ body: "*",
97
+ matches: []
98
+ )
99
+ transcoder.transcode request_pb
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/policy_troubleshooter/iam/v3/version"
24
+
25
+ require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/credentials"
26
+ require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest/client"
27
+
28
+ module Google
29
+ module Cloud
30
+ module PolicyTroubleshooter
31
+ module Iam
32
+ module V3
33
+ ##
34
+ # IAM Policy Troubleshooter service.
35
+ #
36
+ # This service helps you troubleshoot access issues for Google Cloud resources.
37
+ #
38
+ # To load this service and instantiate a REST client:
39
+ #
40
+ # require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest"
41
+ # client = ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::Client.new
42
+ #
43
+ module PolicyTroubleshooter
44
+ # Client for the REST transport
45
+ module Rest
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
55
+ require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/policy_troubleshooter/iam/v3/version"
24
+
25
+ require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/credentials"
26
+ require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/client"
27
+ require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest"
28
+
29
+ module Google
30
+ module Cloud
31
+ module PolicyTroubleshooter
32
+ module Iam
33
+ module V3
34
+ ##
35
+ # IAM Policy Troubleshooter service.
36
+ #
37
+ # This service helps you troubleshoot access issues for Google Cloud resources.
38
+ #
39
+ # @example Load this service and instantiate a gRPC client
40
+ #
41
+ # require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter"
42
+ # client = ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Client.new
43
+ #
44
+ # @example Load this service and instantiate a REST client
45
+ #
46
+ # require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest"
47
+ # client = ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::Client.new
48
+ #
49
+ module PolicyTroubleshooter
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
56
+
57
+ helper_path = ::File.join __dir__, "policy_troubleshooter", "helpers.rb"
58
+ require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/helpers" if ::File.file? helper_path
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "google/cloud/policy_troubleshooter/iam/v3/policy_troubleshooter/rest"
20
+ require "google/cloud/policy_troubleshooter/iam/v3/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module PolicyTroubleshooter
25
+ module Iam
26
+ ##
27
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
28
+ #
29
+ # @example
30
+ #
31
+ # require "google/cloud/policy_troubleshooter/iam/v3/rest"
32
+ # client = ::Google::Cloud::PolicyTroubleshooter::Iam::V3::PolicyTroubleshooter::Rest::Client.new
33
+ #
34
+ module V3
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Copyright 2023 Google LLC
2
4
  #
3
5
  # Licensed under the Apache License, Version 2.0 (the "License");
4
6
  # you may not use this file except in compliance with the License.
5
7
  # You may obtain a copy of the License at
6
8
  #
7
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # https://www.apache.org/licenses/LICENSE-2.0
8
10
  #
9
11
  # Unless required by applicable law or agreed to in writing, software
10
12
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -12,12 +14,15 @@
12
14
  # See the License for the specific language governing permissions and
13
15
  # limitations under the License.
14
16
 
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
15
20
  module Google
16
21
  module Cloud
17
22
  module PolicyTroubleshooter
18
23
  module Iam
19
24
  module V3
20
- VERSION = "0.a"
25
+ VERSION = "0.2.0"
21
26
  end
22
27
  end
23
28
  end