google-cloud-functions-v1 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9ae6ffbba3fd5993a0ebd2fda5bccd9593e80c37d5012d604203528506b2cce
4
- data.tar.gz: 7e2f03e76720891f2922509bbcaa5527988451d21764dd8b87219286db9e3d6f
3
+ metadata.gz: b2cf74213fbdd2baf3be4bd28c3f06e11e4de253a168aa82e66fdcac81ff69dc
4
+ data.tar.gz: 3337f91356501519dec70e0be7b39467b3127a88334a1d0122a3ee761f961c4a
5
5
  SHA512:
6
- metadata.gz: 3dda274f4f9ec1a4b65684e4f4566e361012d4c605c104da27dbc4715fca81b3d09f579e4e2e6ac8050a975bed3b3f026cbd97ec8d733d3f112367abb67f981f
7
- data.tar.gz: 51b3ff8cb928035e77600e3fbf92d0ea6e4392c84bd70f95891d2aa05e349b1ff10dc711a07331d586c1da2b43d3e685a897832cbbec6cc8dcd2205e6f63e02b
6
+ metadata.gz: 3aec811f3bef44a7410fe1c6ca1401d30af6a498b3f977ccb7841627634e1ffe10b47c706c9966daa39dfbe8248a309510c76e3d9cb630b311aac131966f06c1
7
+ data.tar.gz: 1fc0ce81ced55bcbc461fa0760dc0c716076766ce88133a6ca4dcf199f3aea7e6bc9a813d96347a0ffabbc96622c13cc89f67e92582c058b627f57de1311ad73
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-functions-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Functions::V1::CloudFunctionsService::Credentials}):
68
68
 
69
- 1. `FUNCTIONS_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `FUNCTIONS_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `FUNCTIONS_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `FUNCTIONS_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/functions/v1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/functions/v1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |c
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/functions/v1"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/functions/v1"
34
34
 
35
35
  client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Functions::V1::ListFunctionsRequest.new # (request fields as keyword arguments...)
37
37
  response = client.list_functions request
