google-cloud-asset-v1 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f46ad7edc434252f8c8dee87bfba260b8aa24346e300cf6ab7d442e81c89c3e1
4
- data.tar.gz: 56d5a1b6d03b3b5a8ec8448266abd000d76dc0e06245b6590a7f2739e32852f7
3
+ metadata.gz: 3dfb61d335222011eb319476e5f7ebc66d737ed5b5344b5db618247eeeb582c5
4
+ data.tar.gz: 14fd0db29853d3d81b4ce7093eab112ec73e59e8cf1a1a62113c4b897525c874
5
5
  SHA512:
6
- metadata.gz: f12603eeb775698889082767fec48569b8a072e9029a42f9f4399e50148d9e322fb608fa2a13c8236980aae9249b63c011f7146aa7fa856a2a249a00bd435cf0
7
- data.tar.gz: 433f992728d70ada4cce95693659300799287c9482be3d481ab9e9ea02fc8c712b0e4acc4a1be603272ae1a9c9634d5a1134204591e3644fb0249faf7e949b55
6
+ metadata.gz: 13b021e3db5800d776932c101235106596c33a2af3cee87ce69a1eaa384e34816439cebfb16b87fa0420028799d22ff291de97ea0e0fc9edb6ed576862e779e9
7
+ data.tar.gz: 45c5ff63879d978b1e7f44b9b3c2a88c3aa6aaf52be333abf5a8f09519a889617a05e9c0e3c9b01f230df0b46d2acb45ec0352fe980759077dba93071048d0bc
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.
@@ -184,10 +184,16 @@ module Google
184
184
 
185
185
  ##
186
186
  # Exports assets with time and resource types to a given Cloud Storage
187
- # location. The output format is newline-delimited JSON.
188
- # This API implements the
189
- # {::Google::Longrunning::Operation google.longrunning.Operation} API allowing
190
- # you to keep track of the export.
187
+ # location/BigQuery table. For Cloud Storage location destinations, the
188
+ # output format is newline-delimited JSON. Each line represents a
189
+ # {::Google::Cloud::Asset::V1::Asset google.cloud.asset.v1.Asset} in the JSON
190
+ # format; for BigQuery table destinations, the output table stores the fields
191
+ # in asset proto as columns. This API implements the
192
+ # {::Google::Longrunning::Operation google.longrunning.Operation} API , which
193
+ # allows you to keep track of the export. We recommend intervals of at least
194
+ # 2 seconds with exponential retry to poll the export operation result. For
195
+ # regular-size resource parent, the export operation usually finishes within
196
+ # 5 minutes.
191
197
  #
192
198
  # @overload export_assets(request, options = nil)
193
199
  # Pass arguments to `export_assets` via a request object, either of type
@@ -216,7 +222,7 @@ module Google
216
222
  # data collection and indexing, there is a volatile window during which
217
223
  # running the same query may get different results.
218
224
  # @param asset_types [::Array<::String>]
219
- # A list of asset types of which to take a snapshot for. For example:
225
+ # A list of asset types of which to take a snapshot for. Example:
220
226
  # "compute.googleapis.com/Disk". If specified, only matching assets will be
221
227
  # returned. See [Introduction to Cloud Asset
222
228
  # Inventory](https://cloud.google.com/asset-inventory/docs/overview)
@@ -226,7 +232,7 @@ module Google
226
232
  # returned.
227
233
  # @param output_config [::Google::Cloud::Asset::V1::OutputConfig, ::Hash]
228
234
  # Required. Output configuration indicating where the results will be output
229
- # to. All results will be in newline delimited JSON format.
235
+ # to.
230
236
  #
231
237
  # @yield [response, operation] Access the result along with the RPC operation
232
238
  # @yieldparam response [::Gapic::Operation]
@@ -276,10 +282,10 @@ module Google
276
282
 
277
283
  ##
278
284
  # 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
285
  # For IAM_POLICY content, this API outputs history when the asset and its
