google-cloud-asset-v1 0.2.1 → 0.4.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/AUTHENTICATION.md +6 -6
- data/README.md +1 -1
- data/lib/google/cloud/asset/v1.rb +1 -1
- data/lib/google/cloud/asset/v1/asset_service.rb +1 -1
- data/lib/google/cloud/asset/v1/asset_service/client.rb +456 -169
- data/lib/google/cloud/asset/v1/asset_service/credentials.rb +1 -1
- data/lib/google/cloud/asset/v1/asset_service/operations.rb +108 -102
- data/lib/google/cloud/asset/v1/asset_service/paths.rb +5 -5
- data/lib/google/cloud/asset/v1/asset_service_pb.rb +26 -0
- data/lib/google/cloud/asset/v1/asset_service_services_pb.rb +13 -2
- data/lib/google/cloud/asset/v1/assets_pb.rb +29 -1
- data/lib/google/cloud/asset/v1/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/asset/v1/asset_service.rb +235 -74
- data/proto_docs/google/cloud/asset/v1/assets.rb +217 -28
- data/proto_docs/google/cloud/orgpolicy/v1/orgpolicy.rb +21 -21
- data/proto_docs/google/iam/v1/policy.rb +26 -26
- data/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb +37 -37
- data/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb +8 -8
- data/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb +21 -21
- data/proto_docs/google/longrunning/operations.rb +30 -30
- data/proto_docs/google/protobuf/any.rb +4 -4
- data/proto_docs/google/protobuf/empty.rb +2 -2
- data/proto_docs/google/protobuf/field_mask.rb +3 -3
- data/proto_docs/google/protobuf/struct.rb +18 -18
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- data/proto_docs/google/rpc/status.rb +6 -6
- data/proto_docs/google/type/expr.rb +6 -6
- metadata +32 -5
- 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: 4cd675722292c39ebd65ef783e6c66b16e1da00d186e2cdc38075353a4cb2040
|
|
4
|
+
data.tar.gz: d3799a1c1f4c8cdddbd754b0b0d57937b389e8cf94a8965bb65772f84295ce1b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe1e023fe812625b51f399ffffd5fc4f0004caea5fb6f84bd56c367053678efd17f4131e7a93511a18ff1e680dd78f71fabf300e6a0c50c0a765eda0de7b6f51
|
|
7
|
+
data.tar.gz: af1344a7910432823015326c3b72a143280523bd3e2ef53d02f5c5408e6474c3f50e61573ccea3f38cdbefcdd396113500a1dd27e1d7f3da8151d268f2d54807
|
data/AUTHENTICATION.md
CHANGED
|
@@ -27,7 +27,7 @@ export ASSET_CREDENTIALS=path/to/keyfile.json
|
|
|
27
27
|
```ruby
|
|
28
28
|
require "google/cloud/asset/v1"
|
|
29
29
|
|
|
30
|
-
client = Google::Cloud::Asset::V1::AssetService::Client.new
|
|
30
|
+
client = ::Google::Cloud::Asset::V1::AssetService::Client.new
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
## Credential Lookup
|
|
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
|
|
|
64
64
|
|
|
65
65
|
The environment variables that google-cloud-asset-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
|
67
|
-
{Google::Cloud::Asset::V1::AssetService::Credentials}):
|
|
67
|
+
{::Google::Cloud::Asset::V1::AssetService::Credentials}):
|
|
68
68
|
|
|
69
69
|
1. `ASSET_CREDENTIALS` - Path to JSON file, or JSON contents
|
|
70
70
|
2. `ASSET_KEYFILE` - Path to JSON file, or JSON contents
|
|
@@ -77,7 +77,7 @@ require "google/cloud/asset/v1"
|
|
|
77
77
|
|
|
78
78
|
ENV["ASSET_CREDENTIALS"] = "path/to/keyfile.json"
|
|
79
79
|
|
|
80
|
-
client = Google::Cloud::Asset::V1::AssetService::Client.new
|
|
80
|
+
client = ::Google::Cloud::Asset::V1::AssetService::Client.new
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
### Configuration
|
|
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
|
|
|
88
88
|
```ruby
|
|
89
89
|
require "google/cloud/asset/v1"
|
|
90
90
|
|
|
91
|
-
client = Google::Cloud::Asset::V1::AssetService::Client.new do |config|
|
|
91
|
+
client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config|
|
|
92
92
|
config.credentials = "path/to/keyfile.json"
|
|
93
93
|
end
|
|
94
94
|
```
|
|
@@ -98,11 +98,11 @@ Or configured globally for all clients:
|
|
|
98
98
|
```ruby
|
|
99
99
|
require "google/cloud/asset/v1"
|
|
100
100
|
|
|
101
|
-
Google::Cloud::Asset::V1::AssetService::Client.configure do |config|
|
|
101
|
+
::Google::Cloud::Asset::V1::AssetService::Client.configure do |config|
|
|
102
102
|
config.credentials = "path/to/keyfile.json"
|
|
103
103
|
end
|
|
104
104
|
|
|
105
|
-
client = Google::Cloud::Asset::V1::AssetService::Client.new
|
|
105
|
+
client = ::Google::Cloud::Asset::V1::AssetService::Client.new
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
### Cloud SDK
|
data/README.md
CHANGED
|
@@ -25,7 +25,7 @@ In order to use this library, you first need to go through the following steps:
|
|
|
25
25
|
```ruby
|
|
26
26
|
require "google/cloud/asset/v1"
|
|
27
27
|
|
|
28
|
-
client = Google::Cloud::Asset::V1::AssetService::Client.new
|
|
28
|
+
client = ::Google::Cloud::Asset::V1::AssetService::Client.new
|
|
29
29
|
request = my_create_request
|
|
30
30
|
response = client.export_assets request
|
|
31
31
|
```
|
|
@@ -26,7 +26,7 @@ module Google
|
|
|
26
26
|
# To load this package, including all its services, and instantiate a client:
|
|
27
27
|
#
|
|
28
28
|
# require "google/cloud/asset/v1"
|
|
29
|
-
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
|
29
|
+
# client = ::Google::Cloud::Asset::V1::AssetService::Client.new
|
|
30
30
|
#
|
|
31
31
|
module V1
|
|
32
32
|
end
|
|
@@ -37,7 +37,7 @@ module Google
|
|
|
37
37
|
# To load this service and instantiate a client:
|
|
38
38
|
#
|
|
39
39
|
# require "google/cloud/asset/v1/asset_service"
|
|
40
|
-
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
|
40
|
+
# client = ::Google::Cloud::Asset::V1::AssetService::Client.new
|
|
41
41
|
#
|
|
42
42
|
module AssetService
|
|
43
43
|
end
|
|
@@ -38,15 +38,15 @@ module Google
|
|
|
38
38
|
##
|
|
39
39
|
# Configure the AssetService Client class.
|
|
40
40
|
#
|
|
41
|
-
# See {Google::Cloud::Asset::V1::AssetService::Client::Configuration}
|
|
41
|
+
# See {::Google::Cloud::Asset::V1::AssetService::Client::Configuration}
|
|
42
42
|
# for a description of the configuration fields.
|
|
43
43
|
#
|
|
44
44
|
# ## Example
|
|
45
45
|
#
|
|
46
46
|
# To modify the configuration for all AssetService clients:
|
|
47
47
|
#
|
|
48
|
-
# Google::Cloud::Asset::V1::AssetService::Client.configure do |config|
|
|
49
|
-
# config.timeout =
|
|
48
|
+
# ::Google::Cloud::Asset::V1::AssetService::Client.configure do |config|
|
|
49
|
+
# config.timeout = 10.0
|
|
50
50
|
# end
|
|
51
51
|
#
|
|
52
52
|
# @yield [config] Configure the Client client.
|
|
@@ -75,6 +75,22 @@ module Google
|
|
|
75
75
|
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
default_config.rpcs.search_all_resources.timeout = 15.0
|
|
79
|
+
default_config.rpcs.search_all_resources.retry_policy = {
|
|
80
|
+
initial_delay: 0.1,
|
|
81
|
+
max_delay: 60.0,
|
|
82
|
+
multiplier: 1.3,
|
|
83
|
+
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
default_config.rpcs.search_all_iam_policies.timeout = 15.0
|
|
87
|
+
default_config.rpcs.search_all_iam_policies.retry_policy = {
|
|
88
|
+
initial_delay: 0.1,
|
|
89
|
+
max_delay: 60.0,
|
|
90
|
+
multiplier: 1.3,
|
|
91
|
+
retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
|
|
92
|
+
}
|
|
93
|
+
|
|
78
94
|
default_config
|
|
79
95
|
end
|
|
80
96
|
yield @configure if block_given?
|
|
@@ -88,7 +104,7 @@ module Google
|
|
|
88
104
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
89
105
|
# should be made on {Client.configure}.
|
|
90
106
|
#
|
|
91
|
-
# See {Google::Cloud::Asset::V1::AssetService::Client::Configuration}
|
|
107
|
+
# See {::Google::Cloud::Asset::V1::AssetService::Client::Configuration}
|
|
92
108
|
# for a description of the configuration fields.
|
|
93
109
|
#
|
|
94
110
|
# @yield [config] Configure the Client client.
|
|
@@ -109,13 +125,13 @@ module Google
|
|
|
109
125
|
# To create a new AssetService client with the default
|
|
110
126
|
# configuration:
|
|
111
127
|
#
|
|
112
|
-
# client = Google::Cloud::Asset::V1::AssetService::Client.new
|
|
128
|
+
# client = ::Google::Cloud::Asset::V1::AssetService::Client.new
|
|
113
129
|
#
|
|
114
130
|
# To create a new AssetService client with a custom
|
|
115
131
|
# configuration:
|
|
116
132
|
#
|
|
117
|
-
# client = Google::Cloud::Asset::V1::AssetService::Client.new do |config|
|
|
118
|
-
# config.timeout =
|
|
133
|
+
# client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config|
|
|
134
|
+
# config.timeout = 10.0
|
|
119
135
|
# end
|
|
120
136
|
#
|
|
121
137
|
# @yield [config] Configure the AssetService client.
|
|
@@ -140,14 +156,16 @@ module Google
|
|
|
140
156
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
|
141
157
|
credentials = Credentials.new credentials, scope: @config.scope
|
|
142
158
|
end
|
|
143
|
-
@quota_project_id =
|
|
159
|
+
@quota_project_id = @config.quota_project
|
|
160
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
144
161
|
|
|
145
162
|
@operations_client = Operations.new do |config|
|
|
146
163
|
config.credentials = credentials
|
|
164
|
+
config.endpoint = @config.endpoint
|
|
147
165
|
end
|
|
148
166
|
|
|
149
|
-
@asset_service_stub = Gapic::ServiceStub.new(
|
|
150
|
-
Google::Cloud::Asset::V1::AssetService::Stub,
|
|
167
|
+
@asset_service_stub = ::Gapic::ServiceStub.new(
|
|
168
|
+
::Google::Cloud::Asset::V1::AssetService::Stub,
|
|
151
169
|
credentials: credentials,
|
|
152
170
|
endpoint: @config.endpoint,
|
|
153
171
|
channel_args: @config.channel_args,
|
|
@@ -155,22 +173,30 @@ module Google
|
|
|
155
173
|
)
|
|
156
174
|
end
|
|
157
175
|
|
|
176
|
+
##
|
|
177
|
+
# Get the associated client for long-running operations.
|
|
178
|
+
#
|
|
179
|
+
# @return [::Google::Cloud::Asset::V1::AssetService::Operations]
|
|
180
|
+
#
|
|
181
|
+
attr_reader :operations_client
|
|
182
|
+
|
|
158
183
|
# Service calls
|
|
159
184
|
|
|
160
185
|
##
|
|
161
186
|
# Exports assets with time and resource types to a given Cloud Storage
|
|
162
187
|
# location. The output format is newline-delimited JSON.
|
|
163
|
-
# This API implements the
|
|
164
|
-
#
|
|
188
|
+
# This API implements the
|
|
189
|
+
# {::Google::Longrunning::Operation google.longrunning.Operation} API allowing
|
|
190
|
+
# you to keep track of the export.
|
|
165
191
|
#
|
|
166
192
|
# @overload export_assets(request, options = nil)
|
|
167
193
|
# Pass arguments to `export_assets` via a request object, either of type
|
|
168
|
-
# {Google::Cloud::Asset::V1::ExportAssetsRequest} or an equivalent Hash.
|
|
194
|
+
# {::Google::Cloud::Asset::V1::ExportAssetsRequest} or an equivalent Hash.
|
|
169
195
|
#
|
|
170
|
-
# @param request [Google::Cloud::Asset::V1::ExportAssetsRequest, Hash]
|
|
196
|
+
# @param request [::Google::Cloud::Asset::V1::ExportAssetsRequest, ::Hash]
|
|
171
197
|
# A request object representing the call parameters. Required. To specify no
|
|
172
198
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
173
|
-
# @param options [Gapic::CallOptions, Hash]
|
|
199
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
174
200
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
175
201
|
#
|
|
176
202
|
# @overload export_assets(parent: nil, read_time: nil, asset_types: nil, content_type: nil, output_config: nil)
|
|
@@ -178,51 +204,51 @@ module Google
|
|
|
178
204
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
179
205
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
180
206
|
#
|
|
181
|
-
# @param parent [String]
|
|
207
|
+
# @param parent [::String]
|
|
182
208
|
# Required. The relative name of the root asset. This can only be an
|
|
183
209
|
# organization number (such as "organizations/123"), a project ID (such as
|
|
184
210
|
# "projects/my-project-id"), or a project number (such as "projects/12345"),
|
|
185
211
|
# or a folder number (such as "folders/123").
|
|
186
|
-
# @param read_time [Google::Protobuf::Timestamp, Hash]
|
|
212
|
+
# @param read_time [::Google::Protobuf::Timestamp, ::Hash]
|
|
187
213
|
# Timestamp to take an asset snapshot. This can only be set to a timestamp
|
|
188
214
|
# between the current time and the current time minus 35 days (inclusive).
|
|
189
215
|
# If not specified, the current time will be used. Due to delays in resource
|
|
190
216
|
# data collection and indexing, there is a volatile window during which
|
|
191
217
|
# running the same query may get different results.
|
|
192
|
-
# @param asset_types [Array
|
|
218
|
+
# @param asset_types [::Array<::String>]
|
|
193
219
|
# A list of asset types of which to take a snapshot for. For example:
|
|
194
220
|
# "compute.googleapis.com/Disk". If specified, only matching assets will be
|
|
195
221
|
# returned. See [Introduction to Cloud Asset
|
|
196
222
|
# Inventory](https://cloud.google.com/asset-inventory/docs/overview)
|
|
197
223
|
# for all supported asset types.
|
|
198
|
-
# @param content_type [Google::Cloud::Asset::V1::ContentType]
|
|
224
|
+
# @param content_type [::Google::Cloud::Asset::V1::ContentType]
|
|
199
225
|
# Asset content type. If not specified, no content but the asset name will be
|
|
200
226
|
# returned.
|
|
201
|
-
# @param output_config [Google::Cloud::Asset::V1::OutputConfig, Hash]
|
|
227
|
+
# @param output_config [::Google::Cloud::Asset::V1::OutputConfig, ::Hash]
|
|
202
228
|
# Required. Output configuration indicating where the results will be output
|
|
203
229
|
# to. All results will be in newline delimited JSON format.
|
|
204
230
|
#
|
|
205
231
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
206
|
-
# @yieldparam response [Gapic::Operation]
|
|
207
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
|
232
|
+
# @yieldparam response [::Gapic::Operation]
|
|
233
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
208
234
|
#
|
|
209
|
-
# @return [Gapic::Operation]
|
|
235
|
+
# @return [::Gapic::Operation]
|
|
210
236
|
#
|
|
211
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
|
237
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
212
238
|
#
|
|
213
239
|
def export_assets request, options = nil
|
|
214
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
|
240
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
215
241
|
|
|
216
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::ExportAssetsRequest
|
|
242
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ExportAssetsRequest
|
|
217
243
|
|
|
218
244
|
# Converts hash and nil to an options object
|
|
219
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
245
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
220
246
|
|
|
221
247
|
# Customize the options with defaults
|
|
222
248
|
metadata = @config.rpcs.export_assets.metadata.to_h
|
|
223
249
|
|
|
224
250
|
# Set x-goog-api-client and x-goog-user-project headers
|
|
225
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
|
251
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
226
252
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
227
253
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
|
228
254
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
@@ -240,12 +266,12 @@ module Google
|
|
|
240
266
|
retry_policy: @config.retry_policy
|
|
241
267
|
|
|
242
268
|
@asset_service_stub.call_rpc :export_assets, request, options: options do |response, operation|
|
|
243
|
-
response = Gapic::Operation.new response, @operations_client, options: options
|
|
269
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
244
270
|
yield response, operation if block_given?
|
|
245
271
|
return response
|
|
246
272
|
end
|
|
247
|
-
rescue GRPC::BadStatus => e
|
|
248
|
-
raise Google::Cloud::Error.from_error(e)
|
|
273
|
+
rescue ::GRPC::BadStatus => e
|
|
274
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
249
275
|
end
|
|
250
276
|
|
|
251
277
|
##
|
|
@@ -259,12 +285,12 @@ module Google
|
|
|
259
285
|
#
|
|
260
286
|
# @overload batch_get_assets_history(request, options = nil)
|
|
261
287
|
# Pass arguments to `batch_get_assets_history` via a request object, either of type
|
|
262
|
-
# {Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest} or an equivalent Hash.
|
|
288
|
+
# {::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest} or an equivalent Hash.
|
|
263
289
|
#
|
|
264
|
-
# @param request [Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, Hash]
|
|
290
|
+
# @param request [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest, ::Hash]
|
|
265
291
|
# A request object representing the call parameters. Required. To specify no
|
|
266
292
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
267
|
-
# @param options [Gapic::CallOptions, Hash]
|
|
293
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
268
294
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
269
295
|
#
|
|
270
296
|
# @overload batch_get_assets_history(parent: nil, asset_names: nil, content_type: nil, read_time_window: nil)
|
|
@@ -272,11 +298,11 @@ module Google
|
|
|
272
298
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
273
299
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
274
300
|
#
|
|
275
|
-
# @param parent [String]
|
|
301
|
+
# @param parent [::String]
|
|
276
302
|
# Required. The relative name of the root asset. It can only be an
|
|
277
303
|
# organization number (such as "organizations/123"), a project ID (such as
|
|
278
304
|
# "projects/my-project-id")", or a project number (such as "projects/12345").
|
|
279
|
-
# @param asset_names [Array
|
|
305
|
+
# @param asset_names [::Array<::String>]
|
|
280
306
|
# A list of the full names of the assets. For example:
|
|
281
307
|
# `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
|
|
282
308
|
# See [Resource
|
|
@@ -287,9 +313,9 @@ module Google
|
|
|
287
313
|
#
|
|
288
314
|
# The request becomes a no-op if the asset name list is empty, and the max
|
|
289
315
|
# size of the asset name list is 100 in one request.
|
|
290
|
-
# @param content_type [Google::Cloud::Asset::V1::ContentType]
|
|
316
|
+
# @param content_type [::Google::Cloud::Asset::V1::ContentType]
|
|
291
317
|
# Optional. The content type.
|
|
292
|
-
# @param read_time_window [Google::Cloud::Asset::V1::TimeWindow, Hash]
|
|
318
|
+
# @param read_time_window [::Google::Cloud::Asset::V1::TimeWindow, ::Hash]
|
|
293
319
|
# Optional. The time window for the asset history. Both start_time and
|
|
294
320
|
# end_time are optional and if set, it must be after the current time minus
|
|
295
321
|
# 35 days. If end_time is not set, it is default to current timestamp.
|
|
@@ -298,26 +324,26 @@ module Google
|
|
|
298
324
|
# window overlap with read_time_window.
|
|
299
325
|
#
|
|
300
326
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
301
|
-
# @yieldparam response [Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse]
|
|
302
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
|
327
|
+
# @yieldparam response [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse]
|
|
328
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
303
329
|
#
|
|
304
|
-
# @return [Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse]
|
|
330
|
+
# @return [::Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse]
|
|
305
331
|
#
|
|
306
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
|
332
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
307
333
|
#
|
|
308
334
|
def batch_get_assets_history request, options = nil
|
|
309
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
|
335
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
310
336
|
|
|
311
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest
|
|
337
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest
|
|
312
338
|
|
|
313
339
|
# Converts hash and nil to an options object
|
|
314
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
340
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
315
341
|
|
|
316
342
|
# Customize the options with defaults
|
|
317
343
|
metadata = @config.rpcs.batch_get_assets_history.metadata.to_h
|
|
318
344
|
|
|
319
345
|
# Set x-goog-api-client and x-goog-user-project headers
|
|
320
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
|
346
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
321
347
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
322
348
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
|
323
349
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
@@ -338,8 +364,8 @@ module Google
|
|
|
338
364
|
yield response, operation if block_given?
|
|
339
365
|
return response
|
|
340
366
|
end
|
|
341
|
-
rescue GRPC::BadStatus => e
|
|
342
|
-
raise Google::Cloud::Error.from_error(e)
|
|
367
|
+
rescue ::GRPC::BadStatus => e
|
|
368
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
343
369
|
end
|
|
344
370
|
|
|
345
371
|
##
|
|
@@ -348,12 +374,12 @@ module Google
|
|
|
348
374
|
#
|
|
349
375
|
# @overload create_feed(request, options = nil)
|
|
350
376
|
# Pass arguments to `create_feed` via a request object, either of type
|
|
351
|
-
# {Google::Cloud::Asset::V1::CreateFeedRequest} or an equivalent Hash.
|
|
377
|
+
# {::Google::Cloud::Asset::V1::CreateFeedRequest} or an equivalent Hash.
|
|
352
378
|
#
|
|
353
|
-
# @param request [Google::Cloud::Asset::V1::CreateFeedRequest, Hash]
|
|
379
|
+
# @param request [::Google::Cloud::Asset::V1::CreateFeedRequest, ::Hash]
|
|
354
380
|
# A request object representing the call parameters. Required. To specify no
|
|
355
381
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
356
|
-
# @param options [Gapic::CallOptions, Hash]
|
|
382
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
357
383
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
358
384
|
#
|
|
359
385
|
# @overload create_feed(parent: nil, feed_id: nil, feed: nil)
|
|
@@ -361,43 +387,42 @@ module Google
|
|
|
361
387
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
362
388
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
363
389
|
#
|
|
364
|
-
# @param parent [String]
|
|
390
|
+
# @param parent [::String]
|
|
365
391
|
# Required. The name of the project/folder/organization where this feed
|
|
366
392
|
# should be created in. It can only be an organization number (such as
|
|
367
393
|
# "organizations/123"), a folder number (such as "folders/123"), a project ID
|
|
368
394
|
# (such as "projects/my-project-id")", or a project number (such as
|
|
369
395
|
# "projects/12345").
|
|
370
|
-
# @param feed_id [String]
|
|
396
|
+
# @param feed_id [::String]
|
|
371
397
|
# Required. This is the client-assigned asset feed identifier and it needs to
|
|
372
398
|
# be unique under a specific parent project/folder/organization.
|
|
373
|
-
# @param feed [Google::Cloud::Asset::V1::Feed, Hash]
|
|
374
|
-
# Required. The feed details. The field `name` must be empty and it will be
|
|
375
|
-
# in the format of:
|
|
376
|
-
# projects/project_number/feeds/feed_id
|
|
399
|
+
# @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash]
|
|
400
|
+
# Required. The feed details. The field `name` must be empty and it will be
|
|
401
|
+
# generated in the format of: projects/project_number/feeds/feed_id
|
|
377
402
|
# folders/folder_number/feeds/feed_id
|
|
378
403
|
# organizations/organization_number/feeds/feed_id
|
|
379
404
|
#
|
|
380
405
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
381
|
-
# @yieldparam response [Google::Cloud::Asset::V1::Feed]
|
|
382
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
|
406
|
+
# @yieldparam response [::Google::Cloud::Asset::V1::Feed]
|
|
407
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
383
408
|
#
|
|
384
|
-
# @return [Google::Cloud::Asset::V1::Feed]
|
|
409
|
+
# @return [::Google::Cloud::Asset::V1::Feed]
|
|
385
410
|
#
|
|
386
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
|
411
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
387
412
|
#
|
|
388
413
|
def create_feed request, options = nil
|
|
389
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
|
414
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
390
415
|
|
|
391
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::CreateFeedRequest
|
|
416
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::CreateFeedRequest
|
|
392
417
|
|
|
393
418
|
# Converts hash and nil to an options object
|
|
394
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
419
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
395
420
|
|
|
396
421
|
# Customize the options with defaults
|
|
397
422
|
metadata = @config.rpcs.create_feed.metadata.to_h
|
|
398
423
|
|
|
399
424
|
# Set x-goog-api-client and x-goog-user-project headers
|
|
400
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
|
425
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
401
426
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
402
427
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
|
403
428
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
@@ -418,8 +443,8 @@ module Google
|
|
|
418
443
|
yield response, operation if block_given?
|
|
419
444
|
return response
|
|
420
445
|
end
|
|
421
|
-
rescue GRPC::BadStatus => e
|
|
422
|
-
raise Google::Cloud::Error.from_error(e)
|
|
446
|
+
rescue ::GRPC::BadStatus => e
|
|
447
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
423
448
|
end
|
|
424
449
|
|
|
425
450
|
##
|
|
@@ -427,12 +452,12 @@ module Google
|
|
|
427
452
|
#
|
|
428
453
|
# @overload get_feed(request, options = nil)
|
|
429
454
|
# Pass arguments to `get_feed` via a request object, either of type
|
|
430
|
-
# {Google::Cloud::Asset::V1::GetFeedRequest} or an equivalent Hash.
|
|
455
|
+
# {::Google::Cloud::Asset::V1::GetFeedRequest} or an equivalent Hash.
|
|
431
456
|
#
|
|
432
|
-
# @param request [Google::Cloud::Asset::V1::GetFeedRequest, Hash]
|
|
457
|
+
# @param request [::Google::Cloud::Asset::V1::GetFeedRequest, ::Hash]
|
|
433
458
|
# A request object representing the call parameters. Required. To specify no
|
|
434
459
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
435
|
-
# @param options [Gapic::CallOptions, Hash]
|
|
460
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
436
461
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
437
462
|
#
|
|
438
463
|
# @overload get_feed(name: nil)
|
|
@@ -440,33 +465,33 @@ module Google
|
|
|
440
465
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
441
466
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
442
467
|
#
|
|
443
|
-
# @param name [String]
|
|
468
|
+
# @param name [::String]
|
|
444
469
|
# Required. The name of the Feed and it must be in the format of:
|
|
445
470
|
# projects/project_number/feeds/feed_id
|
|
446
471
|
# folders/folder_number/feeds/feed_id
|
|
447
472
|
# organizations/organization_number/feeds/feed_id
|
|
448
473
|
#
|
|
449
474
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
450
|
-
# @yieldparam response [Google::Cloud::Asset::V1::Feed]
|
|
451
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
|
475
|
+
# @yieldparam response [::Google::Cloud::Asset::V1::Feed]
|
|
476
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
452
477
|
#
|
|
453
|
-
# @return [Google::Cloud::Asset::V1::Feed]
|
|
478
|
+
# @return [::Google::Cloud::Asset::V1::Feed]
|
|
454
479
|
#
|
|
455
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
|
480
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
456
481
|
#
|
|
457
482
|
def get_feed request, options = nil
|
|
458
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
|
483
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
459
484
|
|
|
460
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::GetFeedRequest
|
|
485
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::GetFeedRequest
|
|
461
486
|
|
|
462
487
|
# Converts hash and nil to an options object
|
|
463
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
488
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
464
489
|
|
|
465
490
|
# Customize the options with defaults
|
|
466
491
|
metadata = @config.rpcs.get_feed.metadata.to_h
|
|
467
492
|
|
|
468
493
|
# Set x-goog-api-client and x-goog-user-project headers
|
|
469
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
|
494
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
470
495
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
471
496
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
|
472
497
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
@@ -487,8 +512,8 @@ module Google
|
|
|
487
512
|
yield response, operation if block_given?
|
|
488
513
|
return response
|
|
489
514
|
end
|
|
490
|
-
rescue GRPC::BadStatus => e
|
|
491
|
-
raise Google::Cloud::Error.from_error(e)
|
|
515
|
+
rescue ::GRPC::BadStatus => e
|
|
516
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
492
517
|
end
|
|
493
518
|
|
|
494
519
|
##
|
|
@@ -496,12 +521,12 @@ module Google
|
|
|
496
521
|
#
|
|
497
522
|
# @overload list_feeds(request, options = nil)
|
|
498
523
|
# Pass arguments to `list_feeds` via a request object, either of type
|
|
499
|
-
# {Google::Cloud::Asset::V1::ListFeedsRequest} or an equivalent Hash.
|
|
524
|
+
# {::Google::Cloud::Asset::V1::ListFeedsRequest} or an equivalent Hash.
|
|
500
525
|
#
|
|
501
|
-
# @param request [Google::Cloud::Asset::V1::ListFeedsRequest, Hash]
|
|
526
|
+
# @param request [::Google::Cloud::Asset::V1::ListFeedsRequest, ::Hash]
|
|
502
527
|
# A request object representing the call parameters. Required. To specify no
|
|
503
528
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
504
|
-
# @param options [Gapic::CallOptions, Hash]
|
|
529
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
505
530
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
506
531
|
#
|
|
507
532
|
# @overload list_feeds(parent: nil)
|
|
@@ -509,32 +534,32 @@ module Google
|
|
|
509
534
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
510
535
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
511
536
|
#
|
|
512
|
-
# @param parent [String]
|
|
537
|
+
# @param parent [::String]
|
|
513
538
|
# Required. The parent project/folder/organization whose feeds are to be
|
|
514
539
|
# listed. It can only be using project/folder/organization number (such as
|
|
515
540
|
# "folders/12345")", or a project ID (such as "projects/my-project-id").
|
|
516
541
|
#
|
|
517
542
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
518
|
-
# @yieldparam response [Google::Cloud::Asset::V1::ListFeedsResponse]
|
|
519
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
|
543
|
+
# @yieldparam response [::Google::Cloud::Asset::V1::ListFeedsResponse]
|
|
544
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
520
545
|
#
|
|
521
|
-
# @return [Google::Cloud::Asset::V1::ListFeedsResponse]
|
|
546
|
+
# @return [::Google::Cloud::Asset::V1::ListFeedsResponse]
|
|
522
547
|
#
|
|
523
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
|
548
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
524
549
|
#
|
|
525
550
|
def list_feeds request, options = nil
|
|
526
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
|
551
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
527
552
|
|
|
528
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::ListFeedsRequest
|
|
553
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::ListFeedsRequest
|
|
529
554
|
|
|
530
555
|
# Converts hash and nil to an options object
|
|
531
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
556
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
532
557
|
|
|
533
558
|
# Customize the options with defaults
|
|
534
559
|
metadata = @config.rpcs.list_feeds.metadata.to_h
|
|
535
560
|
|
|
536
561
|
# Set x-goog-api-client and x-goog-user-project headers
|
|
537
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
|
562
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
538
563
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
539
564
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
|
540
565
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
@@ -555,8 +580,8 @@ module Google
|
|
|
555
580
|
yield response, operation if block_given?
|
|
556
581
|
return response
|
|
557
582
|
end
|
|
558
|
-
rescue GRPC::BadStatus => e
|
|
559
|
-
raise Google::Cloud::Error.from_error(e)
|
|
583
|
+
rescue ::GRPC::BadStatus => e
|
|
584
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
560
585
|
end
|
|
561
586
|
|
|
562
587
|
##
|
|
@@ -564,12 +589,12 @@ module Google
|
|
|
564
589
|
#
|
|
565
590
|
# @overload update_feed(request, options = nil)
|
|
566
591
|
# Pass arguments to `update_feed` via a request object, either of type
|
|
567
|
-
# {Google::Cloud::Asset::V1::UpdateFeedRequest} or an equivalent Hash.
|
|
592
|
+
# {::Google::Cloud::Asset::V1::UpdateFeedRequest} or an equivalent Hash.
|
|
568
593
|
#
|
|
569
|
-
# @param request [Google::Cloud::Asset::V1::UpdateFeedRequest, Hash]
|
|
594
|
+
# @param request [::Google::Cloud::Asset::V1::UpdateFeedRequest, ::Hash]
|
|
570
595
|
# A request object representing the call parameters. Required. To specify no
|
|
571
596
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
572
|
-
# @param options [Gapic::CallOptions, Hash]
|
|
597
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
573
598
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
574
599
|
#
|
|
575
600
|
# @overload update_feed(feed: nil, update_mask: nil)
|
|
@@ -577,38 +602,38 @@ module Google
|
|
|
577
602
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
578
603
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
579
604
|
#
|
|
580
|
-
# @param feed [Google::Cloud::Asset::V1::Feed, Hash]
|
|
581
|
-
# Required. The new values of feed details. It must match an existing feed
|
|
582
|
-
# field `name` must be in the format of:
|
|
605
|
+
# @param feed [::Google::Cloud::Asset::V1::Feed, ::Hash]
|
|
606
|
+
# Required. The new values of feed details. It must match an existing feed
|
|
607
|
+
# and the field `name` must be in the format of:
|
|
583
608
|
# projects/project_number/feeds/feed_id or
|
|
584
609
|
# folders/folder_number/feeds/feed_id or
|
|
585
610
|
# organizations/organization_number/feeds/feed_id.
|
|
586
|
-
# @param update_mask [Google::Protobuf::FieldMask, Hash]
|
|
611
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
587
612
|
# Required. Only updates the `feed` fields indicated by this mask.
|
|
588
613
|
# The field mask must not be empty, and it must not contain fields that
|
|
589
614
|
# are immutable or only set by the server.
|
|
590
615
|
#
|
|
591
616
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
592
|
-
# @yieldparam response [Google::Cloud::Asset::V1::Feed]
|
|
593
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
|
617
|
+
# @yieldparam response [::Google::Cloud::Asset::V1::Feed]
|
|
618
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
594
619
|
#
|
|
595
|
-
# @return [Google::Cloud::Asset::V1::Feed]
|
|
620
|
+
# @return [::Google::Cloud::Asset::V1::Feed]
|
|
596
621
|
#
|
|
597
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
|
622
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
598
623
|
#
|
|
599
624
|
def update_feed request, options = nil
|
|
600
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
|
625
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
601
626
|
|
|
602
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::UpdateFeedRequest
|
|
627
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::UpdateFeedRequest
|
|
603
628
|
|
|
604
629
|
# Converts hash and nil to an options object
|
|
605
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
630
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
606
631
|
|
|
607
632
|
# Customize the options with defaults
|
|
608
633
|
metadata = @config.rpcs.update_feed.metadata.to_h
|
|
609
634
|
|
|
610
635
|
# Set x-goog-api-client and x-goog-user-project headers
|
|
611
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
|
636
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
612
637
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
613
638
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
|
614
639
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
@@ -629,8 +654,8 @@ module Google
|
|
|
629
654
|
yield response, operation if block_given?
|
|
630
655
|
return response
|
|
631
656
|
end
|
|
632
|
-
rescue GRPC::BadStatus => e
|
|
633
|
-
raise Google::Cloud::Error.from_error(e)
|
|
657
|
+
rescue ::GRPC::BadStatus => e
|
|
658
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
634
659
|
end
|
|
635
660
|
|
|
636
661
|
##
|
|
@@ -638,12 +663,12 @@ module Google
|
|
|
638
663
|
#
|
|
639
664
|
# @overload delete_feed(request, options = nil)
|
|
640
665
|
# Pass arguments to `delete_feed` via a request object, either of type
|
|
641
|
-
# {Google::Cloud::Asset::V1::DeleteFeedRequest} or an equivalent Hash.
|
|
666
|
+
# {::Google::Cloud::Asset::V1::DeleteFeedRequest} or an equivalent Hash.
|
|
642
667
|
#
|
|
643
|
-
# @param request [Google::Cloud::Asset::V1::DeleteFeedRequest, Hash]
|
|
668
|
+
# @param request [::Google::Cloud::Asset::V1::DeleteFeedRequest, ::Hash]
|
|
644
669
|
# A request object representing the call parameters. Required. To specify no
|
|
645
670
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
646
|
-
# @param options [Gapic::CallOptions, Hash]
|
|
671
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
647
672
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
648
673
|
#
|
|
649
674
|
# @overload delete_feed(name: nil)
|
|
@@ -651,33 +676,33 @@ module Google
|
|
|
651
676
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
652
677
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
653
678
|
#
|
|
654
|
-
# @param name [String]
|
|
679
|
+
# @param name [::String]
|
|
655
680
|
# Required. The name of the feed and it must be in the format of:
|
|
656
681
|
# projects/project_number/feeds/feed_id
|
|
657
682
|
# folders/folder_number/feeds/feed_id
|
|
658
683
|
# organizations/organization_number/feeds/feed_id
|
|
659
684
|
#
|
|
660
685
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
661
|
-
# @yieldparam response [Google::Protobuf::Empty]
|
|
662
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
|
686
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
|
687
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
663
688
|
#
|
|
664
|
-
# @return [Google::Protobuf::Empty]
|
|
689
|
+
# @return [::Google::Protobuf::Empty]
|
|
665
690
|
#
|
|
666
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
|
691
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
667
692
|
#
|
|
668
693
|
def delete_feed request, options = nil
|
|
669
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
|
694
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
670
695
|
|
|
671
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Asset::V1::DeleteFeedRequest
|
|
696
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::DeleteFeedRequest
|
|
672
697
|
|
|
673
698
|
# Converts hash and nil to an options object
|
|
674
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
699
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
675
700
|
|
|
676
701
|
# Customize the options with defaults
|
|
677
702
|
metadata = @config.rpcs.delete_feed.metadata.to_h
|
|
678
703
|
|
|
679
704
|
# Set x-goog-api-client and x-goog-user-project headers
|
|
680
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
|
705
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
681
706
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
682
707
|
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
|
683
708
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
@@ -698,8 +723,252 @@ module Google
|
|
|
698
723
|
yield response, operation if block_given?
|
|
699
724
|
return response
|
|
700
725
|
end
|
|
701
|
-
rescue GRPC::BadStatus => e
|
|
702
|
-
raise Google::Cloud::Error.from_error(e)
|
|
726
|
+
rescue ::GRPC::BadStatus => e
|
|
727
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
728
|
+
end
|
|
729
|
+
|
|
730
|
+
##
|
|
731
|
+
# Searches all the resources within the given accessible scope (e.g., a
|
|
732
|
+
# project, a folder or an organization). Callers should have
|
|
733
|
+
# cloud.assets.SearchAllResources permission upon the requested scope,
|
|
734
|
+
# otherwise the request will be rejected.
|
|
735
|
+
#
|
|
736
|
+
# @overload search_all_resources(request, options = nil)
|
|
737
|
+
# Pass arguments to `search_all_resources` via a request object, either of type
|
|
738
|
+
# {::Google::Cloud::Asset::V1::SearchAllResourcesRequest} or an equivalent Hash.
|
|
739
|
+
#
|
|
740
|
+
# @param request [::Google::Cloud::Asset::V1::SearchAllResourcesRequest, ::Hash]
|
|
741
|
+
# A request object representing the call parameters. Required. To specify no
|
|
742
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
743
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
744
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
745
|
+
#
|
|
746
|
+
# @overload search_all_resources(scope: nil, query: nil, asset_types: nil, page_size: nil, page_token: nil, order_by: nil)
|
|
747
|
+
# Pass arguments to `search_all_resources` via keyword arguments. Note that at
|
|
748
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
749
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
750
|
+
#
|
|
751
|
+
# @param scope [::String]
|
|
752
|
+
# Required. A scope can be a project, a folder or an organization. The search
|
|
753
|
+
# is limited to the resources within the `scope`.
|
|
754
|
+
#
|
|
755
|
+
# The allowed values are:
|
|
756
|
+
#
|
|
757
|
+
# * projects/\\{PROJECT_ID}
|
|
758
|
+
# * projects/\\{PROJECT_NUMBER}
|
|
759
|
+
# * folders/\\{FOLDER_NUMBER}
|
|
760
|
+
# * organizations/\\{ORGANIZATION_NUMBER}
|
|
761
|
+
# @param query [::String]
|
|
762
|
+
# Optional. The query statement. An empty query can be specified to search
|
|
763
|
+
# all the resources of certain `asset_types` within the given `scope`.
|
|
764
|
+
#
|
|
765
|
+
# Examples:
|
|
766
|
+
#
|
|
767
|
+
# * `name : "Important"` to find Cloud resources whose name contains
|
|
768
|
+
# "Important" as a word.
|
|
769
|
+
# * `displayName : "Impor*"` to find Cloud resources whose display name
|
|
770
|
+
# contains "Impor" as a word prefix.
|
|
771
|
+
# * `description : "*por*"` to find Cloud resources whose description
|
|
772
|
+
# contains "por" as a substring.
|
|
773
|
+
# * `location : "us-west*"` to find Cloud resources whose location is
|
|
774
|
+
# prefixed with "us-west".
|
|
775
|
+
# * `labels : "prod"` to find Cloud resources whose labels contain "prod" as
|
|
776
|
+
# a key or value.
|
|
777
|
+
# * `labels.env : "prod"` to find Cloud resources which have a label "env"
|
|
778
|
+
# and its value is "prod".
|
|
779
|
+
# * `labels.env : *` to find Cloud resources which have a label "env".
|
|
780
|
+
# * `"Important"` to find Cloud resources which contain "Important" as a word
|
|
781
|
+
# in any of the searchable fields.
|
|
782
|
+
# * `"Impor*"` to find Cloud resources which contain "Impor" as a word prefix
|
|
783
|
+
# in any of the searchable fields.
|
|
784
|
+
# * `"*por*"` to find Cloud resources which contain "por" as a substring in
|
|
785
|
+
# any of the searchable fields.
|
|
786
|
+
# * `("Important" AND location : ("us-west1" OR "global"))` to find Cloud
|
|
787
|
+
# resources which contain "Important" as a word in any of the searchable
|
|
788
|
+
# fields and are also located in the "us-west1" region or the "global"
|
|
789
|
+
# location.
|
|
790
|
+
#
|
|
791
|
+
# See [how to construct a
|
|
792
|
+
# query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
|
|
793
|
+
# for more details.
|
|
794
|
+
# @param asset_types [::Array<::String>]
|
|
795
|
+
# Optional. A list of asset types that this request searches for. If empty,
|
|
796
|
+
# it will search all the [searchable asset
|
|
797
|
+
# types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
|
|
798
|
+
# @param page_size [::Integer]
|
|
799
|
+
# Optional. The page size for search result pagination. Page size is capped
|
|
800
|
+
# at 500 even if a larger value is given. If set to zero, server will pick an
|
|
801
|
+
# appropriate default. Returned results may be fewer than requested. When
|
|
802
|
+
# this happens, there could be more results as long as `next_page_token` is
|
|
803
|
+
# returned.
|
|
804
|
+
# @param page_token [::String]
|
|
805
|
+
# Optional. If present, then retrieve the next batch of results from the
|
|
806
|
+
# preceding call to this method. `page_token` must be the value of
|
|
807
|
+
# `next_page_token` from the previous response. The values of all other
|
|
808
|
+
# method parameters, must be identical to those in the previous call.
|
|
809
|
+
# @param order_by [::String]
|
|
810
|
+
# Optional. A comma separated list of fields specifying the sorting order of
|
|
811
|
+
# the results. The default order is ascending. Add " DESC" after the field
|
|
812
|
+
# name to indicate descending order. Redundant space characters are ignored.
|
|
813
|
+
# Example: "location DESC, name". See [supported resource metadata
|
|
814
|
+
# fields](https://cloud.google.com/asset-inventory/docs/searching-resources#query_on_resource_metadata_fields)
|
|
815
|
+
# for more details.
|
|
816
|
+
#
|
|
817
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
818
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::ResourceSearchResult>]
|
|
819
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
820
|
+
#
|
|
821
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::ResourceSearchResult>]
|
|
822
|
+
#
|
|
823
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
824
|
+
#
|
|
825
|
+
def search_all_resources request, options = nil
|
|
826
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
827
|
+
|
|
828
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::SearchAllResourcesRequest
|
|
829
|
+
|
|
830
|
+
# Converts hash and nil to an options object
|
|
831
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
832
|
+
|
|
833
|
+
# Customize the options with defaults
|
|
834
|
+
metadata = @config.rpcs.search_all_resources.metadata.to_h
|
|
835
|
+
|
|
836
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
837
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
838
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
839
|
+
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
|
840
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
841
|
+
|
|
842
|
+
header_params = {
|
|
843
|
+
"scope" => request.scope
|
|
844
|
+
}
|
|
845
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
846
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
847
|
+
|
|
848
|
+
options.apply_defaults timeout: @config.rpcs.search_all_resources.timeout,
|
|
849
|
+
metadata: metadata,
|
|
850
|
+
retry_policy: @config.rpcs.search_all_resources.retry_policy
|
|
851
|
+
options.apply_defaults metadata: @config.metadata,
|
|
852
|
+
retry_policy: @config.retry_policy
|
|
853
|
+
|
|
854
|
+
@asset_service_stub.call_rpc :search_all_resources, request, options: options do |response, operation|
|
|
855
|
+
response = ::Gapic::PagedEnumerable.new @asset_service_stub, :search_all_resources, request, response, operation, options
|
|
856
|
+
yield response, operation if block_given?
|
|
857
|
+
return response
|
|
858
|
+
end
|
|
859
|
+
rescue ::GRPC::BadStatus => e
|
|
860
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
861
|
+
end
|
|
862
|
+
|
|
863
|
+
##
|
|
864
|
+
# Searches all the IAM policies within the given accessible scope (e.g., a
|
|
865
|
+
# project, a folder or an organization). Callers should have
|
|
866
|
+
# cloud.assets.SearchAllIamPolicies permission upon the requested scope,
|
|
867
|
+
# otherwise the request will be rejected.
|
|
868
|
+
#
|
|
869
|
+
# @overload search_all_iam_policies(request, options = nil)
|
|
870
|
+
# Pass arguments to `search_all_iam_policies` via a request object, either of type
|
|
871
|
+
# {::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest} or an equivalent Hash.
|
|
872
|
+
#
|
|
873
|
+
# @param request [::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest, ::Hash]
|
|
874
|
+
# A request object representing the call parameters. Required. To specify no
|
|
875
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
876
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
877
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
878
|
+
#
|
|
879
|
+
# @overload search_all_iam_policies(scope: nil, query: nil, page_size: nil, page_token: nil)
|
|
880
|
+
# Pass arguments to `search_all_iam_policies` via keyword arguments. Note that at
|
|
881
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
882
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
883
|
+
#
|
|
884
|
+
# @param scope [::String]
|
|
885
|
+
# Required. A scope can be a project, a folder or an organization. The search
|
|
886
|
+
# is limited to the IAM policies within the `scope`.
|
|
887
|
+
#
|
|
888
|
+
# The allowed values are:
|
|
889
|
+
#
|
|
890
|
+
# * projects/\\{PROJECT_ID}
|
|
891
|
+
# * projects/\\{PROJECT_NUMBER}
|
|
892
|
+
# * folders/\\{FOLDER_NUMBER}
|
|
893
|
+
# * organizations/\\{ORGANIZATION_NUMBER}
|
|
894
|
+
# @param query [::String]
|
|
895
|
+
# Optional. The query statement. An empty query can be specified to search
|
|
896
|
+
# all the IAM policies within the given `scope`.
|
|
897
|
+
#
|
|
898
|
+
# Examples:
|
|
899
|
+
#
|
|
900
|
+
# * `policy : "amy@gmail.com"` to find Cloud IAM policy bindings that
|
|
901
|
+
# specify user "amy@gmail.com".
|
|
902
|
+
# * `policy : "roles/compute.admin"` to find Cloud IAM policy bindings that
|
|
903
|
+
# specify the Compute Admin role.
|
|
904
|
+
# * `policy.role.permissions : "storage.buckets.update"` to find Cloud IAM
|
|
905
|
+
# policy bindings that specify a role containing "storage.buckets.update"
|
|
906
|
+
# permission.
|
|
907
|
+
# * `resource : "organizations/123"` to find Cloud IAM policy bindings that
|
|
908
|
+
# are set on "organizations/123".
|
|
909
|
+
# * `(resource : ("organizations/123" OR "folders/1234") AND policy : "amy")`
|
|
910
|
+
# to find Cloud IAM policy bindings that are set on "organizations/123" or
|
|
911
|
+
# "folders/1234", and also specify user "amy".
|
|
912
|
+
#
|
|
913
|
+
# See [how to construct a
|
|
914
|
+
# query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
|
|
915
|
+
# for more details.
|
|
916
|
+
# @param page_size [::Integer]
|
|
917
|
+
# Optional. The page size for search result pagination. Page size is capped
|
|
918
|
+
# at 500 even if a larger value is given. If set to zero, server will pick an
|
|
919
|
+
# appropriate default. Returned results may be fewer than requested. When
|
|
920
|
+
# this happens, there could be more results as long as `next_page_token` is
|
|
921
|
+
# returned.
|
|
922
|
+
# @param page_token [::String]
|
|
923
|
+
# Optional. If present, retrieve the next batch of results from the preceding
|
|
924
|
+
# call to this method. `page_token` must be the value of `next_page_token`
|
|
925
|
+
# from the previous response. The values of all other method parameters must
|
|
926
|
+
# be identical to those in the previous call.
|
|
927
|
+
#
|
|
928
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
929
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::IamPolicySearchResult>]
|
|
930
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
931
|
+
#
|
|
932
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Asset::V1::IamPolicySearchResult>]
|
|
933
|
+
#
|
|
934
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
935
|
+
#
|
|
936
|
+
def search_all_iam_policies request, options = nil
|
|
937
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
938
|
+
|
|
939
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest
|
|
940
|
+
|
|
941
|
+
# Converts hash and nil to an options object
|
|
942
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
943
|
+
|
|
944
|
+
# Customize the options with defaults
|
|
945
|
+
metadata = @config.rpcs.search_all_iam_policies.metadata.to_h
|
|
946
|
+
|
|
947
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
948
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
949
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
950
|
+
gapic_version: ::Google::Cloud::Asset::V1::VERSION
|
|
951
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
952
|
+
|
|
953
|
+
header_params = {
|
|
954
|
+
"scope" => request.scope
|
|
955
|
+
}
|
|
956
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
957
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
958
|
+
|
|
959
|
+
options.apply_defaults timeout: @config.rpcs.search_all_iam_policies.timeout,
|
|
960
|
+
metadata: metadata,
|
|
961
|
+
retry_policy: @config.rpcs.search_all_iam_policies.retry_policy
|
|
962
|
+
options.apply_defaults metadata: @config.metadata,
|
|
963
|
+
retry_policy: @config.retry_policy
|
|
964
|
+
|
|
965
|
+
@asset_service_stub.call_rpc :search_all_iam_policies, request, options: options do |response, operation|
|
|
966
|
+
response = ::Gapic::PagedEnumerable.new @asset_service_stub, :search_all_iam_policies, request, response, operation, options
|
|
967
|
+
yield response, operation if block_given?
|
|
968
|
+
return response
|
|
969
|
+
end
|
|
970
|
+
rescue ::GRPC::BadStatus => e
|
|
971
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
703
972
|
end
|
|
704
973
|
|
|
705
974
|
##
|
|
@@ -709,7 +978,7 @@ module Google
|
|
|
709
978
|
# providing control over timeouts, retry behavior, logging, transport
|
|
710
979
|
# parameters, and other low-level controls. Certain parameters can also be
|
|
711
980
|
# applied individually to specific RPCs. See
|
|
712
|
-
# {Google::Cloud::Asset::V1::AssetService::Client::Configuration::Rpcs}
|
|
981
|
+
# {::Google::Cloud::Asset::V1::AssetService::Client::Configuration::Rpcs}
|
|
713
982
|
# for a list of RPCs that can be configured independently.
|
|
714
983
|
#
|
|
715
984
|
# Configuration can be applied globally to all clients, or to a single client
|
|
@@ -720,22 +989,22 @@ module Google
|
|
|
720
989
|
# To modify the global config, setting the timeout for export_assets
|
|
721
990
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
|
722
991
|
#
|
|
723
|
-
# Google::Cloud::Asset::V1::AssetService::Client.configure do |config|
|
|
724
|
-
# config.timeout =
|
|
725
|
-
# config.rpcs.export_assets.timeout =
|
|
992
|
+
# ::Google::Cloud::Asset::V1::AssetService::Client.configure do |config|
|
|
993
|
+
# config.timeout = 10.0
|
|
994
|
+
# config.rpcs.export_assets.timeout = 20.0
|
|
726
995
|
# end
|
|
727
996
|
#
|
|
728
997
|
# To apply the above configuration only to a new client:
|
|
729
998
|
#
|
|
730
|
-
# client = Google::Cloud::Asset::V1::AssetService::Client.new do |config|
|
|
731
|
-
# config.timeout =
|
|
732
|
-
# config.rpcs.export_assets.timeout =
|
|
999
|
+
# client = ::Google::Cloud::Asset::V1::AssetService::Client.new do |config|
|
|
1000
|
+
# config.timeout = 10.0
|
|
1001
|
+
# config.rpcs.export_assets.timeout = 20.0
|
|
733
1002
|
# end
|
|
734
1003
|
#
|
|
735
1004
|
# @!attribute [rw] endpoint
|
|
736
1005
|
# The hostname or hostname:port of the service endpoint.
|
|
737
1006
|
# Defaults to `"cloudasset.googleapis.com"`.
|
|
738
|
-
# @return [String]
|
|
1007
|
+
# @return [::String]
|
|
739
1008
|
# @!attribute [rw] credentials
|
|
740
1009
|
# Credentials to send with calls. You may provide any of the following types:
|
|
741
1010
|
# * (`String`) The path to a service account key file in JSON format
|
|
@@ -747,29 +1016,29 @@ module Google
|
|
|
747
1016
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
|
748
1017
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
749
1018
|
# * (`nil`) indicating no credentials
|
|
750
|
-
# @return [Object]
|
|
1019
|
+
# @return [::Object]
|
|
751
1020
|
# @!attribute [rw] scope
|
|
752
1021
|
# The OAuth scopes
|
|
753
|
-
# @return [Array
|
|
1022
|
+
# @return [::Array<::String>]
|
|
754
1023
|
# @!attribute [rw] lib_name
|
|
755
1024
|
# The library name as recorded in instrumentation and logging
|
|
756
|
-
# @return [String]
|
|
1025
|
+
# @return [::String]
|
|
757
1026
|
# @!attribute [rw] lib_version
|
|
758
1027
|
# The library version as recorded in instrumentation and logging
|
|
759
|
-
# @return [String]
|
|
1028
|
+
# @return [::String]
|
|
760
1029
|
# @!attribute [rw] channel_args
|
|
761
1030
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
|
762
1031
|
# `GRPC::Core::Channel` object is provided as the credential.
|
|
763
|
-
# @return [Hash]
|
|
1032
|
+
# @return [::Hash]
|
|
764
1033
|
# @!attribute [rw] interceptors
|
|
765
1034
|
# An array of interceptors that are run before calls are executed.
|
|
766
|
-
# @return [Array
|
|
1035
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
|
767
1036
|
# @!attribute [rw] timeout
|
|
768
|
-
# The call timeout in
|
|
769
|
-
# @return [Numeric]
|
|
1037
|
+
# The call timeout in seconds.
|
|
1038
|
+
# @return [::Numeric]
|
|
770
1039
|
# @!attribute [rw] metadata
|
|
771
1040
|
# Additional gRPC headers to be sent with the call.
|
|
772
|
-
# @return [Hash{Symbol
|
|
1041
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
773
1042
|
# @!attribute [rw] retry_policy
|
|
774
1043
|
# The retry policy. The value is a hash with the following keys:
|
|
775
1044
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
@@ -777,25 +1046,29 @@ module Google
|
|
|
777
1046
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
778
1047
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
779
1048
|
# trigger a retry.
|
|
780
|
-
# @return [Hash]
|
|
1049
|
+
# @return [::Hash]
|
|
1050
|
+
# @!attribute [rw] quota_project
|
|
1051
|
+
# A separate project against which to charge quota.
|
|
1052
|
+
# @return [::String]
|
|
781
1053
|
#
|
|
782
1054
|
class Configuration
|
|
783
|
-
extend Gapic::Config
|
|
1055
|
+
extend ::Gapic::Config
|
|
784
1056
|
|
|
785
|
-
config_attr :endpoint,
|
|
786
|
-
config_attr :credentials,
|
|
1057
|
+
config_attr :endpoint, "cloudasset.googleapis.com", ::String
|
|
1058
|
+
config_attr :credentials, nil do |value|
|
|
787
1059
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
788
1060
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
|
789
1061
|
allowed.any? { |klass| klass === value }
|
|
790
1062
|
end
|
|
791
|
-
config_attr :scope,
|
|
792
|
-
config_attr :lib_name,
|
|
793
|
-
config_attr :lib_version,
|
|
794
|
-
config_attr(:channel_args,
|
|
795
|
-
config_attr :interceptors,
|
|
796
|
-
config_attr :timeout,
|
|
797
|
-
config_attr :metadata,
|
|
798
|
-
config_attr :retry_policy,
|
|
1063
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
1064
|
+
config_attr :lib_name, nil, ::String, nil
|
|
1065
|
+
config_attr :lib_version, nil, ::String, nil
|
|
1066
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
|
1067
|
+
config_attr :interceptors, nil, ::Array, nil
|
|
1068
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
1069
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
1070
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1071
|
+
config_attr :quota_project, nil, ::String, nil
|
|
799
1072
|
|
|
800
1073
|
# @private
|
|
801
1074
|
def initialize parent_config = nil
|
|
@@ -836,56 +1109,70 @@ module Google
|
|
|
836
1109
|
class Rpcs
|
|
837
1110
|
##
|
|
838
1111
|
# RPC-specific configuration for `export_assets`
|
|
839
|
-
# @return [Gapic::Config::Method]
|
|
1112
|
+
# @return [::Gapic::Config::Method]
|
|
840
1113
|
#
|
|
841
1114
|
attr_reader :export_assets
|
|
842
1115
|
##
|
|
843
1116
|
# RPC-specific configuration for `batch_get_assets_history`
|
|
844
|
-
# @return [Gapic::Config::Method]
|
|
1117
|
+
# @return [::Gapic::Config::Method]
|
|
845
1118
|
#
|
|
846
1119
|
attr_reader :batch_get_assets_history
|
|
847
1120
|
##
|
|
848
1121
|
# RPC-specific configuration for `create_feed`
|
|
849
|
-
# @return [Gapic::Config::Method]
|
|
1122
|
+
# @return [::Gapic::Config::Method]
|
|
850
1123
|
#
|
|
851
1124
|
attr_reader :create_feed
|
|
852
1125
|
##
|
|
853
1126
|
# RPC-specific configuration for `get_feed`
|
|
854
|
-
# @return [Gapic::Config::Method]
|
|
1127
|
+
# @return [::Gapic::Config::Method]
|
|
855
1128
|
#
|
|
856
1129
|
attr_reader :get_feed
|
|
857
1130
|
##
|
|
858
1131
|
# RPC-specific configuration for `list_feeds`
|
|
859
|
-
# @return [Gapic::Config::Method]
|
|
1132
|
+
# @return [::Gapic::Config::Method]
|
|
860
1133
|
#
|
|
861
1134
|
attr_reader :list_feeds
|
|
862
1135
|
##
|
|
863
1136
|
# RPC-specific configuration for `update_feed`
|
|
864
|
-
# @return [Gapic::Config::Method]
|
|
1137
|
+
# @return [::Gapic::Config::Method]
|
|
865
1138
|
#
|
|
866
1139
|
attr_reader :update_feed
|
|
867
1140
|
##
|
|
868
1141
|
# RPC-specific configuration for `delete_feed`
|
|
869
|
-
# @return [Gapic::Config::Method]
|
|
1142
|
+
# @return [::Gapic::Config::Method]
|
|
870
1143
|
#
|
|
871
1144
|
attr_reader :delete_feed
|
|
1145
|
+
##
|
|
1146
|
+
# RPC-specific configuration for `search_all_resources`
|
|
1147
|
+
# @return [::Gapic::Config::Method]
|
|
1148
|
+
#
|
|
1149
|
+
attr_reader :search_all_resources
|
|
1150
|
+
##
|
|
1151
|
+
# RPC-specific configuration for `search_all_iam_policies`
|
|
1152
|
+
# @return [::Gapic::Config::Method]
|
|
1153
|
+
#
|
|
1154
|
+
attr_reader :search_all_iam_policies
|
|
872
1155
|
|
|
873
1156
|
# @private
|
|
874
1157
|
def initialize parent_rpcs = nil
|
|
875
1158
|
export_assets_config = parent_rpcs&.export_assets if parent_rpcs&.respond_to? :export_assets
|
|
876
|
-
@export_assets = Gapic::Config::Method.new export_assets_config
|
|
1159
|
+
@export_assets = ::Gapic::Config::Method.new export_assets_config
|
|
877
1160
|
batch_get_assets_history_config = parent_rpcs&.batch_get_assets_history if parent_rpcs&.respond_to? :batch_get_assets_history
|
|
878
|
-
@batch_get_assets_history = Gapic::Config::Method.new batch_get_assets_history_config
|
|
1161
|
+
@batch_get_assets_history = ::Gapic::Config::Method.new batch_get_assets_history_config
|
|
879
1162
|
create_feed_config = parent_rpcs&.create_feed if parent_rpcs&.respond_to? :create_feed
|
|
880
|
-
@create_feed = Gapic::Config::Method.new create_feed_config
|
|
1163
|
+
@create_feed = ::Gapic::Config::Method.new create_feed_config
|
|
881
1164
|
get_feed_config = parent_rpcs&.get_feed if parent_rpcs&.respond_to? :get_feed
|
|
882
|
-
@get_feed = Gapic::Config::Method.new get_feed_config
|
|
1165
|
+
@get_feed = ::Gapic::Config::Method.new get_feed_config
|
|
883
1166
|
list_feeds_config = parent_rpcs&.list_feeds if parent_rpcs&.respond_to? :list_feeds
|
|
884
|
-
@list_feeds = Gapic::Config::Method.new list_feeds_config
|
|
1167
|
+
@list_feeds = ::Gapic::Config::Method.new list_feeds_config
|
|
885
1168
|
update_feed_config = parent_rpcs&.update_feed if parent_rpcs&.respond_to? :update_feed
|
|
886
|
-
@update_feed = Gapic::Config::Method.new update_feed_config
|
|
1169
|
+
@update_feed = ::Gapic::Config::Method.new update_feed_config
|
|
887
1170
|
delete_feed_config = parent_rpcs&.delete_feed if parent_rpcs&.respond_to? :delete_feed
|
|
888
|
-
@delete_feed = Gapic::Config::Method.new delete_feed_config
|
|
1171
|
+
@delete_feed = ::Gapic::Config::Method.new delete_feed_config
|
|
1172
|
+
search_all_resources_config = parent_rpcs&.search_all_resources if parent_rpcs&.respond_to? :search_all_resources
|
|
1173
|
+
@search_all_resources = ::Gapic::Config::Method.new search_all_resources_config
|
|
1174
|
+
search_all_iam_policies_config = parent_rpcs&.search_all_iam_policies if parent_rpcs&.respond_to? :search_all_iam_policies
|
|
1175
|
+
@search_all_iam_policies = ::Gapic::Config::Method.new search_all_iam_policies_config
|
|
889
1176
|
|
|
890
1177
|
yield self if block_given?
|
|
891
1178
|
end
|