38
38
  ```
39
39
 
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Functions::V1::CloudFunctionsService::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all CloudFunctionsService clients:
47
- #
48
- # ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all CloudFunctionsService clients
47
+ # ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -67,36 +66,24 @@ module Google
67
66
 
68
67
  default_config.rpcs.list_functions.timeout = 600.0
69
68
  default_config.rpcs.list_functions.retry_policy = {
70
- initial_delay: 0.1,
71
- max_delay: 60.0,
72
- multiplier: 1.3,
73
- retry_codes: [14, 4]
69
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
74
70
  }
75
71
 
76
72
  default_config.rpcs.get_function.timeout = 600.0
77
73
  default_config.rpcs.get_function.retry_policy = {
78
- initial_delay: 0.1,
79
- max_delay: 60.0,
80
- multiplier: 1.3,
81
- retry_codes: [14, 4]
74
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
82
75
  }
83
76
 
84
77
  default_config.rpcs.create_function.timeout = 600.0
85
78
 
86
79
  default_config.rpcs.update_function.timeout = 600.0
87
80
  default_config.rpcs.update_function.retry_policy = {
88
- initial_delay: 0.1,
89
- max_delay: 60.0,
90
- multiplier: 1.3,
91
- retry_codes: [14, 4]
81
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
92
82
  }
93
83
 
94
84
  default_config.rpcs.delete_function.timeout = 600.0
95
85
  default_config.rpcs.delete_function.retry_policy = {
96
- initial_delay: 0.1,
97
- max_delay: 60.0,
98
- multiplier: 1.3,
99
- retry_codes: [14, 4]
86
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
100
87
  }
101
88
 
102
89
  default_config.rpcs.call_function.timeout = 600.0
@@ -130,19 +117,15 @@ module Google
130
117
  ##
131
118
  # Create a new CloudFunctionsService client object.
132
119
  #
133
- # ## Examples
134
- #
135
- # To create a new CloudFunctionsService client with the default
136
- # configuration:
137
- #
138
- # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
120
+ # @example
139
121
  #
140
- # To create a new CloudFunctionsService client with a custom
141
- # configuration:
122
+ # # Create a client using the default configuration
123
+ # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new
142
124
  #
143
- # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config|
144
- # config.timeout = 10.0
145
- # end
125
+ # # Create a client using a custom configuration
126
+ # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config|
127
+ # config.timeout = 10.0
128
+ # end
146
129
  #
147
130
  # @yield [config] Configure the CloudFunctionsService client.
148
131
  # @yieldparam config [Client::Configuration]
@@ -162,14 +145,13 @@ module Google
162
145
 
163
146
  # Create credentials
164
147
  credentials = @config.credentials
165
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
148
+ # Use self-signed JWT if the endpoint is unchanged from default,
166
149
  # but only if the default endpoint does not have a region prefix.
167
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
168
- @config.endpoint == Client.configure.endpoint &&
150
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
169
151
  !@config.endpoint.split(".").first.include?("-")
170
152
  credentials ||= Credentials.default scope: @config.scope,
171
153
  enable_self_signed_jwt: enable_self_signed_jwt
172
- if credentials.is_a?(String) || credentials.is_a?(Hash)
154
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
173
155
  credentials = Credentials.new credentials, scope: @config.scope
174
156
  end
175
157
  @quota_project_id = @config.quota_project
@@ -265,7 +247,9 @@ module Google
265
247
  options.apply_defaults timeout: @config.rpcs.list_functions.timeout,
266
248
  metadata: metadata,
267
249
  retry_policy: @config.rpcs.list_functions.retry_policy
268
- options.apply_defaults metadata: @config.metadata,
250
+
251
+ options.apply_defaults timeout: @config.timeout,
252
+ metadata: @config.metadata,
269
253
  retry_policy: @config.retry_policy
270
254
 
271
255
  @cloud_functions_service_stub.call_rpc :list_functions, request, options: options do |response, operation|
@@ -332,7 +316,9 @@ module Google
332
316
  options.apply_defaults timeout: @config.rpcs.get_function.timeout,
333
317
  metadata: metadata,
334
318
  retry_policy: @config.rpcs.get_function.retry_policy
335
- options.apply_defaults metadata: @config.metadata,
319
+
320
+ options.apply_defaults timeout: @config.timeout,
321
+ metadata: @config.metadata,
336
322
  retry_policy: @config.retry_policy
337
323
 
338
324
  @cloud_functions_service_stub.call_rpc :get_function, request, options: options do |response, operation|
@@ -403,7 +389,9 @@ module Google
403
389
  options.apply_defaults timeout: @config.rpcs.create_function.timeout,
404
390
  metadata: metadata,
405
391
  retry_policy: @config.rpcs.create_function.retry_policy
406
- options.apply_defaults metadata: @config.metadata,
392
+
393
+ options.apply_defaults timeout: @config.timeout,
394
+ metadata: @config.metadata,
407
395
  retry_policy: @config.retry_policy
408
396
 
409
397
  @cloud_functions_service_stub.call_rpc :create_function, request, options: options do |response, operation|
@@ -472,7 +460,9 @@ module Google
472
460
  options.apply_defaults timeout: @config.rpcs.update_function.timeout,
473
461
  metadata: metadata,
474
462
  retry_policy: @config.rpcs.update_function.retry_policy
475
- options.apply_defaults metadata: @config.metadata,
463
+
464
+ options.apply_defaults timeout: @config.timeout,
465
+ metadata: @config.metadata,
476
466
  retry_policy: @config.retry_policy
477
467
 
478
468
  @cloud_functions_service_stub.call_rpc :update_function, request, options: options do |response, operation|
@@ -541,7 +531,9 @@ module Google
541
531
  options.apply_defaults timeout: @config.rpcs.delete_function.timeout,
542
532
  metadata: metadata,
543
533
  retry_policy: @config.rpcs.delete_function.retry_policy
544
- options.apply_defaults metadata: @config.metadata,
534
+
535
+ options.apply_defaults timeout: @config.timeout,
536
+ metadata: @config.metadata,
545
537
  retry_policy: @config.retry_policy
546
538
 
547
539
  @cloud_functions_service_stub.call_rpc :delete_function, request, options: options do |response, operation|
@@ -613,7 +605,9 @@ module Google
613
605
  options.apply_defaults timeout: @config.rpcs.call_function.timeout,
614
606
  metadata: metadata,
615
607
  retry_policy: @config.rpcs.call_function.retry_policy
616
- options.apply_defaults metadata: @config.metadata,
608
+
609
+ options.apply_defaults timeout: @config.timeout,
610
+ metadata: @config.metadata,
617
611
  retry_policy: @config.retry_policy
618
612
 
619
613
  @cloud_functions_service_stub.call_rpc :call_function, request, options: options do |response, operation|
@@ -704,7 +698,9 @@ module Google
704
698
  options.apply_defaults timeout: @config.rpcs.generate_upload_url.timeout,
705
699
  metadata: metadata,
706
700
  retry_policy: @config.rpcs.generate_upload_url.retry_policy
707
- options.apply_defaults metadata: @config.metadata,
701
+
702
+ options.apply_defaults timeout: @config.timeout,
703
+ metadata: @config.metadata,
708
704
  retry_policy: @config.retry_policy
709
705
 
710
706
  @cloud_functions_service_stub.call_rpc :generate_upload_url, request, options: options do |response, operation|
@@ -778,7 +774,9 @@ module Google
778
774
  options.apply_defaults timeout: @config.rpcs.generate_download_url.timeout,
779
775
  metadata: metadata,
780
776
  retry_policy: @config.rpcs.generate_download_url.retry_policy
781
- options.apply_defaults metadata: @config.metadata,
777
+
778
+ options.apply_defaults timeout: @config.timeout,
779
+ metadata: @config.metadata,
782
780
  retry_policy: @config.retry_policy
783
781
 
784
782
  @cloud_functions_service_stub.call_rpc :generate_download_url, request, options: options do |response, operation|
@@ -851,7 +849,9 @@ module Google
851
849
  options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
852
850
  metadata: metadata,
853
851
  retry_policy: @config.rpcs.set_iam_policy.retry_policy
854
- options.apply_defaults metadata: @config.metadata,
852
+
853
+ options.apply_defaults timeout: @config.timeout,
854
+ metadata: @config.metadata,
855
855
  retry_policy: @config.retry_policy
856
856
 
857
857
  @cloud_functions_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
@@ -923,7 +923,9 @@ module Google
923
923
  options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
924
924
  metadata: metadata,
925
925
  retry_policy: @config.rpcs.get_iam_policy.retry_policy
926
- options.apply_defaults metadata: @config.metadata,
926
+
927
+ options.apply_defaults timeout: @config.timeout,
928
+ metadata: @config.metadata,
927
929
  retry_policy: @config.retry_policy
928
930
 
929
931
  @cloud_functions_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
@@ -998,7 +1000,9 @@ module Google
998
1000
  options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
999
1001
  metadata: metadata,
1000
1002
  retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1001
- options.apply_defaults metadata: @config.metadata,
1003
+
1004
+ options.apply_defaults timeout: @config.timeout,
1005
+ metadata: @config.metadata,
1002
1006
  retry_policy: @config.retry_policy
1003
1007
 
1004
1008
  @cloud_functions_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
@@ -1022,22 +1026,21 @@ module Google
1022
1026
  # Configuration can be applied globally to all clients, or to a single client
1023
1027
  # on construction.
1024
1028
  #
1025
- # # Examples
1026
- #
1027
- # To modify the global config, setting the timeout for list_functions
1028
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1029
- #
1030
- # ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.configure do |config|
1031
- # config.timeout = 10.0
1032
- # config.rpcs.list_functions.timeout = 20.0
1033
- # end
1034
- #
1035
- # To apply the above configuration only to a new client:
1036
- #
1037
- # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config|
1038
- # config.timeout = 10.0
1039
- # config.rpcs.list_functions.timeout = 20.0
1040
- # end
1029
+ # @example
1030
+ #
1031
+ # # Modify the global config, setting the timeout for
1032
+ # # list_functions to 20 seconds,
1033
+ # # and all remaining timeouts to 10 seconds.
1034
+ # ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.configure do |config|
1035
+ # config.timeout = 10.0
1036
+ # config.rpcs.list_functions.timeout = 20.0
1037
+ # end
1038
+ #
1039
+ # # Apply the above configuration only to a new client.
1040
+ # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config|
1041
+ # config.timeout = 10.0
1042
+ # config.rpcs.list_functions.timeout = 20.0
1043
+ # end
1041
1044
  #
1042
1045
  # @!attribute [rw] endpoint
1043
1046
  # The hostname or hostname:port of the service endpoint.
@@ -82,7 +82,7 @@ module Google
82
82
  # Create credentials
83
83
  credentials = @config.credentials
84
84
  credentials ||= Credentials.default scope: @config.scope
85
- if credentials.is_a?(String) || credentials.is_a?(Hash)
85
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
86
86
  credentials = Credentials.new credentials, scope: @config.scope
87
87
  end
88
88
  @quota_project_id = @config.quota_project
@@ -169,7 +169,9 @@ module Google
169
169
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
170
170
  metadata: metadata,
171
171
  retry_policy: @config.rpcs.list_operations.retry_policy
172
- options.apply_defaults metadata: @config.metadata,
172
+
173
+ options.apply_defaults timeout: @config.timeout,
174
+ metadata: @config.metadata,
173
175
  retry_policy: @config.retry_policy
174
176
 
175
177
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -239,7 +241,9 @@ module Google
239
241
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
240
242
  metadata: metadata,
241
243
  retry_policy: @config.rpcs.get_operation.retry_policy
242
- options.apply_defaults metadata: @config.metadata,
244
+
245
+ options.apply_defaults timeout: @config.timeout,
246
+ metadata: @config.metadata,
243
247
  retry_policy: @config.retry_policy
244
248
 
245
249
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -309,7 +313,9 @@ module Google
309
313
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
310
314
  metadata: metadata,
311
315
  retry_policy: @config.rpcs.delete_operation.retry_policy
312
- options.apply_defaults metadata: @config.metadata,
316
+
317
+ options.apply_defaults timeout: @config.timeout,
318
+ metadata: @config.metadata,
313
319
  retry_policy: @config.retry_policy
314
320
 
315
321
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -384,7 +390,9 @@ module Google
384
390
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
385
391
  metadata: metadata,
386
392
  retry_policy: @config.rpcs.cancel_operation.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
393
+
394
+ options.apply_defaults timeout: @config.timeout,
395
+ metadata: @config.metadata,
388
396
  retry_policy: @config.retry_policy
389
397
 
390
398
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -396,9 +404,9 @@ module Google
396
404
  end
397
405
 
398
406
  ##
399
- # Waits for the specified long-running operation until it is done or reaches
400
- # at most a specified timeout, returning the latest state. If the operation
401
- # is already done, the latest state is immediately returned. If the timeout
407
+ # Waits until the specified long-running operation is done or reaches at most
408
+ # a specified timeout, returning the latest state. If the operation is
409
+ # already done, the latest state is immediately returned. If the timeout
402
410
  # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
403
411
  # timeout is used. If the server does not support this method, it returns
404
412
  # `google.rpc.Code.UNIMPLEMENTED`.
@@ -456,7 +464,9 @@ module Google
456
464
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
465
  metadata: metadata,
458
466
  retry_policy: @config.rpcs.wait_operation.retry_policy
459
- options.apply_defaults metadata: @config.metadata,
467
+
468
+ options.apply_defaults timeout: @config.timeout,
469
+ metadata: @config.metadata,
460
470
  retry_policy: @config.retry_policy
461
471
 
462
472
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -481,22 +491,21 @@ module Google
481
491
  # Configuration can be applied globally to all clients, or to a single client
482
492
  # on construction.
483
493
  #
484
- # # Examples
485
- #
486
- # To modify the global config, setting the timeout for list_operations
487
- # to 20 seconds, and all remaining timeouts to 10 seconds:
488
- #
489
- # ::Google::Longrunning::Operations::Client.configure do |config|
490
- # config.timeout = 10.0
491
- # config.rpcs.list_operations.timeout = 20.0
492
- # end
493
- #
494
- # To apply the above configuration only to a new client:
495
- #
496
- # client = ::Google::Longrunning::Operations::Client.new do |config|
497
- # config.timeout = 10.0
498
- # config.rpcs.list_operations.timeout = 20.0
499
- # end
494
+ # @example
495
+ #
496
+ # # Modify the global config, setting the timeout for
497
+ # # list_operations to 20 seconds,
498
+ # # and all remaining timeouts to 10 seconds.
499
+ # ::Google::Longrunning::Operations::Client.configure do |config|
500
+ # config.timeout = 10.0
501
+ # config.rpcs.list_operations.timeout = 20.0
502
+ # end
503
+ #
504
+ # # Apply the above configuration only to a new client.
505
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
506
+ # config.timeout = 10.0
507
+ # config.rpcs.list_operations.timeout = 20.0
508
+ # end
500
509
  #
501
510
  # @!attribute [rw] endpoint
502
511
  # The hostname or hostname:port of the service endpoint.
@@ -61,6 +61,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
61
61
  end
62
62
  add_message "google.cloud.functions.v1.HttpsTrigger" do
63
63
  optional :url, :string, 1
64
+ optional :security_level, :enum, 2, "google.cloud.functions.v1.HttpsTrigger.SecurityLevel"
65
+ end
66
+ add_enum "google.cloud.functions.v1.HttpsTrigger.SecurityLevel" do
67
+ value :SECURITY_LEVEL_UNSPECIFIED, 0
68
+ value :SECURE_ALWAYS, 1
69
+ value :SECURE_OPTIONAL, 2
64
70
  end
65
71
  add_message "google.cloud.functions.v1.EventTrigger" do
66
72
  optional :event_type, :string, 1
@@ -141,6 +147,7 @@ module Google
141
147
  CloudFunction::IngressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.IngressSettings").enummodule
142
148
  SourceRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.SourceRepository").msgclass
143
149
  HttpsTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.HttpsTrigger").msgclass
150
+ HttpsTrigger::SecurityLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.HttpsTrigger.SecurityLevel").enummodule
144
151
  EventTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.EventTrigger").msgclass
145
152
  FailurePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.FailurePolicy").msgclass
146
153
  FailurePolicy::Retry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.FailurePolicy.Retry").msgclass
@@ -27,7 +27,7 @@ module Google
27
27
  # A service that application uses to manipulate triggers and functions.
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Functions
23
23
  module V1
24
- VERSION = "0.3.0"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -32,7 +32,7 @@ module Google
32
32
  # User-provided description of a function.
33
33
  # @!attribute [rw] source_archive_url
34
34
  # @return [::String]
35
- # The Google Cloud Storage URL, starting with gs://, pointing to the zip
35
+ # The Google Cloud Storage URL, starting with `gs://`, pointing to the zip
36
36
  # archive which contains the function.
