google-cloud-dlp-v2 0.21.0 → 0.22.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.
@@ -1467,6 +1467,234 @@ module Google
1467
1467
  result
1468
1468
  end
1469
1469
 
1470
+ ##
1471
+ # Baseline implementation for the list_project_data_profiles REST call
1472
+ #
1473
+ # @param request_pb [::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest]
1474
+ # A request object representing the call parameters. Required.
1475
+ # @param options [::Gapic::CallOptions]
1476
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1477
+ #
1478
+ # @yield [result, operation] Access the result along with the TransportOperation object
1479
+ # @yieldparam result [::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse]
1480
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1481
+ #
1482
+ # @return [::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse]
1483
+ # A result object deserialized from the server's reply
1484
+ def list_project_data_profiles request_pb, options = nil
1485
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1486
+
1487
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_project_data_profiles_request request_pb
1488
+ query_string_params = if query_string_params.any?
1489
+ query_string_params.to_h { |p| p.split "=", 2 }
1490
+ else
1491
+ {}
1492
+ end
1493
+
1494
+ response = @client_stub.make_http_request(
1495
+ verb,
1496
+ uri: uri,
1497
+ body: body || "",
1498
+ params: query_string_params,
1499
+ options: options
1500
+ )
1501
+ operation = ::Gapic::Rest::TransportOperation.new response
1502
+ result = ::Google::Cloud::Dlp::V2::ListProjectDataProfilesResponse.decode_json response.body, ignore_unknown_fields: true
1503
+
1504
+ yield result, operation if block_given?
1505
+ result
1506
+ end
1507
+
1508
+ ##
1509
+ # Baseline implementation for the list_table_data_profiles REST call
1510
+ #
1511
+ # @param request_pb [::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest]
1512
+ # A request object representing the call parameters. Required.
1513
+ # @param options [::Gapic::CallOptions]
1514
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1515
+ #
1516
+ # @yield [result, operation] Access the result along with the TransportOperation object
1517
+ # @yieldparam result [::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse]
1518
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1519
+ #
1520
+ # @return [::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse]
1521
+ # A result object deserialized from the server's reply
1522
+ def list_table_data_profiles request_pb, options = nil
1523
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1524
+
1525
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_table_data_profiles_request request_pb
1526
+ query_string_params = if query_string_params.any?
1527
+ query_string_params.to_h { |p| p.split "=", 2 }
1528
+ else
1529
+ {}
1530
+ end
1531
+
1532
+ response = @client_stub.make_http_request(
1533
+ verb,
1534
+ uri: uri,
1535
+ body: body || "",
1536
+ params: query_string_params,
1537
+ options: options
1538
+ )
1539
+ operation = ::Gapic::Rest::TransportOperation.new response
1540
+ result = ::Google::Cloud::Dlp::V2::ListTableDataProfilesResponse.decode_json response.body, ignore_unknown_fields: true
1541
+
1542
+ yield result, operation if block_given?
1543
+ result
1544
+ end
1545
+
1546
+ ##
1547
+ # Baseline implementation for the list_column_data_profiles REST call
1548
+ #
1549
+ # @param request_pb [::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest]
1550
+ # A request object representing the call parameters. Required.
1551
+ # @param options [::Gapic::CallOptions]
1552
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1553
+ #
1554
+ # @yield [result, operation] Access the result along with the TransportOperation object
1555
+ # @yieldparam result [::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse]
1556
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1557
+ #
1558
+ # @return [::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse]
1559
+ # A result object deserialized from the server's reply
1560
+ def list_column_data_profiles request_pb, options = nil
1561
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1562
+
1563
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_column_data_profiles_request request_pb
1564
+ query_string_params = if query_string_params.any?
1565
+ query_string_params.to_h { |p| p.split "=", 2 }
1566
+ else
1567
+ {}
1568
+ end
1569
+
1570
+ response = @client_stub.make_http_request(
1571
+ verb,
1572
+ uri: uri,
1573
+ body: body || "",
1574
+ params: query_string_params,
1575
+ options: options
1576
+ )
1577
+ operation = ::Gapic::Rest::TransportOperation.new response
1578
+ result = ::Google::Cloud::Dlp::V2::ListColumnDataProfilesResponse.decode_json response.body, ignore_unknown_fields: true
1579
+
1580
+ yield result, operation if block_given?
1581
+ result
1582
+ end
1583
+
1584
+ ##
1585
+ # Baseline implementation for the get_project_data_profile REST call
1586
+ #
1587
+ # @param request_pb [::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest]
1588
+ # A request object representing the call parameters. Required.
1589
+ # @param options [::Gapic::CallOptions]
1590
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1591
+ #
1592
+ # @yield [result, operation] Access the result along with the TransportOperation object
1593
+ # @yieldparam result [::Google::Cloud::Dlp::V2::ProjectDataProfile]
1594
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1595
+ #
1596
+ # @return [::Google::Cloud::Dlp::V2::ProjectDataProfile]
1597
+ # A result object deserialized from the server's reply
1598
+ def get_project_data_profile request_pb, options = nil
1599
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1600
+
1601
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_project_data_profile_request request_pb
1602
+ query_string_params = if query_string_params.any?
1603
+ query_string_params.to_h { |p| p.split "=", 2 }
1604
+ else
1605
+ {}
1606
+ end
1607
+
1608
+ response = @client_stub.make_http_request(
1609
+ verb,
1610
+ uri: uri,
1611
+ body: body || "",
1612
+ params: query_string_params,
1613
+ options: options
1614
+ )
1615
+ operation = ::Gapic::Rest::TransportOperation.new response
1616
+ result = ::Google::Cloud::Dlp::V2::ProjectDataProfile.decode_json response.body, ignore_unknown_fields: true
1617
+
1618
+ yield result, operation if block_given?
1619
+ result
1620
+ end
1621
+
1622
+ ##
1623
+ # Baseline implementation for the get_table_data_profile REST call
1624
+ #
1625
+ # @param request_pb [::Google::Cloud::Dlp::V2::GetTableDataProfileRequest]
1626
+ # A request object representing the call parameters. Required.
1627
+ # @param options [::Gapic::CallOptions]
1628
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1629
+ #
1630
+ # @yield [result, operation] Access the result along with the TransportOperation object
1631
+ # @yieldparam result [::Google::Cloud::Dlp::V2::TableDataProfile]
1632
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1633
+ #
1634
+ # @return [::Google::Cloud::Dlp::V2::TableDataProfile]
1635
+ # A result object deserialized from the server's reply
1636
+ def get_table_data_profile request_pb, options = nil
1637
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1638
+
1639
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_table_data_profile_request request_pb
1640
+ query_string_params = if query_string_params.any?
1641
+ query_string_params.to_h { |p| p.split "=", 2 }
1642
+ else
1643
+ {}
1644
+ end
1645
+
1646
+ response = @client_stub.make_http_request(
1647
+ verb,
1648
+ uri: uri,
1649
+ body: body || "",
1650
+ params: query_string_params,
1651
+ options: options
1652
+ )
1653
+ operation = ::Gapic::Rest::TransportOperation.new response
1654
+ result = ::Google::Cloud::Dlp::V2::TableDataProfile.decode_json response.body, ignore_unknown_fields: true
1655
+
1656
+ yield result, operation if block_given?
1657
+ result
1658
+ end
1659
+
1660
+ ##
1661
+ # Baseline implementation for the get_column_data_profile REST call
1662
+ #
1663
+ # @param request_pb [::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest]
1664
+ # A request object representing the call parameters. Required.
1665
+ # @param options [::Gapic::CallOptions]
1666
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1667
+ #
1668
+ # @yield [result, operation] Access the result along with the TransportOperation object
1669
+ # @yieldparam result [::Google::Cloud::Dlp::V2::ColumnDataProfile]
1670
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1671
+ #
1672
+ # @return [::Google::Cloud::Dlp::V2::ColumnDataProfile]
1673
+ # A result object deserialized from the server's reply
1674
+ def get_column_data_profile request_pb, options = nil
1675
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1676
+
1677
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_column_data_profile_request request_pb
1678
+ query_string_params = if query_string_params.any?
1679
+ query_string_params.to_h { |p| p.split "=", 2 }
1680
+ else
1681
+ {}
1682
+ end
1683
+
1684
+ response = @client_stub.make_http_request(
1685
+ verb,
1686
+ uri: uri,
1687
+ body: body || "",
1688
+ params: query_string_params,
1689
+ options: options
1690
+ )
1691
+ operation = ::Gapic::Rest::TransportOperation.new response
1692
+ result = ::Google::Cloud::Dlp::V2::ColumnDataProfile.decode_json response.body, ignore_unknown_fields: true
1693
+
1694
+ yield result, operation if block_given?
1695
+ result
1696
+ end
1697
+
1470
1698
  ##
