google-cloud-security-private_ca-v1beta1 0.6.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,6 +27,9 @@ module Google
27
27
  module Rest
28
28
  # Service that implements Longrunning Operations API.
29
29
  class Operations
30
+ # @private
31
+ DEFAULT_ENDPOINT_TEMPLATE = "privateca.$UNIVERSE_DOMAIN$"
32
+
30
33
  # @private
31
34
  attr_reader :operations_stub
32
35
 
@@ -61,6 +64,15 @@ module Google
61
64
  @config
62
65
  end
63
66
 
67
+ ##
68
+ # The effective universe domain
69
+ #
70
+ # @return [String]
71
+ #
72
+ def universe_domain
73
+ @operations_stub.universe_domain
74
+ end
75
+
64
76
  ##
65
77
  # Create a new Operations client object.
66
78
  #
@@ -85,8 +97,10 @@ module Google
85
97
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
86
98
 
87
99
  @operations_stub = OperationsServiceStub.new(
88
- endpoint: @config.endpoint,
89
- credentials: credentials
100
+ endpoint: @config.endpoint,
101
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
102
+ universe_domain: @config.universe_domain,
103
+ credentials: credentials
90
104
  )
91
105
 
92
106
  # Used by an LRO wrapper for some methods of this service
@@ -137,6 +151,26 @@ module Google
137
151
  # @return [::Gapic::Operation]
138
152
  #
139
153
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
154
+ #
155
+ # @example Basic example
156
+ # require "google/longrunning"
157
+ #
158
+ # # Create a client object. The client can be reused for multiple calls.
159
+ # client = Google::Longrunning::Operations::Rest::Client.new
160
+ #
161
+ # # Create a request. To set request fields, pass in keyword arguments.
162
+ # request = Google::Longrunning::ListOperationsRequest.new
163
+ #
164
+ # # Call the list_operations method.
165
+ # result = client.list_operations request
166
+ #
167
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
168
+ # # over elements, and API calls will be issued to fetch pages as needed.
169
+ # result.each do |item|
170
+ # # Each element is of type ::Google::Longrunning::Operation.
171
+ # p item
172
+ # end
173
+ #
140
174
  def list_operations request, options = nil
141
175
  raise ::ArgumentError, "request must be provided" if request.nil?
142
176
 
@@ -202,6 +236,29 @@ module Google
202
236
  # @return [::Gapic::Operation]
203
237
  #
204
238
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
239
+ #
240
+ # @example Basic example
241
+ # require "google/longrunning"
242
+ #
243
+ # # Create a client object. The client can be reused for multiple calls.
244
+ # client = Google::Longrunning::Operations::Rest::Client.new
245
+ #
246
+ # # Create a request. To set request fields, pass in keyword arguments.
247
+ # request = Google::Longrunning::GetOperationRequest.new
248
+ #
249
+ # # Call the get_operation method.
250
+ # result = client.get_operation request
251
+ #
252
+ # # The returned object is of type Gapic::Operation. You can use it to
253
+ # # check the status of an operation, cancel it, or wait for results.
254
+ # # Here is how to wait for a response.
255
+ # result.wait_until_done! timeout: 60
256
+ # if result.response?
257
+ # p result.response
258
+ # else
259
+ # puts "No response received."
260
+ # end
261
+ #
205
262
  def get_operation request, options = nil
206
263
  raise ::ArgumentError, "request must be provided" if request.nil?
207
264
 
@@ -268,6 +325,22 @@ module Google
268
325
  # @return [::Google::Protobuf::Empty]
269
326
  #
270
327
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
328
+ #
329
+ # @example Basic example
330
+ # require "google/longrunning"
331
+ #
332
+ # # Create a client object. The client can be reused for multiple calls.
333
+ # client = Google::Longrunning::Operations::Rest::Client.new
334
+ #
335
+ # # Create a request. To set request fields, pass in keyword arguments.
336
+ # request = Google::Longrunning::DeleteOperationRequest.new
337
+ #
338
+ # # Call the delete_operation method.
339
+ # result = client.delete_operation request
340
+ #
341
+ # # The returned object is of type Google::Protobuf::Empty.
342
+ # p result
343
+ #
271
344
  def delete_operation request, options = nil
272
345
  raise ::ArgumentError, "request must be provided" if request.nil?
273
346
 
@@ -339,6 +412,22 @@ module Google
339
412
  # @return [::Google::Protobuf::Empty]
340
413
  #
341
414
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
415
+ #
416
+ # @example Basic example
417
+ # require "google/longrunning"
418
+ #
419
+ # # Create a client object. The client can be reused for multiple calls.
420
+ # client = Google::Longrunning::Operations::Rest::Client.new
421
+ #
422
+ # # Create a request. To set request fields, pass in keyword arguments.
423
+ # request = Google::Longrunning::CancelOperationRequest.new
424
+ #
425
+ # # Call the cancel_operation method.
426
+ # result = client.cancel_operation request
427
+ #
428
+ # # The returned object is of type Google::Protobuf::Empty.
429
+ # p result
430
+ #
342
431
  def cancel_operation request, options = nil
343
432
  raise ::ArgumentError, "request must be provided" if request.nil?
344
433
 
@@ -404,9 +493,9 @@ module Google
404
493
  # end
405
494
  #
406
495
  # @!attribute [rw] endpoint
