google-cloud-os_config-v1 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # 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|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # 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.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # 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.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil