google-cloud-service_management-v1 0.3.10 → 0.5.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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +12 -7
  4. data/lib/google/api/servicemanagement/v1/resources_pb.rb +2 -1
  5. data/lib/google/api/servicemanagement/v1/servicemanager_pb.rb +2 -1
  6. data/lib/google/cloud/service_management/v1/rest.rb +37 -0
  7. data/lib/google/cloud/service_management/v1/service_manager/client.rb +32 -38
  8. data/lib/google/cloud/service_management/v1/service_manager/operations.rb +15 -22
  9. data/lib/google/cloud/service_management/v1/service_manager/rest/client.rb +1347 -0
  10. data/lib/google/cloud/service_management/v1/service_manager/rest/operations.rb +791 -0
  11. data/lib/google/cloud/service_management/v1/service_manager/rest/service_stub.rb +823 -0
  12. data/lib/google/cloud/service_management/v1/service_manager/rest.rb +53 -0
  13. data/lib/google/cloud/service_management/v1/service_manager.rb +7 -1
  14. data/lib/google/cloud/service_management/v1/version.rb +1 -1
  15. data/lib/google/cloud/service_management/v1.rb +7 -2
  16. data/proto_docs/google/api/auth.rb +8 -4
  17. data/proto_docs/google/api/backend.rb +1 -2
  18. data/proto_docs/google/api/client.rb +318 -0
  19. data/proto_docs/google/api/control.rb +9 -5
  20. data/proto_docs/google/api/documentation.rb +16 -10
  21. data/proto_docs/google/api/endpoint.rb +14 -9
  22. data/proto_docs/google/api/launch_stage.rb +3 -3
  23. data/proto_docs/google/api/monitored_resource.rb +9 -2
  24. data/proto_docs/google/api/quota.rb +6 -6
  25. data/proto_docs/google/api/service.rb +31 -14
  26. data/proto_docs/google/protobuf/any.rb +3 -3
  27. data/proto_docs/google/protobuf/empty.rb +0 -2
  28. data/proto_docs/google/protobuf/struct.rb +2 -2
  29. data/proto_docs/google/rpc/status.rb +4 -2
  30. metadata +20 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12384b80f49a4546e2f2022ca985fc49018a9a8341c6bc9b314cf7eed43b50e3
4
- data.tar.gz: 4d27f1aa403329eee090477860d7c8ecae506c94fd53da2e1a79208ae8b1e95a
3
+ metadata.gz: 5dbdfceb2ffe80990ec667158a04873b283daa2b70efe4158bbf17195b03ee84
4
+ data.tar.gz: 48dd2d4bb32c1b85f04774ffff771fe2b376708e11a7ea1959477577d77be1d1
5
5
  SHA512:
6
- metadata.gz: a05573429057114fc67ba2dec44e47fbb0d73ec6e0810553f6dcab742c02cf3c33b178cfa2e259fe10e019bfc7d1a627395b5f8d632b1f982a2f0b0406650ca0
7
- data.tar.gz: 50fbd6770ecfdd0a5d962e7d6a4d3468d25dd0fb70d36013061fd428232120a41968e63f5dd3a56141edad821b63ee77c1e671bea0da028e29e571219651af41
6
+ metadata.gz: 5ea0682cd81c35650d619b5d5cba2f7f9a8318dd0e383e70e91f6a941857b6fd6ae8aadd2fa45db83de0a6da3ca0175e9e53a13b95b9873fb60400d39c6a8f94
7
+ data.tar.gz: 213f38ffa4767c32eaa88817c62778d4263ac500ea0c343eea43f93e1a6b46643637235b09df8c562f369f09f1f666554128de6995e57f4c3cbaddf4ffb9155d
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Service Management V1 API
2
2
 
3
- API Client library for the Service Management V1 API
3
+ Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers.
4
4
 
5
5
  Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers.
6
6
 
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -69,16 +69,21 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
- This library is supported on Ruby 2.5+.
79
+ This library is supported on Ruby 2.6+.
75
80
 
76
81
  Google provides official support for Ruby versions that are actively supported
77
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
- about the Ruby support schedule.
83
+ in security maintenance, and not end of life. Older versions of Ruby _may_
84
+ still work, but are unsupported and not recommended. See
85
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
86
+ support schedule.
82
87
 
83
88
  ## Which client should I use?
84
89
 
@@ -1,10 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/servicemanagement/v1/resources.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/config_change_pb'
5
7
  require 'google/api/field_behavior_pb'
6
8
  require 'google/protobuf/timestamp_pb'
7
- require 'google/protobuf'
8
9
 
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/api/servicemanagement/v1/resources.proto", :syntax => :proto3) do
@@ -1,6 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/api/servicemanagement/v1/servicemanager.proto
3
3
 
4
+ require 'google/protobuf'
5
+
4
6
  require 'google/api/annotations_pb'
5
7
  require 'google/api/client_pb'
6
8
  require 'google/api/field_behavior_pb'
@@ -8,7 +10,6 @@ require 'google/api/service_pb'
8
10
  require 'google/api/servicemanagement/v1/resources_pb'
