google-cloud-security_center-v1 1.1.0 → 1.3.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.
@@ -124,14 +124,6 @@ module Google
124
124
  # Lists operations that match the specified filter in the request. If the
125
125
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
126
126
  #
127
- # NOTE: the `name` binding allows API services to override the binding
128
- # to use different resource name schemes, such as `users/*/operations`. To
129
- # override the binding, API services can add a binding such as
130
- # `"/v1/{name=users/*}/operations"` to their service configuration.
131
- # For backwards compatibility, the default name includes the operations
132
- # collection id, however overriding users must ensure the name binding
133
- # is the parent resource, without the operations collection id.
134
- #
135
127
  # @overload list_operations(request, options = nil)
136
128
  # Pass arguments to `list_operations` via a request object, either of type
137
129
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -221,7 +213,7 @@ module Google
221
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
222
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
223
215
  yield response, operation if block_given?
224
- return response
216
+ throw :response, response
225
217
  end
226
218
  rescue ::GRPC::BadStatus => e
227
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -317,7 +309,7 @@ module Google
317
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
318
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
319
311
  yield response, operation if block_given?
320
- return response
312
+ throw :response, response
321
313
  end
322
314
  rescue ::GRPC::BadStatus => e
323
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -406,7 +398,6 @@ module Google
406
398
 
407
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
408
400
  yield response, operation if block_given?
409
- return response
410
401
  end
411
402
  rescue ::GRPC::BadStatus => e
412
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -421,8 +412,9 @@ module Google
421
412
  # other methods to check whether the cancellation succeeded or whether the
422
413
  # operation completed despite cancellation. On successful cancellation,
423
414
  # the operation is not deleted; instead, it becomes an operation with
424
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
425
- # corresponding to `Code.CANCELLED`.
415
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
416
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
417
+ # `Code.CANCELLED`.
426
418
  #
427
419
  # @overload cancel_operation(request, options = nil)
428
420
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -501,7 +493,6 @@ module Google
501
493
 
502
494
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
503
495
  yield response, operation if block_given?
504
- return response
505
496
  end
506
497
  rescue ::GRPC::BadStatus => e
507
498
  raise ::Google::Cloud::Error.from_error(e)
@@ -599,7 +590,7 @@ module Google
599
590
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
600
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
601
592
  yield response, operation if block_given?
602
- return response
593
+ throw :response, response
603
594
  end
604
595
  rescue ::GRPC::BadStatus => e
605
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -688,6 +679,11 @@ module Google
688
679
  # default endpoint URL. The default value of nil uses the environment
689
680
  # universe (usually the default "googleapis.com" universe).
690
681
  # @return [::String,nil]
682
+ # @!attribute [rw] logger
683
+ # A custom logger to use for request/response debug logging, or the value
684
+ # `:default` (the default) to construct a default logger, or `nil` to
685
+ # explicitly disable logging.
686
+ # @return [::Logger,:default,nil]
691
687
  #
692
688
  class Configuration
693
689
  extend ::Gapic::Config
@@ -712,6 +708,7 @@ module Google
712
708
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
713
709
  config_attr :quota_project, nil, ::String, nil
714
710
  config_attr :universe_domain, nil, ::String, nil
711
+ config_attr :logger, :default, ::Logger, nil, :default
715
712
 
716
713
  # @private
717
714
  def initialize parent_config = nil
@@ -120,47 +120,47 @@ module Google
120
120
  ##
121
121
  # Create a fully-qualified EffectiveEventThreatDetectionCustomModule resource string.
122
122
  #
123
- # @overload effective_event_threat_detection_custom_module_path(organization:, module_param:)
123
+ # @overload effective_event_threat_detection_custom_module_path(organization:, module:)
124
124
  # The resource will be in the following format:
125
125
  #
126
- # `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module_param}`
126
+ # `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`
127
127
  #
128
128
  # @param organization [String]
129
- # @param module_param [String]
129
+ # @param module [String]
130
130
  #
131
- # @overload effective_event_threat_detection_custom_module_path(folder:, module_param:)
131
+ # @overload effective_event_threat_detection_custom_module_path(folder:, module:)
132
132
  # The resource will be in the following format:
133
133
  #
134
- # `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module_param}`
134
+ # `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`
135
135
  #
136
136
  # @param folder [String]
137
- # @param module_param [String]
137
+ # @param module [String]
138
138
  #
