google-cloud-app_engine-v1 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +2 -2
  4. data/lib/google/appengine/v1/appengine_pb.rb +0 -1
  5. data/lib/google/cloud/app_engine/v1/applications/client.rb +12 -12
  6. data/lib/google/cloud/app_engine/v1/applications/operations.rb +12 -14
  7. data/lib/google/cloud/app_engine/v1/applications/rest/client.rb +589 -0
  8. data/lib/google/cloud/app_engine/v1/applications/rest/operations.rb +793 -0
  9. data/lib/google/cloud/app_engine/v1/applications/rest/service_stub.rb +285 -0
  10. data/lib/google/cloud/app_engine/v1/applications/rest.rb +52 -0
  11. data/lib/google/cloud/app_engine/v1/applications.rb +7 -1
  12. data/lib/google/cloud/app_engine/v1/authorized_certificates/client.rb +4 -6
  13. data/lib/google/cloud/app_engine/v1/authorized_certificates/rest/client.rb +643 -0
  14. data/lib/google/cloud/app_engine/v1/authorized_certificates/rest/service_stub.rb +345 -0
  15. data/lib/google/cloud/app_engine/v1/authorized_certificates/rest.rb +52 -0
  16. data/lib/google/cloud/app_engine/v1/authorized_certificates.rb +7 -1
  17. data/lib/google/cloud/app_engine/v1/authorized_domains/client.rb +4 -6
  18. data/lib/google/cloud/app_engine/v1/authorized_domains/rest/client.rb +349 -0
  19. data/lib/google/cloud/app_engine/v1/authorized_domains/rest/service_stub.rb +107 -0
  20. data/lib/google/cloud/app_engine/v1/authorized_domains/rest.rb +53 -0
  21. data/lib/google/cloud/app_engine/v1/authorized_domains.rb +7 -1
  22. data/lib/google/cloud/app_engine/v1/domain_mappings/client.rb +16 -18
  23. data/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb +12 -14
  24. data/lib/google/cloud/app_engine/v1/domain_mappings/rest/client.rb +659 -0
  25. data/lib/google/cloud/app_engine/v1/domain_mappings/rest/operations.rb +793 -0
  26. data/lib/google/cloud/app_engine/v1/domain_mappings/rest/service_stub.rb +345 -0
  27. data/lib/google/cloud/app_engine/v1/domain_mappings/rest.rb +52 -0
  28. data/lib/google/cloud/app_engine/v1/domain_mappings.rb +7 -1
  29. data/lib/google/cloud/app_engine/v1/firewall/client.rb +4 -6
  30. data/lib/google/cloud/app_engine/v1/firewall/rest/client.rb +732 -0
  31. data/lib/google/cloud/app_engine/v1/firewall/rest/service_stub.rb +405 -0
  32. data/lib/google/cloud/app_engine/v1/firewall/rest.rb +60 -0
  33. data/lib/google/cloud/app_engine/v1/firewall.rb +7 -1
  34. data/lib/google/cloud/app_engine/v1/instances/client.rb +12 -14
  35. data/lib/google/cloud/app_engine/v1/instances/operations.rb +12 -14
  36. data/lib/google/cloud/app_engine/v1/instances/rest/client.rb +602 -0
  37. data/lib/google/cloud/app_engine/v1/instances/rest/operations.rb +793 -0
  38. data/lib/google/cloud/app_engine/v1/instances/rest/service_stub.rb +285 -0
  39. data/lib/google/cloud/app_engine/v1/instances/rest.rb +52 -0
  40. data/lib/google/cloud/app_engine/v1/instances.rb +7 -1
  41. data/lib/google/cloud/app_engine/v1/rest.rb +44 -0
  42. data/lib/google/cloud/app_engine/v1/services/client.rb +12 -14
  43. data/lib/google/cloud/app_engine/v1/services/operations.rb +12 -14
  44. data/lib/google/cloud/app_engine/v1/services/rest/client.rb +587 -0
  45. data/lib/google/cloud/app_engine/v1/services/rest/operations.rb +793 -0
  46. data/lib/google/cloud/app_engine/v1/services/rest/service_stub.rb +285 -0
  47. data/lib/google/cloud/app_engine/v1/services/rest.rb +52 -0
  48. data/lib/google/cloud/app_engine/v1/services.rb +7 -1
  49. data/lib/google/cloud/app_engine/v1/version.rb +1 -1
  50. data/lib/google/cloud/app_engine/v1/versions/client.rb +16 -18
  51. data/lib/google/cloud/app_engine/v1/versions/operations.rb +12 -14
  52. data/lib/google/cloud/app_engine/v1/versions/rest/client.rb +692 -0
  53. data/lib/google/cloud/app_engine/v1/versions/rest/operations.rb +793 -0
  54. data/lib/google/cloud/app_engine/v1/versions/rest/service_stub.rb +345 -0
  55. data/lib/google/cloud/app_engine/v1/versions/rest.rb +52 -0
  56. data/lib/google/cloud/app_engine/v1/versions.rb +7 -1
  57. data/lib/google/cloud/app_engine/v1.rb +7 -2
  58. data/proto_docs/google/api/client.rb +318 -0
  59. data/proto_docs/google/api/launch_stage.rb +71 -0
  60. data/proto_docs/google/protobuf/empty.rb +0 -2
  61. data/proto_docs/google/rpc/status.rb +4 -2
  62. metadata +40 -8
