google-cloud-dlp 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +2 -0
- data/AUTHENTICATION.md +199 -0
- data/lib/google/cloud/dlp/v2/dlp_service_client.rb +61 -61
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/any.rb +2 -1
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/field_mask.rb +18 -26
- data/lib/google/cloud/dlp/v2/doc/google/protobuf/timestamp.rb +15 -13
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 559657b5842795388714a124ef772a8ed27dfa5ba29e83825e67ddc34c50f58e
|
4
|
+
data.tar.gz: 06dcee2a5d5074147f2d414454fe7e067d28db8f123c8b0b80c4e40398ad65b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7c7a8631d727a848f421e29597969a91417a9cd027bd6f8ef3933f38f995dc7af7b948c8e313f789ec8f663d6ad38f92a1a23be827c4471876d8e92b6bf06e9
|
7
|
+
data.tar.gz: f43f65d72a13dd210906412363127f2bbec6ea868a683760e615af16aae2a047a48c2ea25451438e3d1b1b64ca85db4dfb3c0da5886921057deaec226fc2ba8c
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
ADDED
@@ -0,0 +1,199 @@
|
|
1
|
+
# Authentication
|
2
|
+
|
3
|
+
In general, the google-cloud-dlp library uses [Service
|
4
|
+
Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
|
5
|
+
credentials to connect to Google Cloud services. When running within [Google
|
6
|
+
Cloud Platform environments](#google-cloud-platform-environments)
|
7
|
+
the credentials will be discovered automatically. When running on other
|
8
|
+
environments, the Service Account credentials can be specified by providing the
|
9
|
+
path to the [JSON
|
10
|
+
keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys) for
|
11
|
+
the account (or the JSON itself) in [environment
|
12
|
+
variables](#environment-variables). Additionally, Cloud SDK credentials can also
|
13
|
+
be discovered automatically, but this is only recommended during development.
|
14
|
+
|
15
|
+
## Quickstart
|
16
|
+
|
17
|
+
1. [Create a service account and credentials](#creating-a-service-account).
|
18
|
+
2. Set the [environment variable](#environment-variables).
|
19
|
+
|
20
|
+
```sh
|
21
|
+
export DLP_CREDENTIALS=/path/to/json`
|
22
|
+
```
|
23
|
+
|
24
|
+
3. Initialize the client.
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require "google/cloud/dlp"
|
28
|
+
|
29
|
+
client = Google::Cloud::Dlp.new
|
30
|
+
```
|
31
|
+
|
32
|
+
## Project and Credential Lookup
|
33
|
+
|
34
|
+
The google-cloud-dlp library aims to make authentication
|
35
|
+
as simple as possible, and provides several mechanisms to configure your system
|
36
|
+
without providing **Project ID** and **Service Account Credentials** directly in
|
37
|
+
code.
|
38
|
+
|
39
|
+
**Project ID** is discovered in the following order:
|
40
|
+
|
41
|
+
1. Specify project ID in method arguments
|
42
|
+
2. Specify project ID in configuration
|
43
|
+
3. Discover project ID in environment variables
|
44
|
+
4. Discover GCE project ID
|
45
|
+
5. Discover project ID in credentials JSON
|
46
|
+
|
47
|
+
**Credentials** are discovered in the following order:
|
48
|
+
|
49
|
+
1. Specify credentials in method arguments
|
50
|
+
2. Specify credentials in configuration
|
51
|
+
3. Discover credentials path in environment variables
|
52
|
+
4. Discover credentials JSON in environment variables
|
53
|
+
5. Discover credentials file in the Cloud SDK's path
|
54
|
+
6. Discover GCE credentials
|
55
|
+
|
56
|
+
### Google Cloud Platform environments
|
57
|
+
|
58
|
+
While running on Google Cloud Platform environments such as Google Compute
|
59
|
+
Engine, Google App Engine and Google Kubernetes Engine, no extra work is needed.
|
60
|
+
The **Project ID** and **Credentials** and are discovered automatically. Code
|
61
|
+
should be written as if already authenticated. Just be sure when you [set up the
|
62
|
+
GCE instance][gce-how-to], you add the correct scopes for the APIs you want to
|
63
|
+
access. For example:
|
64
|
+
|
65
|
+
* **All APIs**
|
66
|
+
* `https://www.googleapis.com/auth/cloud-platform`
|
67
|
+
* `https://www.googleapis.com/auth/cloud-platform.read-only`
|
68
|
+
* **BigQuery**
|
69
|
+
* `https://www.googleapis.com/auth/bigquery`
|
70
|
+
* `https://www.googleapis.com/auth/bigquery.insertdata`
|
71
|
+
* **Compute Engine**
|
72
|
+
* `https://www.googleapis.com/auth/compute`
|
73
|
+
* **Datastore**
|
74
|
+
* `https://www.googleapis.com/auth/datastore`
|
75
|
+
* `https://www.googleapis.com/auth/userinfo.email`
|
76
|
+
* **DNS**
|
77
|
+
* `https://www.googleapis.com/auth/ndev.clouddns.readwrite`
|
78
|
+
* **Pub/Sub**
|
79
|
+
* `https://www.googleapis.com/auth/pubsub`
|
80
|
+
* **Storage**
|
81
|
+
* `https://www.googleapis.com/auth/devstorage.full_control`
|
82
|
+
* `https://www.googleapis.com/auth/devstorage.read_only`
|
83
|
+
* `https://www.googleapis.com/auth/devstorage.read_write`
|
84
|
+
|
85
|
+
### Environment Variables
|
86
|
+
|
87
|
+
The **Project ID** and **Credentials JSON** can be placed in environment
|
88
|
+
variables instead of declaring them directly in code. Each service has its own
|
89
|
+
environment variable, allowing for different service accounts to be used for
|
90
|
+
different services. (See the READMEs for the individual service gems for
|
91
|
+
details.) The path to the **Credentials JSON** file can be stored in the
|
92
|
+
environment variable, or the **Credentials JSON** itself can be stored for
|
93
|
+
environments such as Docker containers where writing files is difficult or not
|
94
|
+
encouraged.
|
95
|
+
|
96
|
+
The environment variables that google-cloud-dlp checks for project ID are:
|
97
|
+
|
98
|
+
1. `DLP_PROJECT`
|
99
|
+
2. `GOOGLE_CLOUD_PROJECT`
|
100
|
+
|
101
|
+
The environment variables that google-cloud-dlp checks for credentials are configured on {Google::Cloud::Dlp::V2::Credentials}:
|
102
|
+
|
103
|
+
1. `DLP_CREDENTIALS` - Path to JSON file, or JSON contents
|
104
|
+
2. `DLP_KEYFILE` - Path to JSON file, or JSON contents
|
105
|
+
3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
106
|
+
4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
107
|
+
5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
108
|
+
|
109
|
+
```ruby
|
110
|
+
require "google/cloud/dlp"
|
111
|
+
|
112
|
+
ENV["DLP_PROJECT"] = "my-project-id"
|
113
|
+
ENV["DLP_CREDENTIALS"] = "path/to/keyfile.json"
|
114
|
+
|
115
|
+
client = Google::Cloud::Dlp.new
|
116
|
+
```
|
117
|
+
|
118
|
+
### Configuration
|
119
|
+
|
120
|
+
The **Project ID** and **Credentials JSON** can be configured instead of placing them in environment variables or providing them as arguments.
|
121
|
+
|
122
|
+
```ruby
|
123
|
+
require "google/cloud/dlp"
|
124
|
+
|
125
|
+
Google::Cloud::Dlp.configure do |config|
|
126
|
+
config.project_id = "my-project-id"
|
127
|
+
config.credentials = "path/to/keyfile.json"
|
128
|
+
end
|
129
|
+
|
130
|
+
client = Google::Cloud::Dlp.new
|
131
|
+
```
|
132
|
+
|
133
|
+
### Cloud SDK
|
134
|
+
|
135
|
+
This option allows for an easy way to authenticate during development. If
|
136
|
+
credentials are not provided in code or in environment variables, then Cloud SDK
|
137
|
+
credentials are discovered.
|
138
|
+
|
139
|
+
To configure your system for this, simply:
|
140
|
+
|
141
|
+
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
142
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
143
|
+
3. Write code as if already authenticated.
|
144
|
+
|
145
|
+
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
146
|
+
*should* only be used during development.
|
147
|
+
|
148
|
+
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
149
|
+
[dev-console]: https://console.cloud.google.com/project
|
150
|
+
|
151
|
+
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
152
|
+
|
153
|
+
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
154
|
+
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
155
|
+
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
156
|
+
|
157
|
+
## Creating a Service Account
|
158
|
+
|
159
|
+
Google Cloud requires a **Project ID** and **Service Account Credentials** to
|
160
|
+
connect to the APIs. You will use the **Project ID** and **JSON key file** to
|
161
|
+
connect to most services with google-cloud-dlp.
|
162
|
+
|
163
|
+
If you are not running this client within [Google Cloud Platform
|
164
|
+
environments](#google-cloud-platform-environments), you need a Google
|
165
|
+
Developers service account.
|
166
|
+
|
167
|
+
1. Visit the [Google Developers Console][dev-console].
|
168
|
+
1. Create a new project or click on an existing project.
|
169
|
+
1. Activate the slide-out navigation tray and select **API Manager**. From
|
170
|
+
here, you will enable the APIs that your application requires.
|
171
|
+
|
172
|
+
![Enable the APIs that your application requires][enable-apis]
|
173
|
+
|
174
|
+
*Note: You may need to enable billing in order to use these services.*
|
175
|
+
|
176
|
+
1. Select **Credentials** from the side navigation.
|
177
|
+
|
178
|
+
You should see a screen like one of the following.
|
179
|
+
|
180
|
+
![Create a new service account][create-new-service-account]
|
181
|
+
|
182
|
+
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
183
|
+
|
184
|
+
Find the "Add credentials" drop down and select "Service account" to be
|
185
|
+
guided through downloading a new JSON key file.
|
186
|
+
|
187
|
+
If you want to re-use an existing service account, you can easily generate a
|
188
|
+
new key file. Just select the account you wish to re-use, and click "Generate
|
189
|
+
new JSON key":
|
190
|
+
|
191
|
+
![Re-use an existing service account][reuse-service-account]
|
192
|
+
|
193
|
+
The key file you download will be used by this library to authenticate API
|
194
|
+
requests and should be stored in a secure location.
|
195
|
+
|
196
|
+
## Troubleshooting
|
197
|
+
|
198
|
+
If you're having trouble authenticating you can ask for help by following the
|
199
|
+
{file:TROUBLESHOOTING.md Troubleshooting Guide}.
|
@@ -91,6 +91,12 @@ module Google
|
|
91
91
|
].freeze
|
92
92
|
|
93
93
|
|
94
|
+
DLP_JOB_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
95
|
+
"projects/{project}/dlpJobs/{dlp_job}"
|
96
|
+
)
|
97
|
+
|
98
|
+
private_constant :DLP_JOB_PATH_TEMPLATE
|
99
|
+
|
94
100
|
ORGANIZATION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
95
101
|
"organizations/{organization}"
|
96
102
|
)
|
@@ -103,29 +109,17 @@ module Google
|
|
103
109
|
|
104
110
|
private_constant :ORGANIZATION_DEIDENTIFY_TEMPLATE_PATH_TEMPLATE
|
105
111
|
|
106
|
-
PROJECT_DEIDENTIFY_TEMPLATE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
107
|
-
"projects/{project}/deidentifyTemplates/{deidentify_template}"
|
108
|
-
)
|
109
|
-
|
110
|
-
private_constant :PROJECT_DEIDENTIFY_TEMPLATE_PATH_TEMPLATE
|
111
|
-
|
112
112
|
ORGANIZATION_INSPECT_TEMPLATE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
113
113
|
"organizations/{organization}/inspectTemplates/{inspect_template}"
|
114
114
|
)
|
115
115
|
|
116
116
|
private_constant :ORGANIZATION_INSPECT_TEMPLATE_PATH_TEMPLATE
|
117
117
|
|
118
|
-
|
119
|
-
"
|
120
|
-
)
|
121
|
-
|
122
|
-
private_constant :PROJECT_INSPECT_TEMPLATE_PATH_TEMPLATE
|
123
|
-
|
124
|
-
PROJECT_JOB_TRIGGER_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
125
|
-
"projects/{project}/jobTriggers/{job_trigger}"
|
118
|
+
ORGANIZATION_STORED_INFO_TYPE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
119
|
+
"organizations/{organization}/storedInfoTypes/{stored_info_type}"
|
126
120
|
)
|
127
121
|
|
128
|
-
private_constant :
|
122
|
+
private_constant :ORGANIZATION_STORED_INFO_TYPE_PATH_TEMPLATE
|
129
123
|
|
130
124
|
PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
131
125
|
"projects/{project}"
|
@@ -133,17 +127,23 @@ module Google
|
|
133
127
|
|
134
128
|
private_constant :PROJECT_PATH_TEMPLATE
|
135
129
|
|
136
|
-
|
137
|
-
"projects/{project}/
|
130
|
+
PROJECT_DEIDENTIFY_TEMPLATE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
131
|
+
"projects/{project}/deidentifyTemplates/{deidentify_template}"
|
138
132
|
)
|
139
133
|
|
140
|
-
private_constant :
|
134
|
+
private_constant :PROJECT_DEIDENTIFY_TEMPLATE_PATH_TEMPLATE
|
141
135
|
|
142
|
-
|
143
|
-
"
|
136
|
+
PROJECT_INSPECT_TEMPLATE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
137
|
+
"projects/{project}/inspectTemplates/{inspect_template}"
|
144
138
|
)
|
145
139
|
|
146
|
-
private_constant :
|
140
|
+
private_constant :PROJECT_INSPECT_TEMPLATE_PATH_TEMPLATE
|
141
|
+
|
142
|
+
PROJECT_JOB_TRIGGER_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
143
|
+
"projects/{project}/jobTriggers/{job_trigger}"
|
144
|
+
)
|
145
|
+
|
146
|
+
private_constant :PROJECT_JOB_TRIGGER_PATH_TEMPLATE
|
147
147
|
|
148
148
|
PROJECT_STORED_INFO_TYPE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
149
149
|
"projects/{project}/storedInfoTypes/{stored_info_type}"
|
@@ -151,6 +151,17 @@ module Google
|
|
151
151
|
|
152
152
|
private_constant :PROJECT_STORED_INFO_TYPE_PATH_TEMPLATE
|
153
153
|
|
154
|
+
# Returns a fully-qualified dlp_job resource name string.
|
155
|
+
# @param project [String]
|
156
|
+
# @param dlp_job [String]
|
157
|
+
# @return [String]
|
158
|
+
def self.dlp_job_path project, dlp_job
|
159
|
+
DLP_JOB_PATH_TEMPLATE.render(
|
160
|
+
:"project" => project,
|
161
|
+
:"dlp_job" => dlp_job
|
162
|
+
)
|
163
|
+
end
|
164
|
+
|
154
165
|
# Returns a fully-qualified organization resource name string.
|
155
166
|
# @param organization [String]
|
156
167
|
# @return [String]
|
@@ -171,17 +182,6 @@ module Google
|
|
171
182
|
)
|
172
183
|
end
|
173
184
|
|
174
|
-
# Returns a fully-qualified project_deidentify_template resource name string.
|
175
|
-
# @param project [String]
|
176
|
-
# @param deidentify_template [String]
|
177
|
-
# @return [String]
|
178
|
-
def self.project_deidentify_template_path project, deidentify_template
|
179
|
-
PROJECT_DEIDENTIFY_TEMPLATE_PATH_TEMPLATE.render(
|
180
|
-
:"project" => project,
|
181
|
-
:"deidentify_template" => deidentify_template
|
182
|
-
)
|
183
|
-
end
|
184
|
-
|
185
185
|
# Returns a fully-qualified organization_inspect_template resource name string.
|
186
186
|
# @param organization [String]
|
187
187
|
# @param inspect_template [String]
|
@@ -193,56 +193,56 @@ module Google
|
|
193
193
|
)
|
194
194
|
end
|
195
195
|
|
196
|
-
# Returns a fully-qualified
|
197
|
-
# @param
|
198
|
-
# @param
|
196
|
+
# Returns a fully-qualified organization_stored_info_type resource name string.
|
197
|
+
# @param organization [String]
|
198
|
+
# @param stored_info_type [String]
|
199
199
|
# @return [String]
|
200
|
-
def self.
|
201
|
-
|
202
|
-
:"
|
203
|
-
:"
|
200
|
+
def self.organization_stored_info_type_path organization, stored_info_type
|
201
|
+
ORGANIZATION_STORED_INFO_TYPE_PATH_TEMPLATE.render(
|
202
|
+
:"organization" => organization,
|
203
|
+
:"stored_info_type" => stored_info_type
|
204
204
|
)
|
205
205
|
end
|
206
206
|
|
207
|
-
# Returns a fully-qualified
|
207
|
+
# Returns a fully-qualified project resource name string.
|
208
208
|
# @param project [String]
|
209
|
-
# @param job_trigger [String]
|
210
209
|
# @return [String]
|
211
|
-
def self.
|
212
|
-
|
213
|
-
:"project" => project
|
214
|
-
:"job_trigger" => job_trigger
|
210
|
+
def self.project_path project
|
211
|
+
PROJECT_PATH_TEMPLATE.render(
|
212
|
+
:"project" => project
|
215
213
|
)
|
216
214
|
end
|
217
215
|
|
218
|
-
# Returns a fully-qualified
|
216
|
+
# Returns a fully-qualified project_deidentify_template resource name string.
|
219
217
|
# @param project [String]
|
218
|
+
# @param deidentify_template [String]
|
220
219
|
# @return [String]
|
221
|
-
def self.
|
222
|
-
|
223
|
-
:"project" => project
|
220
|
+
def self.project_deidentify_template_path project, deidentify_template
|
221
|
+
PROJECT_DEIDENTIFY_TEMPLATE_PATH_TEMPLATE.render(
|
222
|
+
:"project" => project,
|
223
|
+
:"deidentify_template" => deidentify_template
|
224
224
|
)
|
225
225
|
end
|
226
226
|
|
227
|
-
# Returns a fully-qualified
|
227
|
+
# Returns a fully-qualified project_inspect_template resource name string.
|
228
228
|
# @param project [String]
|
229
|
-
# @param
|
229
|
+
# @param inspect_template [String]
|
230
230
|
# @return [String]
|
231
|
-
def self.
|
232
|
-
|
231
|
+
def self.project_inspect_template_path project, inspect_template
|
232
|
+
PROJECT_INSPECT_TEMPLATE_PATH_TEMPLATE.render(
|
233
233
|
:"project" => project,
|
234
|
-
:"
|
234
|
+
:"inspect_template" => inspect_template
|
235
235
|
)
|
236
236
|
end
|
237
237
|
|
238
|
-
# Returns a fully-qualified
|
239
|
-
# @param
|
240
|
-
# @param
|
238
|
+
# Returns a fully-qualified project_job_trigger resource name string.
|
239
|
+
# @param project [String]
|
240
|
+
# @param job_trigger [String]
|
241
241
|
# @return [String]
|
242
|
-
def self.
|
243
|
-
|
244
|
-
:"
|
245
|
-
:"
|
242
|
+
def self.project_job_trigger_path project, job_trigger
|
243
|
+
PROJECT_JOB_TRIGGER_PATH_TEMPLATE.render(
|
244
|
+
:"project" => project,
|
245
|
+
:"job_trigger" => job_trigger
|
246
246
|
)
|
247
247
|
end
|
248
248
|
|
@@ -97,7 +97,8 @@ module Google
|
|
97
97
|
# @!attribute [rw] type_url
|
98
98
|
# @return [String]
|
99
99
|
# A URL/resource name that uniquely identifies the type of the serialized
|
100
|
-
# protocol buffer message.
|
100
|
+
# protocol buffer message. This string must contain at least
|
101
|
+
# one "/" character. The last segment of the URL's path must represent
|
101
102
|
# the fully qualified name of the type (as in
|
102
103
|
# `path/google.protobuf.Duration`). The name should be in a canonical form
|
103
104
|
# (e.g., leading "." is not accepted).
|
@@ -83,57 +83,49 @@ module Google
|
|
83
83
|
# describe the updated values, the API ignores the values of all
|
84
84
|
# fields not covered by the mask.
|
85
85
|
#
|
86
|
-
# If a repeated field is specified for an update operation,
|
87
|
-
#
|
88
|
-
#
|
89
|
-
# string.
|
86
|
+
# If a repeated field is specified for an update operation, new values will
|
87
|
+
# be appended to the existing repeated field in the target resource. Note that
|
88
|
+
# a repeated field is only allowed in the last position of a `paths` string.
|
90
89
|
#
|
91
90
|
# If a sub-message is specified in the last position of the field mask for an
|
92
|
-
# update operation, then the existing sub-message
|
93
|
-
#
|
91
|
+
# update operation, then new value will be merged into the existing sub-message
|
92
|
+
# in the target resource.
|
93
|
+
#
|
94
|
+
# For example, given the target message:
|
94
95
|
#
|
95
96
|
# f {
|
96
97
|
# b {
|
97
|
-
# d
|
98
|
-
# x
|
98
|
+
# d: 1
|
99
|
+
# x: 2
|
99
100
|
# }
|
100
|
-
# c
|
101
|
+
# c: [1]
|
101
102
|
# }
|
102
103
|
#
|
103
104
|
# And an update message:
|
104
105
|
#
|
105
106
|
# f {
|
106
107
|
# b {
|
107
|
-
# d
|
108
|
+
# d: 10
|
108
109
|
# }
|
110
|
+
# c: [2]
|
109
111
|
# }
|
110
112
|
#
|
111
113
|
# then if the field mask is:
|
112
114
|
#
|
113
|
-
# paths: "f.b"
|
115
|
+
# paths: ["f.b", "f.c"]
|
114
116
|
#
|
115
117
|
# then the result will be:
|
116
118
|
#
|
117
119
|
# f {
|
118
120
|
# b {
|
119
|
-
# d
|
121
|
+
# d: 10
|
122
|
+
# x: 2
|
120
123
|
# }
|
121
|
-
# c
|
124
|
+
# c: [1, 2]
|
122
125
|
# }
|
123
126
|
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
# paths: "f.b.d"
|
127
|
-
#
|
128
|
-
# then the result would be:
|
129
|
-
#
|
130
|
-
# f {
|
131
|
-
# b {
|
132
|
-
# d : 10
|
133
|
-
# x : 2
|
134
|
-
# }
|
135
|
-
# c : 1
|
136
|
-
# }
|
127
|
+
# An implementation may provide options to override this default behavior for
|
128
|
+
# repeated and message fields.
|
137
129
|
#
|
138
130
|
# In order to reset a field's value to the default, the field must
|
139
131
|
# be in the mask and set to the default value in the provided resource.
|
@@ -15,17 +15,19 @@
|
|
15
15
|
|
16
16
|
module Google
|
17
17
|
module Protobuf
|
18
|
-
# A Timestamp represents a point in time independent of any time zone
|
19
|
-
#
|
20
|
-
# nanosecond resolution
|
21
|
-
#
|
22
|
-
# backwards to year one.
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
18
|
+
# A Timestamp represents a point in time independent of any time zone or local
|
19
|
+
# calendar, encoded as a count of seconds and fractions of seconds at
|
20
|
+
# nanosecond resolution. The count is relative to an epoch at UTC midnight on
|
21
|
+
# January 1, 1970, in the proleptic Gregorian calendar which extends the
|
22
|
+
# Gregorian calendar backwards to year one.
|
23
|
+
#
|
24
|
+
# All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
|
25
|
+
# second table is needed for interpretation, using a [24-hour linear
|
26
|
+
# smear](https://developers.google.com/time/smear).
|
27
|
+
#
|
28
|
+
# The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
|
29
|
+
# restricting to that range, we ensure that we can convert to and from [RFC
|
30
|
+
# 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
|
29
31
|
#
|
30
32
|
# = Examples
|
31
33
|
#
|
@@ -86,12 +88,12 @@ module Google
|
|
86
88
|
# 01:30 UTC on January 15, 2017.
|
87
89
|
#
|
88
90
|
# In JavaScript, one can convert a Date object to this format using the
|
89
|
-
# standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString
|
91
|
+
# standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
90
92
|
# method. In Python, a standard `datetime.datetime` object can be converted
|
91
93
|
# to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
|
92
94
|
# with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
|
93
95
|
# can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
94
|
-
# http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime
|
96
|
+
# http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
|
95
97
|
# ) to obtain a formatter capable of generating timestamps in this format.
|
96
98
|
# @!attribute [rw] seconds
|
97
99
|
# @return [Integer]
|
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.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-gax
|
@@ -122,6 +122,7 @@ extensions: []
|
|
122
122
|
extra_rdoc_files: []
|
123
123
|
files:
|
124
124
|
- ".yardopts"
|
125
|
+
- AUTHENTICATION.md
|
125
126
|
- LICENSE
|
126
127
|
- README.md
|
127
128
|
- lib/google/cloud/dlp.rb
|