google-cloud-dlp-v2 0.22.0 → 0.24.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 +787 -51
- data/lib/google/cloud/dlp/v2/dlp_service/paths.rb +19 -0
- data/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb +738 -51
- data/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb +429 -0
- data/lib/google/cloud/dlp/v2/version.rb +1 -1
- data/lib/google/privacy/dlp/v2/dlp_pb.rb +30 -1
- data/lib/google/privacy/dlp/v2/dlp_services_pb.rb +18 -3
- data/lib/google/privacy/dlp/v2/storage_pb.rb +2 -1
- data/proto_docs/google/api/client.rb +4 -0
- data/proto_docs/google/privacy/dlp/v2/dlp.rb +527 -14
- data/proto_docs/google/privacy/dlp/v2/storage.rb +24 -0
- metadata +2 -2
@@ -39,6 +39,9 @@ module Google
|
|
39
39
|
# https://cloud.google.com/sensitive-data-protection/docs/.
|
40
40
|
#
|
41
41
|
class Client
|
42
|
+
# @private
|
43
|
+
API_VERSION = ""
|
44
|
+
|
42
45
|
# @private
|
43
46
|
DEFAULT_ENDPOINT_TEMPLATE = "dlp.$UNIVERSE_DOMAIN$"
|
44
47
|
|
@@ -453,10 +456,11 @@ module Google
|
|
453
456
|
# Customize the options with defaults
|
454
457
|
metadata = @config.rpcs.inspect_content.metadata.to_h
|
455
458
|
|
456
|
-
# Set x-goog-api-client
|
459
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
457
460
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
458
461
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
459
462
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
463
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
460
464
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
461
465
|
|
462
466
|
header_params = {}
|
@@ -572,10 +576,11 @@ module Google
|
|
572
576
|
# Customize the options with defaults
|
573
577
|
metadata = @config.rpcs.redact_image.metadata.to_h
|
574
578
|
|
575
|
-
# Set x-goog-api-client
|
579
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
576
580
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
577
581
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
578
582
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
583
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
579
584
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
580
585
|
|
581
586
|
header_params = {}
|
@@ -711,10 +716,11 @@ module Google
|
|
711
716
|
# Customize the options with defaults
|
712
717
|
metadata = @config.rpcs.deidentify_content.metadata.to_h
|
713
718
|
|
714
|
-
# Set x-goog-api-client
|
719
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
715
720
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
716
721
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
717
722
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
723
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
718
724
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
719
725
|
|
720
726
|
header_params = {}
|
@@ -845,10 +851,11 @@ module Google
|
|
845
851
|
# Customize the options with defaults
|
846
852
|
metadata = @config.rpcs.reidentify_content.metadata.to_h
|
847
853
|
|
848
|
-
# Set x-goog-api-client
|
854
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
849
855
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
850
856
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
851
857
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
858
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
852
859
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
853
860
|
|
854
861
|
header_params = {}
|
@@ -946,10 +953,11 @@ module Google
|
|
946
953
|
# Customize the options with defaults
|
947
954
|
metadata = @config.rpcs.list_info_types.metadata.to_h
|
948
955
|
|
949
|
-
# Set x-goog-api-client
|
956
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
950
957
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
951
958
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
952
959
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
960
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
953
961
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
954
962
|
|
955
963
|
options.apply_defaults timeout: @config.rpcs.list_info_types.timeout,
|
@@ -1055,10 +1063,11 @@ module Google
|
|
1055
1063
|
# Customize the options with defaults
|
1056
1064
|
metadata = @config.rpcs.create_inspect_template.metadata.to_h
|
1057
1065
|
|
1058
|
-
# Set x-goog-api-client
|
1066
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1059
1067
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1060
1068
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1061
1069
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1070
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1062
1071
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1063
1072
|
|
1064
1073
|
header_params = {}
|
@@ -1149,10 +1158,11 @@ module Google
|
|
1149
1158
|
# Customize the options with defaults
|
1150
1159
|
metadata = @config.rpcs.update_inspect_template.metadata.to_h
|
1151
1160
|
|
1152
|
-
# Set x-goog-api-client
|
1161
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1153
1162
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1154
1163
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1155
1164
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1165
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1156
1166
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1157
1167
|
|
1158
1168
|
header_params = {}
|
@@ -1239,10 +1249,11 @@ module Google
|
|
1239
1249
|
# Customize the options with defaults
|
1240
1250
|
metadata = @config.rpcs.get_inspect_template.metadata.to_h
|
1241
1251
|
|
1242
|
-
# Set x-goog-api-client
|
1252
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1243
1253
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1244
1254
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1245
1255
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1256
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1246
1257
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1247
1258
|
|
1248
1259
|
header_params = {}
|
@@ -1372,10 +1383,11 @@ module Google
|
|
1372
1383
|
# Customize the options with defaults
|
1373
1384
|
metadata = @config.rpcs.list_inspect_templates.metadata.to_h
|
1374
1385
|
|
1375
|
-
# Set x-goog-api-client
|
1386
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1376
1387
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1377
1388
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1378
1389
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1390
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1379
1391
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1380
1392
|
|
1381
1393
|
header_params = {}
|
@@ -1463,10 +1475,11 @@ module Google
|
|
1463
1475
|
# Customize the options with defaults
|
1464
1476
|
metadata = @config.rpcs.delete_inspect_template.metadata.to_h
|
1465
1477
|
|
1466
|
-
# Set x-goog-api-client
|
1478
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1467
1479
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1468
1480
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1469
1481
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1482
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1470
1483
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1471
1484
|
|
1472
1485
|
header_params = {}
|
@@ -1580,10 +1593,11 @@ module Google
|
|
1580
1593
|
# Customize the options with defaults
|
1581
1594
|
metadata = @config.rpcs.create_deidentify_template.metadata.to_h
|
1582
1595
|
|
1583
|
-
# Set x-goog-api-client
|
1596
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1584
1597
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1585
1598
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1586
1599
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1600
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1587
1601
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1588
1602
|
|
1589
1603
|
header_params = {}
|
@@ -1675,10 +1689,11 @@ module Google
|
|
1675
1689
|
# Customize the options with defaults
|
1676
1690
|
metadata = @config.rpcs.update_deidentify_template.metadata.to_h
|
1677
1691
|
|
1678
|
-
# Set x-goog-api-client
|
1692
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1679
1693
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1680
1694
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1681
1695
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1696
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1682
1697
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1683
1698
|
|
1684
1699
|
header_params = {}
|
@@ -1765,10 +1780,11 @@ module Google
|
|
1765
1780
|
# Customize the options with defaults
|
1766
1781
|
metadata = @config.rpcs.get_deidentify_template.metadata.to_h
|
1767
1782
|
|
1768
|
-
# Set x-goog-api-client
|
1783
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1769
1784
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1770
1785
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1771
1786
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1787
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1772
1788
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1773
1789
|
|
1774
1790
|
header_params = {}
|
@@ -1898,10 +1914,11 @@ module Google
|
|
1898
1914
|
# Customize the options with defaults
|
1899
1915
|
metadata = @config.rpcs.list_deidentify_templates.metadata.to_h
|
1900
1916
|
|
1901
|
-
# Set x-goog-api-client
|
1917
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1902
1918
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1903
1919
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1904
1920
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
1921
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1905
1922
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1906
1923
|
|
1907
1924
|
header_params = {}
|
@@ -1990,10 +2007,11 @@ module Google
|
|
1990
2007
|
# Customize the options with defaults
|
1991
2008
|
metadata = @config.rpcs.delete_deidentify_template.metadata.to_h
|
1992
2009
|
|
1993
|
-
# Set x-goog-api-client
|
2010
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1994
2011
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1995
2012
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1996
2013
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2014
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1997
2015
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1998
2016
|
|
1999
2017
|
header_params = {}
|
@@ -2103,10 +2121,11 @@ module Google
|
|
2103
2121
|
# Customize the options with defaults
|
2104
2122
|
metadata = @config.rpcs.create_job_trigger.metadata.to_h
|
2105
2123
|
|
2106
|
-
# Set x-goog-api-client
|
2124
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2107
2125
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2108
2126
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2109
2127
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2128
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2110
2129
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2111
2130
|
|
2112
2131
|
header_params = {}
|
@@ -2196,10 +2215,11 @@ module Google
|
|
2196
2215
|
# Customize the options with defaults
|
2197
2216
|
metadata = @config.rpcs.update_job_trigger.metadata.to_h
|
2198
2217
|
|
2199
|
-
# Set x-goog-api-client
|
2218
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2200
2219
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2201
2220
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2202
2221
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2222
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2203
2223
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2204
2224
|
|
2205
2225
|
header_params = {}
|
@@ -2286,10 +2306,11 @@ module Google
|
|
2286
2306
|
# Customize the options with defaults
|
2287
2307
|
metadata = @config.rpcs.hybrid_inspect_job_trigger.metadata.to_h
|
2288
2308
|
|
2289
|
-
# Set x-goog-api-client
|
2309
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2290
2310
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2291
2311
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2292
2312
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2313
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2293
2314
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2294
2315
|
|
2295
2316
|
header_params = {}
|
@@ -2375,10 +2396,11 @@ module Google
|
|
2375
2396
|
# Customize the options with defaults
|
2376
2397
|
metadata = @config.rpcs.get_job_trigger.metadata.to_h
|
2377
2398
|
|
2378
|
-
# Set x-goog-api-client
|
2399
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2379
2400
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2380
2401
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2381
2402
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2403
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2382
2404
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2383
2405
|
|
2384
2406
|
header_params = {}
|
@@ -2533,10 +2555,11 @@ module Google
|
|
2533
2555
|
# Customize the options with defaults
|
2534
2556
|
metadata = @config.rpcs.list_job_triggers.metadata.to_h
|
2535
2557
|
|
2536
|
-
# Set x-goog-api-client
|
2558
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2537
2559
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2538
2560
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2539
2561
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2562
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2540
2563
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2541
2564
|
|
2542
2565
|
header_params = {}
|
@@ -2623,10 +2646,11 @@ module Google
|
|
2623
2646
|
# Customize the options with defaults
|
2624
2647
|
metadata = @config.rpcs.delete_job_trigger.metadata.to_h
|
2625
2648
|
|
2626
|
-
# Set x-goog-api-client
|
2649
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2627
2650
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2628
2651
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2629
2652
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2653
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2630
2654
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2631
2655
|
|
2632
2656
|
header_params = {}
|
@@ -2710,10 +2734,11 @@ module Google
|
|
2710
2734
|
# Customize the options with defaults
|
2711
2735
|
metadata = @config.rpcs.activate_job_trigger.metadata.to_h
|
2712
2736
|
|
2713
|
-
# Set x-goog-api-client
|
2737
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2714
2738
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2715
2739
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2716
2740
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2741
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2717
2742
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2718
2743
|
|
2719
2744
|
header_params = {}
|
@@ -2811,10 +2836,11 @@ module Google
|
|
2811
2836
|
# Customize the options with defaults
|
2812
2837
|
metadata = @config.rpcs.create_discovery_config.metadata.to_h
|
2813
2838
|
|
2814
|
-
# Set x-goog-api-client
|
2839
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2815
2840
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2816
2841
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2817
2842
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2843
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2818
2844
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2819
2845
|
|
2820
2846
|
header_params = {}
|
@@ -2901,10 +2927,11 @@ module Google
|
|
2901
2927
|
# Customize the options with defaults
|
2902
2928
|
metadata = @config.rpcs.update_discovery_config.metadata.to_h
|
2903
2929
|
|
2904
|
-
# Set x-goog-api-client
|
2930
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2905
2931
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2906
2932
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2907
2933
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
2934
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2908
2935
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2909
2936
|
|
2910
2937
|
header_params = {}
|
@@ -2987,10 +3014,11 @@ module Google
|
|
2987
3014
|
# Customize the options with defaults
|
2988
3015
|
metadata = @config.rpcs.get_discovery_config.metadata.to_h
|
2989
3016
|
|
2990
|
-
# Set x-goog-api-client
|
3017
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2991
3018
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2992
3019
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2993
3020
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3021
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2994
3022
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2995
3023
|
|
2996
3024
|
header_params = {}
|
@@ -3104,10 +3132,11 @@ module Google
|
|
3104
3132
|
# Customize the options with defaults
|
3105
3133
|
metadata = @config.rpcs.list_discovery_configs.metadata.to_h
|
3106
3134
|
|
3107
|
-
# Set x-goog-api-client
|
3135
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3108
3136
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3109
3137
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3110
3138
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3139
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3111
3140
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3112
3141
|
|
3113
3142
|
header_params = {}
|
@@ -3191,10 +3220,11 @@ module Google
|
|
3191
3220
|
# Customize the options with defaults
|
3192
3221
|
metadata = @config.rpcs.delete_discovery_config.metadata.to_h
|
3193
3222
|
|
3194
|
-
# Set x-goog-api-client
|
3223
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3195
3224
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3196
3225
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3197
3226
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3227
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3198
3228
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3199
3229
|
|
3200
3230
|
header_params = {}
|
@@ -3312,10 +3342,11 @@ module Google
|
|
3312
3342
|
# Customize the options with defaults
|
3313
3343
|
metadata = @config.rpcs.create_dlp_job.metadata.to_h
|
3314
3344
|
|
3315
|
-
# Set x-goog-api-client
|
3345
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3316
3346
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3317
3347
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3318
3348
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3349
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3319
3350
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3320
3351
|
|
3321
3352
|
header_params = {}
|
@@ -3472,10 +3503,11 @@ module Google
|
|
3472
3503
|
# Customize the options with defaults
|
3473
3504
|
metadata = @config.rpcs.list_dlp_jobs.metadata.to_h
|
3474
3505
|
|
3475
|
-
# Set x-goog-api-client
|
3506
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3476
3507
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3477
3508
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3478
3509
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3510
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3479
3511
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3480
3512
|
|
3481
3513
|
header_params = {}
|
@@ -3563,10 +3595,11 @@ module Google
|
|
3563
3595
|
# Customize the options with defaults
|
3564
3596
|
metadata = @config.rpcs.get_dlp_job.metadata.to_h
|
3565
3597
|
|
3566
|
-
# Set x-goog-api-client
|
3598
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3567
3599
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3568
3600
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3569
3601
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3602
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3570
3603
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3571
3604
|
|
3572
3605
|
header_params = {}
|
@@ -3655,10 +3688,11 @@ module Google
|
|
3655
3688
|
# Customize the options with defaults
|
3656
3689
|
metadata = @config.rpcs.delete_dlp_job.metadata.to_h
|
3657
3690
|
|
3658
|
-
# Set x-goog-api-client
|
3691
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3659
3692
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3660
3693
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3661
3694
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3695
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3662
3696
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3663
3697
|
|
3664
3698
|
header_params = {}
|
@@ -3747,10 +3781,11 @@ module Google
|
|
3747
3781
|
# Customize the options with defaults
|
3748
3782
|
metadata = @config.rpcs.cancel_dlp_job.metadata.to_h
|
3749
3783
|
|
3750
|
-
# Set x-goog-api-client
|
3784
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3751
3785
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3752
3786
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3753
3787
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3788
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3754
3789
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3755
3790
|
|
3756
3791
|
header_params = {}
|
@@ -3863,10 +3898,11 @@ module Google
|
|
3863
3898
|
# Customize the options with defaults
|
3864
3899
|
metadata = @config.rpcs.create_stored_info_type.metadata.to_h
|
3865
3900
|
|
3866
|
-
# Set x-goog-api-client
|
3901
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3867
3902
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3868
3903
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3869
3904
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
3905
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3870
3906
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3871
3907
|
|
3872
3908
|
header_params = {}
|
@@ -3960,10 +3996,11 @@ module Google
|
|
3960
3996
|
# Customize the options with defaults
|
3961
3997
|
metadata = @config.rpcs.update_stored_info_type.metadata.to_h
|
3962
3998
|
|
3963
|
-
# Set x-goog-api-client
|
3999
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3964
4000
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3965
4001
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3966
4002
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
4003
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3967
4004
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3968
4005
|
|
3969
4006
|
header_params = {}
|
@@ -4050,10 +4087,11 @@ module Google
|
|
4050
4087
|
# Customize the options with defaults
|
4051
4088
|
metadata = @config.rpcs.get_stored_info_type.metadata.to_h
|
4052
4089
|
|
4053
|
-
# Set x-goog-api-client
|
4090
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4054
4091
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4055
4092
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4056
4093
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
4094
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4057
4095
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4058
4096
|
|
4059
4097
|
header_params = {}
|
@@ -4180,10 +4218,11 @@ module Google
|
|
4180
4218
|
# Customize the options with defaults
|
4181
4219
|
metadata = @config.rpcs.list_stored_info_types.metadata.to_h
|
4182
4220
|
|
4183
|
-
# Set x-goog-api-client
|
4221
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4184
4222
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4185
4223
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4186
4224
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
4225
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4187
4226
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4188
4227
|
|
4189
4228
|
header_params = {}
|
@@ -4271,10 +4310,11 @@ module Google
|
|
4271
4310
|
# Customize the options with defaults
|
4272
4311
|
metadata = @config.rpcs.delete_stored_info_type.metadata.to_h
|
4273
4312
|
|
4274
|
-
# Set x-goog-api-client
|
4313
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4275
4314
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4276
4315
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4277
4316
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
4317
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4278
4318
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4279
4319
|
|
4280
4320
|
header_params = {}
|
@@ -4302,7 +4342,7 @@ module Google
|
|
4302
4342
|
end
|
4303
4343
|
|
4304
4344
|
##
|
4305
|
-
# Lists data profiles for an organization.
|
4345
|
+
# Lists project data profiles for an organization.
|
4306
4346
|
#
|
4307
4347
|
# @overload list_project_data_profiles(request, options = nil)
|
4308
4348
|
# Pass arguments to `list_project_data_profiles` via a request object, either of type
|
@@ -4338,7 +4378,7 @@ module Google
|
|
4338
4378
|
#
|
4339
4379
|
# Supported fields are:
|
4340
4380
|
#
|
4341
|
-
# - `project_id`:
|
4381
|
+
# - `project_id`: Google Cloud project ID
|
4342
4382
|
# - `sensitivity_level`: How sensitive the data in a project is, at most.
|
4343
4383
|
# - `data_risk_level`: How much risk is associated with this data.
|
4344
4384
|
# - `profile_last_generated`: When the profile was last updated in epoch
|
@@ -4404,10 +4444,11 @@ module Google
|
|
4404
4444
|
# Customize the options with defaults
|
4405
4445
|
metadata = @config.rpcs.list_project_data_profiles.metadata.to_h
|
4406
4446
|
|
4407
|
-
# Set x-goog-api-client
|
4447
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4408
4448
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4409
4449
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4410
4450
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
4451
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4411
4452
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4412
4453
|
|
4413
4454
|
header_params = {}
|
@@ -4436,7 +4477,7 @@ module Google
|
|
4436
4477
|
end
|
4437
4478
|
|
4438
4479
|
##
|
4439
|
-
# Lists data profiles for an organization.
|
4480
|
+
# Lists table data profiles for an organization.
|
4440
4481
|
#
|
4441
4482
|
# @overload list_table_data_profiles(request, options = nil)
|
4442
4483
|
# Pass arguments to `list_table_data_profiles` via a request object, either of type
|
@@ -4475,7 +4516,7 @@ module Google
|
|
4475
4516
|
#
|
4476
4517
|
# Supported fields are:
|
4477
4518
|
#
|
4478
|
-
# - `project_id`: The
|
4519
|
+
# - `project_id`: The Google Cloud project ID.
|
4479
4520
|
# - `dataset_id`: The ID of a BigQuery dataset.
|
4480
4521
|
# - `table_id`: The ID of a BigQuery table.
|
4481
4522
|
# - `sensitivity_level`: How sensitive the data in a table is, at most.
|
@@ -4495,7 +4536,7 @@ module Google
|
|
4495
4536
|
# sequence of restrictions implicitly uses `AND`.
|
4496
4537
|
# * A restriction has the form of `{field} {operator} {value}`.
|
4497
4538
|
# * Supported fields/values:
|
4498
|
-
# - `project_id` - The
|
4539
|
+
# - `project_id` - The Google Cloud project ID.
|
4499
4540
|
# - `dataset_id` - The BigQuery dataset ID.
|
4500
4541
|
# - `table_id` - The ID of the BigQuery table.
|
4501
4542
|
# - `sensitivity_level` - HIGH|MODERATE|LOW
|
@@ -4551,10 +4592,11 @@ module Google
|
|
4551
4592
|
# Customize the options with defaults
|
4552
4593
|
metadata = @config.rpcs.list_table_data_profiles.metadata.to_h
|
4553
4594
|
|
4554
|
-
# Set x-goog-api-client
|
4595
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4555
4596
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4556
4597
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4557
4598
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
4599
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4558
4600
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4559
4601
|
|
4560
4602
|
header_params = {}
|
@@ -4583,7 +4625,7 @@ module Google
|
|
4583
4625
|
end
|
4584
4626
|
|
4585
4627
|
##
|
4586
|
-
# Lists data profiles for an organization.
|
4628
|
+
# Lists column data profiles for an organization.
|
4587
4629
|
#
|
4588
4630
|
# @overload list_column_data_profiles(request, options = nil)
|
4589
4631
|
# Pass arguments to `list_column_data_profiles` via a request object, either of type
|
@@ -4699,10 +4741,11 @@ module Google
|
|
4699
4741
|
# Customize the options with defaults
|
4700
4742
|
metadata = @config.rpcs.list_column_data_profiles.metadata.to_h
|
4701
4743
|
|
4702
|
-
# Set x-goog-api-client
|
4744
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4703
4745
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4704
4746
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4705
4747
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
4748
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4706
4749
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4707
4750
|
|
4708
4751
|
header_params = {}
|
@@ -4786,10 +4829,11 @@ module Google
|
|
4786
4829
|
# Customize the options with defaults
|
4787
4830
|
metadata = @config.rpcs.get_project_data_profile.metadata.to_h
|
4788
4831
|
|
4789
|
-
# Set x-goog-api-client
|
4832
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4790
4833
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4791
4834
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4792
4835
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
4836
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4793
4837
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4794
4838
|
|
4795
4839
|
header_params = {}
|
@@ -4872,10 +4916,11 @@ module Google
|
|
4872
4916
|
# Customize the options with defaults
|
4873
4917
|
metadata = @config.rpcs.get_table_data_profile.metadata.to_h
|
4874
4918
|
|
4875
|
-
# Set x-goog-api-client
|
4919
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4876
4920
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4877
4921
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4878
4922
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
4923
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4879
4924
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4880
4925
|
|
4881
4926
|
header_params = {}
|
@@ -4958,10 +5003,11 @@ module Google
|
|
4958
5003
|
# Customize the options with defaults
|
4959
5004
|
metadata = @config.rpcs.get_column_data_profile.metadata.to_h
|
4960
5005
|
|
4961
|
-
# Set x-goog-api-client
|
5006
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
4962
5007
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
4963
5008
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
4964
5009
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
5010
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
4965
5011
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
4966
5012
|
|
4967
5013
|
header_params = {}
|
@@ -4988,6 +5034,93 @@ module Google
|
|
4988
5034
|
raise ::Google::Cloud::Error.from_error(e)
|
4989
5035
|
end
|
4990
5036
|
|
5037
|
+
##
|
5038
|
+
# Delete a TableDataProfile. Will not prevent the profile from being
|
5039
|
+
# regenerated if the table is still included in a discovery configuration.
|
5040
|
+
#
|
5041
|
+
# @overload delete_table_data_profile(request, options = nil)
|
5042
|
+
# Pass arguments to `delete_table_data_profile` via a request object, either of type
|
5043
|
+
# {::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest} or an equivalent Hash.
|
5044
|
+
#
|
5045
|
+
# @param request [::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest, ::Hash]
|
5046
|
+
# A request object representing the call parameters. Required. To specify no
|
5047
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5048
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5049
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5050
|
+
#
|
5051
|
+
# @overload delete_table_data_profile(name: nil)
|
5052
|
+
# Pass arguments to `delete_table_data_profile` via keyword arguments. Note that at
|
5053
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5054
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5055
|
+
#
|
5056
|
+
# @param name [::String]
|
5057
|
+
# Required. Resource name of the table data profile.
|
5058
|
+
#
|
5059
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5060
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
5061
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5062
|
+
#
|
5063
|
+
# @return [::Google::Protobuf::Empty]
|
5064
|
+
#
|
5065
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5066
|
+
#
|
5067
|
+
# @example Basic example
|
5068
|
+
# require "google/cloud/dlp/v2"
|
5069
|
+
#
|
5070
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5071
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
5072
|
+
#
|
5073
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5074
|
+
# request = Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest.new
|
5075
|
+
#
|
5076
|
+
# # Call the delete_table_data_profile method.
|
5077
|
+
# result = client.delete_table_data_profile request
|
5078
|
+
#
|
5079
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
5080
|
+
# p result
|
5081
|
+
#
|
5082
|
+
def delete_table_data_profile request, options = nil
|
5083
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5084
|
+
|
5085
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest
|
5086
|
+
|
5087
|
+
# Converts hash and nil to an options object
|
5088
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5089
|
+
|
5090
|
+
# Customize the options with defaults
|
5091
|
+
metadata = @config.rpcs.delete_table_data_profile.metadata.to_h
|
5092
|
+
|
5093
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5094
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5095
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5096
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
5097
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5098
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5099
|
+
|
5100
|
+
header_params = {}
|
5101
|
+
if request.name
|
5102
|
+
header_params["name"] = request.name
|
5103
|
+
end
|
5104
|
+
|
5105
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5106
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5107
|
+
|
5108
|
+
options.apply_defaults timeout: @config.rpcs.delete_table_data_profile.timeout,
|
5109
|
+
metadata: metadata,
|
5110
|
+
retry_policy: @config.rpcs.delete_table_data_profile.retry_policy
|
5111
|
+
|
5112
|
+
options.apply_defaults timeout: @config.timeout,
|
5113
|
+
metadata: @config.metadata,
|
5114
|
+
retry_policy: @config.retry_policy
|
5115
|
+
|
5116
|
+
@dlp_service_stub.call_rpc :delete_table_data_profile, request, options: options do |response, operation|
|
5117
|
+
yield response, operation if block_given?
|
5118
|
+
return response
|
5119
|
+
end
|
5120
|
+
rescue ::GRPC::BadStatus => e
|
5121
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5122
|
+
end
|
5123
|
+
|
4991
5124
|
##
|
4992
5125
|
# Inspect hybrid content and store findings to a job.
|
4993
5126
|
# To review the findings, inspect the job. Inspection will occur
|
@@ -5048,10 +5181,11 @@ module Google
|
|
5048
5181
|
# Customize the options with defaults
|
5049
5182
|
metadata = @config.rpcs.hybrid_inspect_dlp_job.metadata.to_h
|
5050
5183
|
|
5051
|
-
# Set x-goog-api-client
|
5184
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5052
5185
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5053
5186
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5054
5187
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
5188
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5055
5189
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5056
5190
|
|
5057
5191
|
header_params = {}
|
@@ -5134,10 +5268,11 @@ module Google
|
|
5134
5268
|
# Customize the options with defaults
|
5135
5269
|
metadata = @config.rpcs.finish_dlp_job.metadata.to_h
|
5136
5270
|
|
5137
|
-
# Set x-goog-api-client
|
5271
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5138
5272
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5139
5273
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5140
5274
|
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
5275
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5141
5276
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5142
5277
|
|
5143
5278
|
header_params = {}
|
@@ -5164,6 +5299,558 @@ module Google
|
|
5164
5299
|
raise ::Google::Cloud::Error.from_error(e)
|
5165
5300
|
end
|
5166
5301
|
|
5302
|
+
##
|
5303
|
+
# Create a Connection to an external data source.
|
5304
|
+
#
|
5305
|
+
# @overload create_connection(request, options = nil)
|
5306
|
+
# Pass arguments to `create_connection` via a request object, either of type
|
5307
|
+
# {::Google::Cloud::Dlp::V2::CreateConnectionRequest} or an equivalent Hash.
|
5308
|
+
#
|
5309
|
+
# @param request [::Google::Cloud::Dlp::V2::CreateConnectionRequest, ::Hash]
|
5310
|
+
# A request object representing the call parameters. Required. To specify no
|
5311
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5312
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5313
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5314
|
+
#
|
5315
|
+
# @overload create_connection(parent: nil, connection: nil)
|
5316
|
+
# Pass arguments to `create_connection` via keyword arguments. Note that at
|
5317
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5318
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5319
|
+
#
|
5320
|
+
# @param parent [::String]
|
5321
|
+
# Required. Parent resource name in the format:
|
5322
|
+
# `projects/{project}/locations/{location}`.
|
5323
|
+
# @param connection [::Google::Cloud::Dlp::V2::Connection, ::Hash]
|
5324
|
+
# Required. The connection resource.
|
5325
|
+
#
|
5326
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5327
|
+
# @yieldparam response [::Google::Cloud::Dlp::V2::Connection]
|
5328
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5329
|
+
#
|
5330
|
+
# @return [::Google::Cloud::Dlp::V2::Connection]
|
5331
|
+
#
|
5332
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5333
|
+
#
|
5334
|
+
# @example Basic example
|
5335
|
+
# require "google/cloud/dlp/v2"
|
5336
|
+
#
|
5337
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5338
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
5339
|
+
#
|
5340
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5341
|
+
# request = Google::Cloud::Dlp::V2::CreateConnectionRequest.new
|
5342
|
+
#
|
5343
|
+
# # Call the create_connection method.
|
5344
|
+
# result = client.create_connection request
|
5345
|
+
#
|
5346
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::Connection.
|
5347
|
+
# p result
|
5348
|
+
#
|
5349
|
+
def create_connection request, options = nil
|
5350
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5351
|
+
|
5352
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateConnectionRequest
|
5353
|
+
|
5354
|
+
# Converts hash and nil to an options object
|
5355
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5356
|
+
|
5357
|
+
# Customize the options with defaults
|
5358
|
+
metadata = @config.rpcs.create_connection.metadata.to_h
|
5359
|
+
|
5360
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5361
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5362
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5363
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
5364
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5365
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5366
|
+
|
5367
|
+
header_params = {}
|
5368
|
+
if request.parent
|
5369
|
+
header_params["parent"] = request.parent
|
5370
|
+
end
|
5371
|
+
|
5372
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5373
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5374
|
+
|
5375
|
+
options.apply_defaults timeout: @config.rpcs.create_connection.timeout,
|
5376
|
+
metadata: metadata,
|
5377
|
+
retry_policy: @config.rpcs.create_connection.retry_policy
|
5378
|
+
|
5379
|
+
options.apply_defaults timeout: @config.timeout,
|
5380
|
+
metadata: @config.metadata,
|
5381
|
+
retry_policy: @config.retry_policy
|
5382
|
+
|
5383
|
+
@dlp_service_stub.call_rpc :create_connection, request, options: options do |response, operation|
|
5384
|
+
yield response, operation if block_given?
|
5385
|
+
return response
|
5386
|
+
end
|
5387
|
+
rescue ::GRPC::BadStatus => e
|
5388
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5389
|
+
end
|
5390
|
+
|
5391
|
+
##
|
5392
|
+
# Get a Connection by name.
|
5393
|
+
#
|
5394
|
+
# @overload get_connection(request, options = nil)
|
5395
|
+
# Pass arguments to `get_connection` via a request object, either of type
|
5396
|
+
# {::Google::Cloud::Dlp::V2::GetConnectionRequest} or an equivalent Hash.
|
5397
|
+
#
|
5398
|
+
# @param request [::Google::Cloud::Dlp::V2::GetConnectionRequest, ::Hash]
|
5399
|
+
# A request object representing the call parameters. Required. To specify no
|
5400
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5401
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5402
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5403
|
+
#
|
5404
|
+
# @overload get_connection(name: nil)
|
5405
|
+
# Pass arguments to `get_connection` via keyword arguments. Note that at
|
5406
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5407
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5408
|
+
#
|
5409
|
+
# @param name [::String]
|
5410
|
+
# Required. Resource name in the format:
|
5411
|
+
# `projects/{project}/locations/{location}/connections/{connection}`.
|
5412
|
+
#
|
5413
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5414
|
+
# @yieldparam response [::Google::Cloud::Dlp::V2::Connection]
|
5415
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5416
|
+
#
|
5417
|
+
# @return [::Google::Cloud::Dlp::V2::Connection]
|
5418
|
+
#
|
5419
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5420
|
+
#
|
5421
|
+
# @example Basic example
|
5422
|
+
# require "google/cloud/dlp/v2"
|
5423
|
+
#
|
5424
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5425
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
5426
|
+
#
|
5427
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5428
|
+
# request = Google::Cloud::Dlp::V2::GetConnectionRequest.new
|
5429
|
+
#
|
5430
|
+
# # Call the get_connection method.
|
5431
|
+
# result = client.get_connection request
|
5432
|
+
#
|
5433
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::Connection.
|
5434
|
+
# p result
|
5435
|
+
#
|
5436
|
+
def get_connection request, options = nil
|
5437
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5438
|
+
|
5439
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetConnectionRequest
|
5440
|
+
|
5441
|
+
# Converts hash and nil to an options object
|
5442
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5443
|
+
|
5444
|
+
# Customize the options with defaults
|
5445
|
+
metadata = @config.rpcs.get_connection.metadata.to_h
|
5446
|
+
|
5447
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5448
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5449
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5450
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
5451
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5452
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5453
|
+
|
5454
|
+
header_params = {}
|
5455
|
+
if request.name
|
5456
|
+
header_params["name"] = request.name
|
5457
|
+
end
|
5458
|
+
|
5459
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5460
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5461
|
+
|
5462
|
+
options.apply_defaults timeout: @config.rpcs.get_connection.timeout,
|
5463
|
+
metadata: metadata,
|
5464
|
+
retry_policy: @config.rpcs.get_connection.retry_policy
|
5465
|
+
|
5466
|
+
options.apply_defaults timeout: @config.timeout,
|
5467
|
+
metadata: @config.metadata,
|
5468
|
+
retry_policy: @config.retry_policy
|
5469
|
+
|
5470
|
+
@dlp_service_stub.call_rpc :get_connection, request, options: options do |response, operation|
|
5471
|
+
yield response, operation if block_given?
|
5472
|
+
return response
|
5473
|
+
end
|
5474
|
+
rescue ::GRPC::BadStatus => e
|
5475
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5476
|
+
end
|
5477
|
+
|
5478
|
+
##
|
5479
|
+
# Lists Connections in a parent.
|
5480
|
+
#
|
5481
|
+
# @overload list_connections(request, options = nil)
|
5482
|
+
# Pass arguments to `list_connections` via a request object, either of type
|
5483
|
+
# {::Google::Cloud::Dlp::V2::ListConnectionsRequest} or an equivalent Hash.
|
5484
|
+
#
|
5485
|
+
# @param request [::Google::Cloud::Dlp::V2::ListConnectionsRequest, ::Hash]
|
5486
|
+
# A request object representing the call parameters. Required. To specify no
|
5487
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5488
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5489
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5490
|
+
#
|
5491
|
+
# @overload list_connections(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
5492
|
+
# Pass arguments to `list_connections` via keyword arguments. Note that at
|
5493
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5494
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5495
|
+
#
|
5496
|
+
# @param parent [::String]
|
5497
|
+
# Required. Parent name, for example:
|
5498
|
+
# `projects/project-id/locations/global`.
|
5499
|
+
# @param page_size [::Integer]
|
5500
|
+
# Optional. Number of results per page, max 1000.
|
5501
|
+
# @param page_token [::String]
|
5502
|
+
# Optional. Page token from a previous page to return the next set of
|
5503
|
+
# results. If set, all other request fields must match the original request.
|
5504
|
+
# @param filter [::String]
|
5505
|
+
# Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR
|
5506
|
+
#
|
5507
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5508
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>]
|
5509
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5510
|
+
#
|
5511
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>]
|
5512
|
+
#
|
5513
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5514
|
+
#
|
5515
|
+
# @example Basic example
|
5516
|
+
# require "google/cloud/dlp/v2"
|
5517
|
+
#
|
5518
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5519
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
5520
|
+
#
|
5521
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5522
|
+
# request = Google::Cloud::Dlp::V2::ListConnectionsRequest.new
|
5523
|
+
#
|
5524
|
+
# # Call the list_connections method.
|
5525
|
+
# result = client.list_connections request
|
5526
|
+
#
|
5527
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
5528
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
5529
|
+
# result.each do |item|
|
5530
|
+
# # Each element is of type ::Google::Cloud::Dlp::V2::Connection.
|
5531
|
+
# p item
|
5532
|
+
# end
|
5533
|
+
#
|
5534
|
+
def list_connections request, options = nil
|
5535
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5536
|
+
|
5537
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListConnectionsRequest
|
5538
|
+
|
5539
|
+
# Converts hash and nil to an options object
|
5540
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5541
|
+
|
5542
|
+
# Customize the options with defaults
|
5543
|
+
metadata = @config.rpcs.list_connections.metadata.to_h
|
5544
|
+
|
5545
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5546
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5547
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5548
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
5549
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5550
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5551
|
+
|
5552
|
+
header_params = {}
|
5553
|
+
if request.parent
|
5554
|
+
header_params["parent"] = request.parent
|
5555
|
+
end
|
5556
|
+
|
5557
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5558
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5559
|
+
|
5560
|
+
options.apply_defaults timeout: @config.rpcs.list_connections.timeout,
|
5561
|
+
metadata: metadata,
|
5562
|
+
retry_policy: @config.rpcs.list_connections.retry_policy
|
5563
|
+
|
5564
|
+
options.apply_defaults timeout: @config.timeout,
|
5565
|
+
metadata: @config.metadata,
|
5566
|
+
retry_policy: @config.retry_policy
|
5567
|
+
|
5568
|
+
@dlp_service_stub.call_rpc :list_connections, request, options: options do |response, operation|
|
5569
|
+
response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_connections, request, response, operation, options
|
5570
|
+
yield response, operation if block_given?
|
5571
|
+
return response
|
5572
|
+
end
|
5573
|
+
rescue ::GRPC::BadStatus => e
|
5574
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5575
|
+
end
|
5576
|
+
|
5577
|
+
##
|
5578
|
+
# Searches for Connections in a parent.
|
5579
|
+
#
|
5580
|
+
# @overload search_connections(request, options = nil)
|
5581
|
+
# Pass arguments to `search_connections` via a request object, either of type
|
5582
|
+
# {::Google::Cloud::Dlp::V2::SearchConnectionsRequest} or an equivalent Hash.
|
5583
|
+
#
|
5584
|
+
# @param request [::Google::Cloud::Dlp::V2::SearchConnectionsRequest, ::Hash]
|
5585
|
+
# A request object representing the call parameters. Required. To specify no
|
5586
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5587
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5588
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5589
|
+
#
|
5590
|
+
# @overload search_connections(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
5591
|
+
# Pass arguments to `search_connections` via keyword arguments. Note that at
|
5592
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5593
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5594
|
+
#
|
5595
|
+
# @param parent [::String]
|
5596
|
+
# Required. Parent name, typically an organization, without location.
|
5597
|
+
# For example: `organizations/12345678`.
|
5598
|
+
# @param page_size [::Integer]
|
5599
|
+
# Optional. Number of results per page, max 1000.
|
5600
|
+
# @param page_token [::String]
|
5601
|
+
# Optional. Page token from a previous page to return the next set of
|
5602
|
+
# results. If set, all other request fields must match the original request.
|
5603
|
+
# @param filter [::String]
|
5604
|
+
# Optional. Supported field/value: - `state` - MISSING|AVAILABLE|ERROR
|
5605
|
+
#
|
5606
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5607
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>]
|
5608
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5609
|
+
#
|
5610
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::Connection>]
|
5611
|
+
#
|
5612
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5613
|
+
#
|
5614
|
+
# @example Basic example
|
5615
|
+
# require "google/cloud/dlp/v2"
|
5616
|
+
#
|
5617
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5618
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
5619
|
+
#
|
5620
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5621
|
+
# request = Google::Cloud::Dlp::V2::SearchConnectionsRequest.new
|
5622
|
+
#
|
5623
|
+
# # Call the search_connections method.
|
5624
|
+
# result = client.search_connections request
|
5625
|
+
#
|
5626
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
5627
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
5628
|
+
# result.each do |item|
|
5629
|
+
# # Each element is of type ::Google::Cloud::Dlp::V2::Connection.
|
5630
|
+
# p item
|
5631
|
+
# end
|
5632
|
+
#
|
5633
|
+
def search_connections request, options = nil
|
5634
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5635
|
+
|
5636
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::SearchConnectionsRequest
|
5637
|
+
|
5638
|
+
# Converts hash and nil to an options object
|
5639
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5640
|
+
|
5641
|
+
# Customize the options with defaults
|
5642
|
+
metadata = @config.rpcs.search_connections.metadata.to_h
|
5643
|
+
|
5644
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5645
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5646
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5647
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
5648
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5649
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5650
|
+
|
5651
|
+
header_params = {}
|
5652
|
+
if request.parent
|
5653
|
+
header_params["parent"] = request.parent
|
5654
|
+
end
|
5655
|
+
|
5656
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5657
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5658
|
+
|
5659
|
+
options.apply_defaults timeout: @config.rpcs.search_connections.timeout,
|
5660
|
+
metadata: metadata,
|
5661
|
+
retry_policy: @config.rpcs.search_connections.retry_policy
|
5662
|
+
|
5663
|
+
options.apply_defaults timeout: @config.timeout,
|
5664
|
+
metadata: @config.metadata,
|
5665
|
+
retry_policy: @config.retry_policy
|
5666
|
+
|
5667
|
+
@dlp_service_stub.call_rpc :search_connections, request, options: options do |response, operation|
|
5668
|
+
response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :search_connections, request, response, operation, options
|
5669
|
+
yield response, operation if block_given?
|
5670
|
+
return response
|
5671
|
+
end
|
5672
|
+
rescue ::GRPC::BadStatus => e
|
5673
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5674
|
+
end
|
5675
|
+
|
5676
|
+
##
|
5677
|
+
# Delete a Connection.
|
5678
|
+
#
|
5679
|
+
# @overload delete_connection(request, options = nil)
|
5680
|
+
# Pass arguments to `delete_connection` via a request object, either of type
|
5681
|
+
# {::Google::Cloud::Dlp::V2::DeleteConnectionRequest} or an equivalent Hash.
|
5682
|
+
#
|
5683
|
+
# @param request [::Google::Cloud::Dlp::V2::DeleteConnectionRequest, ::Hash]
|
5684
|
+
# A request object representing the call parameters. Required. To specify no
|
5685
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5686
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5687
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5688
|
+
#
|
5689
|
+
# @overload delete_connection(name: nil)
|
5690
|
+
# Pass arguments to `delete_connection` via keyword arguments. Note that at
|
5691
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5692
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5693
|
+
#
|
5694
|
+
# @param name [::String]
|
5695
|
+
# Required. Resource name of the Connection to be deleted, in the format:
|
5696
|
+
# `projects/{project}/locations/{location}/connections/{connection}`.
|
5697
|
+
#
|
5698
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5699
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
5700
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5701
|
+
#
|
5702
|
+
# @return [::Google::Protobuf::Empty]
|
5703
|
+
#
|
5704
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5705
|
+
#
|
5706
|
+
# @example Basic example
|
5707
|
+
# require "google/cloud/dlp/v2"
|
5708
|
+
#
|
5709
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5710
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
5711
|
+
#
|
5712
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5713
|
+
# request = Google::Cloud::Dlp::V2::DeleteConnectionRequest.new
|
5714
|
+
#
|
5715
|
+
# # Call the delete_connection method.
|
5716
|
+
# result = client.delete_connection request
|
5717
|
+
#
|
5718
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
5719
|
+
# p result
|
5720
|
+
#
|
5721
|
+
def delete_connection request, options = nil
|
5722
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5723
|
+
|
5724
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteConnectionRequest
|
5725
|
+
|
5726
|
+
# Converts hash and nil to an options object
|
5727
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5728
|
+
|
5729
|
+
# Customize the options with defaults
|
5730
|
+
metadata = @config.rpcs.delete_connection.metadata.to_h
|
5731
|
+
|
5732
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5733
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5734
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5735
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
5736
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5737
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5738
|
+
|
5739
|
+
header_params = {}
|
5740
|
+
if request.name
|
5741
|
+
header_params["name"] = request.name
|
5742
|
+
end
|
5743
|
+
|
5744
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5745
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5746
|
+
|
5747
|
+
options.apply_defaults timeout: @config.rpcs.delete_connection.timeout,
|
5748
|
+
metadata: metadata,
|
5749
|
+
retry_policy: @config.rpcs.delete_connection.retry_policy
|
5750
|
+
|
5751
|
+
options.apply_defaults timeout: @config.timeout,
|
5752
|
+
metadata: @config.metadata,
|
5753
|
+
retry_policy: @config.retry_policy
|
5754
|
+
|
5755
|
+
@dlp_service_stub.call_rpc :delete_connection, request, options: options do |response, operation|
|
5756
|
+
yield response, operation if block_given?
|
5757
|
+
return response
|
5758
|
+
end
|
5759
|
+
rescue ::GRPC::BadStatus => e
|
5760
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5761
|
+
end
|
5762
|
+
|
5763
|
+
##
|
5764
|
+
# Update a Connection.
|
5765
|
+
#
|
5766
|
+
# @overload update_connection(request, options = nil)
|
5767
|
+
# Pass arguments to `update_connection` via a request object, either of type
|
5768
|
+
# {::Google::Cloud::Dlp::V2::UpdateConnectionRequest} or an equivalent Hash.
|
5769
|
+
#
|
5770
|
+
# @param request [::Google::Cloud::Dlp::V2::UpdateConnectionRequest, ::Hash]
|
5771
|
+
# A request object representing the call parameters. Required. To specify no
|
5772
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
5773
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
5774
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
5775
|
+
#
|
5776
|
+
# @overload update_connection(name: nil, connection: nil, update_mask: nil)
|
5777
|
+
# Pass arguments to `update_connection` via keyword arguments. Note that at
|
5778
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
5779
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
5780
|
+
#
|
5781
|
+
# @param name [::String]
|
5782
|
+
# Required. Resource name in the format:
|
5783
|
+
# `projects/{project}/locations/{location}/connections/{connection}`.
|
5784
|
+
# @param connection [::Google::Cloud::Dlp::V2::Connection, ::Hash]
|
5785
|
+
# Required. The connection with new values for the relevant fields.
|
5786
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
5787
|
+
# Optional. Mask to control which fields get updated.
|
5788
|
+
#
|
5789
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
5790
|
+
# @yieldparam response [::Google::Cloud::Dlp::V2::Connection]
|
5791
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
5792
|
+
#
|
5793
|
+
# @return [::Google::Cloud::Dlp::V2::Connection]
|
5794
|
+
#
|
5795
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
5796
|
+
#
|
5797
|
+
# @example Basic example
|
5798
|
+
# require "google/cloud/dlp/v2"
|
5799
|
+
#
|
5800
|
+
# # Create a client object. The client can be reused for multiple calls.
|
5801
|
+
# client = Google::Cloud::Dlp::V2::DlpService::Client.new
|
5802
|
+
#
|
5803
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
5804
|
+
# request = Google::Cloud::Dlp::V2::UpdateConnectionRequest.new
|
5805
|
+
#
|
5806
|
+
# # Call the update_connection method.
|
5807
|
+
# result = client.update_connection request
|
5808
|
+
#
|
5809
|
+
# # The returned object is of type Google::Cloud::Dlp::V2::Connection.
|
5810
|
+
# p result
|
5811
|
+
#
|
5812
|
+
def update_connection request, options = nil
|
5813
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
5814
|
+
|
5815
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateConnectionRequest
|
5816
|
+
|
5817
|
+
# Converts hash and nil to an options object
|
5818
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
5819
|
+
|
5820
|
+
# Customize the options with defaults
|
5821
|
+
metadata = @config.rpcs.update_connection.metadata.to_h
|
5822
|
+
|
5823
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
5824
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
5825
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
5826
|
+
gapic_version: ::Google::Cloud::Dlp::V2::VERSION
|
5827
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
5828
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
5829
|
+
|
5830
|
+
header_params = {}
|
5831
|
+
if request.name
|
5832
|
+
header_params["name"] = request.name
|
5833
|
+
end
|
5834
|
+
|
5835
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
5836
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
5837
|
+
|
5838
|
+
options.apply_defaults timeout: @config.rpcs.update_connection.timeout,
|
5839
|
+
metadata: metadata,
|
5840
|
+
retry_policy: @config.rpcs.update_connection.retry_policy
|
5841
|
+
|
5842
|
+
options.apply_defaults timeout: @config.timeout,
|
5843
|
+
metadata: @config.metadata,
|
5844
|
+
retry_policy: @config.retry_policy
|
5845
|
+
|
5846
|
+
@dlp_service_stub.call_rpc :update_connection, request, options: options do |response, operation|
|
5847
|
+
yield response, operation if block_given?
|
5848
|
+
return response
|
5849
|
+
end
|
5850
|
+
rescue ::GRPC::BadStatus => e
|
5851
|
+
raise ::Google::Cloud::Error.from_error(e)
|
5852
|
+
end
|
5853
|
+
|
5167
5854
|
##
|
5168
5855
|
# Configuration class for the DlpService API.
|
5169
5856
|
#
|
@@ -5533,6 +6220,11 @@ module Google
|
|
5533
6220
|
#
|
5534
6221
|
attr_reader :get_column_data_profile
|
5535
6222
|
##
|
6223
|
+
# RPC-specific configuration for `delete_table_data_profile`
|
6224
|
+
# @return [::Gapic::Config::Method]
|
6225
|
+
#
|
6226
|
+
attr_reader :delete_table_data_profile
|
6227
|
+
##
|
5536
6228
|
# RPC-specific configuration for `hybrid_inspect_dlp_job`
|
5537
6229
|
# @return [::Gapic::Config::Method]
|
5538
6230
|
#
|
@@ -5542,6 +6234,36 @@ module Google
|
|
5542
6234
|
# @return [::Gapic::Config::Method]
|
5543
6235
|
#
|
5544
6236
|
attr_reader :finish_dlp_job
|
6237
|
+
##
|
6238
|
+
# RPC-specific configuration for `create_connection`
|
6239
|
+
# @return [::Gapic::Config::Method]
|
6240
|
+
#
|
6241
|
+
attr_reader :create_connection
|
6242
|
+
##
|
6243
|
+
# RPC-specific configuration for `get_connection`
|
6244
|
+
# @return [::Gapic::Config::Method]
|
6245
|
+
#
|
6246
|
+
attr_reader :get_connection
|
6247
|
+
##
|
6248
|
+
# RPC-specific configuration for `list_connections`
|
6249
|
+
# @return [::Gapic::Config::Method]
|
6250
|
+
#
|
6251
|
+
attr_reader :list_connections
|
6252
|
+
##
|
6253
|
+
# RPC-specific configuration for `search_connections`
|
6254
|
+
# @return [::Gapic::Config::Method]
|
6255
|
+
#
|
6256
|
+
attr_reader :search_connections
|
6257
|
+
##
|
6258
|
+
# RPC-specific configuration for `delete_connection`
|
6259
|
+
# @return [::Gapic::Config::Method]
|
6260
|
+
#
|
6261
|
+
attr_reader :delete_connection
|
6262
|
+
##
|
6263
|
+
# RPC-specific configuration for `update_connection`
|
6264
|
+
# @return [::Gapic::Config::Method]
|
6265
|
+
#
|
6266
|
+
attr_reader :update_connection
|
5545
6267
|
|
5546
6268
|
# @private
|
5547
6269
|
def initialize parent_rpcs = nil
|
@@ -5631,10 +6353,24 @@ module Google
|
|
5631
6353
|
@get_table_data_profile = ::Gapic::Config::Method.new get_table_data_profile_config
|
5632
6354
|
get_column_data_profile_config = parent_rpcs.get_column_data_profile if parent_rpcs.respond_to? :get_column_data_profile
|
5633
6355
|
@get_column_data_profile = ::Gapic::Config::Method.new get_column_data_profile_config
|
6356
|
+
delete_table_data_profile_config = parent_rpcs.delete_table_data_profile if parent_rpcs.respond_to? :delete_table_data_profile
|
6357
|
+
@delete_table_data_profile = ::Gapic::Config::Method.new delete_table_data_profile_config
|
5634
6358
|
hybrid_inspect_dlp_job_config = parent_rpcs.hybrid_inspect_dlp_job if parent_rpcs.respond_to? :hybrid_inspect_dlp_job
|
5635
6359
|
@hybrid_inspect_dlp_job = ::Gapic::Config::Method.new hybrid_inspect_dlp_job_config
|
5636
6360
|
finish_dlp_job_config = parent_rpcs.finish_dlp_job if parent_rpcs.respond_to? :finish_dlp_job
|
5637
6361
|
@finish_dlp_job = ::Gapic::Config::Method.new finish_dlp_job_config
|
6362
|
+
create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection
|
6363
|
+
@create_connection = ::Gapic::Config::Method.new create_connection_config
|
6364
|
+
get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection
|
6365
|
+
@get_connection = ::Gapic::Config::Method.new get_connection_config
|
6366
|
+
list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections
|
6367
|
+
@list_connections = ::Gapic::Config::Method.new list_connections_config
|
6368
|
+
search_connections_config = parent_rpcs.search_connections if parent_rpcs.respond_to? :search_connections
|
6369
|
+
@search_connections = ::Gapic::Config::Method.new search_connections_config
|
6370
|
+
delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection
|
6371
|
+
@delete_connection = ::Gapic::Config::Method.new delete_connection_config
|
6372
|
+
update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection
|
6373
|
+
@update_connection = ::Gapic::Config::Method.new update_connection_config
|
5638
6374
|
|
5639
6375
|
yield self if block_given?
|
5640
6376
|
end
|