google-cloud-os_config-v1 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +12 -7
  4. data/lib/google/cloud/os_config/v1/os_config_service/client.rb +12 -18
  5. data/lib/google/cloud/os_config/v1/os_config_service/rest/client.rb +1181 -0
  6. data/lib/google/cloud/os_config/v1/os_config_service/rest/service_stub.rb +762 -0
  7. data/lib/google/cloud/os_config/v1/os_config_service/rest.rb +55 -0
  8. data/lib/google/cloud/os_config/v1/os_config_service.rb +7 -1
  9. data/lib/google/cloud/os_config/v1/os_config_zonal_service/client.rb +32 -42
  10. data/lib/google/cloud/os_config/v1/os_config_zonal_service/operations.rb +15 -14
  11. data/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/client.rb +1282 -0
  12. data/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/operations.rb +793 -0
  13. data/lib/google/cloud/os_config/v1/os_config_zonal_service/rest/service_stub.rb +758 -0
  14. data/lib/google/cloud/os_config/v1/os_config_zonal_service/rest.rb +56 -0
  15. data/lib/google/cloud/os_config/v1/os_config_zonal_service.rb +7 -1
  16. data/lib/google/cloud/os_config/v1/rest.rb +38 -0
  17. data/lib/google/cloud/os_config/v1/version.rb +1 -1
  18. data/lib/google/cloud/os_config/v1.rb +7 -2
  19. data/lib/google/cloud/osconfig/v1/inventory_pb.rb +2 -1
  20. data/lib/google/cloud/osconfig/v1/os_policy_assignment_reports_pb.rb +2 -1
  21. data/lib/google/cloud/osconfig/v1/os_policy_assignments_pb.rb +2 -1
  22. data/lib/google/cloud/osconfig/v1/os_policy_pb.rb +2 -1
  23. data/lib/google/cloud/osconfig/v1/osconfig_service_pb.rb +2 -1
  24. data/lib/google/cloud/osconfig/v1/osconfig_zonal_service_pb.rb +2 -1
  25. data/lib/google/cloud/osconfig/v1/patch_deployments_pb.rb +2 -1
  26. data/lib/google/cloud/osconfig/v1/patch_jobs_pb.rb +2 -1
  27. data/lib/google/cloud/osconfig/v1/vulnerability_pb.rb +2 -1
  28. data/proto_docs/google/api/client.rb +318 -0
  29. data/proto_docs/google/api/launch_stage.rb +71 -0
  30. data/proto_docs/google/protobuf/any.rb +3 -3
  31. data/proto_docs/google/protobuf/empty.rb +0 -2
  32. data/proto_docs/google/rpc/status.rb +4 -2
  33. metadata +24 -13
@@ -0,0 +1,55 @@
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/os_config/v1/version"
24
+
25
+ require "google/cloud/os_config/v1/os_config_service/credentials"
26
+ require "google/cloud/os_config/v1/os_config_service/paths"
27
+ require "google/cloud/os_config/v1/os_config_service/rest/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module OsConfig
32
+ module V1
33
+ ##
34
+ # OS Config API
35
+ #
36
+ # The OS Config service is a server-side component that you can use to
37
+ # manage package installations and patch jobs for virtual machine instances.
38
+ #
39
+ # To load this service and instantiate a REST client:
40
+ #
41
+ # require "google/cloud/os_config/v1/os_config_service/rest"
42
+ # client = ::Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
43
+ #
44
+ module OsConfigService
45
+ # Client for the REST transport
46
+ module Rest
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
55
+ require "google/cloud/os_config/v1/os_config_service/rest/helpers" if ::File.file? helper_path
@@ -25,6 +25,7 @@ require "google/cloud/os_config/v1/version"
25
25
  require "google/cloud/os_config/v1/os_config_service/credentials"
26
26
  require "google/cloud/os_config/v1/os_config_service/paths"
27
27
  require "google/cloud/os_config/v1/os_config_service/client"
28
+ require "google/cloud/os_config/v1/os_config_service/rest"
28
29
 
29
30
  module Google
30
31
  module Cloud
@@ -36,11 +37,16 @@ module Google
36
37
  # The OS Config service is a server-side component that you can use to