37
37
  # @!attribute [rw] source_repository
38
38
  # @return [::Google::Cloud::Functions::V1::SourceRepository]
@@ -42,7 +42,11 @@ module Google
42
42
  # @!attribute [rw] source_upload_url
43
43
  # @return [::String]
44
44
  # The Google Cloud Storage signed URL used for source uploading, generated
45
- # by [google.cloud.functions.v1.GenerateUploadUrl][]
45
+ # by calling [google.cloud.functions.v1.GenerateUploadUrl].
46
+ #
47
+ # The signature is validated on write methods (Create, Update)
48
+ # The signature is stripped from the Function object on read methods (Get,
49
+ # List)
46
50
  # @!attribute [rw] https_trigger
47
51
  # @return [::Google::Cloud::Functions::V1::HttpsTrigger]
48
52
  # An HTTPS endpoint type of source that can be triggered via URL.
@@ -66,7 +70,7 @@ module Google
66
70
  # function, optional when updating an existing function. For a complete
67
71
  # list of possible choices, see the
68
72
  # [`gcloud` command
69
- # reference](/sdk/gcloud/reference/functions/deploy#--runtime).
73
+ # reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).
70
74
  # @!attribute [rw] timeout
71
75
  # @return [::Google::Protobuf::Duration]
72
76
  # The function execution timeout. Execution is considered failed and
