google-cloud-app_engine-v1 0.1.0

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