37
38
  # manage package installations and patch jobs for virtual machine instances.
38
39
  #
39
- # To load this service and instantiate a client:
40
+ # @example Load this service and instantiate a gRPC client
40
41
  #
41
42
  # require "google/cloud/os_config/v1/os_config_service"
42
43
  # client = ::Google::Cloud::OsConfig::V1::OsConfigService::Client.new
43
44
  #
45
+ # @example Load this service and instantiate a REST client
46
+ #
47
+ # require "google/cloud/os_config/v1/os_config_service/rest"
48
+ # client = ::Google::Cloud::OsConfig::V1::OsConfigService::Rest::Client.new
49
+ #
44
50
  module OsConfigService
45
51
  end
46
52
  end
@@ -226,14 +226,14 @@ module Google
226
226
  # # Call the create_os_policy_assignment method.
227
227
  # result = client.create_os_policy_assignment request
228
228
  #
229
- # # The returned object is of type Gapic::Operation. You can use this
230
- # # object to check the status of an operation, cancel it, or wait
231
- # # for results. Here is how to block until completion:
229
+ # # The returned object is of type Gapic::Operation. You can use it to
230
+ # # check the status of an operation, cancel it, or wait for results.
231
+ # # Here is how to wait for a response.
232
232
  # result.wait_until_done! timeout: 60
233
233
  # if result.response?
234
234
  # p result.response
235
235
  # else
236
- # puts "Error!"
236
+ # puts "No response received."
237
237
  # end
238
238
  #
239
239
  def create_os_policy_assignment request, options = nil
@@ -330,14 +330,14 @@ module Google
330
330
  # # Call the update_os_policy_assignment method.
331
331
  # result = client.update_os_policy_assignment request
332
332
  #
333
- # # The returned object is of type Gapic::Operation. You can use this
334
- # # object to check the status of an operation, cancel it, or wait
335
- # # for results. Here is how to block until completion:
333
+ # # The returned object is of type Gapic::Operation. You can use it to
334
+ # # check the status of an operation, cancel it, or wait for results.
335
+ # # Here is how to wait for a response.
336
336
  # result.wait_until_done! timeout: 60
337
337
  # if result.response?
338
338
  # p result.response
339
339
  # else
340
- # puts "Error!"
340
+ # puts "No response received."
341
341
  # end
342
342
  #
343
343
  def update_os_policy_assignment request, options = nil
@@ -523,13 +523,11 @@ module Google
523
523
  # # Call the list_os_policy_assignments method.
524
524
  # result = client.list_os_policy_assignments request
525
525
  #
526
- # # The returned object is of type Gapic::PagedEnumerable. You can
527
- # # iterate over all elements by calling #each, and the enumerable
528
- # # will lazily make API calls to fetch subsequent pages. Other
529
- # # methods are also available for managing paging directly.
530
- # result.each do |response|
526
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
527
+ # # over elements, and API calls will be issued to fetch pages as needed.
528
+ # result.each do |item|
531
529
  # # Each element is of type ::Google::Cloud::OsConfig::V1::OSPolicyAssignment.
532
- # p response
530
+ # p item
533
531
  # end
534
532
  #
535
533
  def list_os_policy_assignments request, options = nil
@@ -621,13 +619,11 @@ module Google
621
619
  # # Call the list_os_policy_assignment_revisions method.
622
620
  # result = client.list_os_policy_assignment_revisions request
623
621
  #
624
- # # The returned object is of type Gapic::PagedEnumerable. You can
625
- # # iterate over all elements by calling #each, and the enumerable
626
- # # will lazily make API calls to fetch subsequent pages. Other
627
- # # methods are also available for managing paging directly.
628
- # result.each do |response|
622
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
623
+ # # over elements, and API calls will be issued to fetch pages as needed.
624
+ # result.each do |item|
629
625
  # # Each element is of type ::Google::Cloud::OsConfig::V1::OSPolicyAssignment.
630
- # p response
626
+ # p item
631
627
  # end
632
628
  #
633
629
  def list_os_policy_assignment_revisions request, options = nil
@@ -724,14 +720,14 @@ module Google
724
720
  # # Call the delete_os_policy_assignment method.
