google-cloud-security-public_ca-v1beta1 0.a → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/README.md +144 -8
- data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/client.rb +403 -0
- data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/credentials.rb +49 -0
- data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/paths.rb +71 -0
- data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest/client.rb +360 -0
- data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest/service_stub.rb +110 -0
- data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest.rb +56 -0
- data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service.rb +59 -0
- data/lib/google/cloud/security/public_ca/v1beta1/rest.rb +39 -0
- data/lib/google/cloud/security/public_ca/v1beta1/version.rb +8 -3
- data/lib/google/cloud/security/public_ca/v1beta1.rb +47 -0
- data/lib/google/cloud/security/publicca/v1beta1/resources_pb.rb +29 -0
- data/lib/google/cloud/security/publicca/v1beta1/service_pb.rb +31 -0
- data/lib/google/cloud/security/publicca/v1beta1/service_services_pb.rb +49 -0
- data/lib/google-cloud-security-public_ca-v1beta1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/security/publicca/v1beta1/resources.rb +49 -0
- data/proto_docs/google/cloud/security/publicca/v1beta1/service.rb +45 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- metadata +191 -16
data/lib/google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest/client.rb
ADDED
@@ -0,0 +1,360 @@
|
|
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/cloud/security/publicca/v1beta1/service_pb"
|
21
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module Security
|
26
|
+
module PublicCA
|
27
|
+
module V1beta1
|
28
|
+
module PublicCertificateAuthorityService
|
29
|
+
module Rest
|
30
|
+
##
|
31
|
+
# REST client for the PublicCertificateAuthorityService service.
|
32
|
+
#
|
33
|
+
# Manages the resources required for ACME [external account
|
34
|
+
# binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for
|
35
|
+
# the public certificate authority service.
|
36
|
+
#
|
37
|
+
class Client
|
38
|
+
include Paths
|
39
|
+
|
40
|
+
# @private
|
41
|
+
attr_reader :public_certificate_authority_service_stub
|
42
|
+
|
43
|
+
##
|
44
|
+
# Configure the PublicCertificateAuthorityService Client class.
|
45
|
+
#
|
46
|
+
# See {::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client::Configuration}
|
47
|
+
# for a description of the configuration fields.
|
48
|
+
#
|
49
|
+
# @example
|
50
|
+
#
|
51
|
+
# # Modify the configuration for all PublicCertificateAuthorityService clients
|
52
|
+
# ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.configure do |config|
|
53
|
+
# config.timeout = 10.0
|
54
|
+
# end
|
55
|
+
#
|
56
|
+
# @yield [config] Configure the Client client.
|
57
|
+
# @yieldparam config [Client::Configuration]
|
58
|
+
#
|
59
|
+
# @return [Client::Configuration]
|
60
|
+
#
|
61
|
+
def self.configure
|
62
|
+
@configure ||= begin
|
63
|
+
namespace = ["Google", "Cloud", "Security", "PublicCA", "V1beta1"]
|
64
|
+
parent_config = while namespace.any?
|
65
|
+
parent_name = namespace.join "::"
|
66
|
+
parent_const = const_get parent_name
|
67
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
68
|
+
namespace.pop
|
69
|
+
end
|
70
|
+
default_config = Client::Configuration.new parent_config
|
71
|
+
|
72
|
+
default_config.timeout = 60.0
|
73
|
+
default_config.retry_policy = {
|
74
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
75
|
+
}
|
76
|
+
|
77
|
+
default_config
|
78
|
+
end
|
79
|
+
yield @configure if block_given?
|
80
|
+
@configure
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Configure the PublicCertificateAuthorityService Client instance.
|
85
|
+
#
|
86
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
87
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
88
|
+
# should be made on {Client.configure}.
|
89
|
+
#
|
90
|
+
# See {::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client::Configuration}
|
91
|
+
# for a description of the configuration fields.
|
92
|
+
#
|
93
|
+
# @yield [config] Configure the Client client.
|
94
|
+
# @yieldparam config [Client::Configuration]
|
95
|
+
#
|
96
|
+
# @return [Client::Configuration]
|
97
|
+
#
|
98
|
+
def configure
|
99
|
+
yield @config if block_given?
|
100
|
+
@config
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Create a new PublicCertificateAuthorityService REST client object.
|
105
|
+
#
|
106
|
+
# @example
|
107
|
+
#
|
108
|
+
# # Create a client using the default configuration
|
109
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.new
|
110
|
+
#
|
111
|
+
# # Create a client using a custom configuration
|
112
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.new do |config|
|
113
|
+
# config.timeout = 10.0
|
114
|
+
# end
|
115
|
+
#
|
116
|
+
# @yield [config] Configure the PublicCertificateAuthorityService client.
|
117
|
+
# @yieldparam config [Client::Configuration]
|
118
|
+
#
|
119
|
+
def initialize
|
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 endpoint is unchanged from default,
|
129
|
+
# but only if the default endpoint does not have a region prefix.
|
130
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
131
|
+
!@config.endpoint.split(".").first.include?("-")
|
132
|
+
credentials ||= Credentials.default scope: @config.scope,
|
133
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
134
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
135
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
136
|
+
end
|
137
|
+
|
138
|
+
@quota_project_id = @config.quota_project
|
139
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
140
|
+
|
141
|
+
@public_certificate_authority_service_stub = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
142
|
+
end
|
143
|
+
|
144
|
+
# Service calls
|
145
|
+
|
146
|
+
##
|
147
|
+
# Creates a new {::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey ExternalAccountKey} bound to the project.
|
148
|
+
#
|
149
|
+
# @overload create_external_account_key(request, options = nil)
|
150
|
+
# Pass arguments to `create_external_account_key` via a request object, either of type
|
151
|
+
# {::Google::Cloud::Security::PublicCA::V1beta1::CreateExternalAccountKeyRequest} or an equivalent Hash.
|
152
|
+
#
|
153
|
+
# @param request [::Google::Cloud::Security::PublicCA::V1beta1::CreateExternalAccountKeyRequest, ::Hash]
|
154
|
+
# A request object representing the call parameters. Required. To specify no
|
155
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
156
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
157
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
158
|
+
#
|
159
|
+
# @overload create_external_account_key(parent: nil, external_account_key: nil)
|
160
|
+
# Pass arguments to `create_external_account_key` via keyword arguments. Note that at
|
161
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
162
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
163
|
+
#
|
164
|
+
# @param parent [::String]
|
165
|
+
# Required. The parent resource where this external_account_key will be created.
|
166
|
+
# Format: projects/[project_id]/locations/[location].
|
167
|
+
# At present only the "global" location is supported.
|
168
|
+
# @param external_account_key [::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey, ::Hash]
|
169
|
+
# Required. The external account key to create. This field only exists to future-proof
|
170
|
+
# the API. At present, all fields in ExternalAccountKey are output only and
|
171
|
+
# all values are ignored. For the purpose of the
|
172
|
+
# CreateExternalAccountKeyRequest, set it to a default/empty value.
|
173
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
174
|
+
# @yieldparam result [::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey]
|
175
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
176
|
+
#
|
177
|
+
# @return [::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey]
|
178
|
+
#
|
179
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
180
|
+
def create_external_account_key request, options = nil
|
181
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
182
|
+
|
183
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Security::PublicCA::V1beta1::CreateExternalAccountKeyRequest
|
184
|
+
|
185
|
+
# Converts hash and nil to an options object
|
186
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
187
|
+
|
188
|
+
# Customize the options with defaults
|
189
|
+
call_metadata = @config.rpcs.create_external_account_key.metadata.to_h
|
190
|
+
|
191
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
192
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
193
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
194
|
+
gapic_version: ::Google::Cloud::Security::PublicCA::V1beta1::VERSION,
|
195
|
+
transports_version_send: [:rest]
|
196
|
+
|
197
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
198
|
+
|
199
|
+
options.apply_defaults timeout: @config.rpcs.create_external_account_key.timeout,
|
200
|
+
metadata: call_metadata,
|
201
|
+
retry_policy: @config.rpcs.create_external_account_key.retry_policy
|
202
|
+
|
203
|
+
options.apply_defaults timeout: @config.timeout,
|
204
|
+
metadata: @config.metadata,
|
205
|
+
retry_policy: @config.retry_policy
|
206
|
+
|
207
|
+
@public_certificate_authority_service_stub.create_external_account_key request, options do |result, operation|
|
208
|
+
yield result, operation if block_given?
|
209
|
+
return result
|
210
|
+
end
|
211
|
+
rescue ::Gapic::Rest::Error => e
|
212
|
+
raise ::Google::Cloud::Error.from_error(e)
|
213
|
+
end
|
214
|
+
|
215
|
+
##
|
216
|
+
# Configuration class for the PublicCertificateAuthorityService REST API.
|
217
|
+
#
|
218
|
+
# This class represents the configuration for PublicCertificateAuthorityService REST,
|
219
|
+
# providing control over timeouts, retry behavior, logging, transport
|
220
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
221
|
+
# applied individually to specific RPCs. See
|
222
|
+
# {::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client::Configuration::Rpcs}
|
223
|
+
# for a list of RPCs that can be configured independently.
|
224
|
+
#
|
225
|
+
# Configuration can be applied globally to all clients, or to a single client
|
226
|
+
# on construction.
|
227
|
+
#
|
228
|
+
# @example
|
229
|
+
#
|
230
|
+
# # Modify the global config, setting the timeout for
|
231
|
+
# # create_external_account_key to 20 seconds,
|
232
|
+
# # and all remaining timeouts to 10 seconds.
|
233
|
+
# ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.configure do |config|
|
234
|
+
# config.timeout = 10.0
|
235
|
+
# config.rpcs.create_external_account_key.timeout = 20.0
|
236
|
+
# end
|
237
|
+
#
|
238
|
+
# # Apply the above configuration only to a new client.
|
239
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.new do |config|
|
240
|
+
# config.timeout = 10.0
|
241
|
+
# config.rpcs.create_external_account_key.timeout = 20.0
|
242
|
+
# end
|
243
|
+
#
|
244
|
+
# @!attribute [rw] endpoint
|
245
|
+
# The hostname or hostname:port of the service endpoint.
|
246
|
+
# Defaults to `"publicca.googleapis.com"`.
|
247
|
+
# @return [::String]
|
248
|
+
# @!attribute [rw] credentials
|
249
|
+
# Credentials to send with calls. You may provide any of the following types:
|
250
|
+
# * (`String`) The path to a service account key file in JSON format
|
251
|
+
# * (`Hash`) A service account key as a Hash
|
252
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
253
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
254
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
255
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
256
|
+
# * (`nil`) indicating no credentials
|
257
|
+
# @return [::Object]
|
258
|
+
# @!attribute [rw] scope
|
259
|
+
# The OAuth scopes
|
260
|
+
# @return [::Array<::String>]
|
261
|
+
# @!attribute [rw] lib_name
|
262
|
+
# The library name as recorded in instrumentation and logging
|
263
|
+
# @return [::String]
|
264
|
+
# @!attribute [rw] lib_version
|
265
|
+
# The library version as recorded in instrumentation and logging
|
266
|
+
# @return [::String]
|
267
|
+
# @!attribute [rw] timeout
|
268
|
+
# The call timeout in seconds.
|
269
|
+
# @return [::Numeric]
|
270
|
+
# @!attribute [rw] metadata
|
271
|
+
# Additional headers to be sent with the call.
|
272
|
+
# @return [::Hash{::Symbol=>::String}]
|
273
|
+
# @!attribute [rw] retry_policy
|
274
|
+
# The retry policy. The value is a hash with the following keys:
|
275
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
276
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
277
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
278
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
279
|
+
# trigger a retry.
|
280
|
+
# @return [::Hash]
|
281
|
+
# @!attribute [rw] quota_project
|
282
|
+
# A separate project against which to charge quota.
|
283
|
+
# @return [::String]
|
284
|
+
#
|
285
|
+
class Configuration
|
286
|
+
extend ::Gapic::Config
|
287
|
+
|
288
|
+
config_attr :endpoint, "publicca.googleapis.com", ::String
|
289
|
+
config_attr :credentials, nil do |value|
|
290
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
291
|
+
allowed.any? { |klass| klass === value }
|
292
|
+
end
|
293
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
294
|
+
config_attr :lib_name, nil, ::String, nil
|
295
|
+
config_attr :lib_version, nil, ::String, nil
|
296
|
+
config_attr :timeout, nil, ::Numeric, nil
|
297
|
+
config_attr :metadata, nil, ::Hash, nil
|
298
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
299
|
+
config_attr :quota_project, nil, ::String, nil
|
300
|
+
|
301
|
+
# @private
|
302
|
+
def initialize parent_config = nil
|
303
|
+
@parent_config = parent_config unless parent_config.nil?
|
304
|
+
|
305
|
+
yield self if block_given?
|
306
|
+
end
|
307
|
+
|
308
|
+
##
|
309
|
+
# Configurations for individual RPCs
|
310
|
+
# @return [Rpcs]
|
311
|
+
#
|
312
|
+
def rpcs
|
313
|
+
@rpcs ||= begin
|
314
|
+
parent_rpcs = nil
|
315
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
316
|
+
Rpcs.new parent_rpcs
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
##
|
321
|
+
# Configuration RPC class for the PublicCertificateAuthorityService API.
|
322
|
+
#
|
323
|
+
# Includes fields providing the configuration for each RPC in this service.
|
324
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
325
|
+
# the following configuration fields:
|
326
|
+
#
|
327
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
328
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
329
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
330
|
+
# include the following keys:
|
331
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
332
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
333
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
334
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
335
|
+
# trigger a retry.
|
336
|
+
#
|
337
|
+
class Rpcs
|
338
|
+
##
|
339
|
+
# RPC-specific configuration for `create_external_account_key`
|
340
|
+
# @return [::Gapic::Config::Method]
|
341
|
+
#
|
342
|
+
attr_reader :create_external_account_key
|
343
|
+
|
344
|
+
# @private
|
345
|
+
def initialize parent_rpcs = nil
|
346
|
+
create_external_account_key_config = parent_rpcs.create_external_account_key if parent_rpcs.respond_to? :create_external_account_key
|
347
|
+
@create_external_account_key = ::Gapic::Config::Method.new create_external_account_key_config
|
348
|
+
|
349
|
+
yield self if block_given?
|
350
|
+
end
|
351
|
+
end
|
352
|
+
end
|
353
|
+
end
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|
357
|
+
end
|
358
|
+
end
|
359
|
+
end
|
360
|
+
end
|
@@ -0,0 +1,110 @@
|
|
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/security/publicca/v1beta1/service_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Security
|
24
|
+
module PublicCA
|
25
|
+
module V1beta1
|
26
|
+
module PublicCertificateAuthorityService
|
27
|
+
module Rest
|
28
|
+
##
|
29
|
+
# REST service stub for the PublicCertificateAuthorityService service.
|
30
|
+
# Service stub contains baseline method implementations
|
31
|
+
# including transcoding, making the REST call, and deserialing the response.
|
32
|
+
#
|
33
|
+
class ServiceStub
|
34
|
+
def initialize endpoint:, credentials:
|
35
|
+
# These require statements are intentionally placed here to initialize
|
36
|
+
# the REST modules only when it's required.
|
37
|
+
require "gapic/rest"
|
38
|
+
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
|
40
|
+
numeric_enums: true,
|
41
|
+
raise_faraday_errors: false
|
42
|
+
end
|
43
|
+
|
44
|
+
##
|
45
|
+
# Baseline implementation for the create_external_account_key REST call
|
46
|
+
#
|
47
|
+
# @param request_pb [::Google::Cloud::Security::PublicCA::V1beta1::CreateExternalAccountKeyRequest]
|
48
|
+
# A request object representing the call parameters. Required.
|
49
|
+
# @param options [::Gapic::CallOptions]
|
50
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
51
|
+
#
|
52
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
53
|
+
# @yieldparam result [::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey]
|
54
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
55
|
+
#
|
56
|
+
# @return [::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey]
|
57
|
+
# A result object deserialized from the server's reply
|
58
|
+
def create_external_account_key request_pb, options = nil
|
59
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
60
|
+
|
61
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_external_account_key_request request_pb
|
62
|
+
query_string_params = if query_string_params.any?
|
63
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
64
|
+
else
|
65
|
+
{}
|
66
|
+
end
|
67
|
+
|
68
|
+
response = @client_stub.make_http_request(
|
69
|
+
verb,
|
70
|
+
uri: uri,
|
71
|
+
body: body || "",
|
72
|
+
params: query_string_params,
|
73
|
+
options: options
|
74
|
+
)
|
75
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
76
|
+
result = ::Google::Cloud::Security::PublicCA::V1beta1::ExternalAccountKey.decode_json response.body, ignore_unknown_fields: true
|
77
|
+
|
78
|
+
yield result, operation if block_given?
|
79
|
+
result
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# @private
|
84
|
+
#
|
85
|
+
# GRPC transcoding helper method for the create_external_account_key REST call
|
86
|
+
#
|
87
|
+
# @param request_pb [::Google::Cloud::Security::PublicCA::V1beta1::CreateExternalAccountKeyRequest]
|
88
|
+
# A request object representing the call parameters. Required.
|
89
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
90
|
+
# Uri, Body, Query string parameters
|
91
|
+
def self.transcode_create_external_account_key_request request_pb
|
92
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
93
|
+
.with_bindings(
|
94
|
+
uri_method: :post,
|
95
|
+
uri_template: "/v1beta1/{parent}/externalAccountKeys",
|
96
|
+
body: "external_account_key",
|
97
|
+
matches: [
|
98
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
99
|
+
]
|
100
|
+
)
|
101
|
+
transcoder.transcode request_pb
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,56 @@
|
|
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 "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/security/public_ca/v1beta1/version"
|
24
|
+
|
25
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/credentials"
|
26
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/paths"
|
27
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module Security
|
32
|
+
module PublicCA
|
33
|
+
module V1beta1
|
34
|
+
##
|
35
|
+
# Manages the resources required for ACME [external account
|
36
|
+
# binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for
|
37
|
+
# the public certificate authority service.
|
38
|
+
#
|
39
|
+
# To load this service and instantiate a REST client:
|
40
|
+
#
|
41
|
+
# require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest"
|
42
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.new
|
43
|
+
#
|
44
|
+
module PublicCertificateAuthorityService
|
45
|
+
# Client for the REST transport
|
46
|
+
module Rest
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
56
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 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/security/public_ca/v1beta1/version"
|
24
|
+
|
25
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/credentials"
|
26
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/paths"
|
27
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/client"
|
28
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module Security
|
33
|
+
module PublicCA
|
34
|
+
module V1beta1
|
35
|
+
##
|
36
|
+
# Manages the resources required for ACME [external account
|
37
|
+
# binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) for
|
38
|
+
# the public certificate authority service.
|
39
|
+
#
|
40
|
+
# @example Load this service and instantiate a gRPC client
|
41
|
+
#
|
42
|
+
# require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service"
|
43
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Client.new
|
44
|
+
#
|
45
|
+
# @example Load this service and instantiate a REST client
|
46
|
+
#
|
47
|
+
# require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/rest"
|
48
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.new
|
49
|
+
#
|
50
|
+
module PublicCertificateAuthorityService
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
helper_path = ::File.join __dir__, "public_certificate_authority_service", "helpers.rb"
|
59
|
+
require "google/cloud/security/public_ca/v1beta1/public_certificate_authority_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,39 @@
|
|
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/security/public_ca/v1beta1/public_certificate_authority_service/rest"
|
20
|
+
require "google/cloud/security/public_ca/v1beta1/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Security
|
25
|
+
module PublicCA
|
26
|
+
##
|
27
|
+
# To load just the REST part of this package, including all its services, and instantiate a REST client:
|
28
|
+
#
|
29
|
+
# @example
|
30
|
+
#
|
31
|
+
# require "google/cloud/security/public_ca/v1beta1/rest"
|
32
|
+
# client = ::Google::Cloud::Security::PublicCA::V1beta1::PublicCertificateAuthorityService::Rest::Client.new
|
33
|
+
#
|
34
|
+
module V1beta1
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Copyright 2022 Google LLC
|
2
4
|
#
|
3
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
6
|
# you may not use this file except in compliance with the License.
|
5
7
|
# You may obtain a copy of the License at
|
6
8
|
#
|
7
|
-
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
10
|
#
|
9
11
|
# Unless required by applicable law or agreed to in writing, software
|
10
12
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
@@ -12,12 +14,15 @@
|
|
12
14
|
# See the License for the specific language governing permissions and
|
13
15
|
# limitations under the License.
|
14
16
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
15
20
|
module Google
|
16
21
|
module Cloud
|
17
22
|
module Security
|
18
|
-
module
|
23
|
+
module PublicCA
|
19
24
|
module V1beta1
|
20
|
-
VERSION = "0.
|
25
|
+
VERSION = "0.2.0"
|
21
26
|
end
|
22
27
|
end
|
23
28
|
end
|