google-cloud-storage-control-v2 1.10.1 → 1.12.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8e47d51b7c002a74d369b0e9f62b70c37888949c4aaf2d5aa29accc8cab931c
4
- data.tar.gz: ba796492f4d38360af62c6d4e028532b3168b98821db376904374dece16ecf8f
3
+ metadata.gz: 2338b158bd7b5ced59c22fe52cb26d61d6b5977f16807608087a54c05c99819f
4
+ data.tar.gz: 70ec9802eb36c7cbc20de41f69afb81b6cec35eeebf7c6970b193d34e9c26d93
5
5
  SHA512:
6
- metadata.gz: 3534f81e4db588467081c29d8fa7c73ae337ccb0079798a541b6c0ea8ad09f7ebd35b0be603fecec985b6bc01c9f571b787c0ff22ecb155ed3ef4459978c710a
7
- data.tar.gz: 3a32a691fe2229df55c275fe1a385f8b184d03d81784a7d92b59a0dc142e22c42fec8fa56db64fc8c7f4ad4dcee4f60006a48ae59c7cacd782f49cbad55c1cdd
6
+ metadata.gz: 4014b94040ec0984becbf06025115b13acaac397fad53d7d61f12fa5b37b83c50947435e028b2d854bcb68072023f938adcab21ca57910ee4bcb93cbcdea5b3c
7
+ data.tar.gz: 61a81fd3b387840ca29e41c6ce9eea9d483bce1bc1bdcd4940f1218ddf4b76d11ba73c51ea45fc6f6594f4b57e24080706d4713444d024ebc888f6cfe7131f86
data/README.md CHANGED
@@ -86,7 +86,7 @@ To browse ready to use code samples check [Google Cloud Samples](https://cloud.g
86
86
 
87
87
  ## Supported Ruby Versions
88
88
 
89
- This library is supported on Ruby 3.0+.
89
+ This library is supported on Ruby 3.2+.
90
90
 
91
91
  Google provides official support for Ruby versions that are actively supported
92
92
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -178,6 +178,31 @@ module Google
178
178
  initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
179
179
  }
180
180
 
181
+ default_config.rpcs.get_intelligence_finding.timeout = 60.0
182
+ default_config.rpcs.get_intelligence_finding.retry_policy = {
183
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
184
+ }
185
+
186
+ default_config.rpcs.list_intelligence_findings.timeout = 60.0
187
+ default_config.rpcs.list_intelligence_findings.retry_policy = {
188
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
189
+ }
190
+
191
+ default_config.rpcs.summarize_intelligence_findings.timeout = 60.0
192
+ default_config.rpcs.summarize_intelligence_findings.retry_policy = {
193
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
194
+ }
195
+
196
+ default_config.rpcs.get_intelligence_finding_revision.timeout = 60.0
197
+ default_config.rpcs.get_intelligence_finding_revision.retry_policy = {
198
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
199
+ }
200
+
201
+ default_config.rpcs.list_intelligence_finding_revisions.timeout = 60.0
202
+ default_config.rpcs.list_intelligence_finding_revisions.retry_policy = {
203
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [8, 14, 4, 13, 2]
204
+ }
205
+
181
206
  default_config
182
207
  end
183
208
  yield @configure if block_given?
@@ -2990,6 +3015,518 @@ module Google
2990
3015
  raise ::Google::Cloud::Error.from_error(e)
2991
3016
  end
2992
3017
 