9
11
  require 'google/longrunning/operations_pb'
10
12
  require 'google/protobuf/any_pb'
11
- require 'google/protobuf'
12
13
 
13
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
15
  add_file("google/api/servicemanagement/v1/servicemanager.proto", :syntax => :proto3) do
@@ -0,0 +1,37 @@
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/service_management/v1/service_manager/rest"
20
+ require "google/cloud/service_management/v1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module ServiceManagement
25
+ ##
26
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
27
+ #
28
+ # @example
29
+ #
30
+ # require "google/cloud/service_management/v1/rest"
31
+ # client = ::Google::Cloud::ServiceManagement::V1::ServiceManager::Rest::Client.new
32
+ #
33
+ module V1
34
+ end
35
+ end
36
+ end
37
+ end
@@ -215,13 +215,11 @@ module Google
215
215
  # # Call the list_services method.
216
216
  # result = client.list_services request
217
217
  #
218
- # # The returned object is of type Gapic::PagedEnumerable. You can
219
- # # iterate over all elements by calling #each, and the enumerable
220
- # # will lazily make API calls to fetch subsequent pages. Other
221
- # # methods are also available for managing paging directly.
222
- # result.each do |response|
218
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
219
+ # # over elements, and API calls will be issued to fetch pages as needed.
220
+ # result.each do |item|
223
221
  # # Each element is of type ::Google::Cloud::ServiceManagement::V1::ManagedService.
224
- # p response
222
+ # p item
225
223
  # end
226
224
  #
227
225
  def list_services request, options = nil
@@ -396,14 +394,14 @@ module Google
396
394
  # # Call the create_service method.
397
395
  # result = client.create_service request
398
396
  #
399
- # # The returned object is of type Gapic::Operation. You can use this
400
- # # object to check the status of an operation, cancel it, or wait
401
- # # for results. Here is how to block until completion:
397
+ # # The returned object is of type Gapic::Operation. You can use it to
398
+ # # check the status of an operation, cancel it, or wait for results.
399
+ # # Here is how to wait for a response.
402
400
  # result.wait_until_done! timeout: 60
403
401
  # if result.response?
404
402
  # p result.response
405
403
  # else
406
- # puts "Error!"
404
+ # puts "No response received."
407
405
  # end
408
406
  #
409
407
  def create_service request, options = nil
@@ -490,14 +488,14 @@ module Google
490
488
  # # Call the delete_service method.
491
489
  # result = client.delete_service request
492
490
  #
493
- # # The returned object is of type Gapic::Operation. You can use this
494
- # # object to check the status of an operation, cancel it, or wait
495
- # # for results. Here is how to block until completion:
491
+ # # The returned object is of type Gapic::Operation. You can use it to
492
+ # # check the status of an operation, cancel it, or wait for results.
493
+ # # Here is how to wait for a response.
496
494
  # result.wait_until_done! timeout: 60
497
495
  # if result.response?
498
496
  # p result.response
499
497
  # else
500
- # puts "Error!"
498
+ # puts "No response received."
501
499
  # end
502
500
  #
503
501
  def delete_service request, options = nil
@@ -590,14 +588,14 @@ module Google
590
588
  # # Call the undelete_service method.
591
589
  # result = client.undelete_service request
592
590
  #
593
- # # The returned object is of type Gapic::Operation. You can use this
594
- # # object to check the status of an operation, cancel it, or wait
595
- # # for results. Here is how to block until completion:
591
+ # # The returned object is of type Gapic::Operation. You can use it to
592
+ # # check the status of an operation, cancel it, or wait for results.
593
+ # # Here is how to wait for a response.
596
594
  # result.wait_until_done! timeout: 60
597
595
  # if result.response?
598
596
  # p result.response
599
597
  # else
600
- # puts "Error!"
598
+ # puts "No response received."
601
599
  # end
602
600
  #
603
601
  def undelete_service request, options = nil
@@ -691,13 +689,11 @@ module Google
691
689
  # # Call the list_service_configs method.
692
690
  # result = client.list_service_configs request
693
691
  #
694
- # # The returned object is of type Gapic::PagedEnumerable. You can
695
- # # iterate over all elements by calling #each, and the enumerable
696
- # # will lazily make API calls to fetch subsequent pages. Other
697
- # # methods are also available for managing paging directly.
698
- # result.each do |response|
692
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
693
+ # # over elements, and API calls will be issued to fetch pages as needed.
694
+ # result.each do |item|
699
695
  # # Each element is of type ::Google::Api::Service.
700
- # p response
696
+ # p item
701
697
  # end
702
698
  #
703
699
  def list_service_configs request, options = nil
@@ -998,14 +994,14 @@ module Google
998
994
  # # Call the submit_config_source method.
999
995
  # result = client.submit_config_source request
1000
996
  #
1001
- # # The returned object is of type Gapic::Operation. You can use this
1002
- # # object to check the status of an operation, cancel it, or wait
1003
- # # for results. Here is how to block until completion:
997
+ # # The returned object is of type Gapic::Operation. You can use it to
998
+ # # check the status of an operation, cancel it, or wait for results.
999
+ # # Here is how to wait for a response.
1004
1000
  # result.wait_until_done! timeout: 60