407
- # The hostname or hostname:port of the service endpoint.
408
- # Defaults to `"privateca.googleapis.com"`.
409
- # @return [::String]
496
+ # A custom service endpoint, as a hostname or hostname:port. The default is
497
+ # nil, indicating to use the default endpoint in the current universe domain.
498
+ # @return [::String,nil]
410
499
  # @!attribute [rw] credentials
411
500
  # Credentials to send with calls. You may provide any of the following types:
412
501
  # * (`String`) The path to a service account key file in JSON format
@@ -443,13 +532,20 @@ module Google
443
532
  # @!attribute [rw] quota_project
444
533
  # A separate project against which to charge quota.
445
534
  # @return [::String]
535
+ # @!attribute [rw] universe_domain
536
+ # The universe domain within which to make requests. This determines the
537
+ # default endpoint URL. The default value of nil uses the environment
538
+ # universe (usually the default "googleapis.com" universe).
539
+ # @return [::String,nil]
446
540
  #
447
541
  class Configuration
448
542
  extend ::Gapic::Config
449
543
 
544
+ # @private
545
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
450
546
  DEFAULT_ENDPOINT = "privateca.googleapis.com"
451
547
 
452
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
548
+ config_attr :endpoint, nil, ::String, nil
453
549
  config_attr :credentials, nil do |value|
454
550
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
455
551
  allowed.any? { |klass| klass === value }
@@ -461,6 +557,7 @@ module Google
461
557
  config_attr :metadata, nil, ::Hash, nil
462
558
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
463
559
  config_attr :quota_project, nil, ::String, nil
560
+ config_attr :universe_domain, nil, ::String, nil
464
561
 
465
562
  # @private
466
563
  def initialize parent_config = nil
@@ -543,12 +640,15 @@ module Google
543
640
  # Service stub contains baseline method implementations
544
641
  # including transcoding, making the REST call, and deserialing the response.
545
642
  class OperationsServiceStub
546
- def initialize endpoint:, credentials:
643
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
547
644
  # These require statements are intentionally placed here to initialize
548
645
  # the REST modules only when it's required.
549
646
  require "gapic/rest"
550
647
 
551
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
648
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
649
+ endpoint_template: endpoint_template,
650
+ universe_domain: universe_domain,
651
+ credentials: credentials
552
652
  end
553
653
 
554
654
  ##
@@ -31,16 +31,28 @@ module Google
31
31
  # including transcoding, making the REST call, and deserialing the response.
32
32
  #
33
33
  class ServiceStub
34
- def initialize endpoint:, credentials:
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
35
35
  # These require statements are intentionally placed here to initialize
36
36
  # the REST modules only when it's required.
37
37
  require "gapic/rest"
38
38
 
39
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
40
43
  numeric_enums: true,
41
44
  raise_faraday_errors: false
42
45
  end
43
46
 
47
+ ##
48
+ # The effective universe domain
49
+ #
50
+ # @return [String]
51
+ #
52
+ def universe_domain
53
+ @client_stub.universe_domain
54
+ end
55
+
44
56
  ##
45
57
  # Baseline implementation for the create_certificate REST call
46
58
  #
@@ -22,7 +22,7 @@ module Google
22
22
  module Security
23
23
  module PrivateCA
24
24
  module V1beta1
25
- VERSION = "0.6.1"
25
+ VERSION = "0.8.0"
26
26
  end
27
27
  end
28
28
  end
@@ -21,6 +21,7 @@ module Google
21
21
  module Api
22
22
  # Required information for every language.
23
23
  # @!attribute [rw] reference_docs_uri
24
+ # @deprecated This field is deprecated and may be removed in the next major version update.
24
25
  # @return [::String]
25
26
  # Link to automatically generated reference documentation. Example:
26
27
  # https://cloud.google.com/nodejs/docs/reference/asset/latest
@@ -304,6 +305,19 @@ module Google
304
305
  # seconds: 360 # 6 minutes
305
306
  # total_poll_timeout:
306
307
  # seconds: 54000 # 90 minutes
308
+ # @!attribute [rw] auto_populated_fields
309
+ # @return [::Array<::String>]
310
+ # List of top-level fields of the request message, that should be
311
+ # automatically populated by the client libraries based on their
312
+ # (google.api.field_info).format. Currently supported format: UUID4.
313
+ #
314
+ # Example of a YAML configuration:
315
+ #
316
+ # publishing:
317
+ # method_settings:
318
+ # - selector: google.example.v1.ExampleService.CreateExample
319
+ # auto_populated_fields:
320
+ # - request_id
307
321
  class MethodSettings
308
322
  include ::Google::Protobuf::MessageExts
309
323
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -66,6 +66,20 @@ module Google
66
66
  # a non-empty value will be returned. The user will not be aware of what
67
67
  # non-empty value to expect.
68
68
  NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
69
83
  end
70
84
  end
71
85
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-security-private_ca-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-06 00:00:00.000000000 Z
11
+ date: 2024-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.19.1
19
+ version: 0.21.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.19.1
29
+ version: 0.21.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  requirements: []
224
- rubygems_version: 3.4.2
224
+ rubygems_version: 3.5.3
225
225
  signing_key:
226
226
  specification_version: 4
227
227
  summary: API Client library for the Certificate Authority Service V1beta1 API