google-cloud-dlp 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,113 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/privacy/dlp/v2/dlp.proto for package 'google.privacy.dlp.v2'
3
+ # Original file comments:
4
+ # Copyright 2018 Google Inc.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/privacy/dlp/v2/dlp_pb'
21
+
22
+ module Google
23
+ module Privacy
24
+ module Dlp
25
+ module V2
26
+ module DlpService
27
+ # The DLP API is a service that allows clients
28
+ # to detect the presence of Personally Identifiable Information (PII) and other
29
+ # privacy-sensitive data in user-supplied, unstructured data streams, like text
30
+ # blocks or images.
31
+ # The service also includes methods for sensitive data redaction and
32
+ # scheduling of data scans on Google Cloud Platform based data sets.
33
+ class Service
34
+
35
+ include GRPC::GenericService
36
+
37
+ self.marshal_class_method = :encode
38
+ self.unmarshal_class_method = :decode
39
+ self.service_name = 'google.privacy.dlp.v2.DlpService'
40
+
41
+ # Finds potentially sensitive info in content.
42
+ # This method has limits on input size, processing time, and output size.
43
+ # [How-to guide for text](/dlp/docs/inspecting-text), [How-to guide for
44
+ # images](/dlp/docs/inspecting-images)
45
+ rpc :InspectContent, InspectContentRequest, InspectContentResponse
46
+ # Redacts potentially sensitive info from an image.
47
+ # This method has limits on input size, processing time, and output size.
48
+ # [How-to guide](/dlp/docs/redacting-sensitive-data-images)
49
+ rpc :RedactImage, RedactImageRequest, RedactImageResponse
50
+ # De-identifies potentially sensitive info from a ContentItem.
51
+ # This method has limits on input size and output size.
52
+ # [How-to guide](/dlp/docs/deidentify-sensitive-data)
53
+ rpc :DeidentifyContent, DeidentifyContentRequest, DeidentifyContentResponse
54
+ # Re-identify content that has been de-identified.
55
+ rpc :ReidentifyContent, ReidentifyContentRequest, ReidentifyContentResponse
56
+ # Returns sensitive information types DLP supports.
57
+ rpc :ListInfoTypes, ListInfoTypesRequest, ListInfoTypesResponse
58
+ # Creates an inspect template for re-using frequently used configuration
59
+ # for inspecting content, images, and storage.
60
+ rpc :CreateInspectTemplate, CreateInspectTemplateRequest, InspectTemplate
61
+ # Updates the inspect template.
62
+ rpc :UpdateInspectTemplate, UpdateInspectTemplateRequest, InspectTemplate
63
+ # Gets an inspect template.
64
+ rpc :GetInspectTemplate, GetInspectTemplateRequest, InspectTemplate
65
+ # Lists inspect templates.
66
+ rpc :ListInspectTemplates, ListInspectTemplatesRequest, ListInspectTemplatesResponse
67
+ # Deletes inspect templates.
68
+ rpc :DeleteInspectTemplate, DeleteInspectTemplateRequest, Google::Protobuf::Empty
69
+ # Creates an Deidentify template for re-using frequently used configuration
70
+ # for Deidentifying content, images, and storage.
71
+ rpc :CreateDeidentifyTemplate, CreateDeidentifyTemplateRequest, DeidentifyTemplate
72
+ # Updates the inspect template.
73
+ rpc :UpdateDeidentifyTemplate, UpdateDeidentifyTemplateRequest, DeidentifyTemplate
74
+ # Gets an inspect template.
75
+ rpc :GetDeidentifyTemplate, GetDeidentifyTemplateRequest, DeidentifyTemplate
76
+ # Lists inspect templates.
77
+ rpc :ListDeidentifyTemplates, ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse
78
+ # Deletes inspect templates.
79
+ rpc :DeleteDeidentifyTemplate, DeleteDeidentifyTemplateRequest, Google::Protobuf::Empty
80
+ # Creates a job to run DLP actions such as scanning storage for sensitive
81
+ # information on a set schedule.
82
+ rpc :CreateJobTrigger, CreateJobTriggerRequest, JobTrigger
83
+ # Updates a job trigger.
84
+ rpc :UpdateJobTrigger, UpdateJobTriggerRequest, JobTrigger
85
+ # Gets a job trigger.
86
+ rpc :GetJobTrigger, GetJobTriggerRequest, JobTrigger
87
+ # Lists job triggers.
88
+ rpc :ListJobTriggers, ListJobTriggersRequest, ListJobTriggersResponse
89
+ # Deletes a job trigger.
90
+ rpc :DeleteJobTrigger, DeleteJobTriggerRequest, Google::Protobuf::Empty
91
+ # Create a new job to inspect storage or calculate risk metrics [How-to
92
+ # guide](/dlp/docs/compute-risk-analysis).
93
+ rpc :CreateDlpJob, CreateDlpJobRequest, DlpJob
94
+ # Lists DlpJobs that match the specified filter in the request.
95
+ rpc :ListDlpJobs, ListDlpJobsRequest, ListDlpJobsResponse
96
+ # Gets the latest state of a long-running DlpJob.
97
+ rpc :GetDlpJob, GetDlpJobRequest, DlpJob
98
+ # Deletes a long-running DlpJob. This method indicates that the client is
99
+ # no longer interested in the DlpJob result. The job will be cancelled if
100
+ # possible.
101
+ rpc :DeleteDlpJob, DeleteDlpJobRequest, Google::Protobuf::Empty
102
+ # Starts asynchronous cancellation on a long-running DlpJob. The server
103
+ # makes a best effort to cancel the DlpJob, but success is not
104
+ # guaranteed.
105
+ rpc :CancelDlpJob, CancelDlpJobRequest, Google::Protobuf::Empty
106
+ end
107
+
108
+ Stub = Service.rpc_stub_class
109
+ end
110
+ end
111
+ end
112
+ end
113
+ end
@@ -0,0 +1,166 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/privacy/dlp/v2/storage.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/protobuf/timestamp_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_message "google.privacy.dlp.v2.InfoType" do
10
+ optional :name, :string, 1
11
+ end
12
+ add_message "google.privacy.dlp.v2.CustomInfoType" do
13
+ optional :info_type, :message, 1, "google.privacy.dlp.v2.InfoType"
14
+ optional :likelihood, :enum, 6, "google.privacy.dlp.v2.Likelihood"
15
+ repeated :detection_rules, :message, 7, "google.privacy.dlp.v2.CustomInfoType.DetectionRule"
16
+ oneof :type do
17
+ optional :dictionary, :message, 2, "google.privacy.dlp.v2.CustomInfoType.Dictionary"
18
+ optional :regex, :message, 3, "google.privacy.dlp.v2.CustomInfoType.Regex"
19
+ optional :surrogate_type, :message, 4, "google.privacy.dlp.v2.CustomInfoType.SurrogateType"
20
+ end
21
+ end
22
+ add_message "google.privacy.dlp.v2.CustomInfoType.Dictionary" do
23
+ oneof :source do
24
+ optional :word_list, :message, 1, "google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList"
25
+ end
26
+ end
27
+ add_message "google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList" do
28
+ repeated :words, :string, 1
29
+ end
30
+ add_message "google.privacy.dlp.v2.CustomInfoType.Regex" do
31
+ optional :pattern, :string, 1
32
+ end
33
+ add_message "google.privacy.dlp.v2.CustomInfoType.SurrogateType" do
34
+ end
35
+ add_message "google.privacy.dlp.v2.CustomInfoType.DetectionRule" do
36
+ oneof :type do
37
+ optional :hotword_rule, :message, 1, "google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule"
38
+ end
39
+ end
40
+ add_message "google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity" do
41
+ optional :window_before, :int32, 1
42
+ optional :window_after, :int32, 2
43
+ end
44
+ add_message "google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment" do
45
+ oneof :adjustment do
46
+ optional :fixed_likelihood, :enum, 1, "google.privacy.dlp.v2.Likelihood"
47
+ optional :relative_likelihood, :int32, 2
48
+ end
49
+ end
50
+ add_message "google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule" do
51
+ optional :hotword_regex, :message, 1, "google.privacy.dlp.v2.CustomInfoType.Regex"
52
+ optional :proximity, :message, 2, "google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity"
53
+ optional :likelihood_adjustment, :message, 3, "google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment"
54
+ end
55
+ add_message "google.privacy.dlp.v2.FieldId" do
56
+ optional :name, :string, 1
57
+ end
58
+ add_message "google.privacy.dlp.v2.PartitionId" do
59
+ optional :project_id, :string, 2
60
+ optional :namespace_id, :string, 4
61
+ end
62
+ add_message "google.privacy.dlp.v2.KindExpression" do
63
+ optional :name, :string, 1
64
+ end
65
+ add_message "google.privacy.dlp.v2.DatastoreOptions" do
66
+ optional :partition_id, :message, 1, "google.privacy.dlp.v2.PartitionId"
67
+ optional :kind, :message, 2, "google.privacy.dlp.v2.KindExpression"
68
+ end
69
+ add_message "google.privacy.dlp.v2.CloudStorageOptions" do
70
+ optional :file_set, :message, 1, "google.privacy.dlp.v2.CloudStorageOptions.FileSet"
71
+ optional :bytes_limit_per_file, :int64, 4
72
+ end
73
+ add_message "google.privacy.dlp.v2.CloudStorageOptions.FileSet" do
74
+ optional :url, :string, 1
75
+ end
76
+ add_message "google.privacy.dlp.v2.BigQueryOptions" do
77
+ optional :table_reference, :message, 1, "google.privacy.dlp.v2.BigQueryTable"
78
+ repeated :identifying_fields, :message, 2, "google.privacy.dlp.v2.FieldId"
79
+ end
80
+ add_message "google.privacy.dlp.v2.StorageConfig" do
81
+ optional :timespan_config, :message, 6, "google.privacy.dlp.v2.StorageConfig.TimespanConfig"
82
+ oneof :type do
83
+ optional :datastore_options, :message, 2, "google.privacy.dlp.v2.DatastoreOptions"
84
+ optional :cloud_storage_options, :message, 3, "google.privacy.dlp.v2.CloudStorageOptions"
85
+ optional :big_query_options, :message, 4, "google.privacy.dlp.v2.BigQueryOptions"
86
+ end
87
+ end
88
+ add_message "google.privacy.dlp.v2.StorageConfig.TimespanConfig" do
89
+ optional :start_time, :message, 1, "google.protobuf.Timestamp"
90
+ optional :end_time, :message, 2, "google.protobuf.Timestamp"
91
+ optional :timestamp_field, :message, 3, "google.privacy.dlp.v2.FieldId"
92
+ optional :enable_auto_population_of_timespan_config, :bool, 4
93
+ end
94
+ add_message "google.privacy.dlp.v2.BigQueryKey" do
95
+ optional :table_reference, :message, 1, "google.privacy.dlp.v2.BigQueryTable"
96
+ optional :row_number, :int64, 2
97
+ end
98
+ add_message "google.privacy.dlp.v2.DatastoreKey" do
99
+ optional :entity_key, :message, 1, "google.privacy.dlp.v2.Key"
100
+ end
101
+ add_message "google.privacy.dlp.v2.Key" do
102
+ optional :partition_id, :message, 1, "google.privacy.dlp.v2.PartitionId"
103
+ repeated :path, :message, 2, "google.privacy.dlp.v2.Key.PathElement"
104
+ end
105
+ add_message "google.privacy.dlp.v2.Key.PathElement" do
106
+ optional :kind, :string, 1
107
+ oneof :id_type do
108
+ optional :id, :int64, 2
109
+ optional :name, :string, 3
110
+ end
111
+ end
112
+ add_message "google.privacy.dlp.v2.RecordKey" do
113
+ oneof :type do
114
+ optional :datastore_key, :message, 2, "google.privacy.dlp.v2.DatastoreKey"
115
+ optional :big_query_key, :message, 3, "google.privacy.dlp.v2.BigQueryKey"
116
+ end
117
+ end
118
+ add_message "google.privacy.dlp.v2.BigQueryTable" do
119
+ optional :project_id, :string, 1
120
+ optional :dataset_id, :string, 2
121
+ optional :table_id, :string, 3
122
+ end
123
+ add_enum "google.privacy.dlp.v2.Likelihood" do
124
+ value :LIKELIHOOD_UNSPECIFIED, 0
125
+ value :VERY_UNLIKELY, 1
126
+ value :UNLIKELY, 2
127
+ value :POSSIBLE, 3
128
+ value :LIKELY, 4
129
+ value :VERY_LIKELY, 5
130
+ end
131
+ end
132
+
133
+ module Google
134
+ module Privacy
135
+ module Dlp
136
+ module V2
137
+ InfoType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.InfoType").msgclass
138
+ CustomInfoType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType").msgclass
139
+ CustomInfoType::Dictionary = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.Dictionary").msgclass
140
+ CustomInfoType::Dictionary::WordList = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList").msgclass
141
+ CustomInfoType::Regex = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.Regex").msgclass
142
+ CustomInfoType::SurrogateType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.SurrogateType").msgclass
143
+ CustomInfoType::DetectionRule = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.DetectionRule").msgclass
144
+ CustomInfoType::DetectionRule::Proximity = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity").msgclass
145
+ CustomInfoType::DetectionRule::LikelihoodAdjustment = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment").msgclass
146
+ CustomInfoType::DetectionRule::HotwordRule = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule").msgclass
147
+ FieldId = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.FieldId").msgclass
148
+ PartitionId = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PartitionId").msgclass
149
+ KindExpression = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.KindExpression").msgclass
150
+ DatastoreOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatastoreOptions").msgclass
151
+ CloudStorageOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions").msgclass
152
+ CloudStorageOptions::FileSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions.FileSet").msgclass
153
+ BigQueryOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryOptions").msgclass
154
+ StorageConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StorageConfig").msgclass
155
+ StorageConfig::TimespanConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.StorageConfig.TimespanConfig").msgclass
156
+ BigQueryKey = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryKey").msgclass
157
+ DatastoreKey = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatastoreKey").msgclass
158
+ Key = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Key").msgclass
159
+ Key::PathElement = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Key.PathElement").msgclass
160
+ RecordKey = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.RecordKey").msgclass
161
+ BigQueryTable = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.BigQueryTable").msgclass
162
+ Likelihood = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.Likelihood").enummodule
163
+ end
164
+ end
165
+ end
166
+ end
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.1.0
4
+ version: 0.2.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: 2017-12-26 00:00:00.000000000 Z
11
+ date: 2018-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0
19
+ version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0
26
+ version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: rubocop
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "<="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.35.1
47
+ version: 0.50.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "<="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.35.1
54
+ version: 0.50.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: simplecov
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -77,6 +77,20 @@ files:
77
77
  - README.md
