google-cloud-storage-control-v2 1.10.0 → 1.11.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 +4 -4
- data/lib/google/cloud/storage/control/v2/storage_control/client.rb +572 -0
- data/lib/google/cloud/storage/control/v2/storage_control/paths.rb +57 -0
- data/lib/google/cloud/storage/control/v2/storage_control/rest/client.rb +537 -0
- data/lib/google/cloud/storage/control/v2/storage_control/rest/service_stub.rb +319 -0
- data/lib/google/cloud/storage/control/v2/version.rb +1 -1
- data/lib/google/storage/control/v2/storage_control_pb.rb +34 -1
- data/lib/google/storage/control/v2/storage_control_services_pb.rb +11 -0
- data/proto_docs/google/api/client.rb +4 -0
- data/proto_docs/google/storage/control/v2/storage_control.rb +638 -0
- data/proto_docs/google/type/interval.rb +45 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c0314087936ad01d0840140fd4e4a588ff5caa2a5da84327ad1e19082edcfc13
|
|
4
|
+
data.tar.gz: 3e9689fd73c393725e01800ebb6e15ced70a1209f6b15a9d1a17b811766d59e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 534de43c7ddeb78ee06e1f9fa51fd142a25fe7cf8b6f453325fe35de0a1db01f2e837c48982b64400f7b95566a1857a03a88472abfd825366a4e31dc190a871c
|
|
7
|
+
data.tar.gz: 3943c745f0e5a1615c1b8137cc396a928acba1eaa5776f3a34ecfe41fea5656daace2508881bfdd44ffc90ecfff76c13bb8d2511462d3e8c2e15c32999006706
|
|
@@ -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
|
#
|
|
@@ -3308,6 +3845,31 @@ module Google
|
|
|
3308
3845
|
# @return [::Gapic::Config::Method]
|
|
3309
3846
|
#
|
|
3310
3847
|
attr_reader :test_iam_permissions
|
|
3848
|
+
##
|
|
3849
|
+
# RPC-specific configuration for `get_intelligence_finding`
|
|
3850
|
+
# @return [::Gapic::Config::Method]
|
|
3851
|
+
#
|
|
3852
|
+
attr_reader :get_intelligence_finding
|
|
3853
|
+
##
|
|
3854
|
+
# RPC-specific configuration for `list_intelligence_findings`
|
|
3855
|
+
# @return [::Gapic::Config::Method]
|
|
3856
|
+
#
|
|
3857
|
+
attr_reader :list_intelligence_findings
|
|
3858
|
+
##
|
|
3859
|
+
# RPC-specific configuration for `summarize_intelligence_findings`
|
|
3860
|
+
# @return [::Gapic::Config::Method]
|
|
3861
|
+
#
|
|
3862
|
+
attr_reader :summarize_intelligence_findings
|
|
3863
|
+
##
|
|
3864
|
+
# RPC-specific configuration for `get_intelligence_finding_revision`
|
|
3865
|
+
# @return [::Gapic::Config::Method]
|
|
3866
|
+
#
|
|
3867
|
+
attr_reader :get_intelligence_finding_revision
|
|
3868
|
+
##
|
|
3869
|
+
# RPC-specific configuration for `list_intelligence_finding_revisions`
|
|
3870
|
+
# @return [::Gapic::Config::Method]
|
|
3871
|
+
#
|
|
3872
|
+
attr_reader :list_intelligence_finding_revisions
|
|
3311
3873
|
|
|
3312
3874
|
# @private
|
|
3313
3875
|
def initialize parent_rpcs = nil
|
|
@@ -3365,6 +3927,16 @@ module Google
|
|
|
3365
3927
|
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
|
3366
3928
|
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
|
3367
3929
|
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
|
3930
|
+
get_intelligence_finding_config = parent_rpcs.get_intelligence_finding if parent_rpcs.respond_to? :get_intelligence_finding
|
|
3931
|
+
@get_intelligence_finding = ::Gapic::Config::Method.new get_intelligence_finding_config
|
|
3932
|
+
list_intelligence_findings_config = parent_rpcs.list_intelligence_findings if parent_rpcs.respond_to? :list_intelligence_findings
|
|
3933
|
+
@list_intelligence_findings = ::Gapic::Config::Method.new list_intelligence_findings_config
|
|
3934
|
+
summarize_intelligence_findings_config = parent_rpcs.summarize_intelligence_findings if parent_rpcs.respond_to? :summarize_intelligence_findings
|
|
3935
|
+
@summarize_intelligence_findings = ::Gapic::Config::Method.new summarize_intelligence_findings_config
|
|
3936
|
+
get_intelligence_finding_revision_config = parent_rpcs.get_intelligence_finding_revision if parent_rpcs.respond_to? :get_intelligence_finding_revision
|
|
3937
|
+
@get_intelligence_finding_revision = ::Gapic::Config::Method.new get_intelligence_finding_revision_config
|
|
3938
|
+
list_intelligence_finding_revisions_config = parent_rpcs.list_intelligence_finding_revisions if parent_rpcs.respond_to? :list_intelligence_finding_revisions
|
|
3939
|
+
@list_intelligence_finding_revisions = ::Gapic::Config::Method.new list_intelligence_finding_revisions_config
|
|
3368
3940
|
|
|
3369
3941
|
yield self if block_given?
|
|
3370
3942
|
end
|