3018
+ ##
3019
+ # Gets the `IntelligenceFinding` for a project.
3020
+ #
3021
+ # @overload get_intelligence_finding(request, options = nil)
3022
+ # Pass arguments to `get_intelligence_finding` via a request object, either of type
3023
+ # {::Google::Cloud::Storage::Control::V2::GetIntelligenceFindingRequest} or an equivalent Hash.
3024
+ #
3025
+ # @param request [::Google::Cloud::Storage::Control::V2::GetIntelligenceFindingRequest, ::Hash]
3026
+ # A request object representing the call parameters. Required. To specify no
3027
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3028
+ # @param options [::Gapic::CallOptions, ::Hash]
3029
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3030
+ #
3031
+ # @overload get_intelligence_finding(name: nil)
3032
+ # Pass arguments to `get_intelligence_finding` via keyword arguments. Note that at
3033
+ # least one keyword argument is required. To specify no parameters, or to keep all
3034
+ # the default parameter values, pass an empty Hash as a request object (see above).
3035
+ #
3036
+ # @param name [::String]
3037
+ # Required. The name of the `IntelligenceFinding` resource.
3038
+ #
3039
+ # Format:
3040
+ # `projects/{project}/locations/{location}/intelligenceFindings/{intelligence_finding}`
3041
+ #
3042
+ # @yield [response, operation] Access the result along with the RPC operation
3043
+ # @yieldparam response [::Google::Cloud::Storage::Control::V2::IntelligenceFinding]
3044
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3045
+ #
3046
+ # @return [::Google::Cloud::Storage::Control::V2::IntelligenceFinding]
3047
+ #
3048
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3049
+ #
3050
+ # @example Basic example
3051
+ # require "google/cloud/storage/control/v2"
3052
+ #
3053
+ # # Create a client object. The client can be reused for multiple calls.
3054
+ # client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new
3055
+ #
3056
+ # # Create a request. To set request fields, pass in keyword arguments.
3057
+ # request = Google::Cloud::Storage::Control::V2::GetIntelligenceFindingRequest.new
3058
+ #
3059
+ # # Call the get_intelligence_finding method.
3060
+ # result = client.get_intelligence_finding request
3061
+ #
3062
+ # # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceFinding.
3063
+ # p result
3064
+ #
3065
+ def get_intelligence_finding request, options = nil
3066
+ raise ::ArgumentError, "request must be provided" if request.nil?
3067
+
3068
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetIntelligenceFindingRequest
3069
+
3070
+ # Converts hash and nil to an options object
3071
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3072
+
3073
+ # Customize the options with defaults
3074
+ metadata = @config.rpcs.get_intelligence_finding.metadata.to_h
3075
+
3076
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3077
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3078
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3079
+ gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION
3080
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3081
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3082
+
3083
+ header_params = {}
3084
+ if request.name
3085
+ header_params["name"] = request.name
3086
+ end
3087
+
3088
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3089
+ metadata[:"x-goog-request-params"] ||= request_params_header
3090
+
3091
+ options.apply_defaults timeout: @config.rpcs.get_intelligence_finding.timeout,
3092
+ metadata: metadata,
3093
+ retry_policy: @config.rpcs.get_intelligence_finding.retry_policy
3094
+
3095
+ options.apply_defaults timeout: @config.timeout,
3096
+ metadata: @config.metadata,
3097
+ retry_policy: @config.retry_policy
3098
+
3099
+ @storage_control_stub.call_rpc :get_intelligence_finding, request, options: options do |response, operation|
3100
+ yield response, operation if block_given?
3101
+ end
3102
+ rescue ::GRPC::BadStatus => e
3103
+ raise ::Google::Cloud::Error.from_error(e)
3104
+ end
3105
+
3106
+ ##
3107
+ # Lists the `IntelligenceFinding` resources for the specified project.
3108
+ #
3109
+ # @overload list_intelligence_findings(request, options = nil)
3110
+ # Pass arguments to `list_intelligence_findings` via a request object, either of type
3111
+ # {::Google::Cloud::Storage::Control::V2::ListIntelligenceFindingsRequest} or an equivalent Hash.
3112
+ #
3113
+ # @param request [::Google::Cloud::Storage::Control::V2::ListIntelligenceFindingsRequest, ::Hash]
3114
+ # A request object representing the call parameters. Required. To specify no
3115
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3116
+ # @param options [::Gapic::CallOptions, ::Hash]
3117
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3118
+ #
3119
+ # @overload list_intelligence_findings(parent: nil, filter: nil, page_size: nil, page_token: nil)
3120
+ # Pass arguments to `list_intelligence_findings` via keyword arguments. Note that at
3121
+ # least one keyword argument is required. To specify no parameters, or to keep all
3122
+ # the default parameter values, pass an empty Hash as a request object (see above).
3123
+ #
3124
+ # @param parent [::String]
3125
+ # Required. The parent of the `IntelligenceFinding` resource.
3126
+ #
3127
+ # Format: `projects/{project}/locations/{location}`
3128
+ # @param filter [::String]
3129
+ # Optional. The filter expression to be applied.
3130
+ # Supports filtering by `type` and `associated_resources`.
3131
+ # @param page_size [::Integer]
3132
+ # Optional. The maximum number of `IntelligenceFinding` resources to return.
3133
+ #
3134
+ # The maximum value is `100`; values above `100` will be coerced to `100`.
3135
+ # The default value is `100`.
3136
+ # @param page_token [::String]
3137
+ # Optional. A page token, received from a previous `ListIntelligenceFindings`
3138
+ # call. Provide this to retrieve the subsequent page.
3139
+ #
3140
+ # When paginating, all other parameters provided to
3141
+ # `ListIntelligenceFindings` must match the call that provided the page
3142
+ # token.
3143
+ #
3144
+ # @yield [response, operation] Access the result along with the RPC operation
3145
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Storage::Control::V2::IntelligenceFinding>]
3146
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3147
+ #
3148
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Storage::Control::V2::IntelligenceFinding>]
3149
+ #
3150
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3151
+ #
3152
+ # @example Basic example
3153
+ # require "google/cloud/storage/control/v2"
3154
+ #
3155
+ # # Create a client object. The client can be reused for multiple calls.
3156
+ # client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new
3157
+ #
3158
+ # # Create a request. To set request fields, pass in keyword arguments.
3159
+ # request = Google::Cloud::Storage::Control::V2::ListIntelligenceFindingsRequest.new
3160
+ #
3161
+ # # Call the list_intelligence_findings method.
3162
+ # result = client.list_intelligence_findings request
3163
+ #
3164
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3165
+ # # over elements, and API calls will be issued to fetch pages as needed.
3166
+ # result.each do |item|
3167
+ # # Each element is of type ::Google::Cloud::Storage::Control::V2::IntelligenceFinding.
3168
+ # p item
3169
+ # end
3170
+ #
3171
+ def list_intelligence_findings request, options = nil
3172
+ raise ::ArgumentError, "request must be provided" if request.nil?
3173
+
3174
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::ListIntelligenceFindingsRequest
3175
+
3176
+ # Converts hash and nil to an options object
3177
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3178
+
3179
+ # Customize the options with defaults
3180
+ metadata = @config.rpcs.list_intelligence_findings.metadata.to_h
3181
+
3182
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3183
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3184
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3185
+ gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION
3186
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3187
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3188
+
3189
+ header_params = {}
3190
+ if request.parent
3191
+ header_params["parent"] = request.parent
3192
+ end
3193
+
3194
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3195
+ metadata[:"x-goog-request-params"] ||= request_params_header
3196
+
3197
+ options.apply_defaults timeout: @config.rpcs.list_intelligence_findings.timeout,
3198
+ metadata: metadata,
3199
+ retry_policy: @config.rpcs.list_intelligence_findings.retry_policy
3200
+
3201
+ options.apply_defaults timeout: @config.timeout,
3202
+ metadata: @config.metadata,
3203
+ retry_policy: @config.retry_policy
3204
+
3205
+ @storage_control_stub.call_rpc :list_intelligence_findings, request, options: options do |response, operation|
3206
+ response = ::Gapic::PagedEnumerable.new @storage_control_stub, :list_intelligence_findings, request, response, operation, options
3207
+ yield response, operation if block_given?
3208
+ throw :response, response
3209
+ end
3210
+ rescue ::GRPC::BadStatus => e
3211
+ raise ::Google::Cloud::Error.from_error(e)
3212
+ end
3213
+
3214
+ ##
3215
+ # Summarize the intelligence findings for the specified scope(org, folder or
3216
+ # project).
3217
+ #
3218
+ # @overload summarize_intelligence_findings(request, options = nil)
3219
+ # Pass arguments to `summarize_intelligence_findings` via a request object, either of type
3220
+ # {::Google::Cloud::Storage::Control::V2::SummarizeIntelligenceFindingsRequest} or an equivalent Hash.
3221
+ #
3222
+ # @param request [::Google::Cloud::Storage::Control::V2::SummarizeIntelligenceFindingsRequest, ::Hash]
3223
+ # A request object representing the call parameters. Required. To specify no
3224
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3225
+ # @param options [::Gapic::CallOptions, ::Hash]
3226
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3227
+ #
3228
+ # @overload summarize_intelligence_findings(parent: nil, resource_scope: nil, filter: nil, page_size: nil, page_token: nil)
3229
+ # Pass arguments to `summarize_intelligence_findings` via keyword arguments. Note that at
3230
+ # least one keyword argument is required. To specify no parameters, or to keep all
3231
+ # the default parameter values, pass an empty Hash as a request object (see above).
3232
+ #
3233
+ # @param parent [::String]
3234
+ # Required. The scope to summarize the findings for.
3235
+ # Format:
3236
+ # - `organizations/{organization}/locations/{location}`
3237
+ # - `folders/{folder}/locations/{location}`
3238
+ # - `projects/{project}/locations/{location}`
3239
+ # @param resource_scope [::Google::Cloud::Storage::Control::V2::SummarizeIntelligenceFindingsRequest::ResourceScope]
3240
+ # Optional. Determines the granularity of the findings
3241
+ # when the `parent` is an organization or folder.
3242
+ #
3243
+ # - `PARENT` (or not set): A single summary is
3244
+ # returned for each insight type, aggregated across the entire `parent`
3245
+ # scope.
3246
+ # - `PROJECT`: A separate summary is returned for each
3247
+ # insight type for every project within the `parent` scope.
3248
+ #
3249
+ # The only supported values are `PARENT` and `PROJECT`.
3250
+ # If no value is specified, the API behaviour defaults to the `PARENT`.
3251
+ # @param filter [::String]
3252
+ # Optional. The filter expression, following AIP-160.
3253
+ # Supports filtering by FindingType.
3254
+ # @param page_size [::Integer]
3255
+ # Optional. The maximum number of findings to return.
3256
+ #
3257
+ # The maximum value is `100`; values above `100` will be coerced to `100`.
3258
+ # The default value is `100`.
3259
+ # @param page_token [::String]
3260
+ # Optional. A page token, received from a previous
3261
+ # `SummarizeIntelligenceFindings` call. Provide this to retrieve the
3262
+ # subsequent page.
3263
+ #
3264
+ # When paginating, all other parameters provided to
3265
+ # `SummarizeIntelligenceFindings` must match the call that provided the page
3266
+ # token.
3267
+ #
3268
+ # @yield [response, operation] Access the result along with the RPC operation
3269
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Storage::Control::V2::FindingSummary>]
3270
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3271
+ #
3272
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Storage::Control::V2::FindingSummary>]
3273
+ #
3274
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3275
+ #
3276
+ # @example Basic example
3277
+ # require "google/cloud/storage/control/v2"
3278
+ #
3279
+ # # Create a client object. The client can be reused for multiple calls.
3280
+ # client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new
3281
+ #
3282
+ # # Create a request. To set request fields, pass in keyword arguments.
3283
+ # request = Google::Cloud::Storage::Control::V2::SummarizeIntelligenceFindingsRequest.new
3284
+ #
3285
+ # # Call the summarize_intelligence_findings method.
3286
+ # result = client.summarize_intelligence_findings request
3287
+ #
3288
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3289
+ # # over elements, and API calls will be issued to fetch pages as needed.
3290
+ # result.each do |item|
3291
+ # # Each element is of type ::Google::Cloud::Storage::Control::V2::FindingSummary.
3292
+ # p item
3293
+ # end
3294
+ #
3295
+ def summarize_intelligence_findings request, options = nil
3296
+ raise ::ArgumentError, "request must be provided" if request.nil?
3297
+
3298
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::SummarizeIntelligenceFindingsRequest
3299
+
3300
+ # Converts hash and nil to an options object
3301
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3302
+
3303
+ # Customize the options with defaults
3304
+ metadata = @config.rpcs.summarize_intelligence_findings.metadata.to_h
3305
+
3306
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3307
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3308
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3309
+ gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION
3310
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3311
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3312
+
3313
+ header_params = {}
3314
+ if request.parent
3315
+ header_params["parent"] = request.parent
3316
+ end
3317
+
3318
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3319
+ metadata[:"x-goog-request-params"] ||= request_params_header
3320
+
3321
+ options.apply_defaults timeout: @config.rpcs.summarize_intelligence_findings.timeout,
3322
+ metadata: metadata,
3323
+ retry_policy: @config.rpcs.summarize_intelligence_findings.retry_policy
3324
+
3325
+ options.apply_defaults timeout: @config.timeout,
3326
+ metadata: @config.metadata,
3327
+ retry_policy: @config.retry_policy
3328
+
3329
+ @storage_control_stub.call_rpc :summarize_intelligence_findings, request, options: options do |response, operation|
3330
+ response = ::Gapic::PagedEnumerable.new @storage_control_stub, :summarize_intelligence_findings, request, response, operation, options
3331
+ yield response, operation if block_given?
3332
+ throw :response, response
3333
+ end
3334
+ rescue ::GRPC::BadStatus => e
3335
+ raise ::Google::Cloud::Error.from_error(e)
3336
+ end
3337
+
3338
+ ##
3339
+ # Gets the `IntelligenceFindingRevision` resource.
3340
+ #
3341
+ # @overload get_intelligence_finding_revision(request, options = nil)
3342
+ # Pass arguments to `get_intelligence_finding_revision` via a request object, either of type
3343
+ # {::Google::Cloud::Storage::Control::V2::GetIntelligenceFindingRevisionRequest} or an equivalent Hash.
3344
+ #
3345
+ # @param request [::Google::Cloud::Storage::Control::V2::GetIntelligenceFindingRevisionRequest, ::Hash]
3346
+ # A request object representing the call parameters. Required. To specify no
3347
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3348
+ # @param options [::Gapic::CallOptions, ::Hash]
3349
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3350
+ #
3351
+ # @overload get_intelligence_finding_revision(name: nil)
3352
+ # Pass arguments to `get_intelligence_finding_revision` via keyword arguments. Note that at
3353
+ # least one keyword argument is required. To specify no parameters, or to keep all
3354
+ # the default parameter values, pass an empty Hash as a request object (see above).
3355
+ #
3356
+ # @param name [::String]
3357
+ # Required. The name of the `IntelligenceFindingRevision` resource.
3358
+ # ## Format:
3359
+ #
3360
+ # `projects/{project}/locations/{location}/intelligenceFindings/{intelligence_finding}/revisions/{revision}`
3361
+ #
3362
+ # @yield [response, operation] Access the result along with the RPC operation
3363
+ # @yieldparam response [::Google::Cloud::Storage::Control::V2::IntelligenceFindingRevision]
3364
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3365
+ #
3366
+ # @return [::Google::Cloud::Storage::Control::V2::IntelligenceFindingRevision]
3367
+ #
3368
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3369
+ #
3370
+ # @example Basic example
3371
+ # require "google/cloud/storage/control/v2"
3372
+ #
3373
+ # # Create a client object. The client can be reused for multiple calls.
3374
+ # client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new
3375
+ #
3376
+ # # Create a request. To set request fields, pass in keyword arguments.
3377
+ # request = Google::Cloud::Storage::Control::V2::GetIntelligenceFindingRevisionRequest.new
3378
+ #
3379
+ # # Call the get_intelligence_finding_revision method.
3380
+ # result = client.get_intelligence_finding_revision request
3381
+ #
3382
+ # # The returned object is of type Google::Cloud::Storage::Control::V2::IntelligenceFindingRevision.
3383
+ # p result
3384
+ #
3385
+ def get_intelligence_finding_revision request, options = nil
3386
+ raise ::ArgumentError, "request must be provided" if request.nil?
3387
+
3388
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::GetIntelligenceFindingRevisionRequest
3389
+
3390
+ # Converts hash and nil to an options object
3391
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3392
+
3393
+ # Customize the options with defaults
3394
+ metadata = @config.rpcs.get_intelligence_finding_revision.metadata.to_h
3395
+
3396
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3397
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3398
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3399
+ gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION
3400
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3401
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3402
+
3403
+ header_params = {}
3404
+ if request.name
3405
+ header_params["name"] = request.name
3406
+ end
3407
+
3408
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3409
+ metadata[:"x-goog-request-params"] ||= request_params_header
3410
+
3411
+ options.apply_defaults timeout: @config.rpcs.get_intelligence_finding_revision.timeout,
3412
+ metadata: metadata,
3413
+ retry_policy: @config.rpcs.get_intelligence_finding_revision.retry_policy
3414
+
3415
+ options.apply_defaults timeout: @config.timeout,
3416
+ metadata: @config.metadata,
3417
+ retry_policy: @config.retry_policy
3418
+
3419
+ @storage_control_stub.call_rpc :get_intelligence_finding_revision, request, options: options do |response, operation|
3420
+ yield response, operation if block_given?
3421
+ end
3422
+ rescue ::GRPC::BadStatus => e
3423
+ raise ::Google::Cloud::Error.from_error(e)
3424
+ end
3425
+
3426
+ ##
3427
+ # Lists all the revisions of an `IntelligenceFinding` resource.
3428
+ #
3429
+ # @overload list_intelligence_finding_revisions(request, options = nil)
3430
+ # Pass arguments to `list_intelligence_finding_revisions` via a request object, either of type
3431
+ # {::Google::Cloud::Storage::Control::V2::ListIntelligenceFindingRevisionsRequest} or an equivalent Hash.
3432
+ #
3433
+ # @param request [::Google::Cloud::Storage::Control::V2::ListIntelligenceFindingRevisionsRequest, ::Hash]
3434
+ # A request object representing the call parameters. Required. To specify no
3435
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3436
+ # @param options [::Gapic::CallOptions, ::Hash]
3437
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3438
+ #
3439
+ # @overload list_intelligence_finding_revisions(parent: nil, page_size: nil, page_token: nil)
3440
+ # Pass arguments to `list_intelligence_finding_revisions` via keyword arguments. Note that at
3441
+ # least one keyword argument is required. To specify no parameters, or to keep all
3442
+ # the default parameter values, pass an empty Hash as a request object (see above).
3443
+ #
3444
+ # @param parent [::String]
3445
+ # Required. The parent of the `IntelligenceFindingRevision` resource.
3446
+ # ## Format:
3447
+ #
3448
+ # `projects/{project}/locations/{location}/intelligenceFindings/{intelligence_finding}`
3449
+ # @param page_size [::Integer]
3450
+ # Optional. The maximum number of `IntelligenceFindingRevision` resources to
3451
+ # return.
3452
+ #
3453
+ # The maximum value is `100`; values above `100` will be coerced to `100`.
3454
+ # The default value is `100`.
3455
+ # @param page_token [::String]
3456
+ # Optional. A page token, received from a previous
3457
+ # `ListIntelligenceFindingRevisions` call. Provide this to retrieve the
3458
+ # subsequent page.
3459
+ #
3460
+ # @yield [response, operation] Access the result along with the RPC operation
3461
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Storage::Control::V2::IntelligenceFindingRevision>]
3462
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3463
+ #
3464
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Storage::Control::V2::IntelligenceFindingRevision>]
3465
+ #
3466
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3467
+ #
3468
+ # @example Basic example
3469
+ # require "google/cloud/storage/control/v2"
3470
+ #
3471
+ # # Create a client object. The client can be reused for multiple calls.
3472
+ # client = Google::Cloud::Storage::Control::V2::StorageControl::Client.new
3473
+ #
3474
+ # # Create a request. To set request fields, pass in keyword arguments.
3475
+ # request = Google::Cloud::Storage::Control::V2::ListIntelligenceFindingRevisionsRequest.new
3476
+ #
3477
+ # # Call the list_intelligence_finding_revisions method.
3478
+ # result = client.list_intelligence_finding_revisions request
3479
+ #
3480
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3481
+ # # over elements, and API calls will be issued to fetch pages as needed.
3482
+ # result.each do |item|
3483
+ # # Each element is of type ::Google::Cloud::Storage::Control::V2::IntelligenceFindingRevision.
3484
+ # p item
3485
+ # end
3486
+ #
3487
+ def list_intelligence_finding_revisions request, options = nil
3488
+ raise ::ArgumentError, "request must be provided" if request.nil?
3489
+
3490
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Storage::Control::V2::ListIntelligenceFindingRevisionsRequest
3491
+
3492
+ # Converts hash and nil to an options object
3493
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3494
+
3495
+ # Customize the options with defaults
3496
+ metadata = @config.rpcs.list_intelligence_finding_revisions.metadata.to_h
3497
+
3498
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3499
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3500
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3501
+ gapic_version: ::Google::Cloud::Storage::Control::V2::VERSION
3502
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3503
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3504
+
3505
+ header_params = {}
3506
+ if request.parent
3507
+ header_params["parent"] = request.parent
3508
+ end
3509
+
3510
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3511
+ metadata[:"x-goog-request-params"] ||= request_params_header
3512
+
3513
+ options.apply_defaults timeout: @config.rpcs.list_intelligence_finding_revisions.timeout,
3514
+ metadata: metadata,
3515
+ retry_policy: @config.rpcs.list_intelligence_finding_revisions.retry_policy
3516
+
3517
+ options.apply_defaults timeout: @config.timeout,
3518
+ metadata: @config.metadata,
3519
+ retry_policy: @config.retry_policy
3520
+
3521
+ @storage_control_stub.call_rpc :list_intelligence_finding_revisions, request, options: options do |response, operation|
3522
+ response = ::Gapic::PagedEnumerable.new @storage_control_stub, :list_intelligence_finding_revisions, request, response, operation, options
3523
+ yield response, operation if block_given?
3524
+ throw :response, response
3525
+ end
3526
+ rescue ::GRPC::BadStatus => e
3527
+ raise ::Google::Cloud::Error.from_error(e)
3528
+ end
3529
+
2993
3530
  ##
