google-cloud-web_risk-v1 0.4.1 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +15 -33
- data/README.md +1 -1
- data/lib/google/cloud/web_risk/v1/version.rb +1 -1
- data/lib/google/cloud/web_risk/v1/web_risk_service/client.rb +110 -56
- data/lib/google/cloud/webrisk/v1/webrisk_pb.rb +2 -2
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/api/resource.rb +10 -71
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24c2518fb4eae9495d4322a6c34ce99557b8fdcf613843e80e5104426701ab20
|
4
|
+
data.tar.gz: f5186a85fd0791aeff0a6b54bcd8466cee89235d6ffae48b072f4fb7410f4964
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb66acb57c6c0cf2b494ecb39e2a0fd38e280252f12833f5dbefe398b75e74eca9bb1ee749b15461ab3d7339b628c5af79be59b4abed4f5e1263eb911f4853d9
|
7
|
+
data.tar.gz: 86f9cb5dd0640ceb5098d089a21871ceead752c27c7ef97a1130da7880ce8496e1ede519cb60a3d83db604db4d2ffa0f94ee398f5c07db7646a7ccecb22461cc
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-web_risk-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::WebRisk::V1::WebRiskService::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `WEBRISK_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `WEBRISK_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/web_risk/v1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/web_risk/v1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config|
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/web_risk/v1"
|
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/web_risk/v1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.compute_threat_list_diff request
|
38
38
|
```
|
39
39
|
|
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration}
|
43
43
|
# for a description of the configuration fields.
|
44
44
|
#
|
45
|
-
#
|
45
|
+
# @example
|
46
46
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
47
|
+
# # Modify the configuration for all WebRiskService clients
|
48
|
+
# ::Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
52
51
|
#
|
53
52
|
# @yield [config] Configure the Client client.
|
54
53
|
# @yieldparam config [Client::Configuration]
|
@@ -68,26 +67,17 @@ module Google
|
|
68
67
|
|
69
68
|
default_config.rpcs.compute_threat_list_diff.timeout = 600.0
|
70
69
|
default_config.rpcs.compute_threat_list_diff.retry_policy = {
|
71
|
-
initial_delay: 0.1,
|
72
|
-
max_delay: 60.0,
|
73
|
-
multiplier: 1.3,
|
74
|
-
retry_codes: [4, 14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
75
71
|
}
|
76
72
|
|
77
73
|
default_config.rpcs.search_uris.timeout = 600.0
|
78
74
|
default_config.rpcs.search_uris.retry_policy = {
|
79
|
-
initial_delay: 0.1,
|
80
|
-
max_delay: 60.0,
|
81
|
-
multiplier: 1.3,
|
82
|
-
retry_codes: [4, 14]
|
75
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
83
76
|
}
|
84
77
|
|
85
78
|
default_config.rpcs.search_hashes.timeout = 600.0
|
86
79
|
default_config.rpcs.search_hashes.retry_policy = {
|
87
|
-
initial_delay: 0.1,
|
88
|
-
max_delay: 60.0,
|
89
|
-
multiplier: 1.3,
|
90
|
-
retry_codes: [4, 14]
|
80
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
91
81
|
}
|
92
82
|
|
93
83
|
default_config.rpcs.create_submission.timeout = 60.0
|
@@ -121,19 +111,15 @@ module Google
|
|
121
111
|
##
|
122
112
|
# Create a new WebRiskService client object.
|
123
113
|
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
# To create a new WebRiskService client with the default
|
127
|
-
# configuration:
|
128
|
-
#
|
129
|
-
# client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
|
114
|
+
# @example
|
130
115
|
#
|
131
|
-
#
|
132
|
-
#
|
116
|
+
# # Create a client using the default configuration
|
117
|
+
# client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new
|
133
118
|
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
119
|
+
# # Create a client using a custom configuration
|
120
|
+
# client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config|
|
121
|
+
# config.timeout = 10.0
|
122
|
+
# end
|
137
123
|
#
|
138
124
|
# @yield [config] Configure the WebRiskService client.
|
139
125
|
# @yieldparam config [Client::Configuration]
|
@@ -153,14 +139,13 @@ module Google
|
|
153
139
|
|
154
140
|
# Create credentials
|
155
141
|
credentials = @config.credentials
|
156
|
-
# Use self-signed JWT if the
|
142
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
157
143
|
# but only if the default endpoint does not have a region prefix.
|
158
|
-
enable_self_signed_jwt = @config.
|
159
|
-
@config.endpoint == Client.configure.endpoint &&
|
144
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
160
145
|
!@config.endpoint.split(".").first.include?("-")
|
161
146
|
credentials ||= Credentials.default scope: @config.scope,
|
162
147
|
enable_self_signed_jwt: enable_self_signed_jwt
|
163
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
148
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
164
149
|
credentials = Credentials.new credentials, scope: @config.scope
|
165
150
|
end
|
166
151
|
@quota_project_id = @config.quota_project
|
@@ -219,6 +204,21 @@ module Google
|
|
219
204
|
#
|
220
205
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
221
206
|
#
|
207
|
+
# @example Basic example
|
208
|
+
# require "google/cloud/web_risk/v1"
|
209
|
+
#
|
210
|
+
# # Create a client object. The client can be reused for multiple calls.
|
211
|
+
# client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new
|
212
|
+
#
|
213
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
214
|
+
# request = Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new
|
215
|
+
#
|
216
|
+
# # Call the compute_threat_list_diff method.
|
217
|
+
# result = client.compute_threat_list_diff request
|
218
|
+
#
|
219
|
+
# # The returned object is of type Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse.
|
220
|
+
# p result
|
221
|
+
#
|
222
222
|
def compute_threat_list_diff request, options = nil
|
223
223
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
224
224
|
|
@@ -239,7 +239,9 @@ module Google
|
|
239
239
|
options.apply_defaults timeout: @config.rpcs.compute_threat_list_diff.timeout,
|
240
240
|
metadata: metadata,
|
241
241
|
retry_policy: @config.rpcs.compute_threat_list_diff.retry_policy
|
242
|
-
|
242
|
+
|
243
|
+
options.apply_defaults timeout: @config.timeout,
|
244
|
+
metadata: @config.metadata,
|
243
245
|
retry_policy: @config.retry_policy
|
244
246
|
|
245
247
|
@web_risk_service_stub.call_rpc :compute_threat_list_diff, request, options: options do |response, operation|
|
@@ -285,6 +287,21 @@ module Google
|
|
285
287
|
#
|
286
288
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
287
289
|
#
|
290
|
+
# @example Basic example
|
291
|
+
# require "google/cloud/web_risk/v1"
|
292
|
+
#
|
293
|
+
# # Create a client object. The client can be reused for multiple calls.
|
294
|
+
# client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new
|
295
|
+
#
|
296
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
297
|
+
# request = Google::Cloud::WebRisk::V1::SearchUrisRequest.new
|
298
|
+
#
|
299
|
+
# # Call the search_uris method.
|
300
|
+
# result = client.search_uris request
|
301
|
+
#
|
302
|
+
# # The returned object is of type Google::Cloud::WebRisk::V1::SearchUrisResponse.
|
303
|
+
# p result
|
304
|
+
#
|
288
305
|
def search_uris request, options = nil
|
289
306
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
290
307
|
|
@@ -305,7 +322,9 @@ module Google
|
|
305
322
|
options.apply_defaults timeout: @config.rpcs.search_uris.timeout,
|
306
323
|
metadata: metadata,
|
307
324
|
retry_policy: @config.rpcs.search_uris.retry_policy
|
308
|
-
|
325
|
+
|
326
|
+
options.apply_defaults timeout: @config.timeout,
|
327
|
+
metadata: @config.metadata,
|
309
328
|
retry_policy: @config.retry_policy
|
310
329
|
|
311
330
|
@web_risk_service_stub.call_rpc :search_uris, request, options: options do |response, operation|
|
@@ -352,6 +371,21 @@ module Google
|
|
352
371
|
#
|
353
372
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
354
373
|
#
|
374
|
+
# @example Basic example
|
375
|
+
# require "google/cloud/web_risk/v1"
|
376
|
+
#
|
377
|
+
# # Create a client object. The client can be reused for multiple calls.
|
378
|
+
# client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new
|
379
|
+
#
|
380
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
381
|
+
# request = Google::Cloud::WebRisk::V1::SearchHashesRequest.new
|
382
|
+
#
|
383
|
+
# # Call the search_hashes method.
|
384
|
+
# result = client.search_hashes request
|
385
|
+
#
|
386
|
+
# # The returned object is of type Google::Cloud::WebRisk::V1::SearchHashesResponse.
|
387
|
+
# p result
|
388
|
+
#
|
355
389
|
def search_hashes request, options = nil
|
356
390
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
357
391
|
|
@@ -372,7 +406,9 @@ module Google
|
|
372
406
|
options.apply_defaults timeout: @config.rpcs.search_hashes.timeout,
|
373
407
|
metadata: metadata,
|
374
408
|
retry_policy: @config.rpcs.search_hashes.retry_policy
|
375
|
-
|
409
|
+
|
410
|
+
options.apply_defaults timeout: @config.timeout,
|
411
|
+
metadata: @config.metadata,
|
376
412
|
retry_policy: @config.retry_policy
|
377
413
|
|
378
414
|
@web_risk_service_stub.call_rpc :search_hashes, request, options: options do |response, operation|
|
@@ -420,6 +456,21 @@ module Google
|
|
420
456
|
#
|
421
457
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
422
458
|
#
|
459
|
+
# @example Basic example
|
460
|
+
# require "google/cloud/web_risk/v1"
|
461
|
+
#
|
462
|
+
# # Create a client object. The client can be reused for multiple calls.
|
463
|
+
# client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new
|
464
|
+
#
|
465
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
466
|
+
# request = Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new
|
467
|
+
#
|
468
|
+
# # Call the create_submission method.
|
469
|
+
# result = client.create_submission request
|
470
|
+
#
|
471
|
+
# # The returned object is of type Google::Cloud::WebRisk::V1::Submission.
|
472
|
+
# p result
|
473
|
+
#
|
423
474
|
def create_submission request, options = nil
|
424
475
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
425
476
|
|
@@ -437,16 +488,20 @@ module Google
|
|
437
488
|
gapic_version: ::Google::Cloud::WebRisk::V1::VERSION
|
438
489
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
439
490
|
|
440
|
-
header_params = {
|
441
|
-
|
442
|
-
|
491
|
+
header_params = {}
|
492
|
+
if request.parent
|
493
|
+
header_params["parent"] = request.parent
|
494
|
+
end
|
495
|
+
|
443
496
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
444
497
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
445
498
|
|
446
499
|
options.apply_defaults timeout: @config.rpcs.create_submission.timeout,
|
447
500
|
metadata: metadata,
|
448
501
|
retry_policy: @config.rpcs.create_submission.retry_policy
|
449
|
-
|
502
|
+
|
503
|
+
options.apply_defaults timeout: @config.timeout,
|
504
|
+
metadata: @config.metadata,
|
450
505
|
retry_policy: @config.retry_policy
|
451
506
|
|
452
507
|
@web_risk_service_stub.call_rpc :create_submission, request, options: options do |response, operation|
|
@@ -470,22 +525,21 @@ module Google
|
|
470
525
|
# Configuration can be applied globally to all clients, or to a single client
|
471
526
|
# on construction.
|
472
527
|
#
|
473
|
-
#
|
474
|
-
#
|
475
|
-
#
|
476
|
-
# to 20 seconds,
|
477
|
-
#
|
478
|
-
#
|
479
|
-
#
|
480
|
-
#
|
481
|
-
#
|
482
|
-
#
|
483
|
-
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
#
|
488
|
-
# end
|
528
|
+
# @example
|
529
|
+
#
|
530
|
+
# # Modify the global config, setting the timeout for
|
531
|
+
# # compute_threat_list_diff to 20 seconds,
|
532
|
+
# # and all remaining timeouts to 10 seconds.
|
533
|
+
# ::Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config|
|
534
|
+
# config.timeout = 10.0
|
535
|
+
# config.rpcs.compute_threat_list_diff.timeout = 20.0
|
536
|
+
# end
|
537
|
+
#
|
538
|
+
# # Apply the above configuration only to a new client.
|
539
|
+
# client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config|
|
540
|
+
# config.timeout = 10.0
|
541
|
+
# config.rpcs.compute_threat_list_diff.timeout = 20.0
|
542
|
+
# end
|
489
543
|
#
|
490
544
|
# @!attribute [rw] endpoint
|
491
545
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/webrisk/v1/webrisk.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
9
7
|
require 'google/api/resource_pb'
|
10
8
|
require 'google/protobuf/timestamp_pb'
|
9
|
+
require 'google/protobuf'
|
10
|
+
|
11
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
12
|
add_file("google/cloud/webrisk/v1/webrisk.proto", :syntax => :proto3) do
|
13
13
|
add_message "google.cloud.webrisk.v1.ComputeThreatListDiffRequest" do
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-web_risk-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
203
|
- !ruby/object:Gem::Version
|
204
204
|
version: '0'
|
205
205
|
requirements: []
|
206
|
-
rubygems_version: 3.
|
206
|
+
rubygems_version: 3.3.4
|
207
207
|
signing_key:
|
208
208
|
specification_version: 4
|
209
209
|
summary: API Client library for the Web Risk V1 API
|