@@ -0,0 +1,589 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/appengine/v1/appengine_pb"
21
+ require "google/cloud/app_engine/v1/applications/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module AppEngine
26
+ module V1
27
+ module Applications
28
+ module Rest
29
+ ##
30
+ # REST client for the Applications service.
31
+ #
32
+ # Manages App Engine applications.
33
+ #
34
+ class Client
35
+ # @private
36
+ attr_reader :applications_stub
37
+
38
+ ##
39
+ # Configure the Applications Client class.
40
+ #
41
+ # See {::Google::Cloud::AppEngine::V1::Applications::Rest::Client::Configuration}
42
+ # for a description of the configuration fields.
43
+ #
44
+ # @example
45
+ #
46
+ # # Modify the configuration for all Applications clients
47
+ # ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
50
+ #
51
+ # @yield [config] Configure the Client client.
52
+ # @yieldparam config [Client::Configuration]
53
+ #
54
+ # @return [Client::Configuration]
55
+ #
56
+ def self.configure
57
+ @configure ||= begin
58
+ namespace = ["Google", "Cloud", "AppEngine", "V1"]
59
+ parent_config = while namespace.any?
60
+ parent_name = namespace.join "::"
61
+ parent_const = const_get parent_name
62
+ break parent_const.configure if parent_const.respond_to? :configure
63
+ namespace.pop
64
+ end
65
+ default_config = Client::Configuration.new parent_config
66
+
67
+ default_config
68
+ end
69
+ yield @configure if block_given?
70
+ @configure
71
+ end
72
+
73
+ ##
74
+ # Configure the Applications Client instance.
75
+ #
76
+ # The configuration is set to the derived mode, meaning that values can be changed,
77
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
78
+ # should be made on {Client.configure}.
79
+ #
80
+ # See {::Google::Cloud::AppEngine::V1::Applications::Rest::Client::Configuration}
81
+ # for a description of the configuration fields.
82
+ #
83
+ # @yield [config] Configure the Client client.
84
+ # @yieldparam config [Client::Configuration]
85
+ #
86
+ # @return [Client::Configuration]
87
+ #
88
+ def configure
89
+ yield @config if block_given?
90
+ @config
91
+ end
92
+
93
+ ##
94
+ # Create a new Applications REST client object.
95
+ #
96
+ # @example
97
+ #
98
+ # # Create a client using the default configuration
99
+ # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new
100
+ #
101
+ # # Create a client using a custom configuration
102
+ # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config|
103
+ # config.timeout = 10.0
104
+ # end
105
+ #
106
+ # @yield [config] Configure the Applications client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ def initialize
110
+ # Create the configuration object
111
+ @config = Configuration.new Client.configure
112
+
113
+ # Yield the configuration if needed
114
+ yield @config if block_given?
115
+
116
+ # Create credentials
117
+ credentials = @config.credentials
118
+ # Use self-signed JWT if the endpoint is unchanged from default,
119
+ # but only if the default endpoint does not have a region prefix.
120
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
121
+ !@config.endpoint.split(".").first.include?("-")
122
+ credentials ||= Credentials.default scope: @config.scope,
123
+ enable_self_signed_jwt: enable_self_signed_jwt
124
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
125
+ credentials = Credentials.new credentials, scope: @config.scope
126
+ end
127
+
128
+ @quota_project_id = @config.quota_project
129
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
130
+
131
+ @operations_client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Operations.new do |config|
132
+ config.credentials = credentials
133
+ config.quota_project = @quota_project_id
134
+ config.endpoint = @config.endpoint
135
+ end
136
+
137
+ @applications_stub = ::Google::Cloud::AppEngine::V1::Applications::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
138
+ end
139
+
140
+ ##
141
+ # Get the associated client for long-running operations.
142
+ #
143
+ # @return [::Google::Cloud::AppEngine::V1::Applications::Rest::Operations]
144
+ #
145
+ attr_reader :operations_client
146
+
147
+ # Service calls
148
+
149
+ ##
150
+ # Gets information about an application.
151
+ #
152
+ # @overload get_application(request, options = nil)
153
+ # Pass arguments to `get_application` via a request object, either of type
154
+ # {::Google::Cloud::AppEngine::V1::GetApplicationRequest} or an equivalent Hash.
155
+ #
156
+ # @param request [::Google::Cloud::AppEngine::V1::GetApplicationRequest, ::Hash]
157
+ # A request object representing the call parameters. Required. To specify no
158
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
159
+ # @param options [::Gapic::CallOptions, ::Hash]
160
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
161
+ #
162
+ # @overload get_application(name: nil)
163
+ # Pass arguments to `get_application` via keyword arguments. Note that at
164
+ # least one keyword argument is required. To specify no parameters, or to keep all
165
+ # the default parameter values, pass an empty Hash as a request object (see above).
166
+ #
167
+ # @param name [::String]
168
+ # Name of the Application resource to get. Example: `apps/myapp`.
169
+ # @yield [result, operation] Access the result along with the TransportOperation object
170
+ # @yieldparam result [::Google::Cloud::AppEngine::V1::Application]
171
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
172
+ #
173
+ # @return [::Google::Cloud::AppEngine::V1::Application]
174
+ #
175
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
176
+ def get_application request, options = nil
177
+ raise ::ArgumentError, "request must be provided" if request.nil?
178
+
179
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetApplicationRequest
180
+
181
+ # Converts hash and nil to an options object
182
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
183
+
184
+ # Customize the options with defaults
185
+ call_metadata = @config.rpcs.get_application.metadata.to_h
186
+
187
+ # Set x-goog-api-client and x-goog-user-project headers
188
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
189
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
190
+ gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
191
+ transports_version_send: [:rest]
192
+
193
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
194
+
195
+ options.apply_defaults timeout: @config.rpcs.get_application.timeout,
196
+ metadata: call_metadata,
197
+ retry_policy: @config.rpcs.get_application.retry_policy
198
+
199
+ options.apply_defaults timeout: @config.timeout,
200
+ metadata: @config.metadata,
201
+ retry_policy: @config.retry_policy
202
+
203
+ @applications_stub.get_application request, options do |result, operation|
204
+ yield result, operation if block_given?
205
+ return result
206
+ end
207
+ rescue ::Gapic::Rest::Error => e
208
+ raise ::Google::Cloud::Error.from_error(e)
209
+ end
210
+
211
+ ##
212
+ # Creates an App Engine application for a Google Cloud Platform project.
213
+ # Required fields:
214
+ #
215
+ # * `id` - The ID of the target Cloud Platform project.
216
+ # * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.
217
+ #
218
+ # For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/).
219
+ #
220
+ # @overload create_application(request, options = nil)
221
+ # Pass arguments to `create_application` via a request object, either of type
222
+ # {::Google::Cloud::AppEngine::V1::CreateApplicationRequest} or an equivalent Hash.
223
+ #
224
+ # @param request [::Google::Cloud::AppEngine::V1::CreateApplicationRequest, ::Hash]
225
+ # A request object representing the call parameters. Required. To specify no
226
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
227
+ # @param options [::Gapic::CallOptions, ::Hash]
228
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
229
+ #
230
+ # @overload create_application(application: nil)
231
+ # Pass arguments to `create_application` via keyword arguments. Note that at
232
+ # least one keyword argument is required. To specify no parameters, or to keep all
233
+ # the default parameter values, pass an empty Hash as a request object (see above).
234
+ #
235
+ # @param application [::Google::Cloud::AppEngine::V1::Application, ::Hash]
236
+ # Application configuration.
237
+ # @yield [result, operation] Access the result along with the TransportOperation object
238
+ # @yieldparam result [::Gapic::Operation]
239
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
240
+ #
241
+ # @return [::Gapic::Operation]
242
+ #
243
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
244
+ def create_application request, options = nil
245
+ raise ::ArgumentError, "request must be provided" if request.nil?
246
+
247
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateApplicationRequest
248
+
249
+ # Converts hash and nil to an options object
250
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
251
+
252
+ # Customize the options with defaults
253
+ call_metadata = @config.rpcs.create_application.metadata.to_h
254
+
255
+ # Set x-goog-api-client and x-goog-user-project headers
256
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
257
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
258
+ gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
259
+ transports_version_send: [:rest]
260
+
261
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
262
+
263
+ options.apply_defaults timeout: @config.rpcs.create_application.timeout,
264
+ metadata: call_metadata,
265
+ retry_policy: @config.rpcs.create_application.retry_policy
266
+
267
+ options.apply_defaults timeout: @config.timeout,
268
+ metadata: @config.metadata,
269
+ retry_policy: @config.retry_policy
270
+
271
+ @applications_stub.create_application request, options do |result, operation|
272
+ result = ::Gapic::Operation.new result, @operations_client, options: options
273
+ yield result, operation if block_given?
274
+ return result
275
+ end
276
+ rescue ::Gapic::Rest::Error => e
277
+ raise ::Google::Cloud::Error.from_error(e)
278
+ end
279
+
280
+ ##
281
+ # Updates the specified Application resource.
282
+ # You can update the following fields:
283
+ #
284
+ # * `auth_domain` - Google authentication domain for controlling user access to the application.
285
+ # * `default_cookie_expiration` - Cookie expiration policy for the application.
286
+ # * `iap` - Identity-Aware Proxy properties for the application.
287
+ #
288
+ # @overload update_application(request, options = nil)
289
+ # Pass arguments to `update_application` via a request object, either of type
290
+ # {::Google::Cloud::AppEngine::V1::UpdateApplicationRequest} or an equivalent Hash.
291
+ #
292
+ # @param request [::Google::Cloud::AppEngine::V1::UpdateApplicationRequest, ::Hash]
293
+ # A request object representing the call parameters. Required. To specify no
294
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
295
+ # @param options [::Gapic::CallOptions, ::Hash]
296
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
297
+ #
298
+ # @overload update_application(name: nil, application: nil, update_mask: nil)
299
+ # Pass arguments to `update_application` via keyword arguments. Note that at
300
+ # least one keyword argument is required. To specify no parameters, or to keep all
301
+ # the default parameter values, pass an empty Hash as a request object (see above).
302
+ #
303
+ # @param name [::String]
304
+ # Name of the Application resource to update. Example: `apps/myapp`.
305
+ # @param application [::Google::Cloud::AppEngine::V1::Application, ::Hash]
306
+ # An Application containing the updated resource.
307
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
308
+ # Required. Standard field mask for the set of fields to be updated.
309
+ # @yield [result, operation] Access the result along with the TransportOperation object
310
+ # @yieldparam result [::Gapic::Operation]
311
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
312
+ #
313
+ # @return [::Gapic::Operation]
314
+ #
315
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
316
+ def update_application request, options = nil
317
+ raise ::ArgumentError, "request must be provided" if request.nil?
318
+
319
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateApplicationRequest
320
+
321
+ # Converts hash and nil to an options object
322
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
323
+
324
+ # Customize the options with defaults
325
+ call_metadata = @config.rpcs.update_application.metadata.to_h
326
+
327
+ # Set x-goog-api-client and x-goog-user-project headers
328
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
329
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
330
+ gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
331
+ transports_version_send: [:rest]
332
+
333
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
334
+
335
+ options.apply_defaults timeout: @config.rpcs.update_application.timeout,
336
+ metadata: call_metadata,
337
+ retry_policy: @config.rpcs.update_application.retry_policy
338
+
339
+ options.apply_defaults timeout: @config.timeout,
340
+ metadata: @config.metadata,
341
+ retry_policy: @config.retry_policy
342
+
343
+ @applications_stub.update_application request, options do |result, operation|
344
+ result = ::Gapic::Operation.new result, @operations_client, options: options
345
+ yield result, operation if block_given?
346
+ return result
347
+ end
348
+ rescue ::Gapic::Rest::Error => e
349
+ raise ::Google::Cloud::Error.from_error(e)
350
+ end
351
+
352
+ ##
353
+ # Recreates the required App Engine features for the specified App Engine
354
+ # application, for example a Cloud Storage bucket or App Engine service
355
+ # account.
356
+ # Use this method if you receive an error message about a missing feature,
357
+ # for example, *Error retrieving the App Engine service account*.
358
+ # If you have deleted your App Engine service account, this will
359
+ # not be able to recreate it. Instead, you should attempt to use the
360
+ # IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D .
361
+ # If the deletion was recent, the numeric ID can be found in the Cloud
362
+ # Console Activity Log.
363
+ #
364
+ # @overload repair_application(request, options = nil)
365
+ # Pass arguments to `repair_application` via a request object, either of type
366
+ # {::Google::Cloud::AppEngine::V1::RepairApplicationRequest} or an equivalent Hash.
367
+ #
368
+ # @param request [::Google::Cloud::AppEngine::V1::RepairApplicationRequest, ::Hash]
369
+ # A request object representing the call parameters. Required. To specify no
370
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
371
+ # @param options [::Gapic::CallOptions, ::Hash]
372
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
373
+ #
374
+ # @overload repair_application(name: nil)
375
+ # Pass arguments to `repair_application` via keyword arguments. Note that at
376
+ # least one keyword argument is required. To specify no parameters, or to keep all
377
+ # the default parameter values, pass an empty Hash as a request object (see above).
378
+ #
379
+ # @param name [::String]
380
+ # Name of the application to repair. Example: `apps/myapp`
381
+ # @yield [result, operation] Access the result along with the TransportOperation object
382
+ # @yieldparam result [::Gapic::Operation]
383
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
384
+ #
385
+ # @return [::Gapic::Operation]
386
+ #
387
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
388
+ def repair_application request, options = nil
389
+ raise ::ArgumentError, "request must be provided" if request.nil?
390
+
391
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::RepairApplicationRequest
392
+
393
+ # Converts hash and nil to an options object
394
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
395
+
396
+ # Customize the options with defaults
397
+ call_metadata = @config.rpcs.repair_application.metadata.to_h
398
+
399
+ # Set x-goog-api-client and x-goog-user-project headers
400
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
401
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
402
+ gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
403
+ transports_version_send: [:rest]
404
+
405
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
406
+
407
+ options.apply_defaults timeout: @config.rpcs.repair_application.timeout,
408
+ metadata: call_metadata,
409
+ retry_policy: @config.rpcs.repair_application.retry_policy
410
+
411
+ options.apply_defaults timeout: @config.timeout,
412
+ metadata: @config.metadata,
413
+ retry_policy: @config.retry_policy
414
+
415
+ @applications_stub.repair_application request, options do |result, operation|
416
+ result = ::Gapic::Operation.new result, @operations_client, options: options
417
+ yield result, operation if block_given?
418
+ return result
419
+ end
420
+ rescue ::Gapic::Rest::Error => e
421
+ raise ::Google::Cloud::Error.from_error(e)
422
+ end
423
+
424
+ ##
425
+ # Configuration class for the Applications REST API.
426
+ #
427
+ # This class represents the configuration for Applications REST,
428
+ # providing control over timeouts, retry behavior, logging, transport
429
+ # parameters, and other low-level controls. Certain parameters can also be
430
+ # applied individually to specific RPCs. See
431
+ # {::Google::Cloud::AppEngine::V1::Applications::Rest::Client::Configuration::Rpcs}
432
+ # for a list of RPCs that can be configured independently.
433
+ #
434
+ # Configuration can be applied globally to all clients, or to a single client
435
+ # on construction.
436
+ #
437
+ # @example
438
+ #
439
+ # # Modify the global config, setting the timeout for
440
+ # # get_application to 20 seconds,
441
+ # # and all remaining timeouts to 10 seconds.
442
+ # ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.configure do |config|
443
+ # config.timeout = 10.0
444
+ # config.rpcs.get_application.timeout = 20.0
445
+ # end
446
+ #
447
+ # # Apply the above configuration only to a new client.
448
+ # client = ::Google::Cloud::AppEngine::V1::Applications::Rest::Client.new do |config|
449
+ # config.timeout = 10.0
450
+ # config.rpcs.get_application.timeout = 20.0
451
+ # end
452
+ #
453
+ # @!attribute [rw] endpoint
454
+ # The hostname or hostname:port of the service endpoint.
455
+ # Defaults to `"appengine.googleapis.com"`.
456
+ # @return [::String]
457
+ # @!attribute [rw] credentials
458
+ # Credentials to send with calls. You may provide any of the following types:
459
+ # * (`String`) The path to a service account key file in JSON format
460
+ # * (`Hash`) A service account key as a Hash
461
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
462
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
463
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
464
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
465
+ # * (`nil`) indicating no credentials
466
+ # @return [::Object]
467
+ # @!attribute [rw] scope
468
+ # The OAuth scopes
469
+ # @return [::Array<::String>]
470
+ # @!attribute [rw] lib_name
471
+ # The library name as recorded in instrumentation and logging
472
+ # @return [::String]
473
+ # @!attribute [rw] lib_version
474
+ # The library version as recorded in instrumentation and logging
475
+ # @return [::String]
476
+ # @!attribute [rw] timeout
477
+ # The call timeout in seconds.
478
+ # @return [::Numeric]
479
+ # @!attribute [rw] metadata
480
+ # Additional headers to be sent with the call.
481
+ # @return [::Hash{::Symbol=>::String}]
482
+ # @!attribute [rw] retry_policy
483
+ # The retry policy. The value is a hash with the following keys:
484
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
485
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
486
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
487
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
488
+ # trigger a retry.
489
+ # @return [::Hash]
490
+ # @!attribute [rw] quota_project
491
+ # A separate project against which to charge quota.
492
+ # @return [::String]
493
+ #
494
+ class Configuration
495
+ extend ::Gapic::Config
496
+
497
+ config_attr :endpoint, "appengine.googleapis.com", ::String
498
+ config_attr :credentials, nil do |value|
499
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
500
+ allowed.any? { |klass| klass === value }
501
+ end
502
+ config_attr :scope, nil, ::String, ::Array, nil
503
+ config_attr :lib_name, nil, ::String, nil
504
+ config_attr :lib_version, nil, ::String, nil
505
+ config_attr :timeout, nil, ::Numeric, nil
506
+ config_attr :metadata, nil, ::Hash, nil
507
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
508
+ config_attr :quota_project, nil, ::String, nil
509
+
510
+ # @private
511
+ def initialize parent_config = nil
512
+ @parent_config = parent_config unless parent_config.nil?
513
+
514
+ yield self if block_given?
515
+ end
516
+
517
+ ##
518
+ # Configurations for individual RPCs
519
+ # @return [Rpcs]
520
+ #
521
+ def rpcs
522
+ @rpcs ||= begin
523
+ parent_rpcs = nil
524
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
525
+ Rpcs.new parent_rpcs
526
+ end
527
+ end
528
+
529
+ ##
530
+ # Configuration RPC class for the Applications API.
531
+ #
532
+ # Includes fields providing the configuration for each RPC in this service.
533
+ # Each configuration object is of type `Gapic::Config::Method` and includes
534
+ # the following configuration fields:
535
+ #
536
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
537
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
538
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
539
+ # include the following keys:
540
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
541
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
542
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
543
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
544
+ # trigger a retry.
545
+ #
546
+ class Rpcs
547
+ ##
548
+ # RPC-specific configuration for `get_application`
549
+ # @return [::Gapic::Config::Method]
550
+ #
551
+ attr_reader :get_application
552
+ ##
553
+ # RPC-specific configuration for `create_application`
554
+ # @return [::Gapic::Config::Method]
555
+ #
556
+ attr_reader :create_application
557
+ ##
558
+ # RPC-specific configuration for `update_application`
559
+ # @return [::Gapic::Config::Method]
560
+ #
561
+ attr_reader :update_application
562
+ ##
563
+ # RPC-specific configuration for `repair_application`
564
+ # @return [::Gapic::Config::Method]
565
+ #
566
+ attr_reader :repair_application
567
+
568
+ # @private
569
+ def initialize parent_rpcs = nil
570
+ get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application
571
+ @get_application = ::Gapic::Config::Method.new get_application_config
572
+ create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application
573
+ @create_application = ::Gapic::Config::Method.new create_application_config
574
+ update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application
575
+ @update_application = ::Gapic::Config::Method.new update_application_config
576
+ repair_application_config = parent_rpcs.repair_application if parent_rpcs.respond_to? :repair_application
577
+ @repair_application = ::Gapic::Config::Method.new repair_application_config
578
+
579
+ yield self if block_given?
580
+ end
581
+ end
582
+ end
583
+ end
584
+ end
585
+ end
586
+ end
587
+ end
588
+ end
589
+ end