2994
3531
  # Configuration class for the StorageControl API.
2995
3532
  #
@@ -3086,6 +3623,7 @@ module Google
3086
3623
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3087
3624
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3088
3625
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3626
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
3089
3627
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3090
3628
  # trigger a retry.
3091
3629
  # @return [::Hash]
@@ -3169,6 +3707,7 @@ module Google
3169
3707
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3170
3708
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3171
3709
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3710
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
3172
3711
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3173
3712
  # trigger a retry.
3174
3713
  #
@@ -3308,6 +3847,31 @@ module Google
3308
3847
  # @return [::Gapic::Config::Method]
3309
3848
  #
3310
3849
  attr_reader :test_iam_permissions
3850
+ ##
3851
+ # RPC-specific configuration for `get_intelligence_finding`
3852
+ # @return [::Gapic::Config::Method]
3853
+ #
3854
+ attr_reader :get_intelligence_finding
3855
+ ##
3856
+ # RPC-specific configuration for `list_intelligence_findings`
3857
+ # @return [::Gapic::Config::Method]
3858
+ #
3859
+ attr_reader :list_intelligence_findings
3860
+ ##
3861
+ # RPC-specific configuration for `summarize_intelligence_findings`
3862
+ # @return [::Gapic::Config::Method]
3863
+ #
3864
+ attr_reader :summarize_intelligence_findings
3865
+ ##
3866
+ # RPC-specific configuration for `get_intelligence_finding_revision`
3867
+ # @return [::Gapic::Config::Method]
3868
+ #
3869
+ attr_reader :get_intelligence_finding_revision
3870
+ ##
3871
+ # RPC-specific configuration for `list_intelligence_finding_revisions`
3872
+ # @return [::Gapic::Config::Method]
3873
+ #
3874
+ attr_reader :list_intelligence_finding_revisions
3311
3875
 
