google-cloud-functions-v1 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +2 -2
- data/lib/google/cloud/functions/v1/cloud_functions_service/client.rb +16 -18
- data/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb +12 -22
- data/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb +1179 -0
- data/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb +791 -0
- data/lib/google/cloud/functions/v1/cloud_functions_service/rest/service_stub.rb +704 -0
- data/lib/google/cloud/functions/v1/cloud_functions_service/rest.rb +53 -0
- data/lib/google/cloud/functions/v1/cloud_functions_service.rb +7 -1
- data/lib/google/cloud/functions/v1/rest.rb +37 -0
- data/lib/google/cloud/functions/v1/version.rb +1 -1
- data/lib/google/cloud/functions/v1.rb +7 -2
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +15 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97f52801b9579f6006085e6e0a3d7bb71894afe24ad60b7871906163023d0dc6
|
4
|
+
data.tar.gz: 990ef0eb79f444d14dc939ed2c22178551aa25178f95dccc8bdfc34ac95a3b5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21f515d95665e92e8d72d636a7169e55b7fc349144da9704e2f1743bf13ceb9b248daeb28c4764b7f5fcb01e69dfc5e367736e050eb3fc303d5682ae966cdc49
|
7
|
+
data.tar.gz: '03163831ba992f741d9d6eb25983e7faee2284ae048ff50ece0c2fed3470c55e317d1c2e4d47e03b52d2ff07d7553cb9a70544dcfaf5ae415384b1e1b48f9bf6'
|
data/AUTHENTICATION.md
CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
|
|
114
114
|
To configure your system for this, simply:
|
115
115
|
|
116
116
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
117
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
117
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
118
118
|
3. Write code as if already authenticated.
|
119
119
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Ruby Client for the Cloud Functions V1 API
|
2
2
|
|
3
|
-
|
3
|
+
Manages lightweight user-provided functions executed in response to events.
|
4
4
|
|
5
5
|
The Cloud Functions API manages lightweight user-provided functions executed in response to events.
|
6
6
|
|
@@ -46,7 +46,7 @@ for general usage information.
|
|
46
46
|
## Enabling Logging
|
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
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/
|
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
50
|
or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/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.
|
@@ -234,13 +234,11 @@ module Google
|
|
234
234
|
# # Call the list_functions method.
|
235
235
|
# result = client.list_functions request
|
236
236
|
#
|
237
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
238
|
-
# #
|
239
|
-
#
|
240
|
-
# # methods are also available for managing paging directly.
|
241
|
-
# result.each do |response|
|
237
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
238
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
239
|
+
# result.each do |item|
|
242
240
|
# # Each element is of type ::Google::Cloud::Functions::V1::CloudFunction.
|
243
|
-
# p
|
241
|
+
# p item
|
244
242
|
# end
|
245
243
|
#
|
246
244
|
def list_functions request, options = nil
|
@@ -416,14 +414,14 @@ module Google
|
|
416
414
|
# # Call the create_function method.
|
417
415
|
# result = client.create_function request
|
418
416
|
#
|
419
|
-
# # The returned object is of type Gapic::Operation. You can use
|
420
|
-
# #
|
421
|
-
# #
|
417
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
418
|
+
# # check the status of an operation, cancel it, or wait for results.
|
419
|
+
# # Here is how to wait for a response.
|
422
420
|
# result.wait_until_done! timeout: 60
|
423
421
|
# if result.response?
|
424
422
|
# p result.response
|
425
423
|
# else
|
426
|
-
# puts "
|
424
|
+
# puts "No response received."
|
427
425
|
# end
|
428
426
|
#
|
429
427
|
def create_function request, options = nil
|
@@ -511,14 +509,14 @@ module Google
|
|
511
509
|
# # Call the update_function method.
|
512
510
|
# result = client.update_function request
|
513
511
|
#
|
514
|
-
# # The returned object is of type Gapic::Operation. You can use
|
515
|
-
# #
|
516
|
-
# #
|
512
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
513
|
+
# # check the status of an operation, cancel it, or wait for results.
|
514
|
+
# # Here is how to wait for a response.
|
517
515
|
# result.wait_until_done! timeout: 60
|
518
516
|
# if result.response?
|
519
517
|
# p result.response
|
520
518
|
# else
|
521
|
-
# puts "
|
519
|
+
# puts "No response received."
|
522
520
|
# end
|
523
521
|
#
|
524
522
|
def update_function request, options = nil
|
@@ -606,14 +604,14 @@ module Google
|
|
606
604
|
# # Call the delete_function method.
|
607
605
|
# result = client.delete_function request
|
608
606
|
#
|
609
|
-
# # The returned object is of type Gapic::Operation. You can use
|
610
|
-
# #
|
611
|
-
# #
|
607
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
608
|
+
# # check the status of an operation, cancel it, or wait for results.
|
609
|
+
# # Here is how to wait for a response.
|
612
610
|
# result.wait_until_done! timeout: 60
|
613
611
|
# if result.response?
|
614
612
|
# p result.response
|
615
613
|
# else
|
616
|
-
# puts "
|
614
|
+
# puts "No response received."
|
617
615
|
# end
|
618
616
|
#
|
619
617
|
def delete_function request, options = nil
|
@@ -158,13 +158,11 @@ module Google
|
|
158
158
|
# # Call the list_operations method.
|
159
159
|
# result = client.list_operations request
|
160
160
|
#
|
161
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
-
# #
|
163
|
-
#
|
164
|
-
# # methods are also available for managing paging directly.
|
165
|
-
# result.each do |response|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
162
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
163
|
+
# result.each do |item|
|
166
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
-
# p
|
165
|
+
# p item
|
168
166
|
# end
|
169
167
|
#
|
170
168
|
def list_operations request, options = nil
|
@@ -184,14 +182,6 @@ module Google
|
|
184
182
|
gapic_version: ::Google::Cloud::Functions::V1::VERSION
|
185
183
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
186
184
|
|
187
|
-
header_params = {}
|
188
|
-
if request.name
|
189
|
-
header_params["name"] = request.name
|
190
|
-
end
|
191
|
-
|
192
|
-
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
193
|
-
metadata[:"x-goog-request-params"] ||= request_params_header
|
194
|
-
|
195
185
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
196
186
|
metadata: metadata,
|
197
187
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
@@ -253,14 +243,14 @@ module Google
|
|
253
243
|
# # Call the get_operation method.
|
254
244
|
# result = client.get_operation request
|
255
245
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
246
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
247
|
+
# # check the status of an operation, cancel it, or wait for results.
|
248
|
+
# # Here is how to wait for a response.
|
259
249
|
# result.wait_until_done! timeout: 60
|
260
250
|
# if result.response?
|
261
251
|
# p result.response
|
262
252
|
# else
|
263
|
-
# puts "
|
253
|
+
# puts "No response received."
|
264
254
|
# end
|
265
255
|
#
|
266
256
|
def get_operation request, options = nil
|
@@ -540,14 +530,14 @@ module Google
|
|
540
530
|
# # Call the wait_operation method.
|
541
531
|
# result = client.wait_operation request
|
542
532
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
533
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
534
|
+
# # check the status of an operation, cancel it, or wait for results.
|
535
|
+
# # Here is how to wait for a response.
|
546
536
|
# result.wait_until_done! timeout: 60
|
547
537
|
# if result.response?
|
548
538
|
# p result.response
|
549
539
|
# else
|
550
|
-
# puts "
|
540
|
+
# puts "No response received."
|
551
541
|
# end
|
552
542
|
#
|
553
543
|
def wait_operation request, options = nil
|