google-cloud-dlp 0.5.0 → 0.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ab118ba23474f0985aa17a8d40f0c46e1cad6546fdb0a3235c0e4393dddd29a
4
- data.tar.gz: c3edbdbb0da5699710753b1417067bcf8ed4fffa97e2ccf1bfcecb260518c31a
3
+ metadata.gz: ea433870bb19233257cca8af9492936bc4cc3b55289dfac2d5b7577e1c85ed7d
4
+ data.tar.gz: a8f4728f8440af5d0917a901357468859a05b1cca03aeba1c45e88c9b4a8ef6a
5
5
  SHA512:
6
- metadata.gz: 2054d42975ea736241c46b960e798dd71ca6713a1022c6979d24cd3c9f8fdfa62761358e8b1750d11703ab02fd2a688beda64a380bb7fe2a1033962867c0650b
7
- data.tar.gz: a88152e7d89201a27c58c26384975102f7de1d1f542dfde3f5aaf26f7662e302021b712bf3bfa905c69c16fd19271921fec0033cd2bb8494ffd930e49e250a20
6
+ metadata.gz: '0768fd1851ef12d8abee5a488f04af874b2fd045c3232b5a0f1436090b65c3736482383fcc9473919f0073b3fe564c0f1beafb9c7c35329102ecbb6dc66ccff3'
7
+ data.tar.gz: f8eaf2d9687bd57fa89d7c1deb58bc8a6a513c7ebe9c177dfb23fd12674ab55d40b553570a141c6c170549e165ebaebf046e061094563d6531e5ef55d45562bb
data/.yardopts CHANGED
@@ -2,6 +2,7 @@
2
2
  --title=Cloud Data Loss Prevention (DLP) API
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
+ --markup-provider redcarpet
5
6
 
6
7
  ./lib/**/*.rb
7
8
  -
data/README.md CHANGED
@@ -13,7 +13,7 @@ steps:
13
13
 
14
14
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
15
15
  2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
