google-cloud-api_gateway-v1 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/api_gateway/v1/api_gateway_service/client.rb +16 -5
- data/lib/google/cloud/api_gateway/v1/api_gateway_service/operations.rb +15 -4
- data/lib/google/cloud/api_gateway/v1/api_gateway_service/rest/client.rb +321 -4
- data/lib/google/cloud/api_gateway/v1/api_gateway_service/rest/operations.rb +84 -7
- data/lib/google/cloud/api_gateway/v1/api_gateway_service/rest/service_stub.rb +15 -15
- data/lib/google/cloud/api_gateway/v1/version.rb +1 -1
- data/lib/google/cloud/apigateway/v1/apigateway_pb.rb +26 -170
- data/lib/google/cloud/apigateway/v1/apigateway_service_pb.rb +25 -2
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35d84aa121722cca047f756d784df2dad2f0aa81b3cdaaa40ed46235c80065a7
|
4
|
+
data.tar.gz: 7e5c2b0d1c158ddd1fce47327fad11bd84757c434c8e69edfe4f1acb2c2d16ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12fcfe01d4e8150cfddd70ffed4322bb30defdcf31b84277afd79a40daf44f48ce6c5054c36452f7c508bd8dac7891f2a1f91e96264e61fb836793e863f11278
|
7
|
+
data.tar.gz: bda8b4e6346bb8212c1ccb207fa3968351d9ce388efeda60cda5e98f3e45671fef1b70767665733b6f778658bf7e53f1d535ec400f0bf87c3b3f9fe3ef52cd01
|
data/README.md
CHANGED
@@ -47,7 +47,7 @@ for general usage information.
|
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
49
|
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
50
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
51
51
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
53
|
|
@@ -168,7 +168,7 @@ module Google
|
|
168
168
|
credentials = @config.credentials
|
169
169
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
170
170
|
# but only if the default endpoint does not have a region prefix.
|
171
|
-
enable_self_signed_jwt = @config.endpoint ==
|
171
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
172
172
|
!@config.endpoint.split(".").first.include?("-")
|
173
173
|
credentials ||= Credentials.default scope: @config.scope,
|
174
174
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -189,7 +189,8 @@ module Google
|
|
189
189
|
credentials: credentials,
|
190
190
|
endpoint: @config.endpoint,
|
191
191
|
channel_args: @config.channel_args,
|
192
|
-
interceptors: @config.interceptors
|
192
|
+
interceptors: @config.interceptors,
|
193
|
+
channel_pool_config: @config.channel_pool
|
193
194
|
)
|
194
195
|
end
|
195
196
|
|
@@ -1674,9 +1675,9 @@ module Google
|
|
1674
1675
|
# * (`String`) The path to a service account key file in JSON format
|
1675
1676
|
# * (`Hash`) A service account key as a Hash
|
1676
1677
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1677
|
-
# (see the [googleauth docs](https://
|
1678
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1678
1679
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1679
|
-
# (see the [signet docs](https://
|
1680
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1680
1681
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1681
1682
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1682
1683
|
# * (`nil`) indicating no credentials
|
@@ -1718,7 +1719,9 @@ module Google
|
|
1718
1719
|
class Configuration
|
1719
1720
|
extend ::Gapic::Config
|
1720
1721
|
|
1721
|
-
|
1722
|
+
DEFAULT_ENDPOINT = "apigateway.googleapis.com"
|
1723
|
+
|
1724
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1722
1725
|
config_attr :credentials, nil do |value|
|
1723
1726
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1724
1727
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -1753,6 +1756,14 @@ module Google
|
|
1753
1756
|
end
|
1754
1757
|
end
|
1755
1758
|
|
1759
|
+
##
|
1760
|
+
# Configuration for the channel pool
|
1761
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
1762
|
+
#
|
1763
|
+
def channel_pool
|
1764
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
1765
|
+
end
|
1766
|
+
|
1756
1767
|
##
|
1757
1768
|
# Configuration RPC class for the ApiGatewayService API.
|
1758
1769
|
#
|
@@ -93,7 +93,8 @@ module Google
|
|
93
93
|
credentials: credentials,
|
94
94
|
endpoint: @config.endpoint,
|
95
95
|
channel_args: @config.channel_args,
|
96
|
-
interceptors: @config.interceptors
|
96
|
+
interceptors: @config.interceptors,
|
97
|
+
channel_pool_config: @config.channel_pool
|
97
98
|
)
|
98
99
|
|
99
100
|
# Used by an LRO wrapper for some methods of this service
|
@@ -620,9 +621,9 @@ module Google
|
|
620
621
|
# * (`String`) The path to a service account key file in JSON format
|
621
622
|
# * (`Hash`) A service account key as a Hash
|
622
623
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
623
|
-
# (see the [googleauth docs](https://
|
624
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
624
625
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
625
|
-
# (see the [signet docs](https://
|
626
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
626
627
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
627
628
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
628
629
|
# * (`nil`) indicating no credentials
|
@@ -664,7 +665,9 @@ module Google
|
|
664
665
|
class Configuration
|
665
666
|
extend ::Gapic::Config
|
666
667
|
|
667
|
-
|
668
|
+
DEFAULT_ENDPOINT = "apigateway.googleapis.com"
|
669
|
+
|
670
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
668
671
|
config_attr :credentials, nil do |value|
|
669
672
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
670
673
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -699,6 +702,14 @@ module Google
|
|
699
702
|
end
|
700
703
|
end
|
701
704
|
|
705
|
+
##
|
706
|
+
# Configuration for the channel pool
|
707
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
708
|
+
#
|
709
|
+
def channel_pool
|
710
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
711
|
+
end
|
712
|
+
|
702
713
|
##
|
703
714
|
# Configuration RPC class for the Operations API.
|
704
715
|
#
|
@@ -164,7 +164,7 @@ module Google
|
|
164
164
|
credentials = @config.credentials
|
165
165
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
166
166
|
# but only if the default endpoint does not have a region prefix.
|
167
|
-
enable_self_signed_jwt = @config.endpoint ==
|
167
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
168
168
|
!@config.endpoint.split(".").first.include?("-")
|
169
169
|
credentials ||= Credentials.default scope: @config.scope,
|
170
170
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -229,6 +229,26 @@ module Google
|
|
229
229
|
# @return [::Google::Cloud::ApiGateway::V1::ListGatewaysResponse]
|
230
230
|
#
|
231
231
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
232
|
+
#
|
233
|
+
# @example Basic example
|
234
|
+
# require "google/cloud/api_gateway/v1"
|
235
|
+
#
|
236
|
+
# # Create a client object. The client can be reused for multiple calls.
|
237
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
238
|
+
#
|
239
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
240
|
+
# request = Google::Cloud::ApiGateway::V1::ListGatewaysRequest.new
|
241
|
+
#
|
242
|
+
# # Call the list_gateways method.
|
243
|
+
# result = client.list_gateways request
|
244
|
+
#
|
245
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
246
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
247
|
+
# result.each do |item|
|
248
|
+
# # Each element is of type ::Google::Cloud::ApiGateway::V1::Gateway.
|
249
|
+
# p item
|
250
|
+
# end
|
251
|
+
#
|
232
252
|
def list_gateways request, options = nil
|
233
253
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
234
254
|
|
@@ -292,6 +312,22 @@ module Google
|
|
292
312
|
# @return [::Google::Cloud::ApiGateway::V1::Gateway]
|
293
313
|
#
|
294
314
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
315
|
+
#
|
316
|
+
# @example Basic example
|
317
|
+
# require "google/cloud/api_gateway/v1"
|
318
|
+
#
|
319
|
+
# # Create a client object. The client can be reused for multiple calls.
|
320
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
321
|
+
#
|
322
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
323
|
+
# request = Google::Cloud::ApiGateway::V1::GetGatewayRequest.new
|
324
|
+
#
|
325
|
+
# # Call the get_gateway method.
|
326
|
+
# result = client.get_gateway request
|
327
|
+
#
|
328
|
+
# # The returned object is of type Google::Cloud::ApiGateway::V1::Gateway.
|
329
|
+
# p result
|
330
|
+
#
|
295
331
|
def get_gateway request, options = nil
|
296
332
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
297
333
|
|
@@ -360,6 +396,29 @@ module Google
|
|
360
396
|
# @return [::Gapic::Operation]
|
361
397
|
#
|
362
398
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
399
|
+
#
|
400
|
+
# @example Basic example
|
401
|
+
# require "google/cloud/api_gateway/v1"
|
402
|
+
#
|
403
|
+
# # Create a client object. The client can be reused for multiple calls.
|
404
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
405
|
+
#
|
406
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
407
|
+
# request = Google::Cloud::ApiGateway::V1::CreateGatewayRequest.new
|
408
|
+
#
|
409
|
+
# # Call the create_gateway method.
|
410
|
+
# result = client.create_gateway request
|
411
|
+
#
|
412
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
413
|
+
# # check the status of an operation, cancel it, or wait for results.
|
414
|
+
# # Here is how to wait for a response.
|
415
|
+
# result.wait_until_done! timeout: 60
|
416
|
+
# if result.response?
|
417
|
+
# p result.response
|
418
|
+
# else
|
419
|
+
# puts "No response received."
|
420
|
+
# end
|
421
|
+
#
|
363
422
|
def create_gateway request, options = nil
|
364
423
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
365
424
|
|
@@ -429,6 +488,29 @@ module Google
|
|
429
488
|
# @return [::Gapic::Operation]
|
430
489
|
#
|
431
490
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
491
|
+
#
|
492
|
+
# @example Basic example
|
493
|
+
# require "google/cloud/api_gateway/v1"
|
494
|
+
#
|
495
|
+
# # Create a client object. The client can be reused for multiple calls.
|
496
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
497
|
+
#
|
498
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
499
|
+
# request = Google::Cloud::ApiGateway::V1::UpdateGatewayRequest.new
|
500
|
+
#
|
501
|
+
# # Call the update_gateway method.
|
502
|
+
# result = client.update_gateway request
|
503
|
+
#
|
504
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
505
|
+
# # check the status of an operation, cancel it, or wait for results.
|
506
|
+
# # Here is how to wait for a response.
|
507
|
+
# result.wait_until_done! timeout: 60
|
508
|
+
# if result.response?
|
509
|
+
# p result.response
|
510
|
+
# else
|
511
|
+
# puts "No response received."
|
512
|
+
# end
|
513
|
+
#
|
432
514
|
def update_gateway request, options = nil
|
433
515
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
434
516
|
|
@@ -493,6 +575,29 @@ module Google
|
|
493
575
|
# @return [::Gapic::Operation]
|
494
576
|
#
|
495
577
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
578
|
+
#
|
579
|
+
# @example Basic example
|
580
|
+
# require "google/cloud/api_gateway/v1"
|
581
|
+
#
|
582
|
+
# # Create a client object. The client can be reused for multiple calls.
|
583
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
584
|
+
#
|
585
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
586
|
+
# request = Google::Cloud::ApiGateway::V1::DeleteGatewayRequest.new
|
587
|
+
#
|
588
|
+
# # Call the delete_gateway method.
|
589
|
+
# result = client.delete_gateway request
|
590
|
+
#
|
591
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
592
|
+
# # check the status of an operation, cancel it, or wait for results.
|
593
|
+
# # Here is how to wait for a response.
|
594
|
+
# result.wait_until_done! timeout: 60
|
595
|
+
# if result.response?
|
596
|
+
# p result.response
|
597
|
+
# else
|
598
|
+
# puts "No response received."
|
599
|
+
# end
|
600
|
+
#
|
496
601
|
def delete_gateway request, options = nil
|
497
602
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
498
603
|
|
@@ -565,6 +670,26 @@ module Google
|
|
565
670
|
# @return [::Google::Cloud::ApiGateway::V1::ListApisResponse]
|
566
671
|
#
|
567
672
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
673
|
+
#
|
674
|
+
# @example Basic example
|
675
|
+
# require "google/cloud/api_gateway/v1"
|
676
|
+
#
|
677
|
+
# # Create a client object. The client can be reused for multiple calls.
|
678
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
679
|
+
#
|
680
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
681
|
+
# request = Google::Cloud::ApiGateway::V1::ListApisRequest.new
|
682
|
+
#
|
683
|
+
# # Call the list_apis method.
|
684
|
+
# result = client.list_apis request
|
685
|
+
#
|
686
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
687
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
688
|
+
# result.each do |item|
|
689
|
+
# # Each element is of type ::Google::Cloud::ApiGateway::V1::Api.
|
690
|
+
# p item
|
691
|
+
# end
|
692
|
+
#
|
568
693
|
def list_apis request, options = nil
|
569
694
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
570
695
|
|
@@ -628,6 +753,22 @@ module Google
|
|
628
753
|
# @return [::Google::Cloud::ApiGateway::V1::Api]
|
629
754
|
#
|
630
755
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
756
|
+
#
|
757
|
+
# @example Basic example
|
758
|
+
# require "google/cloud/api_gateway/v1"
|
759
|
+
#
|
760
|
+
# # Create a client object. The client can be reused for multiple calls.
|
761
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
762
|
+
#
|
763
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
764
|
+
# request = Google::Cloud::ApiGateway::V1::GetApiRequest.new
|
765
|
+
#
|
766
|
+
# # Call the get_api method.
|
767
|
+
# result = client.get_api request
|
768
|
+
#
|
769
|
+
# # The returned object is of type Google::Cloud::ApiGateway::V1::Api.
|
770
|
+
# p result
|
771
|
+
#
|
631
772
|
def get_api request, options = nil
|
632
773
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
633
774
|
|
@@ -696,6 +837,29 @@ module Google
|
|
696
837
|
# @return [::Gapic::Operation]
|
697
838
|
#
|
698
839
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
840
|
+
#
|
841
|
+
# @example Basic example
|
842
|
+
# require "google/cloud/api_gateway/v1"
|
843
|
+
#
|
844
|
+
# # Create a client object. The client can be reused for multiple calls.
|
845
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
846
|
+
#
|
847
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
848
|
+
# request = Google::Cloud::ApiGateway::V1::CreateApiRequest.new
|
849
|
+
#
|
850
|
+
# # Call the create_api method.
|
851
|
+
# result = client.create_api request
|
852
|
+
#
|
853
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
854
|
+
# # check the status of an operation, cancel it, or wait for results.
|
855
|
+
# # Here is how to wait for a response.
|
856
|
+
# result.wait_until_done! timeout: 60
|
857
|
+
# if result.response?
|
858
|
+
# p result.response
|
859
|
+
# else
|
860
|
+
# puts "No response received."
|
861
|
+
# end
|
862
|
+
#
|
699
863
|
def create_api request, options = nil
|
700
864
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
701
865
|
|
@@ -765,6 +929,29 @@ module Google
|
|
765
929
|
# @return [::Gapic::Operation]
|
766
930
|
#
|
767
931
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
932
|
+
#
|
933
|
+
# @example Basic example
|
934
|
+
# require "google/cloud/api_gateway/v1"
|
935
|
+
#
|
936
|
+
# # Create a client object. The client can be reused for multiple calls.
|
937
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
938
|
+
#
|
939
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
940
|
+
# request = Google::Cloud::ApiGateway::V1::UpdateApiRequest.new
|
941
|
+
#
|
942
|
+
# # Call the update_api method.
|
943
|
+
# result = client.update_api request
|
944
|
+
#
|
945
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
946
|
+
# # check the status of an operation, cancel it, or wait for results.
|
947
|
+
# # Here is how to wait for a response.
|
948
|
+
# result.wait_until_done! timeout: 60
|
949
|
+
# if result.response?
|
950
|
+
# p result.response
|
951
|
+
# else
|
952
|
+
# puts "No response received."
|
953
|
+
# end
|
954
|
+
#
|
768
955
|
def update_api request, options = nil
|
769
956
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
770
957
|
|
@@ -829,6 +1016,29 @@ module Google
|
|
829
1016
|
# @return [::Gapic::Operation]
|
830
1017
|
#
|
831
1018
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1019
|
+
#
|
1020
|
+
# @example Basic example
|
1021
|
+
# require "google/cloud/api_gateway/v1"
|
1022
|
+
#
|
1023
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1024
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
1025
|
+
#
|
1026
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1027
|
+
# request = Google::Cloud::ApiGateway::V1::DeleteApiRequest.new
|
1028
|
+
#
|
1029
|
+
# # Call the delete_api method.
|
1030
|
+
# result = client.delete_api request
|
1031
|
+
#
|
1032
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1033
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1034
|
+
# # Here is how to wait for a response.
|
1035
|
+
# result.wait_until_done! timeout: 60
|
1036
|
+
# if result.response?
|
1037
|
+
# p result.response
|
1038
|
+
# else
|
1039
|
+
# puts "No response received."
|
1040
|
+
# end
|
1041
|
+
#
|
832
1042
|
def delete_api request, options = nil
|
833
1043
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
834
1044
|
|
@@ -901,6 +1111,26 @@ module Google
|
|
901
1111
|
# @return [::Google::Cloud::ApiGateway::V1::ListApiConfigsResponse]
|
902
1112
|
#
|
903
1113
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1114
|
+
#
|
1115
|
+
# @example Basic example
|
1116
|
+
# require "google/cloud/api_gateway/v1"
|
1117
|
+
#
|
1118
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1119
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
1120
|
+
#
|
1121
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1122
|
+
# request = Google::Cloud::ApiGateway::V1::ListApiConfigsRequest.new
|
1123
|
+
#
|
1124
|
+
# # Call the list_api_configs method.
|
1125
|
+
# result = client.list_api_configs request
|
1126
|
+
#
|
1127
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1128
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1129
|
+
# result.each do |item|
|
1130
|
+
# # Each element is of type ::Google::Cloud::ApiGateway::V1::ApiConfig.
|
1131
|
+
# p item
|
1132
|
+
# end
|
1133
|
+
#
|
904
1134
|
def list_api_configs request, options = nil
|
905
1135
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
906
1136
|
|
@@ -967,6 +1197,22 @@ module Google
|
|
967
1197
|
# @return [::Google::Cloud::ApiGateway::V1::ApiConfig]
|
968
1198
|
#
|
969
1199
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1200
|
+
#
|
1201
|
+
# @example Basic example
|
1202
|
+
# require "google/cloud/api_gateway/v1"
|
1203
|
+
#
|
1204
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1205
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
1206
|
+
#
|
1207
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1208
|
+
# request = Google::Cloud::ApiGateway::V1::GetApiConfigRequest.new
|
1209
|
+
#
|
1210
|
+
# # Call the get_api_config method.
|
1211
|
+
# result = client.get_api_config request
|
1212
|
+
#
|
1213
|
+
# # The returned object is of type Google::Cloud::ApiGateway::V1::ApiConfig.
|
1214
|
+
# p result
|
1215
|
+
#
|
970
1216
|
def get_api_config request, options = nil
|
971
1217
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
972
1218
|
|
@@ -1035,6 +1281,29 @@ module Google
|
|
1035
1281
|
# @return [::Gapic::Operation]
|
1036
1282
|
#
|
1037
1283
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1284
|
+
#
|
1285
|
+
# @example Basic example
|
1286
|
+
# require "google/cloud/api_gateway/v1"
|
1287
|
+
#
|
1288
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1289
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
1290
|
+
#
|
1291
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1292
|
+
# request = Google::Cloud::ApiGateway::V1::CreateApiConfigRequest.new
|
1293
|
+
#
|
1294
|
+
# # Call the create_api_config method.
|
1295
|
+
# result = client.create_api_config request
|
1296
|
+
#
|
1297
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1298
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1299
|
+
# # Here is how to wait for a response.
|
1300
|
+
# result.wait_until_done! timeout: 60
|
1301
|
+
# if result.response?
|
1302
|
+
# p result.response
|
1303
|
+
# else
|
1304
|
+
# puts "No response received."
|
1305
|
+
# end
|
1306
|
+
#
|
1038
1307
|
def create_api_config request, options = nil
|
1039
1308
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1040
1309
|
|
@@ -1104,6 +1373,29 @@ module Google
|
|
1104
1373
|
# @return [::Gapic::Operation]
|
1105
1374
|
#
|
1106
1375
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1376
|
+
#
|
1377
|
+
# @example Basic example
|
1378
|
+
# require "google/cloud/api_gateway/v1"
|
1379
|
+
#
|
1380
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1381
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
1382
|
+
#
|
1383
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1384
|
+
# request = Google::Cloud::ApiGateway::V1::UpdateApiConfigRequest.new
|
1385
|
+
#
|
1386
|
+
# # Call the update_api_config method.
|
1387
|
+
# result = client.update_api_config request
|
1388
|
+
#
|
1389
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1390
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1391
|
+
# # Here is how to wait for a response.
|
1392
|
+
# result.wait_until_done! timeout: 60
|
1393
|
+
# if result.response?
|
1394
|
+
# p result.response
|
1395
|
+
# else
|
1396
|
+
# puts "No response received."
|
1397
|
+
# end
|
1398
|
+
#
|
1107
1399
|
def update_api_config request, options = nil
|
1108
1400
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1109
1401
|
|
@@ -1168,6 +1460,29 @@ module Google
|
|
1168
1460
|
# @return [::Gapic::Operation]
|
1169
1461
|
#
|
1170
1462
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1463
|
+
#
|
1464
|
+
# @example Basic example
|
1465
|
+
# require "google/cloud/api_gateway/v1"
|
1466
|
+
#
|
1467
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1468
|
+
# client = Google::Cloud::ApiGateway::V1::ApiGatewayService::Rest::Client.new
|
1469
|
+
#
|
1470
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1471
|
+
# request = Google::Cloud::ApiGateway::V1::DeleteApiConfigRequest.new
|
1472
|
+
#
|
1473
|
+
# # Call the delete_api_config method.
|
1474
|
+
# result = client.delete_api_config request
|
1475
|
+
#
|
1476
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1477
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1478
|
+
# # Here is how to wait for a response.
|
1479
|
+
# result.wait_until_done! timeout: 60
|
1480
|
+
# if result.response?
|
1481
|
+
# p result.response
|
1482
|
+
# else
|
1483
|
+
# puts "No response received."
|
1484
|
+
# end
|
1485
|
+
#
|
1171
1486
|
def delete_api_config request, options = nil
|
1172
1487
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1173
1488
|
|
@@ -1242,9 +1557,9 @@ module Google
|
|
1242
1557
|
# * (`String`) The path to a service account key file in JSON format
|
1243
1558
|
# * (`Hash`) A service account key as a Hash
|
1244
1559
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1245
|
-
# (see the [googleauth docs](https://
|
1560
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1246
1561
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1247
|
-
# (see the [signet docs](https://
|
1562
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1248
1563
|
# * (`nil`) indicating no credentials
|
1249
1564
|
# @return [::Object]
|
1250
1565
|
# @!attribute [rw] scope
|
@@ -1277,7 +1592,9 @@ module Google
|
|
1277
1592
|
class Configuration
|
1278
1593
|
extend ::Gapic::Config
|
1279
1594
|
|
1280
|
-
|
1595
|
+
DEFAULT_ENDPOINT = "apigateway.googleapis.com"
|
1596
|
+
|
1597
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1281
1598
|
config_attr :credentials, nil do |value|
|
1282
1599
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1283
1600
|
allowed.any? { |klass| klass === value }
|