@@ -101,8 +105,8 @@ module Google
101
105
  # project. Otherwise, it must belong to a project within the same
102
106
  # organization. The format of this field is either
103
107
  # `projects/{project}/global/networks/{network}` or `{network}`, where
104
- # \\{project} is a project id where the network is defined, and \\{network} is
105
- # the short name of the network.
108
+ # `{project}` is a project id where the network is defined, and `{network}`
109
+ # is the short name of the network.
106
110
  #
107
111
  # This field is mutually exclusive with `vpc_connector` and will be replaced
108
112
  # by it.
@@ -226,9 +230,32 @@ module Google
226
230
  # @!attribute [r] url
227
231
  # @return [::String]
228
232
  # Output only. The deployed url for the function.
233
+ # @!attribute [rw] security_level
234
+ # @return [::Google::Cloud::Functions::V1::HttpsTrigger::SecurityLevel]
235
+ # The security level for the function.
229
236
  class HttpsTrigger
230
237
  include ::Google::Protobuf::MessageExts
231
238
  extend ::Google::Protobuf::MessageExts::ClassMethods
239
+
240
+ # Available security level settings.
241
+ #
242
+ # This controls the methods to enforce security (HTTPS) on a URL.
243
+ #
244
+ # If unspecified, SECURE_OPTIONAL will be used.
245
+ module SecurityLevel
246
+ # Unspecified.
247
+ SECURITY_LEVEL_UNSPECIFIED = 0
248
+
249
+ # Requests for a URL that match this handler that do not use HTTPS are
250
+ # automatically redirected to the HTTPS URL with the same path. Query
251
+ # parameters are reserved for the redirect.
252
+ SECURE_ALWAYS = 1
253
+
254
+ # Both HTTP and HTTPS requests with URLs that match the handler succeed
255
+ # without redirects. The application can examine the request to determine
256
+ # which protocol was used and respond accordingly.
257
+ SECURE_OPTIONAL = 2
258
+ end
232
259
  end
