google-cloud-dlp-v2 1.18.0 → 1.19.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 (34) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/README.md +2 -6
  4. data/lib/google/cloud/dlp/v2/dlp_service/client.rb +546 -52
  5. data/lib/google/cloud/dlp/v2/dlp_service/credentials.rb +1 -1
  6. data/lib/google/cloud/dlp/v2/dlp_service/paths.rb +20 -1
  7. data/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb +511 -52
  8. data/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb +308 -1
  9. data/lib/google/cloud/dlp/v2/dlp_service/rest.rb +2 -2
  10. data/lib/google/cloud/dlp/v2/dlp_service.rb +2 -2
  11. data/lib/google/cloud/dlp/v2/rest.rb +1 -1
  12. data/lib/google/cloud/dlp/v2/version.rb +1 -1
  13. data/lib/google/cloud/dlp/v2.rb +1 -1
  14. data/lib/google/privacy/dlp/v2/dlp_pb.rb +20 -1
  15. data/lib/google/privacy/dlp/v2/dlp_services_pb.rb +48 -38
  16. data/lib/google/privacy/dlp/v2/storage_pb.rb +5 -1
  17. data/lib/google-cloud-dlp-v2.rb +1 -1
  18. data/proto_docs/README.md +1 -1
  19. data/proto_docs/google/api/client.rb +1 -1
  20. data/proto_docs/google/api/field_behavior.rb +1 -1
  21. data/proto_docs/google/api/launch_stage.rb +1 -1
  22. data/proto_docs/google/api/resource.rb +1 -1
  23. data/proto_docs/google/privacy/dlp/v2/dlp.rb +453 -141
  24. data/proto_docs/google/privacy/dlp/v2/storage.rb +76 -20
  25. data/proto_docs/google/protobuf/any.rb +1 -1
  26. data/proto_docs/google/protobuf/duration.rb +1 -1
  27. data/proto_docs/google/protobuf/empty.rb +1 -1
  28. data/proto_docs/google/protobuf/field_mask.rb +1 -1
  29. data/proto_docs/google/protobuf/timestamp.rb +8 -7
  30. data/proto_docs/google/rpc/status.rb +1 -1
  31. data/proto_docs/google/type/date.rb +1 -1
  32. data/proto_docs/google/type/dayofweek.rb +1 -1
  33. data/proto_docs/google/type/timeofday.rb +1 -1
  34. metadata +6 -5
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2023 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -2273,6 +2273,206 @@ module Google
2273
2273
  end
2274
2274
  end
2275
2275
 