78
78
  - lib/google/cloud/dlp.rb
79
79
  - lib/google/cloud/dlp/credentials.rb
80
+ - lib/google/cloud/dlp/v2.rb
81
+ - lib/google/cloud/dlp/v2/dlp_service_client.rb
82
+ - lib/google/cloud/dlp/v2/dlp_service_client_config.json
83
+ - lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/dlp.rb
84
+ - lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/storage.rb
85
+ - lib/google/cloud/dlp/v2/doc/google/protobuf/any.rb
86
+ - lib/google/cloud/dlp/v2/doc/google/protobuf/duration.rb
87
+ - lib/google/cloud/dlp/v2/doc/google/protobuf/empty.rb
88
+ - lib/google/cloud/dlp/v2/doc/google/protobuf/field_mask.rb
89
+ - lib/google/cloud/dlp/v2/doc/google/protobuf/timestamp.rb
90
+ - lib/google/cloud/dlp/v2/doc/google/rpc/status.rb
91
+ - lib/google/cloud/dlp/v2/doc/google/type/date.rb
92
+ - lib/google/cloud/dlp/v2/doc/google/type/timeofday.rb
93
+ - lib/google/cloud/dlp/v2/doc/overview.rb
80
94
  - lib/google/cloud/dlp/v2beta1.rb
