google-cloud-asset-v1 0.4.0 → 0.5.1
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 +4 -4
- data/README.md +4 -0
- data/lib/google/cloud/asset/v1/asset_service/client.rb +47 -15
- data/lib/google/cloud/asset/v1/asset_service/operations.rb +3 -1
- data/lib/google/cloud/asset/v1/asset_service_pb.rb +2 -0
- data/lib/google/cloud/asset/v1/asset_service_services_pb.rb +12 -6
- data/lib/google/cloud/asset/v1/assets_pb.rb +12 -0
- data/lib/google/cloud/asset/v1/version.rb +1 -1
- data/proto_docs/google/cloud/asset/v1/asset_service.rb +26 -21
- data/proto_docs/google/cloud/asset/v1/assets.rb +63 -25
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/rpc/code.rb +185 -0
- data/proto_docs/google/rpc/status.rb +1 -1
- metadata +7 -6
- data/lib/google/cloud/common_resources_pb.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67cfb35e60a8119229a525ad1bd3df06a9a3c44a3b399b2e35523bed5b123a12
|
4
|
+
data.tar.gz: 869d83401de7e480dd7a9b4ae588d824bd1bdf436195e00a8e6b71c9abec8467
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 873ab8dd414a97b7ffc92317e5e1d42595e6c16f9153ca335b9569bd2562842ad03fcd66159c28c80322f3d1a71980619bc85099937f18f53da46f498f4e19b2
|
7
|
+
data.tar.gz: 4026e6b8a8da767c08bbbe6aa6c10a4d11cbda957a1b77aac5dfe201caaea9a7b987425046d6047907e46a8df46f0b5078c91b78c0aca33faaa4563fccaf2ffa
|
data/README.md
CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
|
|
18
18
|
|
19
19
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
20
20
|
1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
21
|
+
1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudasset.googleapis.com)
|
21
22
|
1. {file:AUTHENTICATION.md Set up authentication.}
|
22
23
|
|
23
24
|
## Quick Start
|
@@ -33,6 +34,9 @@ response = client.export_assets request
|
|
33
34
|
View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-asset-v1/latest)
|
34
35
|
for class and method documentation.
|
35
36
|
|
37
|
+
See also the [Product Documentation](https://cloud.google.com/asset-inventory/)
|
38
|
+
for general usage information.
|
39
|
+
|
36
40
|
## Enabling Logging
|
37
41
|
|
38
42
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
@@ -75,6 +75,34 @@ module Google
|
|
75
75
|
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
76
76
|
}
|
77
77
|
|
78
|
+
default_config.rpcs.create_feed.timeout = 60.0
|
79
|
+
|
80
|
+
default_config.rpcs.get_feed.timeout = 60.0
|
81
|
+
default_config.rpcs.get_feed.retry_policy = {
|
82
|
+
initial_delay: 0.1,
|
83
|
+
max_delay: 60.0,
|
84
|
+
multiplier: 1.3,
|
85
|
+
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
86
|
+
}
|
87
|
+
|
88
|
+
default_config.rpcs.list_feeds.timeout = 60.0
|
89
|
+
default_config.rpcs.list_feeds.retry_policy = {
|
90
|
+
initial_delay: 0.1,
|
91
|
+
max_delay: 60.0,
|
92
|
+
multiplier: 1.3,
|
93
|
+
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
94
|
+
}
|
95
|
+
|
96
|
+
default_config.rpcs.update_feed.timeout = 60.0
|
97
|
+
|
98
|
+
default_config.rpcs.delete_feed.timeout = 60.0
|
99
|
+
default_config.rpcs.delete_feed.retry_policy = {
|
100
|
+
initial_delay: 0.1,
|
101
|
+
max_delay: 60.0,
|
102
|
+
multiplier: 1.3,
|
103
|
+
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
104
|
+
}
|
105
|
+
|
78
106
|
default_config.rpcs.search_all_resources.timeout = 15.0
|
79
107
|
default_config.rpcs.search_all_resources.retry_policy = {
|
80
108
|
initial_delay: 0.1,
|
@@ -184,10 +212,16 @@ module Google
|
|
184
212
|
|
185
213
|
##
|
186
214
|
# Exports assets with time and resource types to a given Cloud Storage
|
187
|
-
# location.
|
188
|
-
#
|
189
|
-
# {::Google::
|
190
|
-
#
|
215
|
+
# location/BigQuery table. For Cloud Storage location destinations, the
|
216
|
+
# output format is newline-delimited JSON. Each line represents a
|
217
|
+
# {::Google::Cloud::Asset::V1::Asset google.cloud.asset.v1.Asset} in the JSON
|
218
|
+
# format; for BigQuery table destinations, the output table stores the fields
|
219
|
+
# in asset proto as columns. This API implements the
|
220
|
+
# {::Google::Longrunning::Operation google.longrunning.Operation} API , which
|
221
|
+
# allows you to keep track of the export. We recommend intervals of at least
|
222
|
+
# 2 seconds with exponential retry to poll the export operation result. For
|
223
|
+
# regular-size resource parent, the export operation usually finishes within
|
224
|
+
# 5 minutes.
|
191
225
|
#
|
192
226
|
# @overload export_assets(request, options = nil)
|
193
227
|
# Pass arguments to `export_assets` via a request object, either of type
|
@@ -216,7 +250,7 @@ module Google
|
|
216
250
|
# data collection and indexing, there is a volatile window during which
|
217
251
|
# running the same query may get different results.
|
218
252
|
# @param asset_types [::Array<::String>]
|
219
|
-
# A list of asset types of which to take a snapshot for.
|
253
|
+
# A list of asset types of which to take a snapshot for. Example:
|
220
254
|
# "compute.googleapis.com/Disk". If specified, only matching assets will be
|
221
255
|
# returned. See [Introduction to Cloud Asset
|
222
256
|
# Inventory](https://cloud.google.com/asset-inventory/docs/overview)
|
@@ -226,7 +260,7 @@ module Google
|
|
226
260
|
# returned.
|
227
261
|
# @param output_config [::Google::Cloud::Asset::V1::OutputConfig, ::Hash]
|
228
262
|
# Required. Output configuration indicating where the results will be output
|
229
|
-
# to.
|
263
|
+
# to.
|
230
264
|
#
|
231
265
|
# @yield [response, operation] Access the result along with the RPC operation
|
232
266
|
# @yieldparam response [::Gapic::Operation]
|
@@ -276,10 +310,10 @@ module Google
|
|
276
310
|
|
277
311
|
##
|
278
312
|
# Batch gets the update history of assets that overlap a time window.
|
279
|
-
# For RESOURCE content, this API outputs history with asset in both
|
280
|
-
# non-delete or deleted status.
|
281
313
|
# For IAM_POLICY content, this API outputs history when the asset and its
|
282
314
|
# attached IAM POLICY both exist. This can create gaps in the output history.
|
315
|
+
# Otherwise, this API outputs history with asset in both non-delete or
|
316
|
+
# deleted status.
|
283
317
|
# If a specified asset does not exist, this API returns an INVALID_ARGUMENT
|
284
318
|
# error.
|
285
319
|
#
|
@@ -303,13 +337,11 @@ module Google
|
|
303
337
|
# organization number (such as "organizations/123"), a project ID (such as
|
304
338
|
# "projects/my-project-id")", or a project number (such as "projects/12345").
|
305
339
|
# @param asset_names [::Array<::String>]
|
306
|
-
# A list of the full names of the assets.
|
340
|
+
# A list of the full names of the assets.
|
341
|
+
# See: https://cloud.google.com/asset-inventory/docs/resource-name-format
|
342
|
+
# Example:
|
343
|
+
#
|
307
344
|
# `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
|
308
|
-
# See [Resource
|
309
|
-
# Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
|
310
|
-
# and [Resource Name
|
311
|
-
# Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
|
312
|
-
# for more info.
|
313
345
|
#
|
314
346
|
# The request becomes a no-op if the asset name list is empty, and the max
|
315
347
|
# size of the asset name list is 100 in one request.
|
@@ -1084,7 +1116,7 @@ module Google
|
|
1084
1116
|
def rpcs
|
1085
1117
|
@rpcs ||= begin
|
1086
1118
|
parent_rpcs = nil
|
1087
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
1119
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
1088
1120
|
Rpcs.new parent_rpcs
|
1089
1121
|
end
|
1090
1122
|
end
|
@@ -85,6 +85,8 @@ module Google
|
|
85
85
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
|
+
@quota_project_id = @config.quota_project
|
89
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
88
90
|
|
89
91
|
@operations_stub = ::Gapic::ServiceStub.new(
|
90
92
|
::Google::Longrunning::Operations::Stub,
|
@@ -501,7 +503,7 @@ module Google
|
|
501
503
|
def rpcs
|
502
504
|
@rpcs ||= begin
|
503
505
|
parent_rpcs = nil
|
504
|
-
parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to?
|
506
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
505
507
|
Rpcs.new parent_rpcs
|
506
508
|
end
|
507
509
|
end
|
@@ -9,6 +9,7 @@ require 'google/api/field_behavior_pb'
|
|
9
9
|
require 'google/api/resource_pb'
|
10
10
|
require 'google/cloud/asset/v1/assets_pb'
|
11
11
|
require 'google/longrunning/operations_pb'
|
12
|
+
require 'google/protobuf/duration_pb'
|
12
13
|
require 'google/protobuf/empty_pb'
|
13
14
|
require 'google/protobuf/field_mask_pb'
|
14
15
|
require 'google/protobuf/timestamp_pb'
|
@@ -87,6 +88,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
87
88
|
repeated :asset_types, :string, 3
|
88
89
|
optional :content_type, :enum, 4, "google.cloud.asset.v1.ContentType"
|
89
90
|
optional :feed_output_config, :message, 5, "google.cloud.asset.v1.FeedOutputConfig"
|
91
|
+
optional :condition, :message, 6, "google.type.Expr"
|
90
92
|
end
|
91
93
|
add_message "google.cloud.asset.v1.SearchAllResourcesRequest" do
|
92
94
|
optional :scope, :string, 1
|
@@ -34,16 +34,22 @@ module Google
|
|
34
34
|
self.service_name = 'google.cloud.asset.v1.AssetService'
|
35
35
|
|
36
36
|
# Exports assets with time and resource types to a given Cloud Storage
|
37
|
-
# location.
|
38
|
-
#
|
39
|
-
# [google.
|
40
|
-
#
|
37
|
+
# location/BigQuery table. For Cloud Storage location destinations, the
|
38
|
+
# output format is newline-delimited JSON. Each line represents a
|
39
|
+
# [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON
|
40
|
+
# format; for BigQuery table destinations, the output table stores the fields
|
41
|
+
# in asset proto as columns. This API implements the
|
42
|
+
# [google.longrunning.Operation][google.longrunning.Operation] API , which
|
43
|
+
# allows you to keep track of the export. We recommend intervals of at least
|
44
|
+
# 2 seconds with exponential retry to poll the export operation result. For
|
45
|
+
# regular-size resource parent, the export operation usually finishes within
|
46
|
+
# 5 minutes.
|
41
47
|
rpc :ExportAssets, ExportAssetsRequest, Google::Longrunning::Operation
|
42
48
|
# Batch gets the update history of assets that overlap a time window.
|
43
|
-
# For RESOURCE content, this API outputs history with asset in both
|
44
|
-
# non-delete or deleted status.
|
45
49
|
# For IAM_POLICY content, this API outputs history when the asset and its
|
46
50
|
# attached IAM POLICY both exist. This can create gaps in the output history.
|
51
|
+
# Otherwise, this API outputs history with asset in both non-delete or
|
52
|
+
# deleted status.
|
47
53
|
# If a specified asset does not exist, this API returns an INVALID_ARGUMENT
|
48
54
|
# error.
|
49
55
|
rpc :BatchGetAssetsHistory, BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse
|
@@ -13,18 +13,29 @@ require 'google/identity/accesscontextmanager/v1/service_perimeter_pb'
|
|
13
13
|
require 'google/protobuf/any_pb'
|
14
14
|
require 'google/protobuf/struct_pb'
|
15
15
|
require 'google/protobuf/timestamp_pb'
|
16
|
+
require 'google/rpc/code_pb'
|
16
17
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
18
|
add_file("google/cloud/asset/v1/assets.proto", :syntax => :proto3) do
|
18
19
|
add_message "google.cloud.asset.v1.TemporalAsset" do
|
19
20
|
optional :window, :message, 1, "google.cloud.asset.v1.TimeWindow"
|
20
21
|
optional :deleted, :bool, 2
|
21
22
|
optional :asset, :message, 3, "google.cloud.asset.v1.Asset"
|
23
|
+
optional :prior_asset_state, :enum, 4, "google.cloud.asset.v1.TemporalAsset.PriorAssetState"
|
24
|
+
optional :prior_asset, :message, 5, "google.cloud.asset.v1.Asset"
|
25
|
+
end
|
26
|
+
add_enum "google.cloud.asset.v1.TemporalAsset.PriorAssetState" do
|
27
|
+
value :PRIOR_ASSET_STATE_UNSPECIFIED, 0
|
28
|
+
value :PRESENT, 1
|
29
|
+
value :INVALID, 2
|
30
|
+
value :DOES_NOT_EXIST, 3
|
31
|
+
value :DELETED, 4
|
22
32
|
end
|
23
33
|
add_message "google.cloud.asset.v1.TimeWindow" do
|
24
34
|
optional :start_time, :message, 1, "google.protobuf.Timestamp"
|
25
35
|
optional :end_time, :message, 2, "google.protobuf.Timestamp"
|
26
36
|
end
|
27
37
|
add_message "google.cloud.asset.v1.Asset" do
|
38
|
+
optional :update_time, :message, 11, "google.protobuf.Timestamp"
|
28
39
|
optional :name, :string, 1
|
29
40
|
optional :asset_type, :string, 2
|
30
41
|
optional :resource, :message, 3, "google.cloud.asset.v1.Resource"
|
@@ -77,6 +88,7 @@ module Google
|
|
77
88
|
module Asset
|
78
89
|
module V1
|
79
90
|
TemporalAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TemporalAsset").msgclass
|
91
|
+
TemporalAsset::PriorAssetState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TemporalAsset.PriorAssetState").enummodule
|
80
92
|
TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TimeWindow").msgclass
|
81
93
|
Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Asset").msgclass
|
82
94
|
Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Resource").msgclass
|
@@ -37,7 +37,7 @@ module Google
|
|
37
37
|
# running the same query may get different results.
|
38
38
|
# @!attribute [rw] asset_types
|
39
39
|
# @return [::Array<::String>]
|
40
|
-
# A list of asset types of which to take a snapshot for.
|
40
|
+
# A list of asset types of which to take a snapshot for. Example:
|
41
41
|
# "compute.googleapis.com/Disk". If specified, only matching assets will be
|
42
42
|
# returned. See [Introduction to Cloud Asset
|
43
43
|
# Inventory](https://cloud.google.com/asset-inventory/docs/overview)
|
@@ -49,7 +49,7 @@ module Google
|
|
49
49
|
# @!attribute [rw] output_config
|
50
50
|
# @return [::Google::Cloud::Asset::V1::OutputConfig]
|
51
51
|
# Required. Output configuration indicating where the results will be output
|
52
|
-
# to.
|
52
|
+
# to.
|
53
53
|
class ExportAssetsRequest
|
54
54
|
include ::Google::Protobuf::MessageExts
|
55
55
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -66,7 +66,6 @@ module Google
|
|
66
66
|
# @!attribute [rw] output_config
|
67
67
|
# @return [::Google::Cloud::Asset::V1::OutputConfig]
|
68
68
|
# Output configuration indicating where the results were output to.
|
69
|
-
# All results are in JSON format.
|
70
69
|
class ExportAssetsResponse
|
71
70
|
include ::Google::Protobuf::MessageExts
|
72
71
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -80,13 +79,11 @@ module Google
|
|
80
79
|
# "projects/my-project-id")", or a project number (such as "projects/12345").
|
81
80
|
# @!attribute [rw] asset_names
|
82
81
|
# @return [::Array<::String>]
|
83
|
-
# A list of the full names of the assets.
|
82
|
+
# A list of the full names of the assets.
|
83
|
+
# See: https://cloud.google.com/asset-inventory/docs/resource-name-format
|
84
|
+
# Example:
|
85
|
+
#
|
84
86
|
# `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
|
85
|
-
# See [Resource
|
86
|
-
# Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
|
87
|
-
# and [Resource Name
|
88
|
-
# Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
|
89
|
-
# for more info.
|
90
87
|
#
|
91
88
|
# The request becomes a no-op if the asset name list is empty, and the max
|
92
89
|
# size of the asset name list is 100 in one request.
|
@@ -205,9 +202,7 @@ module Google
|
|
205
202
|
# @!attribute [rw] bigquery_destination
|
206
203
|
# @return [::Google::Cloud::Asset::V1::BigQueryDestination]
|
207
204
|
# Destination on BigQuery. The output table stores the fields in asset
|
208
|
-
# proto as columns in BigQuery.
|
209
|
-
# to a record with each field to a column, except metadata to a single JSON
|
210
|
-
# string.
|
205
|
+
# proto as columns in BigQuery.
|
211
206
|
class OutputConfig
|
212
207
|
include ::Google::Protobuf::MessageExts
|
213
208
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -217,16 +212,16 @@ module Google
|
|
217
212
|
# @!attribute [rw] uri
|
218
213
|
# @return [::String]
|
219
214
|
# The uri of the Cloud Storage object. It's the same uri that is used by
|
220
|
-
# gsutil.
|
215
|
+
# gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
|
221
216
|
# Editing Object
|
222
217
|
# Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
|
223
218
|
# for more information.
|
224
219
|
# @!attribute [rw] uri_prefix
|
225
220
|
# @return [::String]
|
226
|
-
# The uri prefix of all generated Cloud Storage objects.
|
221
|
+
# The uri prefix of all generated Cloud Storage objects. Example:
|
227
222
|
# "gs://bucket_name/object_name_prefix". Each object uri is in format:
|
228
223
|
# "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
|
229
|
-
# contains assets for that type. <shard number> starts from 0.
|
224
|
+
# contains assets for that type. <shard number> starts from 0. Example:
|
230
225
|
# "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
|
231
226
|
# the first shard of output objects containing all
|
232
227
|
# compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
|
@@ -237,7 +232,7 @@ module Google
|
|
237
232
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
238
233
|
end
|
239
234
|
|
240
|
-
# A BigQuery destination.
|
235
|
+
# A BigQuery destination for exporting assets to.
|
241
236
|
# @!attribute [rw] dataset
|
242
237
|
# @return [::String]
|
243
238
|
# Required. The BigQuery dataset in format
|
@@ -264,7 +259,7 @@ module Google
|
|
264
259
|
# @!attribute [rw] topic
|
265
260
|
# @return [::String]
|
266
261
|
# The name of the Pub/Sub topic to publish to.
|
267
|
-
#
|
262
|
+
# Example: `projects/PROJECT_ID/topics/TOPIC_ID`.
|
268
263
|
class PubsubDestination
|
269
264
|
include ::Google::Protobuf::MessageExts
|
270
265
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -297,8 +292,8 @@ module Google
|
|
297
292
|
# @return [::Array<::String>]
|
298
293
|
# A list of the full names of the assets to receive updates. You must specify
|
299
294
|
# either or both of asset_names and asset_types. Only asset updates matching
|
300
|
-
# specified asset_names
|
301
|
-
#
|
295
|
+
# specified asset_names or asset_types are exported to the feed.
|
296
|
+
# Example:
|
302
297
|
# `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
|
303
298
|
# See [Resource
|
304
299
|
# Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
|
@@ -307,8 +302,8 @@ module Google
|
|
307
302
|
# @return [::Array<::String>]
|
308
303
|
# A list of types of the assets to receive updates. You must specify either
|
309
304
|
# or both of asset_names and asset_types. Only asset updates matching
|
310
|
-
# specified asset_names
|
311
|
-
#
|
305
|
+
# specified asset_names or asset_types are exported to the feed.
|
306
|
+
# Example: `"compute.googleapis.com/Disk"`
|
312
307
|
#
|
313
308
|
# See [this
|
314
309
|
# topic](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
|
@@ -321,6 +316,16 @@ module Google
|
|
321
316
|
# @return [::Google::Cloud::Asset::V1::FeedOutputConfig]
|
322
317
|
# Required. Feed output configuration defining where the asset updates are
|
323
318
|
# published to.
|
319
|
+
# @!attribute [rw] condition
|
320
|
+
# @return [::Google::Type::Expr]
|
321
|
+
# A condition which determines whether an asset update should be published.
|
322
|
+
# If specified, an asset will be returned only when the expression evaluates
|
323
|
+
# to true.
|
324
|
+
# When set, `expression` field in the `Expr` must be a valid [CEL expression]
|
325
|
+
# (https://github.com/google/cel-spec) on a TemporalAsset with name
|
326
|
+
# `temporal_asset`. Example: a Feed with expression ("temporal_asset.deleted
|
327
|
+
# == true") will only publish Asset deletions. Other fields in `Expr` are
|
328
|
+
# optional.
|
324
329
|
class Feed
|
325
330
|
include ::Google::Protobuf::MessageExts
|
326
331
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -32,12 +32,37 @@ module Google
|
|
32
32
|
# @!attribute [rw] asset
|
33
33
|
# @return [::Google::Cloud::Asset::V1::Asset]
|
34
34
|
# An asset in Google Cloud.
|
35
|
+
# @!attribute [rw] prior_asset_state
|
36
|
+
# @return [::Google::Cloud::Asset::V1::TemporalAsset::PriorAssetState]
|
37
|
+
# State of prior_asset.
|
38
|
+
# @!attribute [rw] prior_asset
|
39
|
+
# @return [::Google::Cloud::Asset::V1::Asset]
|
40
|
+
# Prior copy of the asset. Populated if prior_asset_state is PRESENT.
|
41
|
+
# Currently this is only set for responses in Real-Time Feed.
|
35
42
|
class TemporalAsset
|
36
43
|
include ::Google::Protobuf::MessageExts
|
37
44
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
45
|
+
|
46
|
+
# State of prior asset.
|
47
|
+
module PriorAssetState
|
48
|
+
# prior_asset is not applicable for the current asset.
|
49
|
+
PRIOR_ASSET_STATE_UNSPECIFIED = 0
|
50
|
+
|
51
|
+
# prior_asset is populated correctly.
|
52
|
+
PRESENT = 1
|
53
|
+
|
54
|
+
# Failed to set prior_asset.
|
55
|
+
INVALID = 2
|
56
|
+
|
57
|
+
# Current asset is the first known state.
|
58
|
+
DOES_NOT_EXIST = 3
|
59
|
+
|
60
|
+
# prior_asset is a deletion.
|
61
|
+
DELETED = 4
|
62
|
+
end
|
38
63
|
end
|
39
64
|
|
40
|
-
# A time window specified by its
|
65
|
+
# A time window specified by its `start_time` and `end_time`.
|
41
66
|
# @!attribute [rw] start_time
|
42
67
|
# @return [::Google::Protobuf::Timestamp]
|
43
68
|
# Start time of the time window (exclusive).
|
@@ -54,18 +79,25 @@ module Google
|
|
54
79
|
# [resource
|
55
80
|
# hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
|
56
81
|
# a resource outside the Google Cloud resource hierarchy (such as Google
|
57
|
-
# Kubernetes Engine clusters and objects), or a Cloud IAM policy.
|
82
|
+
# Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
|
83
|
+
# See [Supported asset
|
84
|
+
# types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
|
85
|
+
# for more information.
|
86
|
+
# @!attribute [rw] update_time
|
87
|
+
# @return [::Google::Protobuf::Timestamp]
|
88
|
+
# The last update timestamp of an asset. update_time is updated when
|
89
|
+
# create/update/delete operation is performed.
|
58
90
|
# @!attribute [rw] name
|
59
91
|
# @return [::String]
|
60
|
-
# The full name of the asset.
|
61
|
-
#
|
92
|
+
# The full name of the asset. Example:
|
93
|
+
# `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
|
62
94
|
#
|
63
95
|
# See [Resource
|
64
96
|
# names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
|
65
97
|
# for more information.
|
66
98
|
# @!attribute [rw] asset_type
|
67
99
|
# @return [::String]
|
68
|
-
# The type of the asset.
|
100
|
+
# The type of the asset. Example: `compute.googleapis.com/Disk`
|
69
101
|
#
|
70
102
|
# See [Supported asset
|
71
103
|
# types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
|
@@ -92,10 +124,16 @@ module Google
|
|
92
124
|
# set on a given resource.
|
93
125
|
# @!attribute [rw] access_policy
|
94
126
|
# @return [::Google::Identity::AccessContextManager::V1::AccessPolicy]
|
127
|
+
# Please also refer to the [access policy user
|
128
|
+
# guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
|
95
129
|
# @!attribute [rw] access_level
|
96
130
|
# @return [::Google::Identity::AccessContextManager::V1::AccessLevel]
|
131
|
+
# Please also refer to the [access level user
|
132
|
+
# guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
|
97
133
|
# @!attribute [rw] service_perimeter
|
98
134
|
# @return [::Google::Identity::AccessContextManager::V1::ServicePerimeter]
|
135
|
+
# Please also refer to the [service perimeter user
|
136
|
+
# guide](https://cloud.google.com/vpc-service-controls/docs/overview).
|
99
137
|
# @!attribute [rw] ancestors
|
100
138
|
# @return [::Array<::String>]
|
101
139
|
# The ancestry path of an asset in Google Cloud [resource
|
@@ -105,7 +143,7 @@ module Google
|
|
105
143
|
# is a project, folder, or organization, the ancestry path starts from the
|
106
144
|
# asset itself.
|
107
145
|
#
|
108
|
-
#
|
146
|
+
# Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
|
109
147
|
class Asset
|
110
148
|
include ::Google::Protobuf::MessageExts
|
111
149
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -114,27 +152,27 @@ module Google
|
|
114
152
|
# A representation of a Google Cloud resource.
|
115
153
|
# @!attribute [rw] version
|
116
154
|
# @return [::String]
|
117
|
-
# The API version.
|
155
|
+
# The API version. Example: `v1`
|
118
156
|
# @!attribute [rw] discovery_document_uri
|
119
157
|
# @return [::String]
|
120
158
|
# The URL of the discovery document containing the resource's JSON schema.
|
121
|
-
#
|
122
|
-
#
|
159
|
+
# Example:
|
160
|
+
# `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
|
123
161
|
#
|
124
162
|
# This value is unspecified for resources that do not have an API based on a
|
125
163
|
# discovery document, such as Cloud Bigtable.
|
126
164
|
# @!attribute [rw] discovery_name
|
127
165
|
# @return [::String]
|
128
|
-
# The JSON schema name listed in the discovery document.
|
129
|
-
#
|
166
|
+
# The JSON schema name listed in the discovery document. Example:
|
167
|
+
# `Project`
|
130
168
|
#
|
131
169
|
# This value is unspecified for resources that do not have an API based on a
|
132
170
|
# discovery document, such as Cloud Bigtable.
|
133
171
|
# @!attribute [rw] resource_url
|
134
172
|
# @return [::String]
|
135
173
|
# The REST URL for accessing the resource. An HTTP `GET` request using this
|
136
|
-
# URL returns the resource itself.
|
137
|
-
#
|
174
|
+
# URL returns the resource itself. Example:
|
175
|
+
# `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
|
138
176
|
#
|
139
177
|
# This value is unspecified for resources without a REST API.
|
140
178
|
# @!attribute [rw] parent
|
@@ -147,8 +185,8 @@ module Google
|
|
147
185
|
# For Google Cloud assets, this value is the parent resource defined in the
|
148
186
|
# [Cloud IAM policy
|
149
187
|
# hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
|
150
|
-
#
|
151
|
-
#
|
188
|
+
# Example:
|
189
|
+
# `//cloudresourcemanager.googleapis.com/projects/my_project_123`
|
152
190
|
#
|
153
191
|
# For third-party assets, this field may be set differently.
|
154
192
|
# @!attribute [rw] data
|
@@ -168,7 +206,7 @@ module Google
|
|
168
206
|
# @!attribute [rw] name
|
169
207
|
# @return [::String]
|
170
208
|
# The full resource name of this resource. Example:
|
171
|
-
#
|
209
|
+
# `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
|
172
210
|
# See [Cloud Asset Inventory Resource Name
|
173
211
|
# Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
|
174
212
|
# for more information.
|
@@ -179,7 +217,7 @@ module Google
|
|
179
217
|
# * use a free text query. Example: `"instance1"`
|
180
218
|
# @!attribute [rw] asset_type
|
181
219
|
# @return [::String]
|
182
|
-
# The type of this resource. Example:
|
220
|
+
# The type of this resource. Example: `compute.googleapis.com/Disk`.
|
183
221
|
#
|
184
222
|
# To search against the `asset_type`:
|
185
223
|
#
|
@@ -211,8 +249,8 @@ module Google
|
|
211
249
|
# * use a free text query. Example: `"*important instance*"`
|
212
250
|
# @!attribute [rw] location
|
213
251
|
# @return [::String]
|
214
|
-
# Location can be
|
215
|
-
#
|
252
|
+
# Location can be `global`, regional like `us-east1`, or zonal like
|
253
|
+
# `us-west1-b`.
|
216
254
|
#
|
217
255
|
# To search against the `location`:
|
218
256
|
#
|
@@ -245,13 +283,13 @@ module Google
|
|
245
283
|
# @!attribute [rw] additional_attributes
|
246
284
|
# @return [::Google::Protobuf::Struct]
|
247
285
|
# The additional attributes of this resource. The attributes may vary from
|
248
|
-
# one resource type to another. Examples:
|
249
|
-
#
|
286
|
+
# one resource type to another. Examples: `projectId` for Project,
|
287
|
+
# `dnsName` for DNS ManagedZone.
|
250
288
|
#
|
251
289
|
# To search against the `additional_attributes`:
|
252
290
|
#
|
253
291
|
# * use a free text query to match the attributes values. Example: to search
|
254
|
-
# additional_attributes = { dnsName: "foobar" }
|
292
|
+
# `additional_attributes = { dnsName: "foobar" }`, you can issue a query
|
255
293
|
# `"foobar"`.
|
256
294
|
class ResourceSearchResult
|
257
295
|
include ::Google::Protobuf::MessageExts
|
@@ -272,7 +310,7 @@ module Google
|
|
272
310
|
# @return [::String]
|
273
311
|
# The full resource name of the resource associated with this IAM policy.
|
274
312
|
# Example:
|
275
|
-
#
|
313
|
+
# `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
|
276
314
|
# See [Cloud Asset Inventory Resource Name
|
277
315
|
# Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
|
278
316
|
# for more information.
|
@@ -322,7 +360,7 @@ module Google
|
|
322
360
|
# permission query (i.e., a query containing `policy.role.permissions:`).
|
323
361
|
# Example: if query `policy.role.permissions : "compute.disk.get"`
|
324
362
|
# matches a policy binding that contains owner role, the
|
325
|
-
# matched_permissions will be
|
363
|
+
# matched_permissions will be `{"roles/owner": ["compute.disk.get"]}`. The
|
326
364
|
# roles can also be found in the returned `policy` bindings. Note that the
|
327
365
|
# map is populated only for requests with permission queries.
|
328
366
|
class Explanation
|
@@ -332,7 +370,7 @@ module Google
|
|
332
370
|
# IAM permissions
|
333
371
|
# @!attribute [rw] permissions
|
334
372
|
# @return [::Array<::String>]
|
335
|
-
# A list of permissions. A sample permission string:
|
373
|
+
# A list of permissions. A sample permission string: `compute.disk.get`.
|
336
374
|
class Permissions
|
337
375
|
include ::Google::Protobuf::MessageExts
|
338
376
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Protobuf
|
22
|
+
# A Duration represents a signed, fixed-length span of time represented
|
23
|
+
# as a count of seconds and fractions of seconds at nanosecond
|
24
|
+
# resolution. It is independent of any calendar and concepts like "day"
|
25
|
+
# or "month". It is related to Timestamp in that the difference between
|
26
|
+
# two Timestamp values is a Duration and it can be added or subtracted
|
27
|
+
# from a Timestamp. Range is approximately +-10,000 years.
|
28
|
+
#
|
29
|
+
# # Examples
|
30
|
+
#
|
31
|
+
# Example 1: Compute Duration from two Timestamps in pseudo code.
|
32
|
+
#
|
33
|
+
# Timestamp start = ...;
|
34
|
+
# Timestamp end = ...;
|
35
|
+
# Duration duration = ...;
|
36
|
+
#
|
37
|
+
# duration.seconds = end.seconds - start.seconds;
|
38
|
+
# duration.nanos = end.nanos - start.nanos;
|
39
|
+
#
|
40
|
+
# if (duration.seconds < 0 && duration.nanos > 0) {
|
41
|
+
# duration.seconds += 1;
|
42
|
+
# duration.nanos -= 1000000000;
|
43
|
+
# } else if (duration.seconds > 0 && duration.nanos < 0) {
|
44
|
+
# duration.seconds -= 1;
|
45
|
+
# duration.nanos += 1000000000;
|
46
|
+
# }
|
47
|
+
#
|
48
|
+
# Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
49
|
+
#
|
50
|
+
# Timestamp start = ...;
|
51
|
+
# Duration duration = ...;
|
52
|
+
# Timestamp end = ...;
|
53
|
+
#
|
54
|
+
# end.seconds = start.seconds + duration.seconds;
|
55
|
+
# end.nanos = start.nanos + duration.nanos;
|
56
|
+
#
|
57
|
+
# if (end.nanos < 0) {
|
58
|
+
# end.seconds -= 1;
|
59
|
+
# end.nanos += 1000000000;
|
60
|
+
# } else if (end.nanos >= 1000000000) {
|
61
|
+
# end.seconds += 1;
|
62
|
+
# end.nanos -= 1000000000;
|
63
|
+
# }
|
64
|
+
#
|
65
|
+
# Example 3: Compute Duration from datetime.timedelta in Python.
|
66
|
+
#
|
67
|
+
# td = datetime.timedelta(days=3, minutes=10)
|
68
|
+
# duration = Duration()
|
69
|
+
# duration.FromTimedelta(td)
|
70
|
+
#
|
71
|
+
# # JSON Mapping
|
72
|
+
#
|
73
|
+
# In JSON format, the Duration type is encoded as a string rather than an
|
74
|
+
# object, where the string ends in the suffix "s" (indicating seconds) and
|
75
|
+
# is preceded by the number of seconds, with nanoseconds expressed as
|
76
|
+
# fractional seconds. For example, 3 seconds with 0 nanoseconds should be
|
77
|
+
# encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
|
78
|
+
# be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
79
|
+
# microsecond should be expressed in JSON format as "3.000001s".
|
80
|
+
# @!attribute [rw] seconds
|
81
|
+
# @return [::Integer]
|
82
|
+
# Signed seconds of the span of time. Must be from -315,576,000,000
|
83
|
+
# to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
84
|
+
# 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
85
|
+
# @!attribute [rw] nanos
|
86
|
+
# @return [::Integer]
|
87
|
+
# Signed fractions of a second at nanosecond resolution of the span
|
88
|
+
# of time. Durations less than one second are represented with a 0
|
89
|
+
# `seconds` field and a positive or negative `nanos` field. For durations
|
90
|
+
# of one second or more, a non-zero value for the `nanos` field must be
|
91
|
+
# of the same sign as the `seconds` field. Must be from -999,999,999
|
92
|
+
# to +999,999,999 inclusive.
|
93
|
+
class Duration
|
94
|
+
include ::Google::Protobuf::MessageExts
|
95
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,185 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Rpc
|
22
|
+
# The canonical error codes for gRPC APIs.
|
23
|
+
#
|
24
|
+
#
|
25
|
+
# Sometimes multiple error codes may apply. Services should return
|
26
|
+
# the most specific error code that applies. For example, prefer
|
27
|
+
# `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
|
28
|
+
# Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
|
29
|
+
module Code
|
30
|
+
# Not an error; returned on success
|
31
|
+
#
|
32
|
+
# HTTP Mapping: 200 OK
|
33
|
+
OK = 0
|
34
|
+
|
35
|
+
# The operation was cancelled, typically by the caller.
|
36
|
+
#
|
37
|
+
# HTTP Mapping: 499 Client Closed Request
|
38
|
+
CANCELLED = 1
|
39
|
+
|
40
|
+
# Unknown error. For example, this error may be returned when
|
41
|
+
# a `Status` value received from another address space belongs to
|
42
|
+
# an error space that is not known in this address space. Also
|
43
|
+
# errors raised by APIs that do not return enough error information
|
44
|
+
# may be converted to this error.
|
45
|
+
#
|
46
|
+
# HTTP Mapping: 500 Internal Server Error
|
47
|
+
UNKNOWN = 2
|
48
|
+
|
49
|
+
# The client specified an invalid argument. Note that this differs
|
50
|
+
# from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
|
51
|
+
# that are problematic regardless of the state of the system
|
52
|
+
# (e.g., a malformed file name).
|
53
|
+
#
|
54
|
+
# HTTP Mapping: 400 Bad Request
|
55
|
+
INVALID_ARGUMENT = 3
|
56
|
+
|
57
|
+
# The deadline expired before the operation could complete. For operations
|
58
|
+
# that change the state of the system, this error may be returned
|
59
|
+
# even if the operation has completed successfully. For example, a
|
60
|
+
# successful response from a server could have been delayed long
|
61
|
+
# enough for the deadline to expire.
|
62
|
+
#
|
63
|
+
# HTTP Mapping: 504 Gateway Timeout
|
64
|
+
DEADLINE_EXCEEDED = 4
|
65
|
+
|
66
|
+
# Some requested entity (e.g., file or directory) was not found.
|
67
|
+
#
|
68
|
+
# Note to server developers: if a request is denied for an entire class
|
69
|
+
# of users, such as gradual feature rollout or undocumented whitelist,
|
70
|
+
# `NOT_FOUND` may be used. If a request is denied for some users within
|
71
|
+
# a class of users, such as user-based access control, `PERMISSION_DENIED`
|
72
|
+
# must be used.
|
73
|
+
#
|
74
|
+
# HTTP Mapping: 404 Not Found
|
75
|
+
NOT_FOUND = 5
|
76
|
+
|
77
|
+
# The entity that a client attempted to create (e.g., file or directory)
|
78
|
+
# already exists.
|
79
|
+
#
|
80
|
+
# HTTP Mapping: 409 Conflict
|
81
|
+
ALREADY_EXISTS = 6
|
82
|
+
|
83
|
+
# The caller does not have permission to execute the specified
|
84
|
+
# operation. `PERMISSION_DENIED` must not be used for rejections
|
85
|
+
# caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
|
86
|
+
# instead for those errors). `PERMISSION_DENIED` must not be
|
87
|
+
# used if the caller can not be identified (use `UNAUTHENTICATED`
|
88
|
+
# instead for those errors). This error code does not imply the
|
89
|
+
# request is valid or the requested entity exists or satisfies
|
90
|
+
# other pre-conditions.
|
91
|
+
#
|
92
|
+
# HTTP Mapping: 403 Forbidden
|
93
|
+
PERMISSION_DENIED = 7
|
94
|
+
|
95
|
+
# The request does not have valid authentication credentials for the
|
96
|
+
# operation.
|
97
|
+
#
|
98
|
+
# HTTP Mapping: 401 Unauthorized
|
99
|
+
UNAUTHENTICATED = 16
|
100
|
+
|
101
|
+
# Some resource has been exhausted, perhaps a per-user quota, or
|
102
|
+
# perhaps the entire file system is out of space.
|
103
|
+
#
|
104
|
+
# HTTP Mapping: 429 Too Many Requests
|
105
|
+
RESOURCE_EXHAUSTED = 8
|
106
|
+
|
107
|
+
# The operation was rejected because the system is not in a state
|
108
|
+
# required for the operation's execution. For example, the directory
|
109
|
+
# to be deleted is non-empty, an rmdir operation is applied to
|
110
|
+
# a non-directory, etc.
|
111
|
+
#
|
112
|
+
# Service implementors can use the following guidelines to decide
|
113
|
+
# between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
|
114
|
+
# (a) Use `UNAVAILABLE` if the client can retry just the failing call.
|
115
|
+
# (b) Use `ABORTED` if the client should retry at a higher level
|
116
|
+
# (e.g., when a client-specified test-and-set fails, indicating the
|
117
|
+
# client should restart a read-modify-write sequence).
|
118
|
+
# (c) Use `FAILED_PRECONDITION` if the client should not retry until
|
119
|
+
# the system state has been explicitly fixed. E.g., if an "rmdir"
|
120
|
+
# fails because the directory is non-empty, `FAILED_PRECONDITION`
|
121
|
+
# should be returned since the client should not retry unless
|
122
|
+
# the files are deleted from the directory.
|
123
|
+
#
|
124
|
+
# HTTP Mapping: 400 Bad Request
|
125
|
+
FAILED_PRECONDITION = 9
|
126
|
+
|
127
|
+
# The operation was aborted, typically due to a concurrency issue such as
|
128
|
+
# a sequencer check failure or transaction abort.
|
129
|
+
#
|
130
|
+
# See the guidelines above for deciding between `FAILED_PRECONDITION`,
|
131
|
+
# `ABORTED`, and `UNAVAILABLE`.
|
132
|
+
#
|
133
|
+
# HTTP Mapping: 409 Conflict
|
134
|
+
ABORTED = 10
|
135
|
+
|
136
|
+
# The operation was attempted past the valid range. E.g., seeking or
|
137
|
+
# reading past end-of-file.
|
138
|
+
#
|
139
|
+
# Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
|
140
|
+
# be fixed if the system state changes. For example, a 32-bit file
|
141
|
+
# system will generate `INVALID_ARGUMENT` if asked to read at an
|
142
|
+
# offset that is not in the range [0,2^32-1], but it will generate
|
143
|
+
# `OUT_OF_RANGE` if asked to read from an offset past the current
|
144
|
+
# file size.
|
145
|
+
#
|
146
|
+
# There is a fair bit of overlap between `FAILED_PRECONDITION` and
|
147
|
+
# `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
|
148
|
+
# error) when it applies so that callers who are iterating through
|
149
|
+
# a space can easily look for an `OUT_OF_RANGE` error to detect when
|
150
|
+
# they are done.
|
151
|
+
#
|
152
|
+
# HTTP Mapping: 400 Bad Request
|
153
|
+
OUT_OF_RANGE = 11
|
154
|
+
|
155
|
+
# The operation is not implemented or is not supported/enabled in this
|
156
|
+
# service.
|
157
|
+
#
|
158
|
+
# HTTP Mapping: 501 Not Implemented
|
159
|
+
UNIMPLEMENTED = 12
|
160
|
+
|
161
|
+
# Internal errors. This means that some invariants expected by the
|
162
|
+
# underlying system have been broken. This error code is reserved
|
163
|
+
# for serious errors.
|
164
|
+
#
|
165
|
+
# HTTP Mapping: 500 Internal Server Error
|
166
|
+
INTERNAL = 13
|
167
|
+
|
168
|
+
# The service is currently unavailable. This is most likely a
|
169
|
+
# transient condition, which can be corrected by retrying with
|
170
|
+
# a backoff. Note that it is not always safe to retry
|
171
|
+
# non-idempotent operations.
|
172
|
+
#
|
173
|
+
# See the guidelines above for deciding between `FAILED_PRECONDITION`,
|
174
|
+
# `ABORTED`, and `UNAVAILABLE`.
|
175
|
+
#
|
176
|
+
# HTTP Mapping: 503 Service Unavailable
|
177
|
+
UNAVAILABLE = 14
|
178
|
+
|
179
|
+
# Unrecoverable data loss or corruption.
|
180
|
+
#
|
181
|
+
# HTTP Mapping: 500 Internal Server Error
|
182
|
+
DATA_LOSS = 15
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
@@ -28,7 +28,7 @@ module Google
|
|
28
28
|
# [API Design Guide](https://cloud.google.com/apis/design/errors).
|
29
29
|
# @!attribute [rw] code
|
30
30
|
# @return [::Integer]
|
31
|
-
# The status code, which should be an enum value of
|
31
|
+
# The status code, which should be an enum value of {::Google::Rpc::Code google.rpc.Code}.
|
32
32
|
# @!attribute [rw] message
|
33
33
|
# @return [::String]
|
34
34
|
# A developer-facing error message, which should be in English. Any
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-asset-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.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: 2020-
|
11
|
+
date: 2020-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.3'
|
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: '0.
|
26
|
+
version: '0.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: google-cloud-errors
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -193,7 +193,6 @@ files:
|
|
193
193
|
- lib/google/cloud/asset/v1/asset_service_services_pb.rb
|
194
194
|
- lib/google/cloud/asset/v1/assets_pb.rb
|
195
195
|
- lib/google/cloud/asset/v1/version.rb
|
196
|
-
- lib/google/cloud/common_resources_pb.rb
|
197
196
|
- lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb
|
198
197
|
- lib/google/identity/accesscontextmanager/type/device_resources_pb.rb
|
199
198
|
- lib/google/identity/accesscontextmanager/v1/access_level_pb.rb
|
@@ -212,10 +211,12 @@ files:
|
|
212
211
|
- proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb
|
213
212
|
- proto_docs/google/longrunning/operations.rb
|
214
213
|
- proto_docs/google/protobuf/any.rb
|
214
|
+
- proto_docs/google/protobuf/duration.rb
|
215
215
|
- proto_docs/google/protobuf/empty.rb
|
216
216
|
- proto_docs/google/protobuf/field_mask.rb
|
217
217
|
- proto_docs/google/protobuf/struct.rb
|
218
218
|
- proto_docs/google/protobuf/timestamp.rb
|
219
|
+
- proto_docs/google/rpc/code.rb
|
219
220
|
- proto_docs/google/rpc/status.rb
|
220
221
|
- proto_docs/google/type/expr.rb
|
221
222
|
homepage: https://github.com/googleapis/google-cloud-ruby
|
@@ -237,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
238
|
- !ruby/object:Gem::Version
|
238
239
|
version: '0'
|
239
240
|
requirements: []
|
240
|
-
rubygems_version: 3.
|
241
|
+
rubygems_version: 3.1.3
|
241
242
|
signing_key:
|
242
243
|
specification_version: 4
|
243
244
|
summary: API Client library for the Cloud Asset V1 API
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# source: google/cloud/common_resources.proto
|
3
|
-
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
|
-
require 'google/api/resource_pb'
|
7
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
-
add_file("google/cloud/common_resources.proto", :syntax => :proto3) do
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
module Google
|
13
|
-
module Cloud
|
14
|
-
end
|
15
|
-
end
|