google-cloud-cloud_security_compliance-v1 0.a → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/cloud_security_compliance/v1/bindings_override.rb +75 -0
  6. data/lib/google/cloud/cloud_security_compliance/v1/config/client.rb +1467 -0
  7. data/lib/google/cloud/cloud_security_compliance/v1/config/credentials.rb +47 -0
  8. data/lib/google/cloud/cloud_security_compliance/v1/config/paths.rb +88 -0
  9. data/lib/google/cloud/cloud_security_compliance/v1/config/rest/client.rb +1379 -0
  10. data/lib/google/cloud/cloud_security_compliance/v1/config/rest/service_stub.rb +695 -0
  11. data/lib/google/cloud/cloud_security_compliance/v1/config/rest.rb +54 -0
  12. data/lib/google/cloud/cloud_security_compliance/v1/config.rb +56 -0
  13. data/lib/google/cloud/cloud_security_compliance/v1/deployment/client.rb +1047 -0
  14. data/lib/google/cloud/cloud_security_compliance/v1/deployment/credentials.rb +47 -0
  15. data/lib/google/cloud/cloud_security_compliance/v1/deployment/operations.rb +824 -0
  16. data/lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb +88 -0
  17. data/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/client.rb +987 -0
  18. data/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/operations.rb +925 -0
  19. data/lib/google/cloud/cloud_security_compliance/v1/deployment/rest/service_stub.rb +448 -0
  20. data/lib/google/cloud/cloud_security_compliance/v1/deployment/rest.rb +55 -0
  21. data/lib/google/cloud/cloud_security_compliance/v1/deployment.rb +57 -0
  22. data/lib/google/cloud/cloud_security_compliance/v1/rest.rb +39 -0
  23. data/lib/google/cloud/cloud_security_compliance/v1/version.rb +7 -2
  24. data/lib/google/cloud/cloud_security_compliance/v1.rb +46 -0
  25. data/lib/google/cloud/cloudsecuritycompliance/v1/common_pb.rb +73 -0
  26. data/lib/google/cloud/cloudsecuritycompliance/v1/config_pb.rb +63 -0
  27. data/lib/google/cloud/cloudsecuritycompliance/v1/config_services_pb.rb +117 -0
  28. data/lib/google/cloud/cloudsecuritycompliance/v1/deployment_pb.rb +70 -0
  29. data/lib/google/cloud/cloudsecuritycompliance/v1/deployment_services_pb.rb +56 -0
  30. data/lib/google-cloud-cloud_security_compliance-v1.rb +21 -0
  31. data/proto_docs/README.md +4 -0
  32. data/proto_docs/google/api/client.rb +473 -0
  33. data/proto_docs/google/api/field_behavior.rb +85 -0
  34. data/proto_docs/google/api/launch_stage.rb +71 -0
  35. data/proto_docs/google/api/resource.rb +227 -0
  36. data/proto_docs/google/cloud/cloudsecuritycompliance/v1/common.rb +638 -0
  37. data/proto_docs/google/cloud/cloudsecuritycompliance/v1/config.rb +223 -0
  38. data/proto_docs/google/cloud/cloudsecuritycompliance/v1/deployment.rb +429 -0
  39. data/proto_docs/google/longrunning/operations.rb +191 -0
  40. data/proto_docs/google/protobuf/any.rb +145 -0
  41. data/proto_docs/google/protobuf/duration.rb +98 -0
  42. data/proto_docs/google/protobuf/empty.rb +34 -0
  43. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  44. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  45. data/proto_docs/google/rpc/status.rb +48 -0
  46. metadata +93 -9