233
260
 
234
261
  # Describes EventTrigger, used to request events be sent from another
@@ -25,7 +25,7 @@ module Google
25
25
  # @!attribute [rw] target
26
26
  # @return [::String]
27
27
  # Target of the operation - for example
28
- # projects/project-1/locations/region-1/functions/function-1
28
+ # `projects/project-1/locations/region-1/functions/function-1`
29
29
  # @!attribute [rw] type
30
30
  # @return [::Google::Cloud::Functions::V1::OperationType]
31
31
  # Type of operation.
@@ -19,30 +19,53 @@
19
19
 
20
20
  module Google
21
21
  module Type
22
- # Represents an expression text. Example:
22
+ # Represents a textual expression in the Common Expression Language (CEL)
23
+ # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
24
+ # are documented at https://github.com/google/cel-spec.
23
25
  #
24
- # title: "User account presence"
25
- # description: "Determines whether the request has a user account"
26
- # expression: "size(request.user) > 0"
26
+ # Example (Comparison):
27
+ #
28
+ # title: "Summary size limit"
29
+ # description: "Determines if a summary is less than 100 chars"
30
+ # expression: "document.summary.size() < 100"
31
+ #
32
+ # Example (Equality):
33
+ #
34
+ # title: "Requestor is owner"
35
+ # description: "Determines if requestor is the document owner"
36
+ # expression: "document.owner == request.auth.claims.email"
37
+ #
38
+ # Example (Logic):
39
+ #
40
+ # title: "Public documents"
41
+ # description: "Determine whether the document should be publicly visible"
42
+ # expression: "document.type != 'private' && document.type != 'internal'"
43
+ #
44
+ # Example (Data Manipulation):
45
+ #
46
+ # title: "Notification string"
47
+ # description: "Create a notification string with a timestamp."
48
+ # expression: "'New message received at ' + string(document.create_time)"
49
+ #
50
+ # The exact variables and functions that may be referenced within an expression
51
+ # are determined by the service that evaluates it. See the service
52
+ # documentation for additional information.
27
53
  # @!attribute [rw] expression