282
286
  # attached IAM POLICY both exist. This can create gaps in the output history.
287
+ # Otherwise, this API outputs history with asset in both non-delete or
288
+ # deleted status.
283
289
  # If a specified asset does not exist, this API returns an INVALID_ARGUMENT
284
290
  # error.
285
291
  #
@@ -303,13 +309,11 @@ module Google
303
309
  # organization number (such as "organizations/123"), a project ID (such as
304
310
  # "projects/my-project-id")", or a project number (such as "projects/12345").
305
311
  # @param asset_names [::Array<::String>]
306
- # A list of the full names of the assets. For example:
312
+ # A list of the full names of the assets.
313
+ # See: https://cloud.google.com/asset-inventory/docs/resource-name-format
314
+ # Example:
315
+ #
307
316
  # `//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
317
  #
314
318
  # The request becomes a no-op if the asset name list is empty, and the max
315
319
  # size of the asset name list is 100 in one request.
@@ -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. The output format is newline-delimited JSON.
38
- # This API implements the
39
- # [google.longrunning.Operation][google.longrunning.Operation] API allowing
40
- # you to keep track of the export.
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
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Asset
23
23
  module V1
24
- VERSION = "0.4.3"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -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. For example:
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. All results will be in newline delimited JSON format.
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. For example:
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. The resource/iam_policy field is converted
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. For example: "gs://bucket_name/object_name". See [Viewing and
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. For example:
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. For example:
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
- # For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
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 and asset_types are exported to the feed. For
301
- # example:
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 and asset_types are exported to the feed.
311
- # For example: `"compute.googleapis.com/Disk"`
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,9 +32,34 @@ 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
65
  # A time window specified by its `start_time` and `end_time`.
@@ -54,10 +79,17 @@ 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. For example:
92
+ # The full name of the asset. Example:
61
93
  # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
62
94
  #
63
95
  # See [Resource
@@ -65,7 +97,7 @@ module Google
65
97
  # for more information.
66
98
  # @!attribute [rw] asset_type
67
99
  # @return [::String]
68
- # The type of the asset. For example: `compute.googleapis.com/Disk`
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
- # For example: `["projects/123456789", "folders/5432", "organizations/1234"]`
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,18 +152,18 @@ module Google
114
152
  # A representation of a Google Cloud resource.
115
153
  # @!attribute [rw] version
116
154
  # @return [::String]
117
- # The API version. For example: `v1`
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
- # For example:
159
+ # Example:
122
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. For example:
166
+ # The JSON schema name listed in the discovery document. Example:
129
167
  # `Project`
130
168
  #
131
169
  # This value is unspecified for resources that do not have an API based on a
@@ -133,7 +171,7 @@ module Google
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. For example:
174
+ # URL returns the resource itself. Example:
137
175
  # `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
138
176
  #
139
177
  # This value is unspecified for resources without a REST API.
@@ -147,7 +185,7 @@ 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
- # For example:
188
+ # Example:
151
189
  # `//cloudresourcemanager.googleapis.com/projects/my_project_123`
152
190
  #
153
191
  # For third-party assets, this field may be set differently.
@@ -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 [google.rpc.Code][google.rpc.Code].
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.3
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-06 00:00:00.000000000 Z
11
+ date: 2020-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -211,10 +211,12 @@ files:
211
211
  - proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb
212
212
  - proto_docs/google/longrunning/operations.rb
213
213
  - proto_docs/google/protobuf/any.rb
214
+ - proto_docs/google/protobuf/duration.rb
214
215
  - proto_docs/google/protobuf/empty.rb
215
216
  - proto_docs/google/protobuf/field_mask.rb
216
217
  - proto_docs/google/protobuf/struct.rb
217
218
  - proto_docs/google/protobuf/timestamp.rb
219
+ - proto_docs/google/rpc/code.rb
218
220
  - proto_docs/google/rpc/status.rb
219
221
  - proto_docs/google/type/expr.rb
220
222
  homepage: https://github.com/googleapis/google-cloud-ruby