google-cloud-app_hub-v1 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/app_hub/v1/app_hub/client.rb +103 -55
- data/lib/google/cloud/app_hub/v1/app_hub/operations.rb +25 -20
- data/lib/google/cloud/app_hub/v1/app_hub/rest/client.rb +97 -55
- data/lib/google/cloud/app_hub/v1/app_hub/rest/operations.rb +54 -42
- data/lib/google/cloud/app_hub/v1/app_hub/rest/service_stub.rb +230 -164
- data/lib/google/cloud/app_hub/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +70 -10
- data/proto_docs/google/api/field_info.rb +23 -0
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module AppHub
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
API_VERSION = ""
|
31
|
+
|
29
32
|
# @private
|
30
33
|
DEFAULT_ENDPOINT_TEMPLATE = "apphub.$UNIVERSE_DOMAIN$"
|
31
34
|
|
@@ -121,14 +124,6 @@ module Google
|
|
121
124
|
# Lists operations that match the specified filter in the request. If the
|
122
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
123
126
|
#
|
124
|
-
# NOTE: the `name` binding allows API services to override the binding
|
125
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
126
|
-
# override the binding, API services can add a binding such as
|
127
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
128
|
-
# For backwards compatibility, the default name includes the operations
|
129
|
-
# collection id, however overriding users must ensure the name binding
|
130
|
-
# is the parent resource, without the operations collection id.
|
131
|
-
#
|
132
127
|
# @overload list_operations(request, options = nil)
|
133
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
134
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -191,10 +186,11 @@ module Google
|
|
191
186
|
# Customize the options with defaults
|
192
187
|
metadata = @config.rpcs.list_operations.metadata.to_h
|
193
188
|
|
194
|
-
# Set x-goog-api-client
|
189
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
195
190
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
196
191
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
197
192
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION
|
193
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
198
194
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
199
195
|
|
200
196
|
header_params = {}
|
@@ -217,7 +213,7 @@ module Google
|
|
217
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
218
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
219
215
|
yield response, operation if block_given?
|
220
|
-
|
216
|
+
throw :response, response
|
221
217
|
end
|
222
218
|
rescue ::GRPC::BadStatus => e
|
223
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -287,10 +283,11 @@ module Google
|
|
287
283
|
# Customize the options with defaults
|
288
284
|
metadata = @config.rpcs.get_operation.metadata.to_h
|
289
285
|
|
290
|
-
# Set x-goog-api-client
|
286
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
291
287
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
292
288
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
293
289
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION
|
290
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
294
291
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
295
292
|
|
296
293
|
header_params = {}
|
@@ -312,7 +309,7 @@ module Google
|
|
312
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
313
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
314
311
|
yield response, operation if block_given?
|
315
|
-
|
312
|
+
throw :response, response
|
316
313
|
end
|
317
314
|
rescue ::GRPC::BadStatus => e
|
318
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -376,10 +373,11 @@ module Google
|
|
376
373
|
# Customize the options with defaults
|
377
374
|
metadata = @config.rpcs.delete_operation.metadata.to_h
|
378
375
|
|
379
|
-
# Set x-goog-api-client
|
376
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
380
377
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
381
378
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
382
379
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION
|
380
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
383
381
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
384
382
|
|
385
383
|
header_params = {}
|
@@ -400,7 +398,6 @@ module Google
|
|
400
398
|
|
401
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
402
400
|
yield response, operation if block_given?
|
403
|
-
return response
|
404
401
|
end
|
405
402
|
rescue ::GRPC::BadStatus => e
|
406
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -415,8 +412,9 @@ module Google
|
|
415
412
|
# other methods to check whether the cancellation succeeded or whether the
|
416
413
|
# operation completed despite cancellation. On successful cancellation,
|
417
414
|
# the operation is not deleted; instead, it becomes an operation with
|
418
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
419
|
-
# corresponding to
|
415
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
416
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
417
|
+
# `Code.CANCELLED`.
|
420
418
|
#
|
421
419
|
# @overload cancel_operation(request, options = nil)
|
422
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -470,10 +468,11 @@ module Google
|
|
470
468
|
# Customize the options with defaults
|
471
469
|
metadata = @config.rpcs.cancel_operation.metadata.to_h
|
472
470
|
|
473
|
-
# Set x-goog-api-client
|
471
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
474
472
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
475
473
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
476
474
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION
|
475
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
477
476
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
478
477
|
|
479
478
|
header_params = {}
|
@@ -494,7 +493,6 @@ module Google
|
|
494
493
|
|
495
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
496
495
|
yield response, operation if block_given?
|
497
|
-
return response
|
498
496
|
end
|
499
497
|
rescue ::GRPC::BadStatus => e
|
500
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -574,10 +572,11 @@ module Google
|
|
574
572
|
# Customize the options with defaults
|
575
573
|
metadata = @config.rpcs.wait_operation.metadata.to_h
|
576
574
|
|
577
|
-
# Set x-goog-api-client
|
575
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
578
576
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
579
577
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
580
578
|
gapic_version: ::Google::Cloud::AppHub::V1::VERSION
|
579
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
581
580
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
582
581
|
|
583
582
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
@@ -591,7 +590,7 @@ module Google
|
|
591
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
592
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
593
592
|
yield response, operation if block_given?
|
594
|
-
|
593
|
+
throw :response, response
|
595
594
|
end
|
596
595
|
rescue ::GRPC::BadStatus => e
|
597
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -680,6 +679,11 @@ module Google
|
|
680
679
|
# default endpoint URL. The default value of nil uses the environment
|
681
680
|
# universe (usually the default "googleapis.com" universe).
|
682
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
683
687
|
#
|
684
688
|
class Configuration
|
685
689
|
extend ::Gapic::Config
|
@@ -704,6 +708,7 @@ module Google
|
|
704
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
705
709
|
config_attr :quota_project, nil, ::String, nil
|
706
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
707
712
|
|
708
713
|
# @private
|
709
714
|
def initialize parent_config = nil
|