@@ -0,0 +1,1047 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/cloudsecuritycompliance/v1/deployment_pb"
21
+ require "google/cloud/location"
22
+
23
+ module Google
24
+ module Cloud
25
+ module CloudSecurityCompliance
26
+ module V1
27
+ module Deployment
28
+ ##
29
+ # Client for the Deployment service.
30
+ #
31
+ # Deployment service allows users to manage deployments of Frameworks and
32
+ # Cloud Controls on a target resource.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "cloudsecuritycompliance.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :deployment_stub
45
+
46
+ ##
47
+ # Configure the Deployment Client class.
48
+ #
49
+ # See {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all Deployment clients
55
+ # ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "CloudSecurityCompliance", "V1"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config.rpcs.create_framework_deployment.timeout = 60.0
76
+
77
+ default_config.rpcs.delete_framework_deployment.timeout = 60.0
78
+
79
+ default_config.rpcs.get_framework_deployment.timeout = 60.0
80
+ default_config.rpcs.get_framework_deployment.retry_policy = {
81
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
82
+ }
83
+
84
+ default_config.rpcs.list_framework_deployments.timeout = 60.0
85
+ default_config.rpcs.list_framework_deployments.retry_policy = {
86
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
87
+ }
88
+
89
+ default_config.rpcs.get_cloud_control_deployment.timeout = 60.0
90
+ default_config.rpcs.get_cloud_control_deployment.retry_policy = {
91
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
92
+ }
93
+
94
+ default_config.rpcs.list_cloud_control_deployments.timeout = 60.0
95
+ default_config.rpcs.list_cloud_control_deployments.retry_policy = {
96
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
97
+ }
98
+
99
+ default_config
100
+ end
101
+ yield @configure if block_given?
102
+ @configure
103
+ end
104
+
105
+ ##
106
+ # Configure the Deployment Client instance.
107
+ #
108
+ # The configuration is set to the derived mode, meaning that values can be changed,
109
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
110
+ # should be made on {Client.configure}.
111
+ #
112
+ # See {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client::Configuration}
113
+ # for a description of the configuration fields.
114
+ #
115
+ # @yield [config] Configure the Client client.
116
+ # @yieldparam config [Client::Configuration]
117
+ #
118
+ # @return [Client::Configuration]
119
+ #
120
+ def configure
121
+ yield @config if block_given?
122
+ @config
123
+ end
124
+
125
+ ##
126
+ # The effective universe domain
127
+ #
128
+ # @return [String]
129
+ #
130
+ def universe_domain
131
+ @deployment_stub.universe_domain
132
+ end
133
+
134
+ ##
135
+ # Create a new Deployment client object.
136
+ #
137
+ # @example
138
+ #
139
+ # # Create a client using the default configuration
140
+ # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new
141
+ #
142
+ # # Create a client using a custom configuration
143
+ # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config|
144
+ # config.timeout = 10.0
145
+ # end
146
+ #
147
+ # @yield [config] Configure the Deployment client.
148
+ # @yieldparam config [Client::Configuration]
149
+ #
150
+ def initialize
151
+ # These require statements are intentionally placed here to initialize
152
+ # the gRPC module only when it's required.
153
+ # See https://github.com/googleapis/toolkit/issues/446
154
+ require "gapic/grpc"
155
+ require "google/cloud/cloudsecuritycompliance/v1/deployment_services_pb"
156
+
157
+ # Create the configuration object
158
+ @config = Configuration.new Client.configure
159
+
160
+ # Yield the configuration if needed
161
+ yield @config if block_given?
162
+
163
+ # Create credentials
164
+ credentials = @config.credentials
165
+ # Use self-signed JWT if the endpoint is unchanged from default,
166
+ # but only if the default endpoint does not have a region prefix.
167
+ enable_self_signed_jwt = @config.endpoint.nil? ||
168
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
169
+ !@config.endpoint.split(".").first.include?("-"))
170
+ credentials ||= Credentials.default scope: @config.scope,
171
+ enable_self_signed_jwt: enable_self_signed_jwt
172
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
173
+ credentials = Credentials.new credentials, scope: @config.scope
174
+ end
175
+ @quota_project_id = @config.quota_project
176
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
177
+
178
+ @operations_client = Operations.new do |config|
179
+ config.credentials = credentials
180
+ config.quota_project = @quota_project_id
181
+ config.endpoint = @config.endpoint
182
+ config.universe_domain = @config.universe_domain
183
+ end
184
+
185
+ @deployment_stub = ::Gapic::ServiceStub.new(
186
+ ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Stub,
187
+ credentials: credentials,
188
+ endpoint: @config.endpoint,
189
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
190
+ universe_domain: @config.universe_domain,
191
+ channel_args: @config.channel_args,
192
+ interceptors: @config.interceptors,
193
+ channel_pool_config: @config.channel_pool,
194
+ logger: @config.logger
195
+ )
196
+
197
+ @deployment_stub.stub_logger&.info do |entry|
198
+ entry.set_system_name
199
+ entry.set_service
200
+ entry.message = "Created client for #{entry.service}"
201
+ entry.set_credentials_fields credentials
202
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
203
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
204
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
205
+ end
206
+
207
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
208
+ config.credentials = credentials
209
+ config.quota_project = @quota_project_id
210
+ config.endpoint = @deployment_stub.endpoint
211
+ config.universe_domain = @deployment_stub.universe_domain
212
+ config.logger = @deployment_stub.logger if config.respond_to? :logger=
213
+ end
214
+ end
215
+
216
+ ##
217
+ # Get the associated client for long-running operations.
218
+ #
219
+ # @return [::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Operations]
220
+ #
221
+ attr_reader :operations_client
222
+
223
+ ##
224
+ # Get the associated client for mix-in of the Locations.
225
+ #
226
+ # @return [Google::Cloud::Location::Locations::Client]
227
+ #
228
+ attr_reader :location_client
229
+
230
+ ##
231
+ # The logger used for request/response debug logging.
232
+ #
233
+ # @return [Logger]
234
+ #
235
+ def logger
236
+ @deployment_stub.logger
237
+ end
238
+
239
+ # Service calls
240
+
241
+ ##
242
+ # Creates a new FrameworkDeployment in a given parent resource.
243
+ #
244
+ # @overload create_framework_deployment(request, options = nil)
245
+ # Pass arguments to `create_framework_deployment` via a request object, either of type
246
+ # {::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest} or an equivalent Hash.
247
+ #
248
+ # @param request [::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest, ::Hash]
249
+ # A request object representing the call parameters. Required. To specify no
250
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
251
+ # @param options [::Gapic::CallOptions, ::Hash]
252
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
253
+ #
254
+ # @overload create_framework_deployment(parent: nil, framework_deployment_id: nil, framework_deployment: nil)
255
+ # Pass arguments to `create_framework_deployment` via keyword arguments. Note that at
256
+ # least one keyword argument is required. To specify no parameters, or to keep all
257
+ # the default parameter values, pass an empty Hash as a request object (see above).
258
+ #
259
+ # @param parent [::String]
260
+ # Required. The parent resource of the FrameworkDeployment in the format:
261
+ # organizations/\\{organization}/locations/\\{location}
262
+ # Only global location is supported.
263
+ # @param framework_deployment_id [::String]
264
+ # Optional. User provided identifier. It should be unique in scope of a
265
+ # parent. This is optional and if not provided, a random UUID will be
266
+ # generated.
267
+ # @param framework_deployment [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment, ::Hash]
268
+ # Required. The FrameworkDeployment to be created.
269
+ #
270
+ # @yield [response, operation] Access the result along with the RPC operation
271
+ # @yieldparam response [::Gapic::Operation]
272
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
273
+ #
274
+ # @return [::Gapic::Operation]
275
+ #
276
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
277
+ #
278
+ # @example Basic example
279
+ # require "google/cloud/cloud_security_compliance/v1"
280
+ #
281
+ # # Create a client object. The client can be reused for multiple calls.
282
+ # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new
283
+ #
284
+ # # Create a request. To set request fields, pass in keyword arguments.
285
+ # request = Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest.new
286
+ #
287
+ # # Call the create_framework_deployment method.
288
+ # result = client.create_framework_deployment request
289
+ #
290
+ # # The returned object is of type Gapic::Operation. You can use it to
291
+ # # check the status of an operation, cancel it, or wait for results.
292
+ # # Here is how to wait for a response.
293
+ # result.wait_until_done! timeout: 60
294
+ # if result.response?
295
+ # p result.response
296
+ # else
297
+ # puts "No response received."
298
+ # end
299
+ #
300
+ def create_framework_deployment request, options = nil
301
+ raise ::ArgumentError, "request must be provided" if request.nil?
302
+
303
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::CreateFrameworkDeploymentRequest
304
+
305
+ # Converts hash and nil to an options object
306
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
307
+
308
+ # Customize the options with defaults
309
+ metadata = @config.rpcs.create_framework_deployment.metadata.to_h
310
+
311
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
312
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
313
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
314
+ gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION
315
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
316
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
317
+
318
+ header_params = {}
319
+ if request.parent
320
+ header_params["parent"] = request.parent
321
+ end
322
+
323
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
324
+ metadata[:"x-goog-request-params"] ||= request_params_header
325
+
326
+ options.apply_defaults timeout: @config.rpcs.create_framework_deployment.timeout,
327
+ metadata: metadata,
328
+ retry_policy: @config.rpcs.create_framework_deployment.retry_policy
329
+
330
+ options.apply_defaults timeout: @config.timeout,
331
+ metadata: @config.metadata,
332
+ retry_policy: @config.retry_policy
333
+
334
+ @deployment_stub.call_rpc :create_framework_deployment, request, options: options do |response, operation|
335
+ response = ::Gapic::Operation.new response, @operations_client, options: options
336
+ yield response, operation if block_given?
337
+ throw :response, response
338
+ end
339
+ rescue ::GRPC::BadStatus => e
340
+ raise ::Google::Cloud::Error.from_error(e)
341
+ end
342
+
343
+ ##
344
+ # Deletes a single FrameworkDeployment.
345
+ #
346
+ # @overload delete_framework_deployment(request, options = nil)
347
+ # Pass arguments to `delete_framework_deployment` via a request object, either of type
348
+ # {::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest} or an equivalent Hash.
349
+ #
350
+ # @param request [::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest, ::Hash]
351
+ # A request object representing the call parameters. Required. To specify no
352
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
353
+ # @param options [::Gapic::CallOptions, ::Hash]
354
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
355
+ #
356
+ # @overload delete_framework_deployment(name: nil, etag: nil)
357
+ # Pass arguments to `delete_framework_deployment` via keyword arguments. Note that at
358
+ # least one keyword argument is required. To specify no parameters, or to keep all
359
+ # the default parameter values, pass an empty Hash as a request object (see above).
360
+ #
361
+ # @param name [::String]
362
+ # Required. name of the FrameworkDeployment to be deleted in the following
363
+ # format:
364
+ # organizations/\\{organization}/locations/\\{location}/frameworkDeployments/\\{framework_deployment_id}
365
+ # @param etag [::String]
366
+ # Optional. An opaque identifier for the current version of the resource.
367
+ #
368
+ # If you provide this value, then it must match the existing value. If the
369
+ # values don't match, then the request fails with an
370
+ # [ABORTED][google.rpc.Code.ABORTED] error.
371
+ #
372
+ # If you omit this value, then the resource is deleted regardless of its
373
+ # current `etag` value.
374
+ #
375
+ # @yield [response, operation] Access the result along with the RPC operation
376
+ # @yieldparam response [::Gapic::Operation]
377
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
378
+ #
379
+ # @return [::Gapic::Operation]
380
+ #
381
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
382
+ #
383
+ # @example Basic example
384
+ # require "google/cloud/cloud_security_compliance/v1"
385
+ #
386
+ # # Create a client object. The client can be reused for multiple calls.
387
+ # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new
388
+ #
389
+ # # Create a request. To set request fields, pass in keyword arguments.
390
+ # request = Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest.new
391
+ #
392
+ # # Call the delete_framework_deployment method.
393
+ # result = client.delete_framework_deployment request
394
+ #
395
+ # # The returned object is of type Gapic::Operation. You can use it to
396
+ # # check the status of an operation, cancel it, or wait for results.
397
+ # # Here is how to wait for a response.
398
+ # result.wait_until_done! timeout: 60
399
+ # if result.response?
400
+ # p result.response
401
+ # else
402
+ # puts "No response received."
403
+ # end
404
+ #
405
+ def delete_framework_deployment request, options = nil
406
+ raise ::ArgumentError, "request must be provided" if request.nil?
407
+
408
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::DeleteFrameworkDeploymentRequest
409
+
410
+ # Converts hash and nil to an options object
411
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
412
+
413
+ # Customize the options with defaults
414
+ metadata = @config.rpcs.delete_framework_deployment.metadata.to_h
415
+
416
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
417
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
418
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
419
+ gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION
420
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
421
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
422
+
423
+ header_params = {}
424
+ if request.name
425
+ header_params["name"] = request.name
426
+ end
427
+
428
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
429
+ metadata[:"x-goog-request-params"] ||= request_params_header
430
+
431
+ options.apply_defaults timeout: @config.rpcs.delete_framework_deployment.timeout,
432
+ metadata: metadata,
433
+ retry_policy: @config.rpcs.delete_framework_deployment.retry_policy
434
+
435
+ options.apply_defaults timeout: @config.timeout,
436
+ metadata: @config.metadata,
437
+ retry_policy: @config.retry_policy
438
+
439
+ @deployment_stub.call_rpc :delete_framework_deployment, request, options: options do |response, operation|
440
+ response = ::Gapic::Operation.new response, @operations_client, options: options
441
+ yield response, operation if block_given?
442
+ throw :response, response
443
+ end
444
+ rescue ::GRPC::BadStatus => e
445
+ raise ::Google::Cloud::Error.from_error(e)
446
+ end
447
+
448
+ ##
449
+ # Gets details of a single FrameworkDeployment.
450
+ #
451
+ # @overload get_framework_deployment(request, options = nil)
452
+ # Pass arguments to `get_framework_deployment` via a request object, either of type
453
+ # {::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest} or an equivalent Hash.
454
+ #
455
+ # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest, ::Hash]
456
+ # A request object representing the call parameters. Required. To specify no
457
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
458
+ # @param options [::Gapic::CallOptions, ::Hash]
459
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
460
+ #
461
+ # @overload get_framework_deployment(name: nil)
462
+ # Pass arguments to `get_framework_deployment` via keyword arguments. Note that at
463
+ # least one keyword argument is required. To specify no parameters, or to keep all
464
+ # the default parameter values, pass an empty Hash as a request object (see above).
465
+ #
466
+ # @param name [::String]
467
+ # Required. FrameworkDeployment name in the following format:
468
+ # organizations/\\{organization}/locations/\\{location}/frameworkDeployments/\\{framework_deployment_id}
469
+ #
470
+ # @yield [response, operation] Access the result along with the RPC operation
471
+ # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment]
472
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
473
+ #
474
+ # @return [::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment]
475
+ #
476
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
477
+ #
478
+ # @example Basic example
479
+ # require "google/cloud/cloud_security_compliance/v1"
480
+ #
481
+ # # Create a client object. The client can be reused for multiple calls.
482
+ # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new
483
+ #
484
+ # # Create a request. To set request fields, pass in keyword arguments.
485
+ # request = Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest.new
486
+ #
487
+ # # Call the get_framework_deployment method.
488
+ # result = client.get_framework_deployment request
489
+ #
490
+ # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment.
491
+ # p result
492
+ #
493
+ def get_framework_deployment request, options = nil
494
+ raise ::ArgumentError, "request must be provided" if request.nil?
495
+
496
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetFrameworkDeploymentRequest
497
+
498
+ # Converts hash and nil to an options object
499
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
500
+
501
+ # Customize the options with defaults
502
+ metadata = @config.rpcs.get_framework_deployment.metadata.to_h
503
+
504
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
505
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
506
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
507
+ gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION
508
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
509
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
510
+
511
+ header_params = {}
512
+ if request.name
513
+ header_params["name"] = request.name
514
+ end
515
+
516
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
517
+ metadata[:"x-goog-request-params"] ||= request_params_header
518
+
519
+ options.apply_defaults timeout: @config.rpcs.get_framework_deployment.timeout,
520
+ metadata: metadata,
521
+ retry_policy: @config.rpcs.get_framework_deployment.retry_policy
522
+
523
+ options.apply_defaults timeout: @config.timeout,
524
+ metadata: @config.metadata,
525
+ retry_policy: @config.retry_policy
526
+
527
+ @deployment_stub.call_rpc :get_framework_deployment, request, options: options do |response, operation|
528
+ yield response, operation if block_given?
529
+ end
530
+ rescue ::GRPC::BadStatus => e
531
+ raise ::Google::Cloud::Error.from_error(e)
532
+ end
533
+
534
+ ##
535
+ # Lists FrameworkDeployments in a given parent resource.
536
+ #
537
+ # @overload list_framework_deployments(request, options = nil)
538
+ # Pass arguments to `list_framework_deployments` via a request object, either of type
539
+ # {::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest} or an equivalent Hash.
540
+ #
541
+ # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest, ::Hash]
542
+ # A request object representing the call parameters. Required. To specify no
543
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
544
+ # @param options [::Gapic::CallOptions, ::Hash]
545
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
546
+ #
547
+ # @overload list_framework_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
548
+ # Pass arguments to `list_framework_deployments` via keyword arguments. Note that at
549
+ # least one keyword argument is required. To specify no parameters, or to keep all
550
+ # the default parameter values, pass an empty Hash as a request object (see above).
551
+ #
552
+ # @param parent [::String]
553
+ # Required. parent resource of the FrameworkDeployment in the format:
554
+ # organizations/\\{organization}/locations/\\{location}
555
+ # Only global location is supported.
556
+ # @param page_size [::Integer]
557
+ # Optional. Requested page size. Server may return fewer items than
558
+ # requested. If unspecified, server will pick an appropriate default.
559
+ # @param page_token [::String]
560
+ # Optional. A token identifying a page of results the server should return.
561
+ # @param filter [::String]
562
+ # Optional. Filter to be applied on the resource, defined by EBNF grammar
563
+ # https://google.aip.dev/assets/misc/ebnf-filtering.txt.
564
+ # @param order_by [::String]
565
+ # Optional. Sort results. Supported are "name", "name desc" or "" (unsorted).
566
+ #
567
+ # @yield [response, operation] Access the result along with the RPC operation
568
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>]
569
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
570
+ #
571
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment>]
572
+ #
573
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
574
+ #
575
+ # @example Basic example
576
+ # require "google/cloud/cloud_security_compliance/v1"
577
+ #
578
+ # # Create a client object. The client can be reused for multiple calls.
579
+ # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new
580
+ #
581
+ # # Create a request. To set request fields, pass in keyword arguments.
582
+ # request = Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest.new
583
+ #
584
+ # # Call the list_framework_deployments method.
585
+ # result = client.list_framework_deployments request
586
+ #
587
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
588
+ # # over elements, and API calls will be issued to fetch pages as needed.
589
+ # result.each do |item|
590
+ # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::FrameworkDeployment.
591
+ # p item
592
+ # end
593
+ #
594
+ def list_framework_deployments request, options = nil
595
+ raise ::ArgumentError, "request must be provided" if request.nil?
596
+
597
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListFrameworkDeploymentsRequest
598
+
599
+ # Converts hash and nil to an options object
600
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
601
+
602
+ # Customize the options with defaults
603
+ metadata = @config.rpcs.list_framework_deployments.metadata.to_h
604
+
605
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
606
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
607
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
608
+ gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION
609
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
610
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
611
+
612
+ header_params = {}
613
+ if request.parent
614
+ header_params["parent"] = request.parent
615
+ end
616
+
617
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
618
+ metadata[:"x-goog-request-params"] ||= request_params_header
619
+
620
+ options.apply_defaults timeout: @config.rpcs.list_framework_deployments.timeout,
621
+ metadata: metadata,
622
+ retry_policy: @config.rpcs.list_framework_deployments.retry_policy
623
+
624
+ options.apply_defaults timeout: @config.timeout,
625
+ metadata: @config.metadata,
626
+ retry_policy: @config.retry_policy
627
+
628
+ @deployment_stub.call_rpc :list_framework_deployments, request, options: options do |response, operation|
629
+ response = ::Gapic::PagedEnumerable.new @deployment_stub, :list_framework_deployments, request, response, operation, options
630
+ yield response, operation if block_given?
631
+ throw :response, response
632
+ end
633
+ rescue ::GRPC::BadStatus => e
634
+ raise ::Google::Cloud::Error.from_error(e)
635
+ end
636
+
637
+ ##
638
+ # Gets details of a single CloudControlDeployment.
639
+ #
640
+ # @overload get_cloud_control_deployment(request, options = nil)
641
+ # Pass arguments to `get_cloud_control_deployment` via a request object, either of type
642
+ # {::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest} or an equivalent Hash.
643
+ #
644
+ # @param request [::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest, ::Hash]
645
+ # A request object representing the call parameters. Required. To specify no
646
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
647
+ # @param options [::Gapic::CallOptions, ::Hash]
648
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
649
+ #
650
+ # @overload get_cloud_control_deployment(name: nil)
651
+ # Pass arguments to `get_cloud_control_deployment` via keyword arguments. Note that at
652
+ # least one keyword argument is required. To specify no parameters, or to keep all
653
+ # the default parameter values, pass an empty Hash as a request object (see above).
654
+ #
655
+ # @param name [::String]
656
+ # Required. CloudControlDeployment name in the following format:
657
+ # organizations/\\{organization}/locations/\\{location}/cloudControlDeployments/\\{cloud_control_deployment_id}
658
+ #
659
+ # @yield [response, operation] Access the result along with the RPC operation
660
+ # @yieldparam response [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment]
661
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
662
+ #
663
+ # @return [::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment]
664
+ #
665
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
666
+ #
667
+ # @example Basic example
668
+ # require "google/cloud/cloud_security_compliance/v1"
669
+ #
670
+ # # Create a client object. The client can be reused for multiple calls.
671
+ # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new
672
+ #
673
+ # # Create a request. To set request fields, pass in keyword arguments.
674
+ # request = Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest.new
675
+ #
676
+ # # Call the get_cloud_control_deployment method.
677
+ # result = client.get_cloud_control_deployment request
678
+ #
679
+ # # The returned object is of type Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment.
680
+ # p result
681
+ #
682
+ def get_cloud_control_deployment request, options = nil
683
+ raise ::ArgumentError, "request must be provided" if request.nil?
684
+
685
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::GetCloudControlDeploymentRequest
686
+
687
+ # Converts hash and nil to an options object
688
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
689
+
690
+ # Customize the options with defaults
691
+ metadata = @config.rpcs.get_cloud_control_deployment.metadata.to_h
692
+
693
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
694
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
695
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
696
+ gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION
697
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
698
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
699
+
700
+ header_params = {}
701
+ if request.name
702
+ header_params["name"] = request.name
703
+ end
704
+
705
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
706
+ metadata[:"x-goog-request-params"] ||= request_params_header
707
+
708
+ options.apply_defaults timeout: @config.rpcs.get_cloud_control_deployment.timeout,
709
+ metadata: metadata,
710
+ retry_policy: @config.rpcs.get_cloud_control_deployment.retry_policy
711
+
712
+ options.apply_defaults timeout: @config.timeout,
713
+ metadata: @config.metadata,
714
+ retry_policy: @config.retry_policy
715
+
716
+ @deployment_stub.call_rpc :get_cloud_control_deployment, request, options: options do |response, operation|
717
+ yield response, operation if block_given?
718
+ end
719
+ rescue ::GRPC::BadStatus => e
720
+ raise ::Google::Cloud::Error.from_error(e)
721
+ end
722
+
723
+ ##
724
+ # Lists CloudControlDeployments in a given parent resource.
725
+ #
726
+ # @overload list_cloud_control_deployments(request, options = nil)
727
+ # Pass arguments to `list_cloud_control_deployments` via a request object, either of type
728
+ # {::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest} or an equivalent Hash.
729
+ #
730
+ # @param request [::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest, ::Hash]
731
+ # A request object representing the call parameters. Required. To specify no
732
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
733
+ # @param options [::Gapic::CallOptions, ::Hash]
734
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
735
+ #
736
+ # @overload list_cloud_control_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
737
+ # Pass arguments to `list_cloud_control_deployments` via keyword arguments. Note that at
738
+ # least one keyword argument is required. To specify no parameters, or to keep all
739
+ # the default parameter values, pass an empty Hash as a request object (see above).
740
+ #
741
+ # @param parent [::String]
742
+ # Required. parent resource of the CloudControlDeployment in the format:
743
+ # organizations/\\{organization}/locations/\\{location}
744
+ # Only global location is supported.
745
+ # @param page_size [::Integer]
746
+ # Optional. Requested page size. Server may return fewer items than
747
+ # requested. If unspecified, server will pick an appropriate default.
748
+ # @param page_token [::String]
749
+ # Optional. A token identifying a page of results the server should return.
750
+ # @param filter [::String]
751
+ # Optional. Filter to be applied on the resource, defined by EBNF grammar
752
+ # https://google.aip.dev/assets/misc/ebnf-filtering.txt.
753
+ # @param order_by [::String]
754
+ # Optional. Sort results. Supported are "name", "name desc" or "" (unsorted).
755
+ #
756
+ # @yield [response, operation] Access the result along with the RPC operation
757
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>]
758
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
759
+ #
760
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment>]
761
+ #
762
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
763
+ #
764
+ # @example Basic example
765
+ # require "google/cloud/cloud_security_compliance/v1"
766
+ #
767
+ # # Create a client object. The client can be reused for multiple calls.
768
+ # client = Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new
769
+ #
770
+ # # Create a request. To set request fields, pass in keyword arguments.
771
+ # request = Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest.new
772
+ #
773
+ # # Call the list_cloud_control_deployments method.
774
+ # result = client.list_cloud_control_deployments request
775
+ #
776
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
777
+ # # over elements, and API calls will be issued to fetch pages as needed.
778
+ # result.each do |item|
779
+ # # Each element is of type ::Google::Cloud::CloudSecurityCompliance::V1::CloudControlDeployment.
780
+ # p item
781
+ # end
782
+ #
783
+ def list_cloud_control_deployments request, options = nil
784
+ raise ::ArgumentError, "request must be provided" if request.nil?
785
+
786
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudSecurityCompliance::V1::ListCloudControlDeploymentsRequest
787
+
788
+ # Converts hash and nil to an options object
789
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
790
+
791
+ # Customize the options with defaults
792
+ metadata = @config.rpcs.list_cloud_control_deployments.metadata.to_h
793
+
794
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
795
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
796
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
797
+ gapic_version: ::Google::Cloud::CloudSecurityCompliance::V1::VERSION
798
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
799
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
800
+
801
+ header_params = {}
802
+ if request.parent
803
+ header_params["parent"] = request.parent
804
+ end
805
+
806
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
807
+ metadata[:"x-goog-request-params"] ||= request_params_header
808
+
809
+ options.apply_defaults timeout: @config.rpcs.list_cloud_control_deployments.timeout,
810
+ metadata: metadata,
811
+ retry_policy: @config.rpcs.list_cloud_control_deployments.retry_policy
812
+
813
+ options.apply_defaults timeout: @config.timeout,
814
+ metadata: @config.metadata,
815
+ retry_policy: @config.retry_policy
816
+
817
+ @deployment_stub.call_rpc :list_cloud_control_deployments, request, options: options do |response, operation|
818
+ response = ::Gapic::PagedEnumerable.new @deployment_stub, :list_cloud_control_deployments, request, response, operation, options
819
+ yield response, operation if block_given?
820
+ throw :response, response
821
+ end
822
+ rescue ::GRPC::BadStatus => e
823
+ raise ::Google::Cloud::Error.from_error(e)
824
+ end
825
+
826
+ ##
827
+ # Configuration class for the Deployment API.
828
+ #
829
+ # This class represents the configuration for Deployment,
830
+ # providing control over timeouts, retry behavior, logging, transport
831
+ # parameters, and other low-level controls. Certain parameters can also be
832
+ # applied individually to specific RPCs. See
833
+ # {::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client::Configuration::Rpcs}
834
+ # for a list of RPCs that can be configured independently.
835
+ #
836
+ # Configuration can be applied globally to all clients, or to a single client
837
+ # on construction.
838
+ #
839
+ # @example
840
+ #
841
+ # # Modify the global config, setting the timeout for
842
+ # # create_framework_deployment to 20 seconds,
843
+ # # and all remaining timeouts to 10 seconds.
844
+ # ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.configure do |config|
845
+ # config.timeout = 10.0
846
+ # config.rpcs.create_framework_deployment.timeout = 20.0
847
+ # end
848
+ #
849
+ # # Apply the above configuration only to a new client.
850
+ # client = ::Google::Cloud::CloudSecurityCompliance::V1::Deployment::Client.new do |config|
851
+ # config.timeout = 10.0
852
+ # config.rpcs.create_framework_deployment.timeout = 20.0
853
+ # end
854
+ #
855
+ # @!attribute [rw] endpoint
856
+ # A custom service endpoint, as a hostname or hostname:port. The default is
857
+ # nil, indicating to use the default endpoint in the current universe domain.
858
+ # @return [::String,nil]
859
+ # @!attribute [rw] credentials
860
+ # Credentials to send with calls. You may provide any of the following types:
861
+ # * (`String`) The path to a service account key file in JSON format
862
+ # * (`Hash`) A service account key as a Hash
863
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
864
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
865
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
866
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
867
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
868
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
869
+ # * (`nil`) indicating no credentials
870
+ #
871
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
872
+ # external source for authentication to Google Cloud, you must validate it before
873
+ # providing it to a Google API client library. Providing an unvalidated credential
874
+ # configuration to Google APIs can compromise the security of your systems and data.
875
+ # For more information, refer to [Validate credential configurations from external
876
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
877
+ # @return [::Object]
878
+ # @!attribute [rw] scope
879
+ # The OAuth scopes
880
+ # @return [::Array<::String>]
881
+ # @!attribute [rw] lib_name
882
+ # The library name as recorded in instrumentation and logging
883
+ # @return [::String]
884
+ # @!attribute [rw] lib_version
885
+ # The library version as recorded in instrumentation and logging
886
+ # @return [::String]
887
+ # @!attribute [rw] channel_args
888
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
889
+ # `GRPC::Core::Channel` object is provided as the credential.
890
+ # @return [::Hash]
891
+ # @!attribute [rw] interceptors
892
+ # An array of interceptors that are run before calls are executed.
893
+ # @return [::Array<::GRPC::ClientInterceptor>]
894
+ # @!attribute [rw] timeout
895
+ # The call timeout in seconds.
896
+ # @return [::Numeric]
897
+ # @!attribute [rw] metadata
898
+ # Additional gRPC headers to be sent with the call.
899
+ # @return [::Hash{::Symbol=>::String}]
900
+ # @!attribute [rw] retry_policy
901
+ # The retry policy. The value is a hash with the following keys:
902
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
903
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
904
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
905
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
906
+ # trigger a retry.
907
+ # @return [::Hash]
908
+ # @!attribute [rw] quota_project
909
+ # A separate project against which to charge quota.
910
+ # @return [::String]
911
+ # @!attribute [rw] universe_domain
912
+ # The universe domain within which to make requests. This determines the
913
+ # default endpoint URL. The default value of nil uses the environment
914
+ # universe (usually the default "googleapis.com" universe).
915
+ # @return [::String,nil]
916
+ # @!attribute [rw] logger
917
+ # A custom logger to use for request/response debug logging, or the value
918
+ # `:default` (the default) to construct a default logger, or `nil` to
919
+ # explicitly disable logging.
920
+ # @return [::Logger,:default,nil]
921
+ #
922
+ class Configuration
923
+ extend ::Gapic::Config
924
+
925
+ # @private
926
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
927
+ DEFAULT_ENDPOINT = "cloudsecuritycompliance.googleapis.com"
928
+
929
+ config_attr :endpoint, nil, ::String, nil
930
+ config_attr :credentials, nil do |value|
931
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
932
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
933
+ allowed.any? { |klass| klass === value }
934
+ end
935
+ config_attr :scope, nil, ::String, ::Array, nil
936
+ config_attr :lib_name, nil, ::String, nil
937
+ config_attr :lib_version, nil, ::String, nil
938
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
939
+ config_attr :interceptors, nil, ::Array, nil
940
+ config_attr :timeout, nil, ::Numeric, nil
941
+ config_attr :metadata, nil, ::Hash, nil
942
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
943
+ config_attr :quota_project, nil, ::String, nil
944
+ config_attr :universe_domain, nil, ::String, nil
945
+ config_attr :logger, :default, ::Logger, nil, :default
946
+
947
+ # @private
948
+ def initialize parent_config = nil
949
+ @parent_config = parent_config unless parent_config.nil?
950
+
951
+ yield self if block_given?
952
+ end
953
+
954
+ ##
955
+ # Configurations for individual RPCs
956
+ # @return [Rpcs]
957
+ #
958
+ def rpcs
959
+ @rpcs ||= begin
960
+ parent_rpcs = nil
961
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
962
+ Rpcs.new parent_rpcs
963
+ end
964
+ end
965
+
966
+ ##
967
+ # Configuration for the channel pool
968
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
969
+ #
970
+ def channel_pool
971
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
972
+ end
973
+
974
+ ##
975
+ # Configuration RPC class for the Deployment API.
976
+ #
977
+ # Includes fields providing the configuration for each RPC in this service.
978
+ # Each configuration object is of type `Gapic::Config::Method` and includes
979
+ # the following configuration fields:
980
+ #
981
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
982
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
983
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
984
+ # include the following keys:
985
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
986
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
987
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
988
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
989
+ # trigger a retry.
990
+ #
991
+ class Rpcs
992
+ ##
993
+ # RPC-specific configuration for `create_framework_deployment`
994
+ # @return [::Gapic::Config::Method]
995
+ #
996
+ attr_reader :create_framework_deployment
997
+ ##
998
+ # RPC-specific configuration for `delete_framework_deployment`
999
+ # @return [::Gapic::Config::Method]
1000
+ #
1001
+ attr_reader :delete_framework_deployment
1002
+ ##
1003
+ # RPC-specific configuration for `get_framework_deployment`
1004
+ # @return [::Gapic::Config::Method]
1005
+ #
1006
+ attr_reader :get_framework_deployment
1007
+ ##
1008
+ # RPC-specific configuration for `list_framework_deployments`
1009
+ # @return [::Gapic::Config::Method]
1010
+ #
1011
+ attr_reader :list_framework_deployments
1012
+ ##
1013
+ # RPC-specific configuration for `get_cloud_control_deployment`
1014
+ # @return [::Gapic::Config::Method]
1015
+ #
1016
+ attr_reader :get_cloud_control_deployment
1017
+ ##
1018
+ # RPC-specific configuration for `list_cloud_control_deployments`
1019
+ # @return [::Gapic::Config::Method]
1020
+ #
1021
+ attr_reader :list_cloud_control_deployments
1022
+
1023
+ # @private
1024
+ def initialize parent_rpcs = nil
1025
+ create_framework_deployment_config = parent_rpcs.create_framework_deployment if parent_rpcs.respond_to? :create_framework_deployment
1026
+ @create_framework_deployment = ::Gapic::Config::Method.new create_framework_deployment_config
1027
+ delete_framework_deployment_config = parent_rpcs.delete_framework_deployment if parent_rpcs.respond_to? :delete_framework_deployment
1028
+ @delete_framework_deployment = ::Gapic::Config::Method.new delete_framework_deployment_config
1029
+ get_framework_deployment_config = parent_rpcs.get_framework_deployment if parent_rpcs.respond_to? :get_framework_deployment
1030
+ @get_framework_deployment = ::Gapic::Config::Method.new get_framework_deployment_config
1031
+ list_framework_deployments_config = parent_rpcs.list_framework_deployments if parent_rpcs.respond_to? :list_framework_deployments
1032
+ @list_framework_deployments = ::Gapic::Config::Method.new list_framework_deployments_config
1033
+ get_cloud_control_deployment_config = parent_rpcs.get_cloud_control_deployment if parent_rpcs.respond_to? :get_cloud_control_deployment
1034
+ @get_cloud_control_deployment = ::Gapic::Config::Method.new get_cloud_control_deployment_config
1035
+ list_cloud_control_deployments_config = parent_rpcs.list_cloud_control_deployments if parent_rpcs.respond_to? :list_cloud_control_deployments
1036
+ @list_cloud_control_deployments = ::Gapic::Config::Method.new list_cloud_control_deployments_config
1037
+
1038
+ yield self if block_given?
1039
+ end
1040
+ end
1041
+ end
1042
+ end
1043
+ end
1044
+ end
1045
+ end
1046
+ end
1047
+ end