1471
1699
  # Baseline implementation for the hybrid_inspect_dlp_job REST call
1472
1700
  #
@@ -2871,6 +3099,174 @@ module Google
2871
3099
  transcoder.transcode request_pb
2872
3100
  end
2873
3101
 
3102
+ ##
3103
+ # @private
3104
+ #
3105
+ # GRPC transcoding helper method for the list_project_data_profiles REST call
3106
+ #
3107
+ # @param request_pb [::Google::Cloud::Dlp::V2::ListProjectDataProfilesRequest]
3108
+ # A request object representing the call parameters. Required.
3109
+ # @return [Array(String, [String, nil], Hash{String => String})]
3110
+ # Uri, Body, Query string parameters
3111
+ def self.transcode_list_project_data_profiles_request request_pb
3112
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3113
+ .with_bindings(
3114
+ uri_method: :get,
3115
+ uri_template: "/v2/{parent}/projectDataProfiles",
3116
+ matches: [
3117
+ ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false]
3118
+ ]
3119
+ )
3120
+ .with_bindings(
3121
+ uri_method: :get,
3122
+ uri_template: "/v2/{parent}/projectDataProfiles",
3123
+ matches: [
3124
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
3125
+ ]
3126
+ )
3127
+ transcoder.transcode request_pb
3128
+ end
3129
+
3130
+ ##
3131
+ # @private
3132
+ #
3133
+ # GRPC transcoding helper method for the list_table_data_profiles REST call
3134
+ #
3135
+ # @param request_pb [::Google::Cloud::Dlp::V2::ListTableDataProfilesRequest]
3136
+ # A request object representing the call parameters. Required.
3137
+ # @return [Array(String, [String, nil], Hash{String => String})]
3138
+ # Uri, Body, Query string parameters
3139
+ def self.transcode_list_table_data_profiles_request request_pb
3140
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3141
+ .with_bindings(
3142
+ uri_method: :get,
3143
+ uri_template: "/v2/{parent}/tableDataProfiles",
3144
+ matches: [
3145
+ ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false]
3146
+ ]
3147
+ )
3148
+ .with_bindings(
3149
+ uri_method: :get,
3150
+ uri_template: "/v2/{parent}/tableDataProfiles",
3151
+ matches: [
3152
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
3153
+ ]
3154
+ )
3155
+ transcoder.transcode request_pb
3156
+ end
3157
+
3158
+ ##
3159
+ # @private
3160
+ #
3161
+ # GRPC transcoding helper method for the list_column_data_profiles REST call
3162
+ #
3163
+ # @param request_pb [::Google::Cloud::Dlp::V2::ListColumnDataProfilesRequest]
3164
+ # A request object representing the call parameters. Required.
3165
+ # @return [Array(String, [String, nil], Hash{String => String})]
3166
+ # Uri, Body, Query string parameters
3167
+ def self.transcode_list_column_data_profiles_request request_pb
3168
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3169
+ .with_bindings(
3170
+ uri_method: :get,
3171
+ uri_template: "/v2/{parent}/columnDataProfiles",
3172
+ matches: [
3173
+ ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false]
3174
+ ]
3175
+ )
3176
+ .with_bindings(
3177
+ uri_method: :get,
3178
+ uri_template: "/v2/{parent}/columnDataProfiles",
3179
+ matches: [
3180
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
3181
+ ]
3182
+ )
3183
+ transcoder.transcode request_pb
3184
+ end
3185
+
3186
+ ##
3187
+ # @private
3188
+ #
3189
+ # GRPC transcoding helper method for the get_project_data_profile REST call
3190
+ #
3191
+ # @param request_pb [::Google::Cloud::Dlp::V2::GetProjectDataProfileRequest]
3192
+ # A request object representing the call parameters. Required.
3193
+ # @return [Array(String, [String, nil], Hash{String => String})]
3194
+ # Uri, Body, Query string parameters
3195
+ def self.transcode_get_project_data_profile_request request_pb
3196
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3197
+ .with_bindings(
3198
+ uri_method: :get,
3199
+ uri_template: "/v2/{name}",
3200
+ matches: [
3201
+ ["name", %r{^organizations/[^/]+/locations/[^/]+/projectDataProfiles/[^/]+/?$}, false]
3202
+ ]
3203
+ )
3204
+ .with_bindings(
3205
+ uri_method: :get,
3206
+ uri_template: "/v2/{name}",
3207
+ matches: [
3208
+ ["name", %r{^projects/[^/]+/locations/[^/]+/projectDataProfiles/[^/]+/?$}, false]
3209
+ ]
3210
+ )
3211
+ transcoder.transcode request_pb
3212
+ end
3213
+
3214
+ ##
3215
+ # @private
3216
+ #
3217
+ # GRPC transcoding helper method for the get_table_data_profile REST call
3218
+ #
3219
+ # @param request_pb [::Google::Cloud::Dlp::V2::GetTableDataProfileRequest]
3220
+ # A request object representing the call parameters. Required.
3221
+ # @return [Array(String, [String, nil], Hash{String => String})]
3222
+ # Uri, Body, Query string parameters
3223
+ def self.transcode_get_table_data_profile_request request_pb
3224
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3225
+ .with_bindings(
3226
+ uri_method: :get,
3227
+ uri_template: "/v2/{name}",
3228
+ matches: [
3229
+ ["name", %r{^organizations/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+/?$}, false]
3230
+ ]
3231
+ )
3232
+ .with_bindings(
3233
+ uri_method: :get,
3234
+ uri_template: "/v2/{name}",
3235
+ matches: [
3236
+ ["name", %r{^projects/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+/?$}, false]
3237
+ ]
3238
+ )
3239
+ transcoder.transcode request_pb
3240
+ end
3241
+
3242
+ ##
3243
+ # @private
3244
+ #
3245
+ # GRPC transcoding helper method for the get_column_data_profile REST call
3246
+ #
3247
+ # @param request_pb [::Google::Cloud::Dlp::V2::GetColumnDataProfileRequest]
3248
+ # A request object representing the call parameters. Required.
3249
+ # @return [Array(String, [String, nil], Hash{String => String})]
3250
+ # Uri, Body, Query string parameters
3251
+ def self.transcode_get_column_data_profile_request request_pb
3252
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3253
+ .with_bindings(
3254
+ uri_method: :get,
3255
+ uri_template: "/v2/{name}",
3256
+ matches: [
3257
+ ["name", %r{^organizations/[^/]+/locations/[^/]+/columnDataProfiles/[^/]+/?$}, false]
3258
+ ]
3259
+ )
3260
+ .with_bindings(
3261
+ uri_method: :get,
3262
+ uri_template: "/v2/{name}",
3263
+ matches: [
3264
+ ["name", %r{^projects/[^/]+/locations/[^/]+/columnDataProfiles/[^/]+/?$}, false]
3265
+ ]
3266
+ )
3267
+ transcoder.transcode request_pb
3268
+ end
3269
+
2874
3270
  ##
2875
3271
  # @private
2876
3272
  #
@@ -39,7 +39,7 @@ module Google
39
39
  # scheduling of data scans on Google Cloud Platform based data sets.
40
40
  #
41
41
  # To learn more about concepts and find how-to guides see
42
- # https://cloud.google.com/dlp/docs/.
42
+ # https://cloud.google.com/sensitive-data-protection/docs/.
43
43
  #
44
44
  # To load this service and instantiate a REST client:
45
45
  #
@@ -40,7 +40,7 @@ module Google
40
40
  # scheduling of data scans on Google Cloud Platform based data sets.
41
41
  #
42
42
  # To learn more about concepts and find how-to guides see
43
- # https://cloud.google.com/dlp/docs/.
43
+ # https://cloud.google.com/sensitive-data-protection/docs/.
44
44
  #
45
45
  # @example Load this service and instantiate a gRPC client
46
46
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Dlp
23
23
  module V2
24
- VERSION = "0.21.0"
24
+ VERSION = "0.22.0"
25
25
  end
26
26
  end
27
27
  end