2276
+ ##
2277
+ # Baseline implementation for the create_content_policy REST call
2278
+ #
2279
+ # @param request_pb [::Google::Cloud::Dlp::V2::CreateContentPolicyRequest]
2280
+ # A request object representing the call parameters. Required.
2281
+ # @param options [::Gapic::CallOptions]
2282
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2283
+ #
2284
+ # @yield [result, operation] Access the result along with the TransportOperation object
2285
+ # @yieldparam result [::Google::Cloud::Dlp::V2::ContentPolicy]
2286
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2287
+ #
2288
+ # @return [::Google::Cloud::Dlp::V2::ContentPolicy]
2289
+ # A result object deserialized from the server's reply
2290
+ def create_content_policy request_pb, options = nil
2291
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2292
+
2293
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_content_policy_request request_pb
2294
+ query_string_params = if query_string_params.any?
2295
+ query_string_params.to_h { |p| p.split "=", 2 }
2296
+ else
2297
+ {}
2298
+ end
2299
+
2300
+ response = @client_stub.make_http_request(
2301
+ verb,
2302
+ uri: uri,
2303
+ body: body || "",
2304
+ params: query_string_params,
2305
+ method_name: "create_content_policy",
2306
+ options: options
2307
+ )
2308
+ operation = ::Gapic::Rest::TransportOperation.new response
2309
+ result = ::Google::Cloud::Dlp::V2::ContentPolicy.decode_json response.body, ignore_unknown_fields: true
2310
+ catch :response do
2311
+ yield result, operation if block_given?
2312
+ result
2313
+ end
2314
+ end
2315
+
2316
+ ##
2317
+ # Baseline implementation for the update_content_policy REST call
2318
+ #
2319
+ # @param request_pb [::Google::Cloud::Dlp::V2::UpdateContentPolicyRequest]
2320
+ # A request object representing the call parameters. Required.
2321
+ # @param options [::Gapic::CallOptions]
2322
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2323
+ #
2324
+ # @yield [result, operation] Access the result along with the TransportOperation object
2325
+ # @yieldparam result [::Google::Cloud::Dlp::V2::ContentPolicy]
2326
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2327
+ #
2328
+ # @return [::Google::Cloud::Dlp::V2::ContentPolicy]
2329
+ # A result object deserialized from the server's reply
2330
+ def update_content_policy request_pb, options = nil
2331
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2332
+
2333
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_content_policy_request request_pb
2334
+ query_string_params = if query_string_params.any?
2335
+ query_string_params.to_h { |p| p.split "=", 2 }
2336
+ else
2337
+ {}
2338
+ end
2339
+
2340
+ response = @client_stub.make_http_request(
2341
+ verb,
2342
+ uri: uri,
2343
+ body: body || "",
2344
+ params: query_string_params,
2345
+ method_name: "update_content_policy",
2346
+ options: options
2347
+ )
2348
+ operation = ::Gapic::Rest::TransportOperation.new response
2349
+ result = ::Google::Cloud::Dlp::V2::ContentPolicy.decode_json response.body, ignore_unknown_fields: true
2350
+ catch :response do
2351
+ yield result, operation if block_given?
2352
+ result
2353
+ end
2354
+ end
2355
+
2356
+ ##
2357
+ # Baseline implementation for the get_content_policy REST call
2358
+ #
2359
+ # @param request_pb [::Google::Cloud::Dlp::V2::GetContentPolicyRequest]
2360
+ # A request object representing the call parameters. Required.
2361
+ # @param options [::Gapic::CallOptions]
2362
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2363
+ #
2364
+ # @yield [result, operation] Access the result along with the TransportOperation object
2365
+ # @yieldparam result [::Google::Cloud::Dlp::V2::ContentPolicy]
2366
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2367
+ #
2368
+ # @return [::Google::Cloud::Dlp::V2::ContentPolicy]
2369
+ # A result object deserialized from the server's reply
2370
+ def get_content_policy request_pb, options = nil
2371
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2372
+
2373
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_content_policy_request request_pb
2374
+ query_string_params = if query_string_params.any?
2375
+ query_string_params.to_h { |p| p.split "=", 2 }
2376
+ else
2377
+ {}
2378
+ end
2379
+
2380
+ response = @client_stub.make_http_request(
2381
+ verb,
2382
+ uri: uri,
2383
+ body: body || "",
2384
+ params: query_string_params,
2385
+ method_name: "get_content_policy",
2386
+ options: options
2387
+ )
2388
+ operation = ::Gapic::Rest::TransportOperation.new response
2389
+ result = ::Google::Cloud::Dlp::V2::ContentPolicy.decode_json response.body, ignore_unknown_fields: true
2390
+ catch :response do
2391
+ yield result, operation if block_given?
2392
+ result
2393
+ end
2394
+ end
2395
+
2396
+ ##
2397
+ # Baseline implementation for the list_content_policies REST call
2398
+ #
2399
+ # @param request_pb [::Google::Cloud::Dlp::V2::ListContentPoliciesRequest]
2400
+ # A request object representing the call parameters. Required.
2401
+ # @param options [::Gapic::CallOptions]
2402
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2403
+ #
2404
+ # @yield [result, operation] Access the result along with the TransportOperation object
2405
+ # @yieldparam result [::Google::Cloud::Dlp::V2::ListContentPoliciesResponse]
2406
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2407
+ #
2408
+ # @return [::Google::Cloud::Dlp::V2::ListContentPoliciesResponse]
2409
+ # A result object deserialized from the server's reply
2410
+ def list_content_policies request_pb, options = nil
2411
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2412
+
2413
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_content_policies_request request_pb
2414
+ query_string_params = if query_string_params.any?
2415
+ query_string_params.to_h { |p| p.split "=", 2 }
2416
+ else
2417
+ {}
2418
+ end
2419
+
2420
+ response = @client_stub.make_http_request(
2421
+ verb,
2422
+ uri: uri,
2423
+ body: body || "",
2424
+ params: query_string_params,
2425
+ method_name: "list_content_policies",
2426
+ options: options
2427
+ )
2428
+ operation = ::Gapic::Rest::TransportOperation.new response
2429
+ result = ::Google::Cloud::Dlp::V2::ListContentPoliciesResponse.decode_json response.body, ignore_unknown_fields: true
2430
+ catch :response do
2431
+ yield result, operation if block_given?
2432
+ result
2433
+ end
2434
+ end
2435
+
2436
+ ##
2437
+ # Baseline implementation for the delete_content_policy REST call
2438
+ #
2439
+ # @param request_pb [::Google::Cloud::Dlp::V2::DeleteContentPolicyRequest]
2440
+ # A request object representing the call parameters. Required.
2441
+ # @param options [::Gapic::CallOptions]
2442
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2443
+ #
2444
+ # @yield [result, operation] Access the result along with the TransportOperation object
2445
+ # @yieldparam result [::Google::Protobuf::Empty]
2446
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2447
+ #
2448
+ # @return [::Google::Protobuf::Empty]
2449
+ # A result object deserialized from the server's reply
2450
+ def delete_content_policy request_pb, options = nil
2451
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2452
+
2453
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_content_policy_request request_pb
2454
+ query_string_params = if query_string_params.any?
2455
+ query_string_params.to_h { |p| p.split "=", 2 }
2456
+ else
2457
+ {}
2458
+ end
2459
+
2460
+ response = @client_stub.make_http_request(
2461
+ verb,
2462
+ uri: uri,
2463
+ body: body || "",
2464
+ params: query_string_params,
2465
+ method_name: "delete_content_policy",
2466
+ options: options
2467
+ )
2468
+ operation = ::Gapic::Rest::TransportOperation.new response
2469
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
2470
+ catch :response do
2471
+ yield result, operation if block_given?
2472
+ result
2473
+ end
2474
+ end
2475
+
2276
2476
  ##
