google-cloud-app_engine-v1 0.5.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +3 -3
  4. data/lib/google/appengine/v1/appengine_pb.rb +0 -1
  5. data/lib/google/cloud/app_engine/v1/applications/client.rb +14 -14
  6. data/lib/google/cloud/app_engine/v1/applications/operations.rb +14 -16
  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 +6 -8
  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 +6 -8
  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 +18 -20
  23. data/lib/google/cloud/app_engine/v1/domain_mappings/operations.rb +14 -16
  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 +6 -8
  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 +14 -16
  35. data/lib/google/cloud/app_engine/v1/instances/operations.rb +14 -16
  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 +14 -16
  43. data/lib/google/cloud/app_engine/v1/services/operations.rb +14 -16
  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 +18 -20
  51. data/lib/google/cloud/app_engine/v1/versions/operations.rb +14 -16
  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 +372 -0
  59. data/proto_docs/google/api/launch_stage.rb +71 -0
  60. data/proto_docs/google/appengine/v1/domain.rb +1 -1
  61. data/proto_docs/google/protobuf/empty.rb +0 -2
  62. data/proto_docs/google/rpc/status.rb +4 -2
  63. metadata +40 -8
@@ -0,0 +1,643 @@
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/authorized_certificates/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module AppEngine
26
+ module V1
27
+ module AuthorizedCertificates
28
+ module Rest
29
+ ##
30
+ # REST client for the AuthorizedCertificates service.
31
+ #
32
+ # Manages SSL certificates a user is authorized to administer. A user can
33
+ # administer any SSL certificates applicable to their authorized domains.
34
+ #
35
+ class Client
36
+ # @private
37
+ attr_reader :authorized_certificates_stub
38
+
39
+ ##
40
+ # Configure the AuthorizedCertificates Client class.
41
+ #
42
+ # See {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # @example
46
+ #
47
+ # # Modify the configuration for all AuthorizedCertificates clients
48
+ # ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
51
+ #
52
+ # @yield [config] Configure the Client client.
53
+ # @yieldparam config [Client::Configuration]
54
+ #
55
+ # @return [Client::Configuration]
56
+ #
57
+ def self.configure
58
+ @configure ||= begin
59
+ namespace = ["Google", "Cloud", "AppEngine", "V1"]
60
+ parent_config = while namespace.any?
61
+ parent_name = namespace.join "::"
62
+ parent_const = const_get parent_name
63
+ break parent_const.configure if parent_const.respond_to? :configure
64
+ namespace.pop
65
+ end
66
+ default_config = Client::Configuration.new parent_config
67
+
68
+ default_config
69
+ end
70
+ yield @configure if block_given?
71
+ @configure
72
+ end
73
+
74
+ ##
75
+ # Configure the AuthorizedCertificates Client instance.
76
+ #
77
+ # The configuration is set to the derived mode, meaning that values can be changed,
78
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
79
+ # should be made on {Client.configure}.
80
+ #
81
+ # See {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client::Configuration}
82
+ # for a description of the configuration fields.
83
+ #
84
+ # @yield [config] Configure the Client client.
85
+ # @yieldparam config [Client::Configuration]
86
+ #
87
+ # @return [Client::Configuration]
88
+ #
89
+ def configure
90
+ yield @config if block_given?
91
+ @config
92
+ end
93
+
94
+ ##
95
+ # Create a new AuthorizedCertificates REST client object.
96
+ #
97
+ # @example
98
+ #
99
+ # # Create a client using the default configuration
100
+ # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new
101
+ #
102
+ # # Create a client using a custom configuration
103
+ # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config|
104
+ # config.timeout = 10.0
105
+ # end
106
+ #
107
+ # @yield [config] Configure the AuthorizedCertificates client.
108
+ # @yieldparam config [Client::Configuration]
109
+ #
110
+ def initialize
111
+ # Create the configuration object
112
+ @config = Configuration.new Client.configure
113
+
114
+ # Yield the configuration if needed
115
+ yield @config if block_given?
116
+
117
+ # Create credentials
118
+ credentials = @config.credentials
119
+ # Use self-signed JWT if the endpoint is unchanged from default,
120
+ # but only if the default endpoint does not have a region prefix.
121
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
122
+ !@config.endpoint.split(".").first.include?("-")
123
+ credentials ||= Credentials.default scope: @config.scope,
124
+ enable_self_signed_jwt: enable_self_signed_jwt
125
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
126
+ credentials = Credentials.new credentials, scope: @config.scope
127
+ end
128
+
129
+ @quota_project_id = @config.quota_project
130
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
131
+
132
+ @authorized_certificates_stub = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
133
+ end
134
+
135
+ # Service calls
136
+
137
+ ##
138
+ # Lists all SSL certificates the user is authorized to administer.
139
+ #
140
+ # @overload list_authorized_certificates(request, options = nil)
141
+ # Pass arguments to `list_authorized_certificates` via a request object, either of type
142
+ # {::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest} or an equivalent Hash.
143
+ #
144
+ # @param request [::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest, ::Hash]
145
+ # A request object representing the call parameters. Required. To specify no
146
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
147
+ # @param options [::Gapic::CallOptions, ::Hash]
148
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
149
+ #
150
+ # @overload list_authorized_certificates(parent: nil, view: nil, page_size: nil, page_token: nil)
151
+ # Pass arguments to `list_authorized_certificates` via keyword arguments. Note that at
152
+ # least one keyword argument is required. To specify no parameters, or to keep all
153
+ # the default parameter values, pass an empty Hash as a request object (see above).
154
+ #
155
+ # @param parent [::String]
156
+ # Name of the parent `Application` resource. Example: `apps/myapp`.
157
+ # @param view [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView]
158
+ # Controls the set of fields returned in the `LIST` response.
159
+ # @param page_size [::Integer]
160
+ # Maximum results to return per page.
161
+ # @param page_token [::String]
162
+ # Continuation token for fetching the next page of results.
163
+ # @yield [result, operation] Access the result along with the TransportOperation object
164
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedCertificate>]
165
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
166
+ #
167
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AppEngine::V1::AuthorizedCertificate>]
168
+ #
169
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
170
+ def list_authorized_certificates request, options = nil
171
+ raise ::ArgumentError, "request must be provided" if request.nil?
172
+
173
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::ListAuthorizedCertificatesRequest
174
+
175
+ # Converts hash and nil to an options object
176
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
177
+
178
+ # Customize the options with defaults
179
+ call_metadata = @config.rpcs.list_authorized_certificates.metadata.to_h
180
+
181
+ # Set x-goog-api-client and x-goog-user-project headers
182
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
183
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
184
+ gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
185
+ transports_version_send: [:rest]
186
+
187
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
188
+
189
+ options.apply_defaults timeout: @config.rpcs.list_authorized_certificates.timeout,
190
+ metadata: call_metadata,
191
+ retry_policy: @config.rpcs.list_authorized_certificates.retry_policy
192
+
193
+ options.apply_defaults timeout: @config.timeout,
194
+ metadata: @config.metadata,
195
+ retry_policy: @config.retry_policy
196
+
197
+ @authorized_certificates_stub.list_authorized_certificates request, options do |result, operation|
198
+ result = ::Gapic::Rest::PagedEnumerable.new @authorized_certificates_stub, :list_authorized_certificates, "certificates", request, result, options
199
+ yield result, operation if block_given?
200
+ return result
201
+ end
202
+ rescue ::Gapic::Rest::Error => e
203
+ raise ::Google::Cloud::Error.from_error(e)
204
+ end
205
+
206
+ ##
207
+ # Gets the specified SSL certificate.
208
+ #
209
+ # @overload get_authorized_certificate(request, options = nil)
210
+ # Pass arguments to `get_authorized_certificate` via a request object, either of type
211
+ # {::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest} or an equivalent Hash.
212
+ #
213
+ # @param request [::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest, ::Hash]
214
+ # A request object representing the call parameters. Required. To specify no
215
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
216
+ # @param options [::Gapic::CallOptions, ::Hash]
217
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
218
+ #
219
+ # @overload get_authorized_certificate(name: nil, view: nil)
220
+ # Pass arguments to `get_authorized_certificate` via keyword arguments. Note that at
221
+ # least one keyword argument is required. To specify no parameters, or to keep all
222
+ # the default parameter values, pass an empty Hash as a request object (see above).
223
+ #
224
+ # @param name [::String]
225
+ # Name of the resource requested. Example:
226
+ # `apps/myapp/authorizedCertificates/12345`.
227
+ # @param view [::Google::Cloud::AppEngine::V1::AuthorizedCertificateView]
228
+ # Controls the set of fields returned in the `GET` response.
229
+ # @yield [result, operation] Access the result along with the TransportOperation object
230
+ # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate]
231
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
232
+ #
233
+ # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate]
234
+ #
235
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
236
+ def get_authorized_certificate request, options = nil
237
+ raise ::ArgumentError, "request must be provided" if request.nil?
238
+
239
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::GetAuthorizedCertificateRequest
240
+
241
+ # Converts hash and nil to an options object
242
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
243
+
244
+ # Customize the options with defaults
245
+ call_metadata = @config.rpcs.get_authorized_certificate.metadata.to_h
246
+
247
+ # Set x-goog-api-client and x-goog-user-project headers
248
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
249
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
250
+ gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
251
+ transports_version_send: [:rest]
252
+
253
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
254
+
255
+ options.apply_defaults timeout: @config.rpcs.get_authorized_certificate.timeout,
256
+ metadata: call_metadata,
257
+ retry_policy: @config.rpcs.get_authorized_certificate.retry_policy
258
+
259
+ options.apply_defaults timeout: @config.timeout,
260
+ metadata: @config.metadata,
261
+ retry_policy: @config.retry_policy
262
+
263
+ @authorized_certificates_stub.get_authorized_certificate request, options do |result, operation|
264
+ yield result, operation if block_given?
265
+ return result
266
+ end
267
+ rescue ::Gapic::Rest::Error => e
268
+ raise ::Google::Cloud::Error.from_error(e)
269
+ end
270
+
271
+ ##
272
+ # Uploads the specified SSL certificate.
273
+ #
274
+ # @overload create_authorized_certificate(request, options = nil)
275
+ # Pass arguments to `create_authorized_certificate` via a request object, either of type
276
+ # {::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest} or an equivalent Hash.
277
+ #
278
+ # @param request [::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest, ::Hash]
279
+ # A request object representing the call parameters. Required. To specify no
280
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
281
+ # @param options [::Gapic::CallOptions, ::Hash]
282
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
283
+ #
284
+ # @overload create_authorized_certificate(parent: nil, certificate: nil)
285
+ # Pass arguments to `create_authorized_certificate` via keyword arguments. Note that at
286
+ # least one keyword argument is required. To specify no parameters, or to keep all
287
+ # the default parameter values, pass an empty Hash as a request object (see above).
288
+ #
289
+ # @param parent [::String]
290
+ # Name of the parent `Application` resource. Example: `apps/myapp`.
291
+ # @param certificate [::Google::Cloud::AppEngine::V1::AuthorizedCertificate, ::Hash]
292
+ # SSL certificate data.
293
+ # @yield [result, operation] Access the result along with the TransportOperation object
294
+ # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate]
295
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
296
+ #
297
+ # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate]
298
+ #
299
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
300
+ def create_authorized_certificate request, options = nil
301
+ raise ::ArgumentError, "request must be provided" if request.nil?
302
+
303
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::CreateAuthorizedCertificateRequest
304
+
305
+ # Converts hash and nil to an options object
306
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
307
+
308
+ # Customize the options with defaults
309
+ call_metadata = @config.rpcs.create_authorized_certificate.metadata.to_h
310
+
311
+ # Set x-goog-api-client and x-goog-user-project headers
312
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
313
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
314
+ gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
315
+ transports_version_send: [:rest]
316
+
317
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
318
+
319
+ options.apply_defaults timeout: @config.rpcs.create_authorized_certificate.timeout,
320
+ metadata: call_metadata,
321
+ retry_policy: @config.rpcs.create_authorized_certificate.retry_policy
322
+
323
+ options.apply_defaults timeout: @config.timeout,
324
+ metadata: @config.metadata,
325
+ retry_policy: @config.retry_policy
326
+
327
+ @authorized_certificates_stub.create_authorized_certificate request, options do |result, operation|
328
+ yield result, operation if block_given?
329
+ return result
330
+ end
331
+ rescue ::Gapic::Rest::Error => e
332
+ raise ::Google::Cloud::Error.from_error(e)
333
+ end
334
+
335
+ ##
336
+ # Updates the specified SSL certificate. To renew a certificate and maintain
337
+ # its existing domain mappings, update `certificate_data` with a new
338
+ # certificate. The new certificate must be applicable to the same domains as
339
+ # the original certificate. The certificate `display_name` may also be
340
+ # updated.
341
+ #
342
+ # @overload update_authorized_certificate(request, options = nil)
343
+ # Pass arguments to `update_authorized_certificate` via a request object, either of type
344
+ # {::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest} or an equivalent Hash.
345
+ #
346
+ # @param request [::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest, ::Hash]
347
+ # A request object representing the call parameters. Required. To specify no
348
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
349
+ # @param options [::Gapic::CallOptions, ::Hash]
350
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
351
+ #
352
+ # @overload update_authorized_certificate(name: nil, certificate: nil, update_mask: nil)
353
+ # Pass arguments to `update_authorized_certificate` via keyword arguments. Note that at
354
+ # least one keyword argument is required. To specify no parameters, or to keep all
355
+ # the default parameter values, pass an empty Hash as a request object (see above).
356
+ #
357
+ # @param name [::String]
358
+ # Name of the resource to update. Example:
359
+ # `apps/myapp/authorizedCertificates/12345`.
360
+ # @param certificate [::Google::Cloud::AppEngine::V1::AuthorizedCertificate, ::Hash]
361
+ # An `AuthorizedCertificate` containing the updated resource. Only fields set
362
+ # in the field mask will be updated.
363
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
364
+ # Standard field mask for the set of fields to be updated. Updates are only
365
+ # supported on the `certificate_raw_data` and `display_name` fields.
366
+ # @yield [result, operation] Access the result along with the TransportOperation object
367
+ # @yieldparam result [::Google::Cloud::AppEngine::V1::AuthorizedCertificate]
368
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
369
+ #
370
+ # @return [::Google::Cloud::AppEngine::V1::AuthorizedCertificate]
371
+ #
372
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
373
+ def update_authorized_certificate request, options = nil
374
+ raise ::ArgumentError, "request must be provided" if request.nil?
375
+
376
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::UpdateAuthorizedCertificateRequest
377
+
378
+ # Converts hash and nil to an options object
379
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
380
+
381
+ # Customize the options with defaults
382
+ call_metadata = @config.rpcs.update_authorized_certificate.metadata.to_h
383
+
384
+ # Set x-goog-api-client and x-goog-user-project headers
385
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
386
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
387
+ gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
388
+ transports_version_send: [:rest]
389
+
390
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
391
+
392
+ options.apply_defaults timeout: @config.rpcs.update_authorized_certificate.timeout,
393
+ metadata: call_metadata,
394
+ retry_policy: @config.rpcs.update_authorized_certificate.retry_policy
395
+
396
+ options.apply_defaults timeout: @config.timeout,
397
+ metadata: @config.metadata,
398
+ retry_policy: @config.retry_policy
399
+
400
+ @authorized_certificates_stub.update_authorized_certificate request, options do |result, operation|
401
+ yield result, operation if block_given?
402
+ return result
403
+ end
404
+ rescue ::Gapic::Rest::Error => e
405
+ raise ::Google::Cloud::Error.from_error(e)
406
+ end
407
+
408
+ ##
409
+ # Deletes the specified SSL certificate.
410
+ #
411
+ # @overload delete_authorized_certificate(request, options = nil)
412
+ # Pass arguments to `delete_authorized_certificate` via a request object, either of type
413
+ # {::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest} or an equivalent Hash.
414
+ #
415
+ # @param request [::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest, ::Hash]
416
+ # A request object representing the call parameters. Required. To specify no
417
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
418
+ # @param options [::Gapic::CallOptions, ::Hash]
419
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
420
+ #
421
+ # @overload delete_authorized_certificate(name: nil)
422
+ # Pass arguments to `delete_authorized_certificate` via keyword arguments. Note that at
423
+ # least one keyword argument is required. To specify no parameters, or to keep all
424
+ # the default parameter values, pass an empty Hash as a request object (see above).
425
+ #
426
+ # @param name [::String]
427
+ # Name of the resource to delete. Example:
428
+ # `apps/myapp/authorizedCertificates/12345`.
429
+ # @yield [result, operation] Access the result along with the TransportOperation object
430
+ # @yieldparam result [::Google::Protobuf::Empty]
431
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
432
+ #
433
+ # @return [::Google::Protobuf::Empty]
434
+ #
435
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
436
+ def delete_authorized_certificate request, options = nil
437
+ raise ::ArgumentError, "request must be provided" if request.nil?
438
+
439
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AppEngine::V1::DeleteAuthorizedCertificateRequest
440
+
441
+ # Converts hash and nil to an options object
442
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
443
+
444
+ # Customize the options with defaults
445
+ call_metadata = @config.rpcs.delete_authorized_certificate.metadata.to_h
446
+
447
+ # Set x-goog-api-client and x-goog-user-project headers
448
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
449
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
450
+ gapic_version: ::Google::Cloud::AppEngine::V1::VERSION,
451
+ transports_version_send: [:rest]
452
+
453
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
454
+
455
+ options.apply_defaults timeout: @config.rpcs.delete_authorized_certificate.timeout,
456
+ metadata: call_metadata,
457
+ retry_policy: @config.rpcs.delete_authorized_certificate.retry_policy
458
+
459
+ options.apply_defaults timeout: @config.timeout,
460
+ metadata: @config.metadata,
461
+ retry_policy: @config.retry_policy
462
+
463
+ @authorized_certificates_stub.delete_authorized_certificate request, options do |result, operation|
464
+ yield result, operation if block_given?
465
+ return result
466
+ end
467
+ rescue ::Gapic::Rest::Error => e
468
+ raise ::Google::Cloud::Error.from_error(e)
469
+ end
470
+
471
+ ##
472
+ # Configuration class for the AuthorizedCertificates REST API.
473
+ #
474
+ # This class represents the configuration for AuthorizedCertificates REST,
475
+ # providing control over timeouts, retry behavior, logging, transport
476
+ # parameters, and other low-level controls. Certain parameters can also be
477
+ # applied individually to specific RPCs. See
478
+ # {::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client::Configuration::Rpcs}
479
+ # for a list of RPCs that can be configured independently.
480
+ #
481
+ # Configuration can be applied globally to all clients, or to a single client
482
+ # on construction.
483
+ #
484
+ # @example
485
+ #
486
+ # # Modify the global config, setting the timeout for
487
+ # # list_authorized_certificates to 20 seconds,
488
+ # # and all remaining timeouts to 10 seconds.
489
+ # ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.configure do |config|
490
+ # config.timeout = 10.0
491
+ # config.rpcs.list_authorized_certificates.timeout = 20.0
492
+ # end
493
+ #
494
+ # # Apply the above configuration only to a new client.
495
+ # client = ::Google::Cloud::AppEngine::V1::AuthorizedCertificates::Rest::Client.new do |config|
496
+ # config.timeout = 10.0
497
+ # config.rpcs.list_authorized_certificates.timeout = 20.0
498
+ # end
499
+ #
500
+ # @!attribute [rw] endpoint
501
+ # The hostname or hostname:port of the service endpoint.
502
+ # Defaults to `"appengine.googleapis.com"`.
503
+ # @return [::String]
504
+ # @!attribute [rw] credentials
505
+ # Credentials to send with calls. You may provide any of the following types:
506
+ # * (`String`) The path to a service account key file in JSON format
507
+ # * (`Hash`) A service account key as a Hash
508
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
509
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
510
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
511
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
512
+ # * (`nil`) indicating no credentials
513
+ # @return [::Object]
514
+ # @!attribute [rw] scope
515
+ # The OAuth scopes
516
+ # @return [::Array<::String>]
517
+ # @!attribute [rw] lib_name
518
+ # The library name as recorded in instrumentation and logging
519
+ # @return [::String]
520
+ # @!attribute [rw] lib_version
521
+ # The library version as recorded in instrumentation and logging
522
+ # @return [::String]
523
+ # @!attribute [rw] timeout
524
+ # The call timeout in seconds.
525
+ # @return [::Numeric]
526
+ # @!attribute [rw] metadata
527
+ # Additional headers to be sent with the call.
528
+ # @return [::Hash{::Symbol=>::String}]
529
+ # @!attribute [rw] retry_policy
530
+ # The retry policy. The value is a hash with the following keys:
531
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
532
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
533
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
534
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
535
+ # trigger a retry.
536
+ # @return [::Hash]
537
+ # @!attribute [rw] quota_project
538
+ # A separate project against which to charge quota.
539
+ # @return [::String]
540
+ #
541
+ class Configuration
542
+ extend ::Gapic::Config
543
+
544
+ config_attr :endpoint, "appengine.googleapis.com", ::String
545
+ config_attr :credentials, nil do |value|
546
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
547
+ allowed.any? { |klass| klass === value }
548
+ end
549
+ config_attr :scope, nil, ::String, ::Array, nil
550
+ config_attr :lib_name, nil, ::String, nil
551
+ config_attr :lib_version, nil, ::String, nil
552
+ config_attr :timeout, nil, ::Numeric, nil
553
+ config_attr :metadata, nil, ::Hash, nil
554
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
555
+ config_attr :quota_project, nil, ::String, nil
556
+
557
+ # @private
558
+ def initialize parent_config = nil
559
+ @parent_config = parent_config unless parent_config.nil?
560
+
561
+ yield self if block_given?
562
+ end
563
+
564
+ ##
565
+ # Configurations for individual RPCs
566
+ # @return [Rpcs]
567
+ #
568
+ def rpcs
569
+ @rpcs ||= begin
570
+ parent_rpcs = nil
571
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
572
+ Rpcs.new parent_rpcs
573
+ end
574
+ end
575
+
576
+ ##
577
+ # Configuration RPC class for the AuthorizedCertificates API.
578
+ #
579
+ # Includes fields providing the configuration for each RPC in this service.
580
+ # Each configuration object is of type `Gapic::Config::Method` and includes
581
+ # the following configuration fields:
582
+ #
583
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
584
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
585
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
586
+ # include the following keys:
587
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
588
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
589
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
590
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
591
+ # trigger a retry.
592
+ #
593
+ class Rpcs
594
+ ##
595
+ # RPC-specific configuration for `list_authorized_certificates`
596
+ # @return [::Gapic::Config::Method]
597
+ #
598
+ attr_reader :list_authorized_certificates
599
+ ##
600
+ # RPC-specific configuration for `get_authorized_certificate`
601
+ # @return [::Gapic::Config::Method]
602
+ #
603
+ attr_reader :get_authorized_certificate
604
+ ##
605
+ # RPC-specific configuration for `create_authorized_certificate`
606
+ # @return [::Gapic::Config::Method]
607
+ #
608
+ attr_reader :create_authorized_certificate
609
+ ##
610
+ # RPC-specific configuration for `update_authorized_certificate`
611
+ # @return [::Gapic::Config::Method]
612
+ #
613
+ attr_reader :update_authorized_certificate
614
+ ##
615
+ # RPC-specific configuration for `delete_authorized_certificate`
616
+ # @return [::Gapic::Config::Method]
617
+ #
618
+ attr_reader :delete_authorized_certificate
619
+
620
+ # @private
621
+ def initialize parent_rpcs = nil
622
+ list_authorized_certificates_config = parent_rpcs.list_authorized_certificates if parent_rpcs.respond_to? :list_authorized_certificates
623
+ @list_authorized_certificates = ::Gapic::Config::Method.new list_authorized_certificates_config
624
+ get_authorized_certificate_config = parent_rpcs.get_authorized_certificate if parent_rpcs.respond_to? :get_authorized_certificate
625
+ @get_authorized_certificate = ::Gapic::Config::Method.new get_authorized_certificate_config
626
+ create_authorized_certificate_config = parent_rpcs.create_authorized_certificate if parent_rpcs.respond_to? :create_authorized_certificate
627
+ @create_authorized_certificate = ::Gapic::Config::Method.new create_authorized_certificate_config
628
+ update_authorized_certificate_config = parent_rpcs.update_authorized_certificate if parent_rpcs.respond_to? :update_authorized_certificate
629
+ @update_authorized_certificate = ::Gapic::Config::Method.new update_authorized_certificate_config
630
+ delete_authorized_certificate_config = parent_rpcs.delete_authorized_certificate if parent_rpcs.respond_to? :delete_authorized_certificate
631
+ @delete_authorized_certificate = ::Gapic::Config::Method.new delete_authorized_certificate_config
632
+
633
+ yield self if block_given?
634
+ end
635
+ end
636
+ end
637
+ end
638
+ end
639
+ end
640
+ end
641
+ end
642
+ end
643
+ end