81
95
  - lib/google/cloud/dlp/v2beta1/dlp_service_client.rb
82
96
  - lib/google/cloud/dlp/v2beta1/dlp_service_client_config.json
@@ -88,6 +102,9 @@ files:
88
102
  - lib/google/cloud/dlp/v2beta1/doc/google/type/date.rb
89
103
  - lib/google/cloud/dlp/v2beta1/doc/google/type/timeofday.rb
90
104
  - lib/google/cloud/dlp/v2beta1/doc/overview.rb
105
+ - lib/google/privacy/dlp/v2/dlp_pb.rb
106
+ - lib/google/privacy/dlp/v2/dlp_services_pb.rb
107
+ - lib/google/privacy/dlp/v2/storage_pb.rb
91
108
  - lib/google/privacy/dlp/v2beta1/dlp_pb.rb
92
109
  - lib/google/privacy/dlp/v2beta1/dlp_services_pb.rb
93
110
  - lib/google/privacy/dlp/v2beta1/storage_pb.rb
@@ -111,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
128
  version: '0'
112
129
  requirements: []
113
130
  rubyforge_project:
114
- rubygems_version: 2.7.4
131
+ rubygems_version: 2.7.6
115
132
  signing_key:
116
133
  specification_version: 4
117
134
  summary: API Client library for DLP API