google-cloud-dlp-v2 0.18.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/dlp/v2/dlp_service/client.rb +582 -45
- data/lib/google/cloud/dlp/v2/dlp_service/paths.rb +19 -0
- data/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb +547 -45
- data/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb +334 -0
- data/lib/google/cloud/dlp/v2/version.rb +1 -1
- data/lib/google/privacy/dlp/v2/dlp_pb.rb +42 -1
- data/lib/google/privacy/dlp/v2/dlp_services_pb.rb +10 -0
- data/lib/google/privacy/dlp/v2/storage_pb.rb +1 -1
- data/proto_docs/google/privacy/dlp/v2/dlp.rb +930 -111
- data/proto_docs/google/privacy/dlp/v2/storage.rb +83 -35
- metadata +2 -2
@@ -876,6 +876,196 @@ module Google
|
|
876
876
|
result
|
877
877
|
end
|
878
878
|
|
879
|
+
##
|
880
|
+
# Baseline implementation for the create_discovery_config REST call
|
881
|
+
#
|
882
|
+
# @param request_pb [::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest]
|
883
|
+
# A request object representing the call parameters. Required.
|
884
|
+
# @param options [::Gapic::CallOptions]
|
885
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
886
|
+
#
|
887
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
888
|
+
# @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig]
|
889
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
890
|
+
#
|
891
|
+
# @return [::Google::Cloud::Dlp::V2::DiscoveryConfig]
|
892
|
+
# A result object deserialized from the server's reply
|
893
|
+
def create_discovery_config request_pb, options = nil
|
894
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
895
|
+
|
896
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_discovery_config_request request_pb
|
897
|
+
query_string_params = if query_string_params.any?
|
898
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
899
|
+
else
|
900
|
+
{}
|
901
|
+
end
|
902
|
+
|
903
|
+
response = @client_stub.make_http_request(
|
904
|
+
verb,
|
905
|
+
uri: uri,
|
906
|
+
body: body || "",
|
907
|
+
params: query_string_params,
|
908
|
+
options: options
|
909
|
+
)
|
910
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
911
|
+
result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.decode_json response.body, ignore_unknown_fields: true
|
912
|
+
|
913
|
+
yield result, operation if block_given?
|
914
|
+
result
|
915
|
+
end
|
916
|
+
|
917
|
+
##
|
918
|
+
# Baseline implementation for the update_discovery_config REST call
|
919
|
+
#
|
920
|
+
# @param request_pb [::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest]
|
921
|
+
# A request object representing the call parameters. Required.
|
922
|
+
# @param options [::Gapic::CallOptions]
|
923
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
924
|
+
#
|
925
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
926
|
+
# @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig]
|
927
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
928
|
+
#
|
929
|
+
# @return [::Google::Cloud::Dlp::V2::DiscoveryConfig]
|
930
|
+
# A result object deserialized from the server's reply
|
931
|
+
def update_discovery_config request_pb, options = nil
|
932
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
933
|
+
|
934
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_discovery_config_request request_pb
|
935
|
+
query_string_params = if query_string_params.any?
|
936
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
937
|
+
else
|
938
|
+
{}
|
939
|
+
end
|
940
|
+
|
941
|
+
response = @client_stub.make_http_request(
|
942
|
+
verb,
|
943
|
+
uri: uri,
|
944
|
+
body: body || "",
|
945
|
+
params: query_string_params,
|
946
|
+
options: options
|
947
|
+
)
|
948
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
949
|
+
result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.decode_json response.body, ignore_unknown_fields: true
|
950
|
+
|
951
|
+
yield result, operation if block_given?
|
952
|
+
result
|
953
|
+
end
|
954
|
+
|
955
|
+
##
|
956
|
+
# Baseline implementation for the get_discovery_config REST call
|
957
|
+
#
|
958
|
+
# @param request_pb [::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest]
|
959
|
+
# A request object representing the call parameters. Required.
|
960
|
+
# @param options [::Gapic::CallOptions]
|
961
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
962
|
+
#
|
963
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
964
|
+
# @yieldparam result [::Google::Cloud::Dlp::V2::DiscoveryConfig]
|
965
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
966
|
+
#
|
967
|
+
# @return [::Google::Cloud::Dlp::V2::DiscoveryConfig]
|
968
|
+
# A result object deserialized from the server's reply
|
969
|
+
def get_discovery_config request_pb, options = nil
|
970
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
971
|
+
|
972
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_discovery_config_request request_pb
|
973
|
+
query_string_params = if query_string_params.any?
|
974
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
975
|
+
else
|
976
|
+
{}
|
977
|
+
end
|
978
|
+
|
979
|
+
response = @client_stub.make_http_request(
|
980
|
+
verb,
|
981
|
+
uri: uri,
|
982
|
+
body: body || "",
|
983
|
+
params: query_string_params,
|
984
|
+
options: options
|
985
|
+
)
|
986
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
987
|
+
result = ::Google::Cloud::Dlp::V2::DiscoveryConfig.decode_json response.body, ignore_unknown_fields: true
|
988
|
+
|
989
|
+
yield result, operation if block_given?
|
990
|
+
result
|
991
|
+
end
|
992
|
+
|
993
|
+
##
|
994
|
+
# Baseline implementation for the list_discovery_configs REST call
|
995
|
+
#
|
996
|
+
# @param request_pb [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest]
|
997
|
+
# A request object representing the call parameters. Required.
|
998
|
+
# @param options [::Gapic::CallOptions]
|
999
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1000
|
+
#
|
1001
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1002
|
+
# @yieldparam result [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse]
|
1003
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1004
|
+
#
|
1005
|
+
# @return [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse]
|
1006
|
+
# A result object deserialized from the server's reply
|
1007
|
+
def list_discovery_configs request_pb, options = nil
|
1008
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1009
|
+
|
1010
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_discovery_configs_request request_pb
|
1011
|
+
query_string_params = if query_string_params.any?
|
1012
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1013
|
+
else
|
1014
|
+
{}
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
response = @client_stub.make_http_request(
|
1018
|
+
verb,
|
1019
|
+
uri: uri,
|
1020
|
+
body: body || "",
|
1021
|
+
params: query_string_params,
|
1022
|
+
options: options
|
1023
|
+
)
|
1024
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1025
|
+
result = ::Google::Cloud::Dlp::V2::ListDiscoveryConfigsResponse.decode_json response.body, ignore_unknown_fields: true
|
1026
|
+
|
1027
|
+
yield result, operation if block_given?
|
1028
|
+
result
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
##
|
1032
|
+
# Baseline implementation for the delete_discovery_config REST call
|
1033
|
+
#
|
1034
|
+
# @param request_pb [::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest]
|
1035
|
+
# A request object representing the call parameters. Required.
|
1036
|
+
# @param options [::Gapic::CallOptions]
|
1037
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1038
|
+
#
|
1039
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1040
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
1041
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1042
|
+
#
|
1043
|
+
# @return [::Google::Protobuf::Empty]
|
1044
|
+
# A result object deserialized from the server's reply
|
1045
|
+
def delete_discovery_config request_pb, options = nil
|
1046
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
1047
|
+
|
1048
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_discovery_config_request request_pb
|
1049
|
+
query_string_params = if query_string_params.any?
|
1050
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
1051
|
+
else
|
1052
|
+
{}
|
1053
|
+
end
|
1054
|
+
|
1055
|
+
response = @client_stub.make_http_request(
|
1056
|
+
verb,
|
1057
|
+
uri: uri,
|
1058
|
+
body: body || "",
|
1059
|
+
params: query_string_params,
|
1060
|
+
options: options
|
1061
|
+
)
|
1062
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
1063
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
1064
|
+
|
1065
|
+
yield result, operation if block_given?
|
1066
|
+
result
|
1067
|
+
end
|
1068
|
+
|
879
1069
|
##
|
880
1070
|
# Baseline implementation for the create_dlp_job REST call
|
881
1071
|
#
|
@@ -2147,6 +2337,150 @@ module Google
|
|
2147
2337
|
transcoder.transcode request_pb
|
2148
2338
|
end
|
2149
2339
|
|
2340
|
+
##
|
2341
|
+
# @private
|
2342
|
+
#
|
2343
|
+
# GRPC transcoding helper method for the create_discovery_config REST call
|
2344
|
+
#
|
2345
|
+
# @param request_pb [::Google::Cloud::Dlp::V2::CreateDiscoveryConfigRequest]
|
2346
|
+
# A request object representing the call parameters. Required.
|
2347
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
2348
|
+
# Uri, Body, Query string parameters
|
2349
|
+
def self.transcode_create_discovery_config_request request_pb
|
2350
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
2351
|
+
.with_bindings(
|
2352
|
+
uri_method: :post,
|
2353
|
+
uri_template: "/v2/{parent}/discoveryConfigs",
|
2354
|
+
body: "*",
|
2355
|
+
matches: [
|
2356
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
2357
|
+
]
|
2358
|
+
)
|
2359
|
+
.with_bindings(
|
2360
|
+
uri_method: :post,
|
2361
|
+
uri_template: "/v2/{parent}/discoveryConfigs",
|
2362
|
+
body: "*",
|
2363
|
+
matches: [
|
2364
|
+
["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false]
|
2365
|
+
]
|
2366
|
+
)
|
2367
|
+
transcoder.transcode request_pb
|
2368
|
+
end
|
2369
|
+
|
2370
|
+
##
|
2371
|
+
# @private
|
2372
|
+
#
|
2373
|
+
# GRPC transcoding helper method for the update_discovery_config REST call
|
2374
|
+
#
|
2375
|
+
# @param request_pb [::Google::Cloud::Dlp::V2::UpdateDiscoveryConfigRequest]
|
2376
|
+
# A request object representing the call parameters. Required.
|
2377
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
2378
|
+
# Uri, Body, Query string parameters
|
2379
|
+
def self.transcode_update_discovery_config_request request_pb
|
2380
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
2381
|
+
.with_bindings(
|
2382
|
+
uri_method: :patch,
|
2383
|
+
uri_template: "/v2/{name}",
|
2384
|
+
body: "*",
|
2385
|
+
matches: [
|
2386
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false]
|
2387
|
+
]
|
2388
|
+
)
|
2389
|
+
.with_bindings(
|
2390
|
+
uri_method: :patch,
|
2391
|
+
uri_template: "/v2/{name}",
|
2392
|
+
body: "*",
|
2393
|
+
matches: [
|
2394
|
+
["name", %r{^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false]
|
2395
|
+
]
|
2396
|
+
)
|
2397
|
+
transcoder.transcode request_pb
|
2398
|
+
end
|
2399
|
+
|
2400
|
+
##
|
2401
|
+
# @private
|
2402
|
+
#
|
2403
|
+
# GRPC transcoding helper method for the get_discovery_config REST call
|
2404
|
+
#
|
2405
|
+
# @param request_pb [::Google::Cloud::Dlp::V2::GetDiscoveryConfigRequest]
|
2406
|
+
# A request object representing the call parameters. Required.
|
2407
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
2408
|
+
# Uri, Body, Query string parameters
|
2409
|
+
def self.transcode_get_discovery_config_request request_pb
|
2410
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
2411
|
+
.with_bindings(
|
2412
|
+
uri_method: :get,
|
2413
|
+
uri_template: "/v2/{name}",
|
2414
|
+
matches: [
|
2415
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false]
|
2416
|
+
]
|
2417
|
+
)
|
2418
|
+
.with_bindings(
|
2419
|
+
uri_method: :get,
|
2420
|
+
uri_template: "/v2/{name}",
|
2421
|
+
matches: [
|
2422
|
+
["name", %r{^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false]
|
2423
|
+
]
|
2424
|
+
)
|
2425
|
+
transcoder.transcode request_pb
|
2426
|
+
end
|
2427
|
+
|
2428
|
+
##
|
2429
|
+
# @private
|
2430
|
+
#
|
2431
|
+
# GRPC transcoding helper method for the list_discovery_configs REST call
|
2432
|
+
#
|
2433
|
+
# @param request_pb [::Google::Cloud::Dlp::V2::ListDiscoveryConfigsRequest]
|
2434
|
+
# A request object representing the call parameters. Required.
|
2435
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
2436
|
+
# Uri, Body, Query string parameters
|
2437
|
+
def self.transcode_list_discovery_configs_request request_pb
|
2438
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
2439
|
+
.with_bindings(
|
2440
|
+
uri_method: :get,
|
2441
|
+
uri_template: "/v2/{parent}/discoveryConfigs",
|
2442
|
+
matches: [
|
2443
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
2444
|
+
]
|
2445
|
+
)
|
2446
|
+
.with_bindings(
|
2447
|
+
uri_method: :get,
|
2448
|
+
uri_template: "/v2/{parent}/discoveryConfigs",
|
2449
|
+
matches: [
|
2450
|
+
["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false]
|
2451
|
+
]
|
2452
|
+
)
|
2453
|
+
transcoder.transcode request_pb
|
2454
|
+
end
|
2455
|
+
|
2456
|
+
##
|
2457
|
+
# @private
|
2458
|
+
#
|
2459
|
+
# GRPC transcoding helper method for the delete_discovery_config REST call
|
2460
|
+
#
|
2461
|
+
# @param request_pb [::Google::Cloud::Dlp::V2::DeleteDiscoveryConfigRequest]
|
2462
|
+
# A request object representing the call parameters. Required.
|
2463
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
2464
|
+
# Uri, Body, Query string parameters
|
2465
|
+
def self.transcode_delete_discovery_config_request request_pb
|
2466
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
2467
|
+
.with_bindings(
|
2468
|
+
uri_method: :delete,
|
2469
|
+
uri_template: "/v2/{name}",
|
2470
|
+
matches: [
|
2471
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false]
|
2472
|
+
]
|
2473
|
+
)
|
2474
|
+
.with_bindings(
|
2475
|
+
uri_method: :delete,
|
2476
|
+
uri_template: "/v2/{name}",
|
2477
|
+
matches: [
|
2478
|
+
["name", %r{^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+/?$}, false]
|
2479
|
+
]
|
2480
|
+
)
|
2481
|
+
transcoder.transcode request_pb
|
2482
|
+
end
|
2483
|
+
|
2150
2484
|
##
|
2151
2485
|
# @private
|
2152
2486
|
#
|