google-cloud-dlp-v2 0.14.0 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a19842449c06d4fdf42454eefe3fbdd8b2cb75e0d45df60629a045cc40677726
4
- data.tar.gz: b2519d54763609820b764ccce239217d371462161a8dd53b11916c2349cc2589
3
+ metadata.gz: 05decd06046f5eacc03f49216fd4282af41d520c7eb7d8b8600c40a030b12bb3
4
+ data.tar.gz: fb3c7f4c039710b08f88f9ea6398bc02cee732ebb9eda2487ce5bf04c3aaa8b4
5
5
  SHA512:
6
- metadata.gz: d43d5a2678924715b9ddbd40b28f1e3cd626905f4fcfefbd5d6907900818a13560a92da77a897e494ee5a6370146a7cb9b6c7e650dd31f1fce00f86748284033
7
- data.tar.gz: 84b9641c4dfa18d77b6ba2bd526ac4af48f9f142995a1220742d2f37583bf155d3e742db405dbceb27bf60160186b28fb1ea3c835099ee0b8e1111d9d0c2f9fd
6
+ metadata.gz: 8d5af223f6b1c383f082fd452b32f166bf3233c8a0d8a9f6465020620701af955989eae73d20b1f92298302a4aebfe1b480ddd2f2a15a064debf8d0d2e08bfd0
7
+ data.tar.gz: b972dace8650d41b3cbe9a182de9deffb6428550fa8508c12f1a40cdbcb8885a7561d2794416754f232b83537436efb4166473c9b4bfcc1e67181f3f02aba5be
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud Data Loss Prevention (DLP) V2 API
2
2
 
3
- API Client library for the Cloud Data Loss Prevention (DLP) V2 API
3
+ Provides methods for detection, risk analysis, and de-identification of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories.
4
4
 
5
5
  Provides methods for detection of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories.
6
6
 
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/privacy/dlp/v2/dlp_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -269,6 +270,12 @@ module Google
269
270
  @quota_project_id = @config.quota_project
270
271
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
271
272
 
273
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
274
+ config.credentials = credentials
275
+ config.quota_project = @quota_project_id
276
+ config.endpoint = @config.endpoint
277
+ end
278
+
272
279
  @dlp_service_stub = ::Gapic::ServiceStub.new(
273
280
  ::Google::Cloud::Dlp::V2::DlpService::Stub,
274
281
  credentials: credentials,
@@ -278,6 +285,13 @@ module Google
278
285
  )
279
286
  end
280
287
 
288
+ ##
289
+ # Get the associated client for mix-in of the Locations.
290
+ #
291
+ # @return [Google::Cloud::Location::Locations::Client]
292
+ #
293
+ attr_reader :location_client
294
+
281
295
  # Service calls
282
296
 
283
297
  ##
@@ -1261,13 +1275,11 @@ module Google
1261
1275
  # # Call the list_inspect_templates method.
1262
1276
  # result = client.list_inspect_templates request
1263
1277
  #
1264
- # # The returned object is of type Gapic::PagedEnumerable. You can
1265
- # # iterate over all elements by calling #each, and the enumerable
1266
- # # will lazily make API calls to fetch subsequent pages. Other
1267
- # # methods are also available for managing paging directly.
1268
- # result.each do |response|
1278
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1279
+ # # over elements, and API calls will be issued to fetch pages as needed.
1280
+ # result.each do |item|
1269
1281
  # # Each element is of type ::Google::Cloud::Dlp::V2::InspectTemplate.
1270
- # p response
1282
+ # p item
1271
1283
  # end
1272
1284
  #
1273
1285
  def list_inspect_templates request, options = nil
@@ -1782,13 +1794,11 @@ module Google
1782
1794
  # # Call the list_deidentify_templates method.
1783
1795
  # result = client.list_deidentify_templates request
1784
1796
  #
1785
- # # The returned object is of type Gapic::PagedEnumerable. You can
1786
- # # iterate over all elements by calling #each, and the enumerable
1787
- # # will lazily make API calls to fetch subsequent pages. Other
1788
- # # methods are also available for managing paging directly.
1789
- # result.each do |response|
1797
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1798
+ # # over elements, and API calls will be issued to fetch pages as needed.
1799
+ # result.each do |item|
1790
1800
  # # Each element is of type ::Google::Cloud::Dlp::V2::DeidentifyTemplate.
1791
- # p response
1801
+ # p item
1792
1802
  # end
1793
1803
  #
1794
1804
  def list_deidentify_templates request, options = nil
@@ -2409,13 +2419,11 @@ module Google
2409
2419
  # # Call the list_job_triggers method.
2410
2420
  # result = client.list_job_triggers request
2411
2421
  #
2412
- # # The returned object is of type Gapic::PagedEnumerable. You can
2413
- # # iterate over all elements by calling #each, and the enumerable
2414
- # # will lazily make API calls to fetch subsequent pages. Other
2415
- # # methods are also available for managing paging directly.
2416
- # result.each do |response|
2422
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2423
+ # # over elements, and API calls will be issued to fetch pages as needed.
2424
+ # result.each do |item|
2417
2425
  # # Each element is of type ::Google::Cloud::Dlp::V2::JobTrigger.
2418
- # p response
2426
+ # p item
2419
2427
  # end
2420
2428
  #
2421
2429
  def list_job_triggers request, options = nil
@@ -2861,13 +2869,11 @@ module Google
2861
2869
  # # Call the list_dlp_jobs method.
2862
2870
  # result = client.list_dlp_jobs request
2863
2871
  #
2864
- # # The returned object is of type Gapic::PagedEnumerable. You can
2865
- # # iterate over all elements by calling #each, and the enumerable
2866
- # # will lazily make API calls to fetch subsequent pages. Other
2867
- # # methods are also available for managing paging directly.
2868
- # result.each do |response|
2872
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2873
+ # # over elements, and API calls will be issued to fetch pages as needed.
2874
+ # result.each do |item|
2869
2875
  # # Each element is of type ::Google::Cloud::Dlp::V2::DlpJob.
2870
- # p response
2876
+ # p item
2871
2877
  # end
2872
2878
  #
2873
2879
  def list_dlp_jobs request, options = nil
@@ -3558,13 +3564,11 @@ module Google
3558
3564
  # # Call the list_stored_info_types method.
3559
3565
  # result = client.list_stored_info_types request
3560
3566
  #
3561
- # # The returned object is of type Gapic::PagedEnumerable. You can
3562
- # # iterate over all elements by calling #each, and the enumerable
3563
- # # will lazily make API calls to fetch subsequent pages. Other
3564
- # # methods are also available for managing paging directly.
3565
- # result.each do |response|
3567
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3568
+ # # over elements, and API calls will be issued to fetch pages as needed.
3569
+ # result.each do |item|
3566
3570
  # # Each element is of type ::Google::Cloud::Dlp::V2::StoredInfoType.
3567
- # p response
3571
+ # p item
3568
3572
  # end
3569
3573
  #
3570
3574
  def list_stored_info_types request, options = nil