2277
2477
  # @private
2278
2478
  #
@@ -4110,6 +4310,113 @@ module Google
4110
4310
  )
4111
4311
  transcoder.transcode request_pb
4112
4312
  end
4313
+
4314
+ ##
4315
+ # @private
4316
+ #
4317
+ # GRPC transcoding helper method for the create_content_policy REST call
4318
+ #
4319
+ # @param request_pb [::Google::Cloud::Dlp::V2::CreateContentPolicyRequest]
4320
+ # A request object representing the call parameters. Required.
4321
+ # @return [Array(String, [String, nil], Hash{String => String})]
4322
+ # Uri, Body, Query string parameters
4323
+ def self.transcode_create_content_policy_request request_pb
4324
+ transcoder = Gapic::Rest::GrpcTranscoder.new
4325
+ .with_bindings(
4326
+ uri_method: :post,
4327
+ uri_template: "/v2/{parent}/contentPolicies",
4328
+ body: "*",
4329
+ matches: [
4330
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
4331
+ ]
4332
+ )
4333
+ transcoder.transcode request_pb
4334
+ end
4335
+
4336
+ ##
4337
+ # @private
4338
+ #
4339
+ # GRPC transcoding helper method for the update_content_policy REST call
4340
+ #
4341
+ # @param request_pb [::Google::Cloud::Dlp::V2::UpdateContentPolicyRequest]
4342
+ # A request object representing the call parameters. Required.
4343
+ # @return [Array(String, [String, nil], Hash{String => String})]
4344
+ # Uri, Body, Query string parameters
4345
+ def self.transcode_update_content_policy_request request_pb
4346
+ transcoder = Gapic::Rest::GrpcTranscoder.new
4347
+ .with_bindings(
4348
+ uri_method: :patch,
4349
+ uri_template: "/v2/{name}",
4350
+ body: "*",
4351
+ matches: [
4352
+ ["name", %r{^projects/[^/]+/locations/[^/]+/contentPolicies/[^/]+/?$}, false]
4353
+ ]
4354
+ )
4355
+ transcoder.transcode request_pb
4356
+ end
4357
+
4358
+ ##
4359
+ # @private
4360
+ #
4361
+ # GRPC transcoding helper method for the get_content_policy REST call
4362
+ #
4363
+ # @param request_pb [::Google::Cloud::Dlp::V2::GetContentPolicyRequest]
4364
+ # A request object representing the call parameters. Required.
4365
+ # @return [Array(String, [String, nil], Hash{String => String})]
4366
+ # Uri, Body, Query string parameters
4367
+ def self.transcode_get_content_policy_request request_pb
4368
+ transcoder = Gapic::Rest::GrpcTranscoder.new
4369
+ .with_bindings(
4370
+ uri_method: :get,
4371
+ uri_template: "/v2/{name}",
4372
+ matches: [
4373
+ ["name", %r{^projects/[^/]+/locations/[^/]+/contentPolicies/[^/]+/?$}, false]
4374
+ ]
4375
+ )
4376
+ transcoder.transcode request_pb
4377
+ end
4378
+
4379
+ ##
4380
+ # @private
4381
+ #
4382
+ # GRPC transcoding helper method for the list_content_policies REST call
4383
+ #
4384
+ # @param request_pb [::Google::Cloud::Dlp::V2::ListContentPoliciesRequest]
4385
+ # A request object representing the call parameters. Required.
4386
+ # @return [Array(String, [String, nil], Hash{String => String})]
4387
+ # Uri, Body, Query string parameters
4388
+ def self.transcode_list_content_policies_request request_pb
4389
+ transcoder = Gapic::Rest::GrpcTranscoder.new
4390
+ .with_bindings(
4391
+ uri_method: :get,
4392
+ uri_template: "/v2/{parent}/contentPolicies",
4393
+ matches: [
4394
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
4395
+ ]
4396
+ )
4397
+ transcoder.transcode request_pb
4398
+ end
4399
+
4400
+ ##
4401
+ # @private
4402
+ #
4403
+ # GRPC transcoding helper method for the delete_content_policy REST call
4404
+ #
4405
+ # @param request_pb [::Google::Cloud::Dlp::V2::DeleteContentPolicyRequest]
4406
+ # A request object representing the call parameters. Required.
4407
+ # @return [Array(String, [String, nil], Hash{String => String})]
4408
+ # Uri, Body, Query string parameters
4409
+ def self.transcode_delete_content_policy_request request_pb
4410
+ transcoder = Gapic::Rest::GrpcTranscoder.new
4411
+ .with_bindings(
4412
+ uri_method: :delete,
4413
+ uri_template: "/v2/{name}",
4414
+ matches: [
4415
+ ["name", %r{^projects/[^/]+/locations/[^/]+/contentPolicies/[^/]+/?$}, false]
4416
+ ]
4417
+ )
4418
+ transcoder.transcode request_pb
4419
+ end
4113
4420
  end
4114
4421
  end
4115
4422
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2023 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ module Google
35
35
  # inspection, classification, and de-identification platform that works
36
36
  # on text, images, and Google Cloud storage repositories.
37
37
  # To learn more about concepts and find how-to guides see
38
- # https://cloud.google.com/sensitive-data-protection/docs/.
38
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/.
39
39
  #
40
40
  # To load this service and instantiate a REST client:
41
41
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ module Google
36
36
  # inspection, classification, and de-identification platform that works
37
37
  # on text, images, and Google Cloud storage repositories.
38
38
  # To learn more about concepts and find how-to guides see
39
- # https://cloud.google.com/sensitive-data-protection/docs/.
39
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/.
40
40
  #
41
41
  # @example Load this service and instantiate a gRPC client
42
42
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2023 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Dlp
23
23
  module V2
24
- VERSION = "1.18.0"
24
+ VERSION = "1.19.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.