3312
3876
  # @private
3313
3877
  def initialize parent_rpcs = nil
@@ -3365,6 +3929,16 @@ module Google
3365
3929
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
3366
3930
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
3367
3931
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
3932
+ get_intelligence_finding_config = parent_rpcs.get_intelligence_finding if parent_rpcs.respond_to? :get_intelligence_finding
3933
+ @get_intelligence_finding = ::Gapic::Config::Method.new get_intelligence_finding_config
3934
+ list_intelligence_findings_config = parent_rpcs.list_intelligence_findings if parent_rpcs.respond_to? :list_intelligence_findings
3935
+ @list_intelligence_findings = ::Gapic::Config::Method.new list_intelligence_findings_config
3936
+ summarize_intelligence_findings_config = parent_rpcs.summarize_intelligence_findings if parent_rpcs.respond_to? :summarize_intelligence_findings
3937
+ @summarize_intelligence_findings = ::Gapic::Config::Method.new summarize_intelligence_findings_config
3938
+ get_intelligence_finding_revision_config = parent_rpcs.get_intelligence_finding_revision if parent_rpcs.respond_to? :get_intelligence_finding_revision
3939
+ @get_intelligence_finding_revision = ::Gapic::Config::Method.new get_intelligence_finding_revision_config
3940
+ list_intelligence_finding_revisions_config = parent_rpcs.list_intelligence_finding_revisions if parent_rpcs.respond_to? :list_intelligence_finding_revisions
3941
+ @list_intelligence_finding_revisions = ::Gapic::Config::Method.new list_intelligence_finding_revisions_config
3368
3942
 
3369
3943
  yield self if block_given?
3370
3944
  end
@@ -704,6 +704,7 @@ module Google
704
704
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
705
705
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
706
706
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
707
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
707
708
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
708
709
  # trigger a retry.
709
710
  # @return [::Hash]
@@ -787,6 +788,7 @@ module Google
787
788
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
788
789
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
789
790
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
791
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
790
792
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
791
793
  # trigger a retry.
792
794
  #