1005
1001
  # if result.response?
1006
1002
  # p result.response
1007
1003
  # else
1008
- # puts "Error!"
1004
+ # puts "No response received."
1009
1005
  # end
1010
1006
  #
1011
1007
  def submit_config_source request, options = nil
@@ -1108,13 +1104,11 @@ module Google
1108
1104
  # # Call the list_service_rollouts method.
1109
1105
  # result = client.list_service_rollouts request
1110
1106
  #
1111
- # # The returned object is of type Gapic::PagedEnumerable. You can
1112
- # # iterate over all elements by calling #each, and the enumerable
1113
- # # will lazily make API calls to fetch subsequent pages. Other
1114
- # # methods are also available for managing paging directly.
1115
- # result.each do |response|
1107
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1108
+ # # over elements, and API calls will be issued to fetch pages as needed.
1109
+ # result.each do |item|
1116
1110
  # # Each element is of type ::Google::Cloud::ServiceManagement::V1::Rollout.
1117
- # p response
1111
+ # p item
1118
1112
  # end
1119
1113
  #
1120
1114
  def list_service_rollouts request, options = nil
@@ -1310,14 +1304,14 @@ module Google
1310
1304
  # # Call the create_service_rollout method.
1311
1305
  # result = client.create_service_rollout request
1312
1306
  #
1313
- # # The returned object is of type Gapic::Operation. You can use this
1314
- # # object to check the status of an operation, cancel it, or wait
1315
- # # for results. Here is how to block until completion:
1307
+ # # The returned object is of type Gapic::Operation. You can use it to
1308
+ # # check the status of an operation, cancel it, or wait for results.
1309
+ # # Here is how to wait for a response.
1316
1310
  # result.wait_until_done! timeout: 60
1317
1311
  # if result.response?
1318
1312
  # p result.response
1319
1313
  # else
1320
- # puts "Error!"
1314
+ # puts "No response received."
1321
1315
  # end
1322
1316
  #
1323
1317
  def create_service_rollout request, options = nil
@@ -95,6 +95,9 @@ module Google
95
95
  channel_args: @config.channel_args,
96
96
  interceptors: @config.interceptors
97
97
  )
98
+
99
+ # Used by an LRO wrapper for some methods of this service
100
+ @operations_client = self
98
101
  end
99
102
 
100
103
  # Service calls
@@ -155,13 +158,11 @@ module Google
155
158
  # # Call the list_operations method.
156
159
  # result = client.list_operations request
157
160
  #
158
- # # The returned object is of type Gapic::PagedEnumerable. You can
159
- # # iterate over all elements by calling #each, and the enumerable
160
- # # will lazily make API calls to fetch subsequent pages. Other
161
- # # methods are also available for managing paging directly.
162
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
163
164
  # # Each element is of type ::Google::Longrunning::Operation.
164
- # p response
165
+ # p item
165
166
  # end
166
167
  #
167
168
  def list_operations request, options = nil
@@ -181,14 +182,6 @@ module Google
181
182
  gapic_version: ::Google::Cloud::ServiceManagement::V1::VERSION
182
183
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
183
184
 
184
- header_params = {}
185
- if request.name
186
- header_params["name"] = request.name
187
- end
188
-
189
- request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
190
- metadata[:"x-goog-request-params"] ||= request_params_header
191
-
192
185
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
193
186
  metadata: metadata,
194
187
  retry_policy: @config.rpcs.list_operations.retry_policy
@@ -250,14 +243,14 @@ module Google
250
243
  # # Call the get_operation method.
251
244
  # result = client.get_operation request
252
245
  #
253
- # # The returned object is of type Gapic::Operation. You can use this
254
- # # object to check the status of an operation, cancel it, or wait
255
- # # for results. Here is how to block until completion:
246
+ # # The returned object is of type Gapic::Operation. You can use it to
247
+ # # check the status of an operation, cancel it, or wait for results.
248
+ # # Here is how to wait for a response.
256
249
  # result.wait_until_done! timeout: 60
257
250
  # if result.response?
258
251
  # p result.response
259
252
  # else
260
- # puts "Error!"
253
+ # puts "No response received."
261
254
  # end
262
255
  #
263
256
  def get_operation request, options = nil
@@ -537,14 +530,14 @@ module Google
537
530
  # # Call the wait_operation method.
538
531
  # result = client.wait_operation request
539
532
  #
540
- # # The returned object is of type Gapic::Operation. You can use this
541
- # # object to check the status of an operation, cancel it, or wait
542
- # # for results. Here is how to block until completion:
533
+ # # The returned object is of type Gapic::Operation. You can use it to
534
+ # # check the status of an operation, cancel it, or wait for results.
535
+ # # Here is how to wait for a response.
543
536
  # result.wait_until_done! timeout: 60
544
537
  # if result.response?
545
538
  # p result.response
546
539
  # else
547
- # puts "Error!"
540
+ # puts "No response received."
548
541
  # end
549
542
  #
550
543
  def wait_operation request, options = nil