16
- 3. [Enable the Cloud Data Loss Prevention (DLP) API.](https://console.cloud.google.com/apis/api/dlp)
16
+ 3. [Enable the Cloud Data Loss Prevention (DLP) API.](https://console.cloud.google.com/apis/library/dlp.googleapis.com)
17
17
  4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
18
18
 
19
19
  ### Installation
@@ -21,36 +21,6 @@ steps:
21
21
  $ gem install google-cloud-dlp
22
22
  ```
23
23
 
24
- ### Supported Ruby Versions
25
-
26
- This library is supported on Ruby 2.0+.
27
-
28
- However, Ruby 2.3 or later is strongly recommended, as earlier releases have
29
- reached or are nearing end-of-life. After June 1, 2018, Google will provide
30
- official support only for Ruby versions that are considered current and
31
- supported by Ruby Core (that is, Ruby versions that are either in normal
32
- maintenance or in security maintenance).
33
- See https://www.ruby-lang.org/en/downloads/branches/ for further details.
34
-
35
- ### Preview
36
- #### DlpServiceClient
37
- ```rb
38
- require "google/cloud/dlp"
39
-
40
- dlp = Google::Cloud::Dlp.new
41
-
42
- inspect_config = {
43
- info_types: [{ name: "PHONE_NUMBER" }],
44
- min_likelihood: :POSSIBLE
45
- }
46
- item = { value: "my phone number is 215-512-1212" }
47
- parent = "projects/#{ENV["MY_PROJECT"]}"
48
-
49
- response = dlp.inspect_content parent,
50
- inspect_config: inspect_config,
51
- item: item
52
- ```
53
-
54
24
  ### Next Steps
55
25
  - Read the [Client Library Documentation][] for Cloud Data Loss Prevention (DLP) API
56
26
  to see other available methods on the client.
@@ -59,9 +29,16 @@ response = dlp.inspect_content parent,
59
29
  - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
60
30
  to see the full list of Cloud APIs that we cover.
61
31
 
32
+ [Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-dlp/latest/google/privacy/dlp/v2
33
+ [Product Documentation]: https://cloud.google.com/dlp
34
+
62
35
  ## Enabling Logging
63
36
 
64
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below, or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger) that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
37
+ To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
38
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
39
+ or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
40
+ that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
41
+ and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
65
42
 
66
43
  Configuring a Ruby stdlib logger:
67
44
 
@@ -83,14 +60,11 @@ end
83
60
 
84
61
  ## Supported Ruby Versions
85
62
 
86
- This library is supported on Ruby 2.0+.
63
+ This library is supported on Ruby 2.3+.
87
64
 
88
- However, Ruby 2.3 or later is strongly recommended, as earlier releases have
89
- reached or are nearing end-of-life. After June 1, 2018, Google will provide
90
- official support only for Ruby versions that are considered current and
91
- supported by Ruby Core (that is, Ruby versions that are either in normal
92
- maintenance or in security maintenance).
93
- See https://www.ruby-lang.org/en/downloads/branches/ for further details.
94
-
95
- [Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-dlp/latest/google/privacy/dlp/v2
96
- [Product Documentation]: https://cloud.google.com/dlp
65
+ Google provides official support for Ruby versions that are actively supported
66
+ by Ruby Core—that is, Ruby versions that are either in normal maintenance or
67
+ in security maintenance, and not end of life. Currently, this means Ruby 2.3
68
+ and later. Older versions of Ruby _may_ still work, but are unsupported and not
69
+ recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
70
+ about the Ruby support schedule.
@@ -34,24 +34,9 @@ module Google
34
34
  #
35
35
  # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
36
36
  # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
37
- # 3. [Enable the Cloud Data Loss Prevention (DLP) API.](https://console.cloud.google.com/apis/api/dlp)
37
+ # 3. [Enable the Cloud Data Loss Prevention (DLP) API.](https://console.cloud.google.com/apis/library/dlp.googleapis.com)
38
38
  # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
39
39
  #
40
- # ### Preview
41
- # #### DlpServiceClient
42
- # ```rb
43
- # require "google/cloud/dlp"
44
- #
45
- # dlp_service_client = Google::Cloud::Dlp.new
46
- # min_likelihood = :POSSIBLE
47
- # inspect_config = { min_likelihood: min_likelihood }
48
- # type = "text/plain"
49
- # value = "my phone number is 215-512-1212"
50
- # items_element = { type: type, value: value }
51
- # items = [items_element]
52
- # response = dlp_service_client.inspect_content(inspect_config, items)
53
- # ```
54
- #
55
40
  # ### Next Steps
56
41
  # - Read the [Cloud Data Loss Prevention (DLP) API Product documentation][Product Documentation]
57
42
  # to learn more about the product and see How-to Guides.
@@ -86,9 +71,6 @@ module Google
86
71
  # end
87
72
  # ```
88
73
  #
89
- # [Product Documentation]: https://cloud.google.com/dlp
90
- #
91
- #
92
74
  module Dlp
93
75
  # rubocop:enable LineLength
94
76
 
@@ -16,61 +16,61 @@ require "google/cloud/dlp/v2/dlp_service_client"
16
16
 
17
17
  module Google
18
18
  module Cloud
19
- # rubocop:disable LineLength
20
-
21
- ##
22
- # # Ruby Client for Cloud Data Loss Prevention (DLP) API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
23
- #
24
- # [Cloud Data Loss Prevention (DLP) API][Product Documentation]:
25
- # Provides methods for detection, risk analysis, and de-identification of
26
- # privacy-sensitive fragments in text, images, and Google Cloud Platform
27
- # storage repositories.
28
- # - [Product Documentation][]
29
- #
30
- # ## Quick Start
31
- # In order to use this library, you first need to go through the following
32
- # steps:
33
- #
34
- # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
35
- # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
36
- # 3. [Enable the Cloud Data Loss Prevention (DLP) API.](https://console.cloud.google.com/apis/api/dlp)
37
- # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
38
- #
39
- # ### Next Steps
40
- # - Read the [Cloud Data Loss Prevention (DLP) API Product documentation][Product Documentation]
41
- # to learn more about the product and see How-to Guides.
42
- # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
43
- # to see the full list of Cloud APIs that we cover.
44
- #
45
- # [Product Documentation]: https://cloud.google.com/dlp
46
- #
47
- # ## Enabling Logging
48
- #
49
- # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
50
- # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
51
- # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
52
- # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
53
- # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
54
- #
55
- # Configuring a Ruby stdlib logger:
56
- #
57
- # ```ruby
58
- # require "logger"
59
- #
60
- # module MyLogger
61
- # LOGGER = Logger.new $stderr, level: Logger::WARN
62
- # def logger
63
- # LOGGER
64
- # end
65
- # end
66
- #
67
- # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
68
- # module GRPC
69
- # extend MyLogger
70
- # end
71
- # ```
72
- #
73
19
  module Dlp
20
+ # rubocop:disable LineLength
21
+
22
+ ##
23
+ # # Ruby Client for Cloud Data Loss Prevention (DLP) API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
24
+ #
25
+ # [Cloud Data Loss Prevention (DLP) API][Product Documentation]:
26
+ # Provides methods for detection, risk analysis, and de-identification of
27
+ # privacy-sensitive fragments in text, images, and Google Cloud Platform
28
+ # storage repositories.
29
+ # - [Product Documentation][]
30
+ #
31
+ # ## Quick Start
32
+ # In order to use this library, you first need to go through the following
33
+ # steps:
34
+ #
35
+ # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
36
+ # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
37
+ # 3. [Enable the Cloud Data Loss Prevention (DLP) API.](https://console.cloud.google.com/apis/library/dlp.googleapis.com)
38
+ # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
39
+ #
40
+ # ### Next Steps
41
+ # - Read the [Cloud Data Loss Prevention (DLP) API Product documentation][Product Documentation]
42
+ # to learn more about the product and see How-to Guides.
43
+ # - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
44
+ # to see the full list of Cloud APIs that we cover.
45
+ #
46
+ # [Product Documentation]: https://cloud.google.com/dlp
47
+ #
48
+ # ## Enabling Logging
49
+ #
50
+ # To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
51
+ # The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
52
+ # or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-logging/latest/google/cloud/logging/logger)
53
+ # that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
54
+ # and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
55
+ #
56
+ # Configuring a Ruby stdlib logger:
57
+ #
58
+ # ```ruby
59
+ # require "logger"
60
+ #
61
+ # module MyLogger
62
+ # LOGGER = Logger.new $stderr, level: Logger::WARN
63
+ # def logger
64
+ # LOGGER
65
+ # end
66
+ # end
67
+ #
68
+ # # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
69
+ # module GRPC
70
+ # extend MyLogger
71
+ # end
72
+ # ```
73
+ #
74
74
  module V2
75
75
  # rubocop:enable LineLength
76
76
 
@@ -22,13 +22,13 @@ module Google
22
22
  SCOPE = [
23
23
  "https://www.googleapis.com/auth/cloud-platform"
24
24
  ].freeze
25
- PATH_ENV_VARS = %w(DLP_KEYFILE
26
- DLP_CREDENTIALS
25
+ PATH_ENV_VARS = %w(DLP_CREDENTIALS
26
+ DLP_KEYFILE
27
27
  GOOGLE_CLOUD_CREDENTIALS
28
28
  GOOGLE_CLOUD_KEYFILE
29
29
  GCLOUD_KEYFILE)
30
- JSON_ENV_VARS = %w(DLP_KEYFILE_JSON
31
- DLP_CREDENTIALS_JSON
30
+ JSON_ENV_VARS = %w(DLP_CREDENTIALS_JSON
31
+ DLP_KEYFILE_JSON
32
32
  GOOGLE_CLOUD_CREDENTIALS_JSON
33
33
  GOOGLE_CLOUD_KEYFILE_JSON
34
34
  GCLOUD_KEYFILE_JSON)
@@ -487,7 +487,7 @@ module Google
487
487
  # @example
488
488
  # require "google/cloud/dlp"
489
489
  #
490
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
490
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
491
491
  # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
492
492
  # response = dlp_service_client.inspect_content(formatted_parent)
493
493
 
@@ -545,7 +545,7 @@ module Google
545
545
  # @example
546
546
  # require "google/cloud/dlp"
547
547
  #
548
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
548
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
549
549
  # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
550
550
  # response = dlp_service_client.redact_image(formatted_parent)
551
551
 
@@ -618,7 +618,7 @@ module Google
618
618
  # @example
619
619
  # require "google/cloud/dlp"
620
620
  #
621
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
621
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
622
622
  # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
623
623
  # response = dlp_service_client.deidentify_content(formatted_parent)
624
624
 
@@ -694,7 +694,7 @@ module Google
694
694
  # @example
695
695
  # require "google/cloud/dlp"
696
696
  #
697
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
697
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
698
698
  # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
699
699
  # response = dlp_service_client.reidentify_content(formatted_parent)
700
700
 
@@ -741,7 +741,7 @@ module Google
741
741
  # @example
742
742
  # require "google/cloud/dlp"
743
743
  #
744
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
744
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
745
745
  # response = dlp_service_client.list_info_types
746
746
 
747
747
  def list_info_types \
@@ -784,7 +784,7 @@ module Google
784
784
  # @example
785
785
  # require "google/cloud/dlp"
786
786
  #
787
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
787
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
788
788
  # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.organization_path("[ORGANIZATION]")
789
789
  # response = dlp_service_client.create_inspect_template(formatted_parent)
790
790
 
@@ -829,7 +829,7 @@ module Google
829
829
  # @example
830
830
  # require "google/cloud/dlp"
831
831
  #
832
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
832
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
833
833
  # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_inspect_template_path("[ORGANIZATION]", "[INSPECT_TEMPLATE]")
834
834
  # response = dlp_service_client.update_inspect_template(formatted_name)
835
835
 
@@ -866,7 +866,7 @@ module Google
866
866
  # @example
867
867
  # require "google/cloud/dlp"
868
868
  #
869
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
869
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
870
870
  # response = dlp_service_client.get_inspect_template
871
871
 
872
872
  def get_inspect_template \
@@ -907,7 +907,7 @@ module Google
907
907
  # @example
908
908
  # require "google/cloud/dlp"
909
909
  #
910
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
910
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
911
911
  # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.organization_path("[ORGANIZATION]")
912
912
  #
913
913
  # # Iterate over all results.
@@ -953,7 +953,7 @@ module Google
953
953
  # @example
954
954
  # require "google/cloud/dlp"
955
955
  #
956
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
956
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
957
957
  # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_inspect_template_path("[ORGANIZATION]", "[INSPECT_TEMPLATE]")
958
958
  # dlp_service_client.delete_inspect_template(formatted_name)
959
959
 
@@ -997,7 +997,7 @@ module Google
997
997
  # @example
998
998
  # require "google/cloud/dlp"
999
999
  #
1000
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1000
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1001
1001
  # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.organization_path("[ORGANIZATION]")
1002
1002
  # response = dlp_service_client.create_deidentify_template(formatted_parent)
1003
1003
 
@@ -1043,7 +1043,7 @@ module Google
1043
1043
  # @example
1044
1044
  # require "google/cloud/dlp"
1045
1045
  #
1046
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1046
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1047
1047
  # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_deidentify_template_path("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
1048
1048
  # response = dlp_service_client.update_deidentify_template(formatted_name)
1049
1049
 
@@ -1081,7 +1081,7 @@ module Google
1081
1081
  # @example
1082
1082
  # require "google/cloud/dlp"
1083
1083
  #
1084
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1084
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1085
1085
  # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_deidentify_template_path("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
1086
1086
  # response = dlp_service_client.get_deidentify_template(formatted_name)
1087
1087
 
@@ -1124,7 +1124,7 @@ module Google
1124
1124
  # @example
1125
1125
  # require "google/cloud/dlp"
1126
1126
  #
1127
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1127
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1128
1128
  # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.organization_path("[ORGANIZATION]")
1129
1129
  #
1130
1130
  # # Iterate over all results.
@@ -1171,7 +1171,7 @@ module Google
1171
1171
  # @example
1172
1172
  # require "google/cloud/dlp"
1173
1173
  #
1174
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1174
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1175
1175
  # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_deidentify_template_path("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
1176
1176
  # dlp_service_client.delete_deidentify_template(formatted_name)
1177
1177
 
@@ -1219,7 +1219,7 @@ module Google
1219
1219
  # @example
1220
1220
  # require "google/cloud/dlp"
1221
1221
  #
1222
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1222
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1223
1223
  # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
1224
1224
  # response = dlp_service_client.create_dlp_job(formatted_parent)
1225
1225
 
@@ -1293,7 +1293,7 @@ module Google
1293
1293
  # @example
1294
1294
  # require "google/cloud/dlp"
1295
1295
  #
1296
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1296
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1297
1297
  # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
1298
1298
  #
1299
1299
  # # Iterate over all results.
@@ -1343,7 +1343,7 @@ module Google
1343
1343
  # @example
1344
1344
  # require "google/cloud/dlp"
1345
1345
  #
1346
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1346
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1347
1347
  # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.dlp_job_path("[PROJECT]", "[DLP_JOB]")
1348
1348
  # response = dlp_service_client.get_dlp_job(formatted_name)
1349
1349
 
@@ -1376,7 +1376,7 @@ module Google
1376
1376
  # @example
1377
1377
  # require "google/cloud/dlp"
1378
1378
  #
1379
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1379
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1380
1380
  # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.dlp_job_path("[PROJECT]", "[DLP_JOB]")
1381
1381
  # dlp_service_client.delete_dlp_job(formatted_name)
1382
1382
 
@@ -1410,7 +1410,7 @@ module Google
1410
1410
  # @example
1411
1411
  # require "google/cloud/dlp"
1412
1412
  #
1413
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1413
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1414
1414
  # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.dlp_job_path("[PROJECT]", "[DLP_JOB]")
1415
1415
  # dlp_service_client.cancel_dlp_job(formatted_name)
1416
1416
 
@@ -1465,7 +1465,7 @@ module Google
1465
1465
  # @example
1466
1466
  # require "google/cloud/dlp"
1467
1467
  #
1468
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1468
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1469
1469
  # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
1470
1470
  #
1471
1471
  # # Iterate over all results.
@@ -1513,7 +1513,7 @@ module Google
1513
1513
  # @example
1514
1514
  # require "google/cloud/dlp"
1515
1515
  #
1516
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1516
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1517
1517
  # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.project_job_trigger_path("[PROJECT]", "[JOB_TRIGGER]")
1518
1518
  # response = dlp_service_client.get_job_trigger(formatted_name)
1519
1519
 
@@ -1544,7 +1544,7 @@ module Google
1544
1544
  # @example
1545
1545
  # require "google/cloud/dlp"
1546
1546
  #
1547
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1547
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1548
1548
  #
1549
1549
  # # TODO: Initialize +name+:
1550
1550
  # name = ''
@@ -1587,7 +1587,7 @@ module Google
1587
1587
  # @example
1588
1588
  # require "google/cloud/dlp"
1589
1589
  #
1590
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1590
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1591
1591
  # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.project_job_trigger_path("[PROJECT]", "[JOB_TRIGGER]")
1592
1592
  # response = dlp_service_client.update_job_trigger(formatted_name)
1593
1593
 
@@ -1632,7 +1632,7 @@ module Google
1632
1632
  # @example
1633
1633
  # require "google/cloud/dlp"
1634
1634
  #
1635
- # dlp_service_client = Google::Cloud::Dlp.new(version: :V2)
1635
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1636
1636
  # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.project_path("[PROJECT]")
1637
1637
  # response = dlp_service_client.create_job_trigger(formatted_parent)
1638
1638
 
@@ -15,17 +15,6 @@
15
15
  module Google
16
16
  module Privacy
17
17
  module Dlp
18
- ##
19
- # # Cloud Data Loss Prevention (DLP) API Contents
20
- #
21
- # | Class | Description |
22
- # | ----- | ----------- |
23
- # | [DlpServiceClient][] | The Cloud Data Loss Prevention (DLP) API is a service that allows clients to detect the presence of Personally Identifiable Information (PII) and other privacy-sensitive data in user-supplied, unstructured data streams, like text blocks or images. |
24
- # | [Data Types][] | Data types for Google::Cloud::Dlp::V2 |
25
- #
26
- # [DlpServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-dlp/latest/google/privacy/dlp/v2/dlpserviceclient
27
- # [Data Types]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-dlp/latest/google/privacy/dlp/v2/datatypes
28
- #
29
18
  module V2
30
19
  # Configuration description of the scanning process.
31
20
  # When used with redactContent only info_types and min_likelihood are currently
@@ -39,6 +28,11 @@ module Google
39
28
  # When no InfoTypes or CustomInfoTypes are specified in a request, the
40
29
  # system may automatically choose what detectors to run. By default this may
41
30
  # be all types, but may change over time as detectors are updated.
31
+ #
32
+ # The special InfoType name "ALL_BASIC" can be used to trigger all detectors,
33
+ # but may change over time as new InfoTypes are added. If you need precise
34
+ # control and predictability as to what detectors are run you should specify
35
+ # specific InfoTypes listed in the reference.
42
36
  # @!attribute [rw] min_likelihood
43
37
  # @return [Google::Privacy::Dlp::V2::Likelihood]
44
38
  # Only returns findings equal or above this threshold. The default is
@@ -2219,6 +2213,153 @@ module Google
2219
2213
  # projects/project-id/deidentifyTemplates/432452342.
2220
2214
  class DeleteDeidentifyTemplateRequest; end
2221
2215
 
2216
+ # Configuration for a custom dictionary created from a data source of any size
2217
+ # up to the maximum size defined in the
2218
+ # [limits](https://cloud.google.com/dlp/limits) page. The artifacts of
2219
+ # dictionary creation are stored in the specified Google Cloud Storage
2220
+ # location. Consider using +CustomInfoType.Dictionary+ for smaller dictionaries
2221
+ # that satisfy the size requirements.
2222
+ # @!attribute [rw] output_path
2223
+ # @return [Google::Privacy::Dlp::V2::CloudStoragePath]
2224
+ # Location to store dictionary artifacts in Google Cloud Storage. These files
2225
+ # will only be accessible by project owners and the DLP API. If any of these
2226
+ # artifacts are modified, the dictionary is considered invalid and can no
2227
+ # longer be used.
2228
+ # @!attribute [rw] cloud_storage_file_set
2229
+ # @return [Google::Privacy::Dlp::V2::CloudStorageFileSet]
2230
+ # Set of files containing newline-delimited lists of dictionary phrases.
2231
+ # @!attribute [rw] big_query_field
2232
+ # @return [Google::Privacy::Dlp::V2::BigQueryField]
2233
+ # Field in a BigQuery table where each cell represents a dictionary phrase.
2234
+ class LargeCustomDictionaryConfig; end
2235
+
2236
+ # Configuration for a StoredInfoType.
2237
+ # @!attribute [rw] display_name
2238
+ # @return [String]
2239
+ # Display name of the StoredInfoType (max 256 characters).
2240
+ # @!attribute [rw] description
2241
+ # @return [String]
2242
+ # Description of the StoredInfoType (max 256 characters).
2243
+ # @!attribute [rw] large_custom_dictionary
2244
+ # @return [Google::Privacy::Dlp::V2::LargeCustomDictionaryConfig]
2245
+ # StoredInfoType where findings are defined by a dictionary of phrases.
2246
+ class StoredInfoTypeConfig; end
2247
+
2248
+ # Version of a StoredInfoType, including the configuration used to build it,
2249
+ # create timestamp, and current state.
2250
+ # @!attribute [rw] config
2251
+ # @return [Google::Privacy::Dlp::V2::StoredInfoTypeConfig]
2252
+ # StoredInfoType configuration.
2253
+ # @!attribute [rw] create_time
2254
+ # @return [Google::Protobuf::Timestamp]
2255
+ # Create timestamp of the version. Read-only, determined by the system
2256
+ # when the version is created.
2257
+ # @!attribute [rw] state
2258
+ # @return [Google::Privacy::Dlp::V2::StoredInfoTypeState]
2259
+ # Stored info type version state. Read-only, updated by the system
2260
+ # during dictionary creation.
2261
+ # @!attribute [rw] errors
2262
+ # @return [Array<Google::Privacy::Dlp::V2::Error>]
2263
+ # Errors that occurred when creating this storedInfoType version, or
2264
+ # anomalies detected in the storedInfoType data that render it unusable. Only
2265
+ # the five most recent errors will be displayed, with the most recent error
2266
+ # appearing first.
2267
+ # <p>For example, some of the data for stored custom dictionaries is put in
2268
+ # the user's Google Cloud Storage bucket, and if this data is modified or
2269
+ # deleted by the user or another system, the dictionary becomes invalid.
2270
+ # <p>If any errors occur, fix the problem indicated by the error message and
2271
+ # use the UpdateStoredInfoType API method to create another version of the
2272
+ # storedInfoType to continue using it, reusing the same +config+ if it was
2273
+ # not the source of the error.
2274
+ class StoredInfoTypeVersion; end
2275
+
2276
+ # StoredInfoType resource message that contains information about the current
2277
+ # version and any pending updates.
2278
+ # @!attribute [rw] name
2279
+ # @return [String]
2280
+ # Resource name.
2281
+ # @!attribute [rw] current_version
2282
+ # @return [Google::Privacy::Dlp::V2::StoredInfoTypeVersion]
2283
+ # Current version of the stored info type.
2284
+ # @!attribute [rw] pending_versions
2285
+ # @return [Array<Google::Privacy::Dlp::V2::StoredInfoTypeVersion>]
2286
+ # Pending versions of the stored info type. Empty if no versions are
2287
+ # pending.
2288
+ class StoredInfoType; end
2289
+
2290
+ # Request message for CreateStoredInfoType.
2291
+ # @!attribute [rw] parent
2292
+ # @return [String]
2293
+ # The parent resource name, for example projects/my-project-id or
2294
+ # organizations/my-org-id.
2295
+ # @!attribute [rw] config
2296
+ # @return [Google::Privacy::Dlp::V2::StoredInfoTypeConfig]
2297
+ # Configuration of the storedInfoType to create.
2298
+ # @!attribute [rw] stored_info_type_id
2299
+ # @return [String]
2300
+ # The storedInfoType ID can contain uppercase and lowercase letters,
2301
+ # numbers, and hyphens; that is, it must match the regular
2302
+ # expression: +[a-zA-Z\\d-]++. The maximum length is 100
2303
+ # characters. Can be empty to allow the system to generate one.
2304
+ class CreateStoredInfoTypeRequest; end
2305
+
2306
+ # Request message for UpdateStoredInfoType.
2307
+ # @!attribute [rw] name
2308
+ # @return [String]
2309
+ # Resource name of organization and storedInfoType to be updated, for
2310
+ # example +organizations/433245324/storedInfoTypes/432452342+ or
2311
+ # projects/project-id/storedInfoTypes/432452342.
2312
+ # @!attribute [rw] config
2313
+ # @return [Google::Privacy::Dlp::V2::StoredInfoTypeConfig]
2314
+ # Updated configuration for the storedInfoType. If not provided, a new
2315
+ # version of the storedInfoType will be created with the existing
2316
+ # configuration.
2317
+ # @!attribute [rw] update_mask
2318
+ # @return [Google::Protobuf::FieldMask]
2319
+ # Mask to control which fields get updated.
2320
+ class UpdateStoredInfoTypeRequest; end
2321
+
2322
+ # Request message for GetStoredInfoType.
2323
+ # @!attribute [rw] name
2324
+ # @return [String]
2325
+ # Resource name of the organization and storedInfoType to be read, for
2326
+ # example +organizations/433245324/storedInfoTypes/432452342+ or
2327
+ # projects/project-id/storedInfoTypes/432452342.
2328
+ class GetStoredInfoTypeRequest; end
2329
+
2330
+ # Request message for ListStoredInfoTypes.
2331
+ # @!attribute [rw] parent
2332
+ # @return [String]
2333
+ # The parent resource name, for example projects/my-project-id or
2334
+ # organizations/my-org-id.
2335
+ # @!attribute [rw] page_token
2336
+ # @return [String]
2337
+ # Optional page token to continue retrieval. Comes from previous call
2338
+ # to +ListStoredInfoTypes+.
2339
+ # @!attribute [rw] page_size
2340
+ # @return [Integer]
2341
+ # Optional size of the page, can be limited by server. If zero server returns
2342
+ # a page of max size 100.
2343
+ class ListStoredInfoTypesRequest; end
2344
+
2345
+ # Response message for ListStoredInfoTypes.
2346
+ # @!attribute [rw] stored_info_types
2347
+ # @return [Array<Google::Privacy::Dlp::V2::StoredInfoType>]
2348
+ # List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest.
2349
+ # @!attribute [rw] next_page_token
2350
+ # @return [String]
2351
+ # If the next page is available then the next page token to be used
2352
+ # in following ListStoredInfoTypes request.
2353
+ class ListStoredInfoTypesResponse; end
2354
+
2355
+ # Request message for DeleteStoredInfoType.
2356
+ # @!attribute [rw] name
2357
+ # @return [String]
2358
+ # Resource name of the organization and storedInfoType to be deleted, for
2359
+ # example +organizations/433245324/storedInfoTypes/432452342+ or
2360
+ # projects/project-id/storedInfoTypes/432452342.
2361
+ class DeleteStoredInfoTypeRequest; end
2362
+
2222
2363
  # Options describing which parts of the provided content should be scanned.
2223
2364
  module ContentOption
2224
2365
  # Includes entire content of a file or a data stream.
@@ -2278,6 +2419,26 @@ module Google
2278
2419
  # The job executed a Risk Analysis computation.
2279
2420
  RISK_ANALYSIS_JOB = 2
2280
2421
  end
2422
+
2423
+ # State of a StoredInfoType version.
2424
+ module StoredInfoTypeState
2425
+ STORED_INFO_TYPE_STATE_UNSPECIFIED = 0
2426
+
2427
+ # StoredInfoType version is being created.
2428
+ PENDING = 1
2429
+
2430
+ # StoredInfoType version is ready for use.
2431
+ READY = 2
2432
+
2433
+ # StoredInfoType creation failed. All relevant error messages are returned in
2434
+ # the +StoredInfoTypeVersion+ message.
2435
+ FAILED = 3
2436
+
2437
+ # StoredInfoType is no longer valid because artifacts stored in
2438
+ # user-controlled storage were modified. To fix an invalid StoredInfoType,
2439
+ # use the +UpdateStoredInfoType+ method to create a new version.
2440
+ INVALID = 4
2441
+ end
2281
2442
  end
2282
2443
  end
2283
2444
  end
@@ -25,6 +25,18 @@ module Google
25
25
  # a built-in type.
26
26
  class InfoType; end
27
27
 
28
+ # A reference to a StoredInfoType to use with scanning.
29
+ # @!attribute [rw] name
30
+ # @return [String]
31
+ # Resource name of the requested +StoredInfoType+, for example
32
+ # +organizations/433245324/storedInfoTypes/432452342+ or
33
+ # +projects/project-id/storedInfoTypes/432452342+.
34
+ # @!attribute [rw] create_time
35
+ # @return [Google::Protobuf::Timestamp]
36
+ # Timestamp indicating when the version of the +StoredInfoType+ used for
37
+ # inspection was created. Output-only field, populated by the system.
38
+ class StoredType; end
39
+
28
40
  # Custom information type provided by the user. Used to find domain-specific
29
41
  # sensitive information configurable to the data in question.
30
42
  # @!attribute [rw] info_type
@@ -46,6 +58,10 @@ module Google
46
58
  # @return [Google::Privacy::Dlp::V2::CustomInfoType::SurrogateType]
47
59
  # Message for detecting output from deidentification transformations that
48
60
  # support reversing.
61
+ # @!attribute [rw] stored_type
62
+ # @return [Google::Privacy::Dlp::V2::StoredType]
63
+ # Load an existing +StoredInfoType+ resource for use in
64
+ # +InspectDataSource+. Not currently supported in +InspectContent+.
49
65
  # @!attribute [rw] detection_rules
50
66
  # @return [Array<Google::Privacy::Dlp::V2::CustomInfoType::DetectionRule>]
51
67
  # Set of detection rules to apply to all findings of this CustomInfoType.
@@ -70,7 +86,11 @@ module Google
70
86
  #
71
87
  # Dictionary words containing a large number of characters that are not
72
88
  # letters or digits may result in unexpected findings because such characters
73
- # are treated as whitespace.
89
+ # are treated as whitespace. The
90
+ # [limits](https://cloud.google.com/dlp/limits) page contains details about
91
+ # the size limits of dictionaries. For dictionaries that do not fit within
92
+ # these constraints, consider using +LargeCustomDictionaryConfig+ in the
93
+ # +StoredInfoType+ API.
74
94
  # @!attribute [rw] word_list
75
95
  # @return [Google::Privacy::Dlp::V2::CustomInfoType::Dictionary::WordList]
76
96
  # List of words or phrases to search for.
@@ -203,7 +223,14 @@ module Google
203
223
  # @!attribute [rw] bytes_limit_per_file
204
224
  # @return [Integer]
205
225
  # Max number of bytes to scan from a file. If a scanned file's size is bigger
206
- # than this value then the rest of the bytes are omitted.
226
+ # than this value then the rest of the bytes are omitted. Only one
227
+ # of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
228
+ # @!attribute [rw] bytes_limit_per_file_percent
229
+ # @return [Integer]
230
+ # Max percentage of bytes to scan from a file. The rest are omitted. The
231
+ # number of bytes scanned is rounded down. Must be between 0 and 100,
232
+ # inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one
233
+ # of bytes_limit_per_file and bytes_limit_per_file_percent can be specified.
207
234
  # @!attribute [rw] file_types
208
235
  # @return [Array<Google::Privacy::Dlp::V2::FileType>]
209
236
  # List of file type groups to include in the scan.
@@ -239,6 +266,13 @@ module Google
239
266
  end
240
267
  end
241
268
 
269
+ # Message representing a set of files in Cloud Storage.
270
+ # @!attribute [rw] url
271
+ # @return [String]
272
+ # The url, in the format +gs://<bucket>/<path>+. Trailing wildcard in the
273
+ # path is allowed.
274
+ class CloudStorageFileSet; end
275
+
242
276
  # Message representing a single file or path in Cloud Storage.
243
277
  # @!attribute [rw] path
244
278
  # @return [String]
@@ -258,7 +292,15 @@ module Google
258
292
  # @return [Integer]
259
293
  # Max number of rows to scan. If the table has more rows than this value, the
260
294
  # rest of the rows are omitted. If not set, or if set to 0, all rows will be
261
- # scanned. Cannot be used in conjunction with TimespanConfig.
295
+ # scanned. Only one of rows_limit and rows_limit_percent can be specified.
296
+ # Cannot be used in conjunction with TimespanConfig.
297
+ # @!attribute [rw] rows_limit_percent
298
+ # @return [Integer]
299
+ # Max percentage of rows to scan. The rest are omitted. The number of rows
300
+ # scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and
301
+ # 100 means no limit. Defaults to 0. Only one of rows_limit and
302
+ # rows_limit_percent can be specified. Cannot be used in conjunction with
303
+ # TimespanConfig.
262
304
  # @!attribute [rw] sample_method
263
305
  # @return [Google::Privacy::Dlp::V2::BigQueryOptions::SampleMethod]
264
306
  class BigQueryOptions
@@ -293,15 +335,17 @@ module Google
293
335
  # Currently only supported when inspecting Google Cloud Storage and BigQuery.
294
336
  # @!attribute [rw] start_time
295
337
  # @return [Google::Protobuf::Timestamp]
296
- # Exclude files older than this value.
338
+ # Exclude files or rows older than this value.
297
339
  # @!attribute [rw] end_time
298
340
  # @return [Google::Protobuf::Timestamp]
299
- # Exclude files newer than this value.
341
+ # Exclude files or rows newer than this value.
300
342
  # If set to zero, no upper time limit is applied.
301
343
  # @!attribute [rw] timestamp_field
302
344
  # @return [Google::Privacy::Dlp::V2::FieldId]
303
345
  # Specification of the field containing the timestamp of scanned items.
304
- # Required for data sources like Datastore or BigQuery.
346
+ # Used for data sources like Datastore or BigQuery.
347
+ # If not specified for BigQuery, table last modification timestamp
348
+ # is checked against given time span.
305
349
  # The valid data types of the timestamp field are:
306
350
  # for BigQuery - timestamp, date, datetime;
307
351
  # for Datastore - timestamp.
@@ -401,6 +445,15 @@ module Google
401
445
  # Name of the table.
402
446
  class BigQueryTable; end
403
447
 
448
+ # Message defining a field of a BigQuery table.
449
+ # @!attribute [rw] table
450
+ # @return [Google::Privacy::Dlp::V2::BigQueryTable]
451
+ # Source table of the field.
452
+ # @!attribute [rw] field
453
+ # @return [Google::Privacy::Dlp::V2::FieldId]
454
+ # Designated field in the BigQuery table.
455
+ class BigQueryField; end
456
+
404
457
  # An entity in a dataset is a field or set of fields that correspond to a
405
458
  # single person. For example, in medical records the +EntityId+ might be a
406
459
  # patient identifier, or for financial records it might be an account
@@ -31,7 +31,7 @@ module Google
31
31
  #
32
32
  # 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
33
33
  # 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
34
- # 3. [Enable the Cloud Data Loss Prevention (DLP) API.](https://console.cloud.google.com/apis/api/dlp)
34
+ # 3. [Enable the Cloud Data Loss Prevention (DLP) API.](https://console.cloud.google.com/apis/library/dlp.googleapis.com)
35
35
  # 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
36
36
  #
37
37
  # ### Installation
@@ -778,6 +778,56 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
778
778
  add_message "google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest" do
779
779
  optional :name, :string, 1
780
780
  end
781
+ add_message "google.privacy.dlp.v2.LargeCustomDictionaryConfig" do
782
+ optional :output_path, :message, 1, "google.privacy.dlp.v2.CloudStoragePath"
783
+ oneof :source do
784
+ optional :cloud_storage_file_set, :message, 2, "google.privacy.dlp.v2.CloudStorageFileSet"
785
+ optional :big_query_field, :message, 3, "google.privacy.dlp.v2.BigQueryField"
786
+ end
787
+ end
788
+ add_message "google.privacy.dlp.v2.StoredInfoTypeConfig" do
789
+ optional :display_name, :string, 1
790
+ optional :description, :string, 2
791
+ oneof :type do
792
+ optional :large_custom_dictionary, :message, 3, "google.privacy.dlp.v2.LargeCustomDictionaryConfig"
793
+ end
794
+ end
795
+ add_message "google.privacy.dlp.v2.StoredInfoTypeVersion" do
796
+ optional :config, :message, 1, "google.privacy.dlp.v2.StoredInfoTypeConfig"
797
+ optional :create_time, :message, 2, "google.protobuf.Timestamp"
798
+ optional :state, :enum, 3, "google.privacy.dlp.v2.StoredInfoTypeState"
799
+ repeated :errors, :message, 4, "google.privacy.dlp.v2.Error"
800
+ end
801
+ add_message "google.privacy.dlp.v2.StoredInfoType" do
802
+ optional :name, :string, 1
803
+ optional :current_version, :message, 2, "google.privacy.dlp.v2.StoredInfoTypeVersion"
804
+ repeated :pending_versions, :message, 3, "google.privacy.dlp.v2.StoredInfoTypeVersion"
805
+ end
806
+ add_message "google.privacy.dlp.v2.CreateStoredInfoTypeRequest" do
807
+ optional :parent, :string, 1
808
+ optional :config, :message, 2, "google.privacy.dlp.v2.StoredInfoTypeConfig"
809
+ optional :stored_info_type_id, :string, 3
810
+ end
811
+ add_message "google.privacy.dlp.v2.UpdateStoredInfoTypeRequest" do
812
+ optional :name, :string, 1
813
+ optional :config, :message, 2, "google.privacy.dlp.v2.StoredInfoTypeConfig"
814
+ optional :update_mask, :message, 3, "google.protobuf.FieldMask"
815
+ end
816
+ add_message "google.privacy.dlp.v2.GetStoredInfoTypeRequest" do
817
+ optional :name, :string, 1
818
+ end
819
+ add_message "google.privacy.dlp.v2.ListStoredInfoTypesRequest" do
820
+ optional :parent, :string, 1
821
+ optional :page_token, :string, 2
822
+ optional :page_size, :int32, 3
823
+ end
824
+ add_message "google.privacy.dlp.v2.ListStoredInfoTypesResponse" do
825
+ repeated :stored_info_types, :message, 1, "google.privacy.dlp.v2.StoredInfoType"
826
+ optional :next_page_token, :string, 2
827
+ end
828
+ add_message "google.privacy.dlp.v2.DeleteStoredInfoTypeRequest" do
829
+ optional :name, :string, 1
830
+ end
781
831
  add_enum "google.privacy.dlp.v2.ContentOption" do
782
832
  value :CONTENT_UNSPECIFIED, 0
783
833
  value :CONTENT_TEXT, 1
@@ -803,6 +853,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
803
853
  value :INSPECT_JOB, 1
804
854
  value :RISK_ANALYSIS_JOB, 2
805
855
  end
856
+ add_enum "google.privacy.dlp.v2.StoredInfoTypeState" do
857
+ value :STORED_INFO_TYPE_STATE_UNSPECIFIED, 0
858
+ value :PENDING, 1
859
+ value :READY, 2
860
+ value :FAILED, 3
861
+ value :INVALID, 4
862
+ end
806
863
  end
807
864
 
808
865
  module Google
@@ -954,10 +1011,21 @@ module Google
954
1011
  ListDeidentifyTemplatesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDeidentifyTemplatesRequest").msgclass
955
1012
  ListDeidentifyTemplatesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListDeidentifyTemplatesResponse").msgclass
956
1013
  DeleteDeidentifyTemplateRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest").msgclass
1014
+ LargeCustomDictionaryConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.LargeCustomDictionaryConfig").msgclass
1015
+ StoredInfoTypeConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoTypeConfig").msgclass
1016
+ StoredInfoTypeVersion = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoTypeVersion").msgclass
1017
+ StoredInfoType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoType").msgclass
1018
+ CreateStoredInfoTypeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CreateStoredInfoTypeRequest").msgclass
1019
+ UpdateStoredInfoTypeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.UpdateStoredInfoTypeRequest").msgclass
1020
+ GetStoredInfoTypeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.GetStoredInfoTypeRequest").msgclass
1021
+ ListStoredInfoTypesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListStoredInfoTypesRequest").msgclass
1022
+ ListStoredInfoTypesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ListStoredInfoTypesResponse").msgclass
1023
+ DeleteStoredInfoTypeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DeleteStoredInfoTypeRequest").msgclass
957
1024
  ContentOption = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.ContentOption").enummodule
958
1025
  InfoTypeSupportedBy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoTypeSupportedBy").enummodule
959
1026
  RelationalOperator = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RelationalOperator").enummodule
960
1027
  DlpJobType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DlpJobType").enummodule
1028
+ StoredInfoTypeState = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredInfoTypeState").enummodule
961
1029
  end
962
1030
  end
963
1031
  end
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/privacy/dlp/v2/dlp.proto for package 'google.privacy.dlp.v2'
3
3
  # Original file comments:
4
- # Copyright 2018 Google Inc.
4
+ # Copyright 2018 Google LLC
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -159,6 +159,27 @@ module Google
159
159
  # See https://cloud.google.com/dlp/docs/inspecting-storage and
160
160
  # https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
161
161
  rpc :CancelDlpJob, CancelDlpJobRequest, Google::Protobuf::Empty
162
+ # Creates a pre-built stored infoType to be used for inspection.
163
+ # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
164
+ # learn more.
165
+ rpc :CreateStoredInfoType, CreateStoredInfoTypeRequest, StoredInfoType
166
+ # Updates the stored infoType by creating a new version. The existing version
167
+ # will continue to be used until the new version is ready.
168
+ # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
169
+ # learn more.
170
+ rpc :UpdateStoredInfoType, UpdateStoredInfoTypeRequest, StoredInfoType
171
+ # Gets a stored infoType.
172
+ # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
173
+ # learn more.
174
+ rpc :GetStoredInfoType, GetStoredInfoTypeRequest, StoredInfoType
175
+ # Lists stored infoTypes.
176
+ # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
177
+ # learn more.
178
+ rpc :ListStoredInfoTypes, ListStoredInfoTypesRequest, ListStoredInfoTypesResponse
179
+ # Deletes a stored infoType.
180
+ # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
181
+ # learn more.
182
+ rpc :DeleteStoredInfoType, DeleteStoredInfoTypeRequest, Google::Protobuf::Empty
162
183
  end
163
184
 
164
185
  Stub = Service.rpc_stub_class
@@ -9,6 +9,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_message "google.privacy.dlp.v2.InfoType" do
10
10
  optional :name, :string, 1
11
11
  end
12
+ add_message "google.privacy.dlp.v2.StoredType" do
13
+ optional :name, :string, 1
14
+ optional :create_time, :message, 2, "google.protobuf.Timestamp"
15
+ end
12
16
  add_message "google.privacy.dlp.v2.CustomInfoType" do
13
17
  optional :info_type, :message, 1, "google.privacy.dlp.v2.InfoType"
14
18
  optional :likelihood, :enum, 6, "google.privacy.dlp.v2.Likelihood"
@@ -17,6 +21,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
17
21
  optional :dictionary, :message, 2, "google.privacy.dlp.v2.CustomInfoType.Dictionary"
18
22
  optional :regex, :message, 3, "google.privacy.dlp.v2.CustomInfoType.Regex"
19
23
  optional :surrogate_type, :message, 4, "google.privacy.dlp.v2.CustomInfoType.SurrogateType"
24
+ optional :stored_type, :message, 5, "google.privacy.dlp.v2.StoredType"
20
25
  end
21
26
  end
22
27
  add_message "google.privacy.dlp.v2.CustomInfoType.Dictionary" do
@@ -70,6 +75,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
70
75
  add_message "google.privacy.dlp.v2.CloudStorageOptions" do
71
76
  optional :file_set, :message, 1, "google.privacy.dlp.v2.CloudStorageOptions.FileSet"
72
77
  optional :bytes_limit_per_file, :int64, 4
78
+ optional :bytes_limit_per_file_percent, :int32, 8
73
79
  repeated :file_types, :enum, 5, "google.privacy.dlp.v2.FileType"
74
80
  optional :sample_method, :enum, 6, "google.privacy.dlp.v2.CloudStorageOptions.SampleMethod"
75
81
  optional :files_limit_percent, :int32, 7
@@ -82,6 +88,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
82
88
  value :TOP, 1
83
89
  value :RANDOM_START, 2
84
90
  end
91
+ add_message "google.privacy.dlp.v2.CloudStorageFileSet" do
92
+ optional :url, :string, 1
93
+ end
85
94
  add_message "google.privacy.dlp.v2.CloudStoragePath" do
86
95
  optional :path, :string, 1
87
96
  end
@@ -89,6 +98,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
89
98
  optional :table_reference, :message, 1, "google.privacy.dlp.v2.BigQueryTable"
90
99
  repeated :identifying_fields, :message, 2, "google.privacy.dlp.v2.FieldId"
91
100
  optional :rows_limit, :int64, 3
101
+ optional :rows_limit_percent, :int32, 6
92
102
  optional :sample_method, :enum, 4, "google.privacy.dlp.v2.BigQueryOptions.SampleMethod"
93
103
  end
94
104
  add_enum "google.privacy.dlp.v2.BigQueryOptions.SampleMethod" do
@@ -139,6 +149,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
139
149
  optional :dataset_id, :string, 2
140
150
  optional :table_id, :string, 3
141
151
  end
152
+ add_message "google.privacy.dlp.v2.BigQueryField" do
153
+ optional :table, :message, 1, "google.privacy.dlp.v2.BigQueryTable"
154
+ optional :field, :message, 2, "google.privacy.dlp.v2.FieldId"
155
+ end
142
156
  add_message "google.privacy.dlp.v2.EntityId" do
143
157
  optional :field, :message, 1, "google.privacy.dlp.v2.FieldId"
144
158
  end
@@ -162,6 +176,7 @@ module Google
162
176
  module Dlp
163
177
  module V2
164
178
  InfoType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoType").msgclass
179
+ StoredType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StoredType").msgclass
165
180
  CustomInfoType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType").msgclass
166
181
  CustomInfoType::Dictionary = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.Dictionary").msgclass
167
182
  CustomInfoType::Dictionary::WordList = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList").msgclass
@@ -178,6 +193,7 @@ module Google
178
193
  CloudStorageOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions").msgclass
179
194
  CloudStorageOptions::FileSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions.FileSet").msgclass
180
195
  CloudStorageOptions::SampleMethod = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions.SampleMethod").enummodule
196
+ CloudStorageFileSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageFileSet").msgclass
181
197
  CloudStoragePath = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStoragePath").msgclass
182
198
  BigQueryOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryOptions").msgclass
183
199
  BigQueryOptions::SampleMethod = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryOptions.SampleMethod").enummodule
@@ -189,6 +205,7 @@ module Google
189
205
  Key::PathElement = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Key.PathElement").msgclass
190
206
  RecordKey = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordKey").msgclass
191
207
  BigQueryTable = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTable").msgclass
208
+ BigQueryField = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryField").msgclass
192
209
  EntityId = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.EntityId").msgclass
193
210
  Likelihood = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Likelihood").enummodule
194
211
  FileType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FileType").enummodule
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dlp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-10 00:00:00.000000000 Z
11
+ date: 2018-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: redcarpet
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rubocop
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +80,20 @@ dependencies:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0.9'
83
+ - !ruby/object:Gem::Dependency
84
+ name: yard
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.9'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.9'
69
97
  description: google-cloud-dlp is the official library for Cloud Data Loss Prevention
70
98
  (DLP) API.
71
99
  email: googleapis-packages@google.com