725
721
  # result = client.delete_os_policy_assignment request
726
722
  #
727
- # # The returned object is of type Gapic::Operation. You can use this
728
- # # object to check the status of an operation, cancel it, or wait
729
- # # for results. Here is how to block until completion:
723
+ # # The returned object is of type Gapic::Operation. You can use it to
724
+ # # check the status of an operation, cancel it, or wait for results.
725
+ # # Here is how to wait for a response.
730
726
  # result.wait_until_done! timeout: 60
731
727
  # if result.response?
732
728
  # p result.response
733
729
  # else
734
- # puts "Error!"
730
+ # puts "No response received."
735
731
  # end
736
732
  #
737
733
  def delete_os_policy_assignment request, options = nil
@@ -941,13 +937,11 @@ module Google
941
937
  # # Call the list_os_policy_assignment_reports method.
942
938
  # result = client.list_os_policy_assignment_reports request
943
939
  #
944
- # # The returned object is of type Gapic::PagedEnumerable. You can
945
- # # iterate over all elements by calling #each, and the enumerable
946
- # # will lazily make API calls to fetch subsequent pages. Other
947
- # # methods are also available for managing paging directly.
948
- # result.each do |response|
940
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
941
+ # # over elements, and API calls will be issued to fetch pages as needed.
942
+ # result.each do |item|
949
943
  # # Each element is of type ::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport.
950
- # p response
944
+ # p item
951
945
  # end
952
946
  #
953
947
  def list_os_policy_assignment_reports request, options = nil
@@ -1145,13 +1139,11 @@ module Google
1145
1139
  # # Call the list_inventories method.
1146
1140
  # result = client.list_inventories request
1147
1141
  #
1148
- # # The returned object is of type Gapic::PagedEnumerable. You can
1149
- # # iterate over all elements by calling #each, and the enumerable
1150
- # # will lazily make API calls to fetch subsequent pages. Other
1151
- # # methods are also available for managing paging directly.
1152
- # result.each do |response|
1142
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1143
+ # # over elements, and API calls will be issued to fetch pages as needed.
1144
+ # result.each do |item|
1153
1145
  # # Each element is of type ::Google::Cloud::OsConfig::V1::Inventory.
1154
- # p response
1146
+ # p item
1155
1147
  # end
1156
1148
  #
1157
1149
  def list_inventories request, options = nil
@@ -1343,13 +1335,11 @@ module Google
1343
1335
  # # Call the list_vulnerability_reports method.
1344
1336
  # result = client.list_vulnerability_reports request
1345
1337
  #
1346
- # # The returned object is of type Gapic::PagedEnumerable. You can
1347
- # # iterate over all elements by calling #each, and the enumerable
1348
- # # will lazily make API calls to fetch subsequent pages. Other
1349
- # # methods are also available for managing paging directly.
1350
- # result.each do |response|
1338
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1339
+ # # over elements, and API calls will be issued to fetch pages as needed.
1340
+ # result.each do |item|
1351
1341
  # # Each element is of type ::Google::Cloud::OsConfig::V1::VulnerabilityReport.
1352
- # p response
1342
+ # p item
1353
1343
  # end
1354
1344
  #
1355
1345
  def list_vulnerability_reports 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
@@ -250,14 +251,14 @@ module Google
250
251
  # # Call the get_operation method.
251
252
  # result = client.get_operation request
252
253
  #
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:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
256
257
  # result.wait_until_done! timeout: 60
257
258
  # if result.response?
258
259
  # p result.response
259
260
  # else
260
- # puts "Error!"
261
+ # puts "No response received."
261
262
  # end
262
263
  #
263
264
  def get_operation request, options = nil
@@ -537,14 +538,14 @@ module Google
537
538
  # # Call the wait_operation method.
538
539
  # result = client.wait_operation request
539
540
  #
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:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
543
544
  # result.wait_until_done! timeout: 60
544
545
  # if result.response?
545
546
  # p result.response
546
547
  # else
547
- # puts "Error!"
548
+ # puts "No response received."
548
549
  # end
549
550
  #
550
551
  def wait_operation request, options = nil