139
- # @overload effective_event_threat_detection_custom_module_path(project:, module_param:)
139
+ # @overload effective_event_threat_detection_custom_module_path(project:, module:)
140
140
  # The resource will be in the following format:
141
141
  #
142
- # `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module_param}`
142
+ # `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`
143
143
  #
144
144
  # @param project [String]
145
- # @param module_param [String]
145
+ # @param module [String]
146
146
  #
147
147
  # @return [::String]
148
148
  def effective_event_threat_detection_custom_module_path **args
149
149
  resources = {
150
- "module_param:organization" => (proc do |organization:, module_param:|
150
+ "module:organization" => (proc do |organization:, module:|
151
151
  raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
152
152
 
153
- "organizations/#{organization}/eventThreatDetectionSettings/effectiveCustomModules/#{module_param}"
153
+ "organizations/#{organization}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}"
154
154
  end),
155
- "folder:module_param" => (proc do |folder:, module_param:|
155
+ "folder:module" => (proc do |folder:, module:|
156
156
  raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
157
157
 
158
- "folders/#{folder}/eventThreatDetectionSettings/effectiveCustomModules/#{module_param}"
158
+ "folders/#{folder}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}"
159
159
  end),
160
- "module_param:project" => (proc do |project:, module_param:|
160
+ "module:project" => (proc do |project:, module:|
161
161
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
162
162
 
163
- "projects/#{project}/eventThreatDetectionSettings/effectiveCustomModules/#{module_param}"
163
+ "projects/#{project}/eventThreatDetectionSettings/effectiveCustomModules/#{binding.local_variable_get :module}"
164
164
  end)
165
165
  }
166
166
 
@@ -224,47 +224,47 @@ module Google
224
224
  ##
225
225
  # Create a fully-qualified EventThreatDetectionCustomModule resource string.
226
226
  #
227
- # @overload event_threat_detection_custom_module_path(organization:, module_param:)
227
+ # @overload event_threat_detection_custom_module_path(organization:, module:)
228
228
  # The resource will be in the following format:
229
229
  #
230
- # `organizations/{organization}/eventThreatDetectionSettings/customModules/{module_param}`
230
+ # `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`
231
231
  #
232
232
  # @param organization [String]
233
- # @param module_param [String]
233
+ # @param module [String]
234
234
  #
235
- # @overload event_threat_detection_custom_module_path(folder:, module_param:)
235
+ # @overload event_threat_detection_custom_module_path(folder:, module:)
236
236
  # The resource will be in the following format:
237
237
  #
238
- # `folders/{folder}/eventThreatDetectionSettings/customModules/{module_param}`
238
+ # `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`
239
239
  #
240
240
  # @param folder [String]
241
- # @param module_param [String]
241
+ # @param module [String]
242
242
  #
243
- # @overload event_threat_detection_custom_module_path(project:, module_param:)
243
+ # @overload event_threat_detection_custom_module_path(project:, module:)
244
244
  # The resource will be in the following format:
245
245
  #
246
- # `projects/{project}/eventThreatDetectionSettings/customModules/{module_param}`
246
+ # `projects/{project}/eventThreatDetectionSettings/customModules/{module}`
247
247
  #
248
248
  # @param project [String]
249
- # @param module_param [String]
249
+ # @param module [String]
250
250
  #
251
251
  # @return [::String]
252
252
  def event_threat_detection_custom_module_path **args
253
253
  resources = {
254
- "module_param:organization" => (proc do |organization:, module_param:|
254
+ "module:organization" => (proc do |organization:, module:|
255
255
  raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
256
256
 
257
- "organizations/#{organization}/eventThreatDetectionSettings/customModules/#{module_param}"
257
+ "organizations/#{organization}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}"
258
258
  end),
259
- "folder:module_param" => (proc do |folder:, module_param:|
259
+ "folder:module" => (proc do |folder:, module:|
260
260
  raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
261
261
 
262
- "folders/#{folder}/eventThreatDetectionSettings/customModules/#{module_param}"
262
+ "folders/#{folder}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}"
263
263
  end),
264
- "module_param:project" => (proc do |project:, module_param:|
264
+ "module:project" => (proc do |project:, module:|
265
265
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
266
266
 
267
- "projects/#{project}/eventThreatDetectionSettings/customModules/#{module_param}"
267
+ "projects/#{project}/eventThreatDetectionSettings/customModules/#{binding.local_variable_get :module}"
268
268
  end)
269
269
  }
270
270