28
54
  # @return [::String]
29
- # Textual representation of an expression in
30
- # Common Expression Language syntax.
31
- #
32
- # The application context of the containing message determines which
33
- # well-known feature set of CEL is supported.
55
+ # Textual representation of an expression in Common Expression Language
56
+ # syntax.
34
57
  # @!attribute [rw] title
35
58
  # @return [::String]
36
- # An optional title for the expression, i.e. a short string describing
59
+ # Optional. Title for the expression, i.e. a short string describing
37
60
  # its purpose. This can be used e.g. in UIs which allow to enter the
38
61
  # expression.
39
62
  # @!attribute [rw] description
40
63
  # @return [::String]
41
- # An optional description of the expression. This is a longer text which
64
+ # Optional. Description of the expression. This is a longer text which
42
65
  # describes the expression, e.g. when hovered over it in a UI.
43
66
  # @!attribute [rw] location
44
67
  # @return [::String]
45
- # An optional string indicating the location of the expression for error
68
+ # Optional. String indicating the location of the expression for error
46
69
  # reporting, e.g. a file name and a position in the file.
47
70
  class Expr
48
71
  include ::Google::Protobuf::MessageExts
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-functions-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-09 00:00:00.000000000 Z
11
+ date: 2021-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.3'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.3'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -47,7 +53,7 @@ dependencies:
47
53
  version: 0.6.10
48
54
  - - "<"
49
55
  - !ruby/object:Gem::Version
50
- version: '2.0'
56
+ version: 2.a
51
57
  type: :runtime
52
58
  prerelease: false
53
59
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,7 +63,7 @@ dependencies:
57
63
  version: 0.6.10
58
64
  - - "<"
59
65
  - !ruby/object:Gem::Version
60
- version: '2.0'
66
+ version: 2.a
61
67
  - !ruby/object:Gem::Dependency
62
68
  name: google-style
63
69
  requirement: !ruby/object:Gem::Requirement
@@ -229,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
235
  - !ruby/object:Gem::Version
230
236
  version: '0'
231
237
  requirements: []
232
- rubygems_version: 3.2.13
238
+ rubygems_version: 3.2.17
233
239
  signing_key:
234
240
  specification_version: 4
235
241
  summary: API Client library for the Cloud Functions V1 API