google-cloud-os_config-v1alpha 0.4.0 → 0.6.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 (29) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +3 -3
  4. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/client.rb +42 -52
  5. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/operations.rb +17 -17
  6. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/rest/client.rb +1446 -0
  7. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/rest/operations.rb +795 -0
  8. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/rest/service_stub.rb +876 -0
  9. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/rest.rb +56 -0
  10. data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service.rb +7 -1
  11. data/lib/google/cloud/os_config/v1alpha/rest.rb +37 -0
  12. data/lib/google/cloud/os_config/v1alpha/version.rb +1 -1
  13. data/lib/google/cloud/os_config/v1alpha.rb +7 -2
  14. data/lib/google/cloud/osconfig/v1alpha/config_common_pb.rb +23 -37
  15. data/lib/google/cloud/osconfig/v1alpha/instance_os_policies_compliance_pb.rb +26 -31
  16. data/lib/google/cloud/osconfig/v1alpha/inventory_pb.rb +26 -110
  17. data/lib/google/cloud/osconfig/v1alpha/os_policy_assignment_reports_pb.rb +25 -62
  18. data/lib/google/cloud/osconfig/v1alpha/os_policy_assignments_pb.rb +29 -95
  19. data/lib/google/cloud/osconfig/v1alpha/os_policy_pb.rb +24 -164
  20. data/lib/google/cloud/osconfig/v1alpha/osconfig_common_pb.rb +23 -8
  21. data/lib/google/cloud/osconfig/v1alpha/osconfig_zonal_service_pb.rb +25 -2
  22. data/lib/google/cloud/osconfig/v1alpha/vulnerability_pb.rb +25 -93
  23. data/proto_docs/google/api/client.rb +381 -0
  24. data/proto_docs/google/api/launch_stage.rb +71 -0
  25. data/proto_docs/google/protobuf/any.rb +7 -4
  26. data/proto_docs/google/protobuf/empty.rb +0 -2
  27. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  28. data/proto_docs/google/rpc/status.rb +4 -2
  29. metadata +16 -8
@@ -0,0 +1,1446 @@
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/osconfig/v1alpha/osconfig_zonal_service_pb"
21
+ require "google/cloud/os_config/v1alpha/os_config_zonal_service/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module OsConfig
26
+ module V1alpha
27
+ module OsConfigZonalService
28
+ module Rest
29
+ ##
30
+ # REST client for the OsConfigZonalService service.
31
+ #
32
+ # Zonal OS Config API
33
+ #
34
+ # The OS Config service is the server-side component that allows users to
35
+ # manage package installations and patch jobs for Compute Engine VM instances.
36
+ #
37
+ class Client
38
+ include Paths
39
+
40
+ # @private
41
+ attr_reader :os_config_zonal_service_stub
42
+
43
+ ##
44
+ # Configure the OsConfigZonalService Client class.
45
+ #
46
+ # See {::Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Rest::Client::Configuration}
47
+ # for a description of the configuration fields.
48
+ #
49
+ # @example
50
+ #
51
+ # # Modify the configuration for all OsConfigZonalService clients
52
+ # ::Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::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", "OsConfig", "V1alpha"]
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: 1.0, 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 OsConfigZonalService 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::OsConfig::V1alpha::OsConfigZonalService::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 OsConfigZonalService REST client object.
105
+ #
106
+ # @example
107
+ #
108
+ # # Create a client using the default configuration
109
+ # client = ::Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Rest::Client.new
110
+ #
111
+ # # Create a client using a custom configuration
112
+ # client = ::Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Rest::Client.new do |config|
113
+ # config.timeout = 10.0
114
+ # end
115
+ #
116
+ # @yield [config] Configure the OsConfigZonalService 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 == Configuration::DEFAULT_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
+ @operations_client = ::Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Rest::Operations.new do |config|
142
+ config.credentials = credentials
143
+ config.quota_project = @quota_project_id
144
+ config.endpoint = @config.endpoint
145
+ end
146
+
147
+ @os_config_zonal_service_stub = ::Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
148
+ end
149
+
150
+ ##
151
+ # Get the associated client for long-running operations.
152
+ #
153
+ # @return [::Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Rest::Operations]
154
+ #
155
+ attr_reader :operations_client
156
+
157
+ # Service calls
158
+
159
+ ##
160
+ # Create an OS policy assignment.
161
+ #
162
+ # This method also creates the first revision of the OS policy assignment.
163
+ #
164
+ # This method returns a long running operation (LRO) that contains the
165
+ # rollout details. The rollout can be cancelled by cancelling the LRO.
166
+ #
167
+ # For more information, see [Method:
168
+ # projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
169
+ #
170
+ # @overload create_os_policy_assignment(request, options = nil)
171
+ # Pass arguments to `create_os_policy_assignment` via a request object, either of type
172
+ # {::Google::Cloud::OsConfig::V1alpha::CreateOSPolicyAssignmentRequest} or an equivalent Hash.
173
+ #
174
+ # @param request [::Google::Cloud::OsConfig::V1alpha::CreateOSPolicyAssignmentRequest, ::Hash]
175
+ # A request object representing the call parameters. Required. To specify no
176
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
177
+ # @param options [::Gapic::CallOptions, ::Hash]
178
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
179
+ #
180
+ # @overload create_os_policy_assignment(parent: nil, os_policy_assignment: nil, os_policy_assignment_id: nil)
181
+ # Pass arguments to `create_os_policy_assignment` via keyword arguments. Note that at
182
+ # least one keyword argument is required. To specify no parameters, or to keep all
183
+ # the default parameter values, pass an empty Hash as a request object (see above).
184
+ #
185
+ # @param parent [::String]
186
+ # Required. The parent resource name in the form:
187
+ # projects/\\{project}/locations/\\{location}
188
+ # @param os_policy_assignment [::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignment, ::Hash]
189
+ # Required. The OS policy assignment to be created.
190
+ # @param os_policy_assignment_id [::String]
191
+ # Required. The logical name of the OS policy assignment in the project
192
+ # with the following restrictions:
193
+ #
194
+ # * Must contain only lowercase letters, numbers, and hyphens.
195
+ # * Must start with a letter.
196
+ # * Must be between 1-63 characters.
197
+ # * Must end with a number or a letter.
198
+ # * Must be unique within the project.
199
+ # @yield [result, operation] Access the result along with the TransportOperation object
200
+ # @yieldparam result [::Gapic::Operation]
201
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
202
+ #
203
+ # @return [::Gapic::Operation]
204
+ #
205
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
206
+ def create_os_policy_assignment request, options = nil
207
+ raise ::ArgumentError, "request must be provided" if request.nil?
208
+
209
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::CreateOSPolicyAssignmentRequest
210
+
211
+ # Converts hash and nil to an options object
212
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
213
+
214
+ # Customize the options with defaults
215
+ call_metadata = @config.rpcs.create_os_policy_assignment.metadata.to_h
216
+
217
+ # Set x-goog-api-client and x-goog-user-project headers
218
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
219
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
220
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
221
+ transports_version_send: [:rest]
222
+
223
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
224
+
225
+ options.apply_defaults timeout: @config.rpcs.create_os_policy_assignment.timeout,
226
+ metadata: call_metadata,
227
+ retry_policy: @config.rpcs.create_os_policy_assignment.retry_policy
228
+
229
+ options.apply_defaults timeout: @config.timeout,
230
+ metadata: @config.metadata,
231
+ retry_policy: @config.retry_policy
232
+
233
+ @os_config_zonal_service_stub.create_os_policy_assignment request, options do |result, operation|
234
+ result = ::Gapic::Operation.new result, @operations_client, options: options
235
+ yield result, operation if block_given?
236
+ return result
237
+ end
238
+ rescue ::Gapic::Rest::Error => e
239
+ raise ::Google::Cloud::Error.from_error(e)
240
+ end
241
+
242
+ ##
243
+ # Update an existing OS policy assignment.
244
+ #
245
+ # This method creates a new revision of the OS policy assignment.
246
+ #
247
+ # This method returns a long running operation (LRO) that contains the
248
+ # rollout details. The rollout can be cancelled by cancelling the LRO.
249
+ #
250
+ # For more information, see [Method:
251
+ # projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
252
+ #
253
+ # @overload update_os_policy_assignment(request, options = nil)
254
+ # Pass arguments to `update_os_policy_assignment` via a request object, either of type
255
+ # {::Google::Cloud::OsConfig::V1alpha::UpdateOSPolicyAssignmentRequest} or an equivalent Hash.
256
+ #
257
+ # @param request [::Google::Cloud::OsConfig::V1alpha::UpdateOSPolicyAssignmentRequest, ::Hash]
258
+ # A request object representing the call parameters. Required. To specify no
259
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
260
+ # @param options [::Gapic::CallOptions, ::Hash]
261
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
262
+ #
263
+ # @overload update_os_policy_assignment(os_policy_assignment: nil, update_mask: nil)
264
+ # Pass arguments to `update_os_policy_assignment` via keyword arguments. Note that at
265
+ # least one keyword argument is required. To specify no parameters, or to keep all
266
+ # the default parameter values, pass an empty Hash as a request object (see above).
267
+ #
268
+ # @param os_policy_assignment [::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignment, ::Hash]
269
+ # Required. The updated OS policy assignment.
270
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
271
+ # Optional. Field mask that controls which fields of the assignment should be updated.
272
+ # @yield [result, operation] Access the result along with the TransportOperation object
273
+ # @yieldparam result [::Gapic::Operation]
274
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
275
+ #
276
+ # @return [::Gapic::Operation]
277
+ #
278
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
279
+ def update_os_policy_assignment request, options = nil
280
+ raise ::ArgumentError, "request must be provided" if request.nil?
281
+
282
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::UpdateOSPolicyAssignmentRequest
283
+
284
+ # Converts hash and nil to an options object
285
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
286
+
287
+ # Customize the options with defaults
288
+ call_metadata = @config.rpcs.update_os_policy_assignment.metadata.to_h
289
+
290
+ # Set x-goog-api-client and x-goog-user-project headers
291
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
292
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
293
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
294
+ transports_version_send: [:rest]
295
+
296
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
297
+
298
+ options.apply_defaults timeout: @config.rpcs.update_os_policy_assignment.timeout,
299
+ metadata: call_metadata,
300
+ retry_policy: @config.rpcs.update_os_policy_assignment.retry_policy
301
+
302
+ options.apply_defaults timeout: @config.timeout,
303
+ metadata: @config.metadata,
304
+ retry_policy: @config.retry_policy
305
+
306
+ @os_config_zonal_service_stub.update_os_policy_assignment request, options do |result, operation|
307
+ result = ::Gapic::Operation.new result, @operations_client, options: options
308
+ yield result, operation if block_given?
309
+ return result
310
+ end
311
+ rescue ::Gapic::Rest::Error => e
312
+ raise ::Google::Cloud::Error.from_error(e)
313
+ end
314
+
315
+ ##
316
+ # Retrieve an existing OS policy assignment.
317
+ #
318
+ # This method always returns the latest revision. In order to retrieve a
319
+ # previous revision of the assignment, also provide the revision ID in the
320
+ # `name` parameter.
321
+ #
322
+ # @overload get_os_policy_assignment(request, options = nil)
323
+ # Pass arguments to `get_os_policy_assignment` via a request object, either of type
324
+ # {::Google::Cloud::OsConfig::V1alpha::GetOSPolicyAssignmentRequest} or an equivalent Hash.
325
+ #
326
+ # @param request [::Google::Cloud::OsConfig::V1alpha::GetOSPolicyAssignmentRequest, ::Hash]
327
+ # A request object representing the call parameters. Required. To specify no
328
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
329
+ # @param options [::Gapic::CallOptions, ::Hash]
330
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
331
+ #
332
+ # @overload get_os_policy_assignment(name: nil)
333
+ # Pass arguments to `get_os_policy_assignment` via keyword arguments. Note that at
334
+ # least one keyword argument is required. To specify no parameters, or to keep all
335
+ # the default parameter values, pass an empty Hash as a request object (see above).
336
+ #
337
+ # @param name [::String]
338
+ # Required. The resource name of OS policy assignment.
339
+ #
340
+ # Format:
341
+ # `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`
342
+ # @yield [result, operation] Access the result along with the TransportOperation object
343
+ # @yieldparam result [::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignment]
344
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
345
+ #
346
+ # @return [::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignment]
347
+ #
348
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
349
+ def get_os_policy_assignment request, options = nil
350
+ raise ::ArgumentError, "request must be provided" if request.nil?
351
+
352
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::GetOSPolicyAssignmentRequest
353
+
354
+ # Converts hash and nil to an options object
355
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
356
+
357
+ # Customize the options with defaults
358
+ call_metadata = @config.rpcs.get_os_policy_assignment.metadata.to_h
359
+
360
+ # Set x-goog-api-client and x-goog-user-project headers
361
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
362
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
363
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
364
+ transports_version_send: [:rest]
365
+
366
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
367
+
368
+ options.apply_defaults timeout: @config.rpcs.get_os_policy_assignment.timeout,
369
+ metadata: call_metadata,
370
+ retry_policy: @config.rpcs.get_os_policy_assignment.retry_policy
371
+
372
+ options.apply_defaults timeout: @config.timeout,
373
+ metadata: @config.metadata,
374
+ retry_policy: @config.retry_policy
375
+
376
+ @os_config_zonal_service_stub.get_os_policy_assignment request, options do |result, operation|
377
+ yield result, operation if block_given?
378
+ return result
379
+ end
380
+ rescue ::Gapic::Rest::Error => e
381
+ raise ::Google::Cloud::Error.from_error(e)
382
+ end
383
+
384
+ ##
385
+ # List the OS policy assignments under the parent resource.
386
+ #
387
+ # For each OS policy assignment, the latest revision is returned.
388
+ #
389
+ # @overload list_os_policy_assignments(request, options = nil)
390
+ # Pass arguments to `list_os_policy_assignments` via a request object, either of type
391
+ # {::Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentsRequest} or an equivalent Hash.
392
+ #
393
+ # @param request [::Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentsRequest, ::Hash]
394
+ # A request object representing the call parameters. Required. To specify no
395
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
396
+ # @param options [::Gapic::CallOptions, ::Hash]
397
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
398
+ #
399
+ # @overload list_os_policy_assignments(parent: nil, page_size: nil, page_token: nil)
400
+ # Pass arguments to `list_os_policy_assignments` via keyword arguments. Note that at
401
+ # least one keyword argument is required. To specify no parameters, or to keep all
402
+ # the default parameter values, pass an empty Hash as a request object (see above).
403
+ #
404
+ # @param parent [::String]
405
+ # Required. The parent resource name.
406
+ # @param page_size [::Integer]
407
+ # The maximum number of assignments to return.
408
+ # @param page_token [::String]
409
+ # A pagination token returned from a previous call to
410
+ # `ListOSPolicyAssignments` that indicates where this listing should continue
411
+ # from.
412
+ # @yield [result, operation] Access the result along with the TransportOperation object
413
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignment>]
414
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
415
+ #
416
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignment>]
417
+ #
418
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
419
+ def list_os_policy_assignments request, options = nil
420
+ raise ::ArgumentError, "request must be provided" if request.nil?
421
+
422
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentsRequest
423
+
424
+ # Converts hash and nil to an options object
425
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
426
+
427
+ # Customize the options with defaults
428
+ call_metadata = @config.rpcs.list_os_policy_assignments.metadata.to_h
429
+
430
+ # Set x-goog-api-client and x-goog-user-project headers
431
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
432
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
433
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
434
+ transports_version_send: [:rest]
435
+
436
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
437
+
438
+ options.apply_defaults timeout: @config.rpcs.list_os_policy_assignments.timeout,
439
+ metadata: call_metadata,
440
+ retry_policy: @config.rpcs.list_os_policy_assignments.retry_policy
441
+
442
+ options.apply_defaults timeout: @config.timeout,
443
+ metadata: @config.metadata,
444
+ retry_policy: @config.retry_policy
445
+
446
+ @os_config_zonal_service_stub.list_os_policy_assignments request, options do |result, operation|
447
+ result = ::Gapic::Rest::PagedEnumerable.new @os_config_zonal_service_stub, :list_os_policy_assignments, "os_policy_assignments", request, result, options
448
+ yield result, operation if block_given?
449
+ return result
450
+ end
451
+ rescue ::Gapic::Rest::Error => e
452
+ raise ::Google::Cloud::Error.from_error(e)
453
+ end
454
+
455
+ ##
456
+ # List the OS policy assignment revisions for a given OS policy assignment.
457
+ #
458
+ # @overload list_os_policy_assignment_revisions(request, options = nil)
459
+ # Pass arguments to `list_os_policy_assignment_revisions` via a request object, either of type
460
+ # {::Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentRevisionsRequest} or an equivalent Hash.
461
+ #
462
+ # @param request [::Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentRevisionsRequest, ::Hash]
463
+ # A request object representing the call parameters. Required. To specify no
464
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
465
+ # @param options [::Gapic::CallOptions, ::Hash]
466
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
467
+ #
468
+ # @overload list_os_policy_assignment_revisions(name: nil, page_size: nil, page_token: nil)
469
+ # Pass arguments to `list_os_policy_assignment_revisions` via keyword arguments. Note that at
470
+ # least one keyword argument is required. To specify no parameters, or to keep all
471
+ # the default parameter values, pass an empty Hash as a request object (see above).
472
+ #
473
+ # @param name [::String]
474
+ # Required. The name of the OS policy assignment to list revisions for.
475
+ # @param page_size [::Integer]
476
+ # The maximum number of revisions to return.
477
+ # @param page_token [::String]
478
+ # A pagination token returned from a previous call to
479
+ # `ListOSPolicyAssignmentRevisions` that indicates where this listing should
480
+ # continue from.
481
+ # @yield [result, operation] Access the result along with the TransportOperation object
482
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignment>]
483
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
484
+ #
485
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignment>]
486
+ #
487
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
488
+ def list_os_policy_assignment_revisions request, options = nil
489
+ raise ::ArgumentError, "request must be provided" if request.nil?
490
+
491
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentRevisionsRequest
492
+
493
+ # Converts hash and nil to an options object
494
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
495
+
496
+ # Customize the options with defaults
497
+ call_metadata = @config.rpcs.list_os_policy_assignment_revisions.metadata.to_h
498
+
499
+ # Set x-goog-api-client and x-goog-user-project headers
500
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
501
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
502
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
503
+ transports_version_send: [:rest]
504
+
505
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
506
+
507
+ options.apply_defaults timeout: @config.rpcs.list_os_policy_assignment_revisions.timeout,
508
+ metadata: call_metadata,
509
+ retry_policy: @config.rpcs.list_os_policy_assignment_revisions.retry_policy
510
+
511
+ options.apply_defaults timeout: @config.timeout,
512
+ metadata: @config.metadata,
513
+ retry_policy: @config.retry_policy
514
+
515
+ @os_config_zonal_service_stub.list_os_policy_assignment_revisions request, options do |result, operation|
516
+ result = ::Gapic::Rest::PagedEnumerable.new @os_config_zonal_service_stub, :list_os_policy_assignment_revisions, "os_policy_assignments", request, result, options
517
+ yield result, operation if block_given?
518
+ return result
519
+ end
520
+ rescue ::Gapic::Rest::Error => e
521
+ raise ::Google::Cloud::Error.from_error(e)
522
+ end
523
+
524
+ ##
525
+ # Delete the OS policy assignment.
526
+ #
527
+ # This method creates a new revision of the OS policy assignment.
528
+ #
529
+ # This method returns a long running operation (LRO) that contains the
530
+ # rollout details. The rollout can be cancelled by cancelling the LRO.
531
+ #
532
+ # If the LRO completes and is not cancelled, all revisions associated with
533
+ # the OS policy assignment are deleted.
534
+ #
535
+ # For more information, see [Method:
536
+ # projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
537
+ #
538
+ # @overload delete_os_policy_assignment(request, options = nil)
539
+ # Pass arguments to `delete_os_policy_assignment` via a request object, either of type
540
+ # {::Google::Cloud::OsConfig::V1alpha::DeleteOSPolicyAssignmentRequest} or an equivalent Hash.
541
+ #
542
+ # @param request [::Google::Cloud::OsConfig::V1alpha::DeleteOSPolicyAssignmentRequest, ::Hash]
543
+ # A request object representing the call parameters. Required. To specify no
544
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
545
+ # @param options [::Gapic::CallOptions, ::Hash]
546
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
547
+ #
548
+ # @overload delete_os_policy_assignment(name: nil)
549
+ # Pass arguments to `delete_os_policy_assignment` via keyword arguments. Note that at
550
+ # least one keyword argument is required. To specify no parameters, or to keep all
551
+ # the default parameter values, pass an empty Hash as a request object (see above).
552
+ #
553
+ # @param name [::String]
554
+ # Required. The name of the OS policy assignment to be deleted
555
+ # @yield [result, operation] Access the result along with the TransportOperation object
556
+ # @yieldparam result [::Gapic::Operation]
557
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
558
+ #
559
+ # @return [::Gapic::Operation]
560
+ #
561
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
562
+ def delete_os_policy_assignment request, options = nil
563
+ raise ::ArgumentError, "request must be provided" if request.nil?
564
+
565
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::DeleteOSPolicyAssignmentRequest
566
+
567
+ # Converts hash and nil to an options object
568
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
569
+
570
+ # Customize the options with defaults
571
+ call_metadata = @config.rpcs.delete_os_policy_assignment.metadata.to_h
572
+
573
+ # Set x-goog-api-client and x-goog-user-project headers
574
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
575
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
576
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
577
+ transports_version_send: [:rest]
578
+
579
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
580
+
581
+ options.apply_defaults timeout: @config.rpcs.delete_os_policy_assignment.timeout,
582
+ metadata: call_metadata,
583
+ retry_policy: @config.rpcs.delete_os_policy_assignment.retry_policy
584
+
585
+ options.apply_defaults timeout: @config.timeout,
586
+ metadata: @config.metadata,
587
+ retry_policy: @config.retry_policy
588
+
589
+ @os_config_zonal_service_stub.delete_os_policy_assignment request, options do |result, operation|
590
+ result = ::Gapic::Operation.new result, @operations_client, options: options
591
+ yield result, operation if block_given?
592
+ return result
593
+ end
594
+ rescue ::Gapic::Rest::Error => e
595
+ raise ::Google::Cloud::Error.from_error(e)
596
+ end
597
+
598
+ ##
599
+ # Get OS policies compliance data for the specified Compute Engine VM
600
+ # instance.
601
+ #
602
+ # @overload get_instance_os_policies_compliance(request, options = nil)
603
+ # Pass arguments to `get_instance_os_policies_compliance` via a request object, either of type
604
+ # {::Google::Cloud::OsConfig::V1alpha::GetInstanceOSPoliciesComplianceRequest} or an equivalent Hash.
605
+ #
606
+ # @param request [::Google::Cloud::OsConfig::V1alpha::GetInstanceOSPoliciesComplianceRequest, ::Hash]
607
+ # A request object representing the call parameters. Required. To specify no
608
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
609
+ # @param options [::Gapic::CallOptions, ::Hash]
610
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
611
+ #
612
+ # @overload get_instance_os_policies_compliance(name: nil)
613
+ # Pass arguments to `get_instance_os_policies_compliance` via keyword arguments. Note that at
614
+ # least one keyword argument is required. To specify no parameters, or to keep all
615
+ # the default parameter values, pass an empty Hash as a request object (see above).
616
+ #
617
+ # @param name [::String]
618
+ # Required. API resource name for instance OS policies compliance resource.
619
+ #
620
+ # Format:
621
+ # `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}`
622
+ #
623
+ # For `{project}`, either Compute Engine project-number or project-id can be
624
+ # provided.
625
+ # For `{instance}`, either Compute Engine VM instance-id or instance-name can
626
+ # be provided.
627
+ # @yield [result, operation] Access the result along with the TransportOperation object
628
+ # @yieldparam result [::Google::Cloud::OsConfig::V1alpha::InstanceOSPoliciesCompliance]
629
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
630
+ #
631
+ # @return [::Google::Cloud::OsConfig::V1alpha::InstanceOSPoliciesCompliance]
632
+ #
633
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
634
+ def get_instance_os_policies_compliance request, options = nil
635
+ raise ::ArgumentError, "request must be provided" if request.nil?
636
+
637
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::GetInstanceOSPoliciesComplianceRequest
638
+
639
+ # Converts hash and nil to an options object
640
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
641
+
642
+ # Customize the options with defaults
643
+ call_metadata = @config.rpcs.get_instance_os_policies_compliance.metadata.to_h
644
+
645
+ # Set x-goog-api-client and x-goog-user-project headers
646
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
647
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
648
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
649
+ transports_version_send: [:rest]
650
+
651
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
652
+
653
+ options.apply_defaults timeout: @config.rpcs.get_instance_os_policies_compliance.timeout,
654
+ metadata: call_metadata,
655
+ retry_policy: @config.rpcs.get_instance_os_policies_compliance.retry_policy
656
+
657
+ options.apply_defaults timeout: @config.timeout,
658
+ metadata: @config.metadata,
659
+ retry_policy: @config.retry_policy
660
+
661
+ @os_config_zonal_service_stub.get_instance_os_policies_compliance request, options do |result, operation|
662
+ yield result, operation if block_given?
663
+ return result
664
+ end
665
+ rescue ::Gapic::Rest::Error => e
666
+ raise ::Google::Cloud::Error.from_error(e)
667
+ end
668
+
669
+ ##
670
+ # List OS policies compliance data for all Compute Engine VM instances in the
671
+ # specified zone.
672
+ #
673
+ # @overload list_instance_os_policies_compliances(request, options = nil)
674
+ # Pass arguments to `list_instance_os_policies_compliances` via a request object, either of type
675
+ # {::Google::Cloud::OsConfig::V1alpha::ListInstanceOSPoliciesCompliancesRequest} or an equivalent Hash.
676
+ #
677
+ # @param request [::Google::Cloud::OsConfig::V1alpha::ListInstanceOSPoliciesCompliancesRequest, ::Hash]
678
+ # A request object representing the call parameters. Required. To specify no
679
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
680
+ # @param options [::Gapic::CallOptions, ::Hash]
681
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
682
+ #
683
+ # @overload list_instance_os_policies_compliances(parent: nil, page_size: nil, page_token: nil, filter: nil)
684
+ # Pass arguments to `list_instance_os_policies_compliances` via keyword arguments. Note that at
685
+ # least one keyword argument is required. To specify no parameters, or to keep all
686
+ # the default parameter values, pass an empty Hash as a request object (see above).
687
+ #
688
+ # @param parent [::String]
689
+ # Required. The parent resource name.
690
+ #
691
+ # Format: `projects/{project}/locations/{location}`
692
+ #
693
+ # For `{project}`, either Compute Engine project-number or project-id can be
694
+ # provided.
695
+ # @param page_size [::Integer]
696
+ # The maximum number of results to return.
697
+ # @param page_token [::String]
698
+ # A pagination token returned from a previous call to
699
+ # `ListInstanceOSPoliciesCompliances` that indicates where this listing
700
+ # should continue from.
701
+ # @param filter [::String]
702
+ # If provided, this field specifies the criteria that must be met by a
703
+ # `InstanceOSPoliciesCompliance` API resource to be included in the response.
704
+ # @yield [result, operation] Access the result along with the TransportOperation object
705
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::InstanceOSPoliciesCompliance>]
706
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
707
+ #
708
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::InstanceOSPoliciesCompliance>]
709
+ #
710
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
711
+ def list_instance_os_policies_compliances request, options = nil
712
+ raise ::ArgumentError, "request must be provided" if request.nil?
713
+
714
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::ListInstanceOSPoliciesCompliancesRequest
715
+
716
+ # Converts hash and nil to an options object
717
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
718
+
719
+ # Customize the options with defaults
720
+ call_metadata = @config.rpcs.list_instance_os_policies_compliances.metadata.to_h
721
+
722
+ # Set x-goog-api-client and x-goog-user-project headers
723
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
724
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
725
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
726
+ transports_version_send: [:rest]
727
+
728
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
729
+
730
+ options.apply_defaults timeout: @config.rpcs.list_instance_os_policies_compliances.timeout,
731
+ metadata: call_metadata,
732
+ retry_policy: @config.rpcs.list_instance_os_policies_compliances.retry_policy
733
+
734
+ options.apply_defaults timeout: @config.timeout,
735
+ metadata: @config.metadata,
736
+ retry_policy: @config.retry_policy
737
+
738
+ @os_config_zonal_service_stub.list_instance_os_policies_compliances request, options do |result, operation|
739
+ result = ::Gapic::Rest::PagedEnumerable.new @os_config_zonal_service_stub, :list_instance_os_policies_compliances, "instance_os_policies_compliances", request, result, options
740
+ yield result, operation if block_given?
741
+ return result
742
+ end
743
+ rescue ::Gapic::Rest::Error => e
744
+ raise ::Google::Cloud::Error.from_error(e)
745
+ end
746
+
747
+ ##
748
+ # Get the OS policy asssignment report for the specified Compute Engine VM
749
+ # instance.
750
+ #
751
+ # @overload get_os_policy_assignment_report(request, options = nil)
752
+ # Pass arguments to `get_os_policy_assignment_report` via a request object, either of type
753
+ # {::Google::Cloud::OsConfig::V1alpha::GetOSPolicyAssignmentReportRequest} or an equivalent Hash.
754
+ #
755
+ # @param request [::Google::Cloud::OsConfig::V1alpha::GetOSPolicyAssignmentReportRequest, ::Hash]
756
+ # A request object representing the call parameters. Required. To specify no
757
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
758
+ # @param options [::Gapic::CallOptions, ::Hash]
759
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
760
+ #
761
+ # @overload get_os_policy_assignment_report(name: nil)
762
+ # Pass arguments to `get_os_policy_assignment_report` via keyword arguments. Note that at
763
+ # least one keyword argument is required. To specify no parameters, or to keep all
764
+ # the default parameter values, pass an empty Hash as a request object (see above).
765
+ #
766
+ # @param name [::String]
767
+ # Required. API resource name for OS policy assignment report.
768
+ #
769
+ # Format:
770
+ # `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`
771
+ #
772
+ # For `{project}`, either `project-number` or `project-id` can be provided.
773
+ # For `{instance_id}`, either Compute Engine `instance-id` or `instance-name`
774
+ # can be provided.
775
+ # For `{assignment_id}`, the OSPolicyAssignment id must be provided.
776
+ # @yield [result, operation] Access the result along with the TransportOperation object
777
+ # @yieldparam result [::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignmentReport]
778
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
779
+ #
780
+ # @return [::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignmentReport]
781
+ #
782
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
783
+ def get_os_policy_assignment_report request, options = nil
784
+ raise ::ArgumentError, "request must be provided" if request.nil?
785
+
786
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::GetOSPolicyAssignmentReportRequest
787
+
788
+ # Converts hash and nil to an options object
789
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
790
+
791
+ # Customize the options with defaults
792
+ call_metadata = @config.rpcs.get_os_policy_assignment_report.metadata.to_h
793
+
794
+ # Set x-goog-api-client and x-goog-user-project headers
795
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
796
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
797
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
798
+ transports_version_send: [:rest]
799
+
800
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
801
+
802
+ options.apply_defaults timeout: @config.rpcs.get_os_policy_assignment_report.timeout,
803
+ metadata: call_metadata,
804
+ retry_policy: @config.rpcs.get_os_policy_assignment_report.retry_policy
805
+
806
+ options.apply_defaults timeout: @config.timeout,
807
+ metadata: @config.metadata,
808
+ retry_policy: @config.retry_policy
809
+
810
+ @os_config_zonal_service_stub.get_os_policy_assignment_report request, options do |result, operation|
811
+ yield result, operation if block_given?
812
+ return result
813
+ end
814
+ rescue ::Gapic::Rest::Error => e
815
+ raise ::Google::Cloud::Error.from_error(e)
816
+ end
817
+
818
+ ##
819
+ # List OS policy asssignment reports for all Compute Engine VM instances in
820
+ # the specified zone.
821
+ #
822
+ # @overload list_os_policy_assignment_reports(request, options = nil)
823
+ # Pass arguments to `list_os_policy_assignment_reports` via a request object, either of type
824
+ # {::Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentReportsRequest} or an equivalent Hash.
825
+ #
826
+ # @param request [::Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentReportsRequest, ::Hash]
827
+ # A request object representing the call parameters. Required. To specify no
828
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
829
+ # @param options [::Gapic::CallOptions, ::Hash]
830
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
831
+ #
832
+ # @overload list_os_policy_assignment_reports(parent: nil, page_size: nil, filter: nil, page_token: nil)
833
+ # Pass arguments to `list_os_policy_assignment_reports` via keyword arguments. Note that at
834
+ # least one keyword argument is required. To specify no parameters, or to keep all
835
+ # the default parameter values, pass an empty Hash as a request object (see above).
836
+ #
837
+ # @param parent [::String]
838
+ # Required. The parent resource name.
839
+ #
840
+ # Format:
841
+ # `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports`
842
+ #
843
+ # For `{project}`, either `project-number` or `project-id` can be provided.
844
+ # For `{instance}`, either `instance-name`, `instance-id`, or `-` can be
845
+ # provided. If '-' is provided, the response will include
846
+ # OSPolicyAssignmentReports for all instances in the project/location.
847
+ # For `{assignment}`, either `assignment-id` or `-` can be provided. If '-'
848
+ # is provided, the response will include OSPolicyAssignmentReports for all
849
+ # OSPolicyAssignments in the project/location.
850
+ # Either \\{instance} or \\{assignment} must be `-`.
851
+ #
852
+ # For example:
853
+ # `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
854
+ # returns all reports for the instance
855
+ # `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
856
+ # returns all the reports for the given assignment across all instances.
857
+ # `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
858
+ # returns all the reports for all assignments across all instances.
859
+ # @param page_size [::Integer]
860
+ # The maximum number of results to return.
861
+ # @param filter [::String]
862
+ # If provided, this field specifies the criteria that must be met by the
863
+ # `OSPolicyAssignmentReport` API resource that is included in the response.
864
+ # @param page_token [::String]
865
+ # A pagination token returned from a previous call to the
866
+ # `ListOSPolicyAssignmentReports` method that indicates where this listing
867
+ # should continue from.
868
+ # @yield [result, operation] Access the result along with the TransportOperation object
869
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignmentReport>]
870
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
871
+ #
872
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignmentReport>]
873
+ #
874
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
875
+ def list_os_policy_assignment_reports request, options = nil
876
+ raise ::ArgumentError, "request must be provided" if request.nil?
877
+
878
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentReportsRequest
879
+
880
+ # Converts hash and nil to an options object
881
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
882
+
883
+ # Customize the options with defaults
884
+ call_metadata = @config.rpcs.list_os_policy_assignment_reports.metadata.to_h
885
+
886
+ # Set x-goog-api-client and x-goog-user-project headers
887
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
888
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
889
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
890
+ transports_version_send: [:rest]
891
+
892
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
893
+
894
+ options.apply_defaults timeout: @config.rpcs.list_os_policy_assignment_reports.timeout,
895
+ metadata: call_metadata,
896
+ retry_policy: @config.rpcs.list_os_policy_assignment_reports.retry_policy
897
+
898
+ options.apply_defaults timeout: @config.timeout,
899
+ metadata: @config.metadata,
900
+ retry_policy: @config.retry_policy
901
+
902
+ @os_config_zonal_service_stub.list_os_policy_assignment_reports request, options do |result, operation|
903
+ result = ::Gapic::Rest::PagedEnumerable.new @os_config_zonal_service_stub, :list_os_policy_assignment_reports, "os_policy_assignment_reports", request, result, options
904
+ yield result, operation if block_given?
905
+ return result
906
+ end
907
+ rescue ::Gapic::Rest::Error => e
908
+ raise ::Google::Cloud::Error.from_error(e)
909
+ end
910
+
911
+ ##
912
+ # Get inventory data for the specified VM instance. If the VM has no
913
+ # associated inventory, the message `NOT_FOUND` is returned.
914
+ #
915
+ # @overload get_inventory(request, options = nil)
916
+ # Pass arguments to `get_inventory` via a request object, either of type
917
+ # {::Google::Cloud::OsConfig::V1alpha::GetInventoryRequest} or an equivalent Hash.
918
+ #
919
+ # @param request [::Google::Cloud::OsConfig::V1alpha::GetInventoryRequest, ::Hash]
920
+ # A request object representing the call parameters. Required. To specify no
921
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
922
+ # @param options [::Gapic::CallOptions, ::Hash]
923
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
924
+ #
925
+ # @overload get_inventory(name: nil, view: nil)
926
+ # Pass arguments to `get_inventory` via keyword arguments. Note that at
927
+ # least one keyword argument is required. To specify no parameters, or to keep all
928
+ # the default parameter values, pass an empty Hash as a request object (see above).
929
+ #
930
+ # @param name [::String]
931
+ # Required. API resource name for inventory resource.
932
+ #
933
+ # Format:
934
+ # `projects/{project}/locations/{location}/instances/{instance}/inventory`
935
+ #
936
+ # For `{project}`, either `project-number` or `project-id` can be provided.
937
+ # For `{instance}`, either Compute Engine `instance-id` or `instance-name`
938
+ # can be provided.
939
+ # @param view [::Google::Cloud::OsConfig::V1alpha::InventoryView]
940
+ # Inventory view indicating what information should be included in the
941
+ # inventory resource. If unspecified, the default view is BASIC.
942
+ # @yield [result, operation] Access the result along with the TransportOperation object
943
+ # @yieldparam result [::Google::Cloud::OsConfig::V1alpha::Inventory]
944
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
945
+ #
946
+ # @return [::Google::Cloud::OsConfig::V1alpha::Inventory]
947
+ #
948
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
949
+ def get_inventory request, options = nil
950
+ raise ::ArgumentError, "request must be provided" if request.nil?
951
+
952
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::GetInventoryRequest
953
+
954
+ # Converts hash and nil to an options object
955
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
956
+
957
+ # Customize the options with defaults
958
+ call_metadata = @config.rpcs.get_inventory.metadata.to_h
959
+
960
+ # Set x-goog-api-client and x-goog-user-project headers
961
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
962
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
963
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
964
+ transports_version_send: [:rest]
965
+
966
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
967
+
968
+ options.apply_defaults timeout: @config.rpcs.get_inventory.timeout,
969
+ metadata: call_metadata,
970
+ retry_policy: @config.rpcs.get_inventory.retry_policy
971
+
972
+ options.apply_defaults timeout: @config.timeout,
973
+ metadata: @config.metadata,
974
+ retry_policy: @config.retry_policy
975
+
976
+ @os_config_zonal_service_stub.get_inventory request, options do |result, operation|
977
+ yield result, operation if block_given?
978
+ return result
979
+ end
980
+ rescue ::Gapic::Rest::Error => e
981
+ raise ::Google::Cloud::Error.from_error(e)
982
+ end
983
+
984
+ ##
985
+ # List inventory data for all VM instances in the specified zone.
986
+ #
987
+ # @overload list_inventories(request, options = nil)
988
+ # Pass arguments to `list_inventories` via a request object, either of type
989
+ # {::Google::Cloud::OsConfig::V1alpha::ListInventoriesRequest} or an equivalent Hash.
990
+ #
991
+ # @param request [::Google::Cloud::OsConfig::V1alpha::ListInventoriesRequest, ::Hash]
992
+ # A request object representing the call parameters. Required. To specify no
993
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
994
+ # @param options [::Gapic::CallOptions, ::Hash]
995
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
996
+ #
997
+ # @overload list_inventories(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil)
998
+ # Pass arguments to `list_inventories` via keyword arguments. Note that at
999
+ # least one keyword argument is required. To specify no parameters, or to keep all
1000
+ # the default parameter values, pass an empty Hash as a request object (see above).
1001
+ #
1002
+ # @param parent [::String]
1003
+ # Required. The parent resource name.
1004
+ #
1005
+ # Format: `projects/{project}/locations/{location}/instances/-`
1006
+ #
1007
+ # For `{project}`, either `project-number` or `project-id` can be provided.
1008
+ # @param view [::Google::Cloud::OsConfig::V1alpha::InventoryView]
1009
+ # Inventory view indicating what information should be included in the
1010
+ # inventory resource. If unspecified, the default view is BASIC.
1011
+ # @param page_size [::Integer]
1012
+ # The maximum number of results to return.
1013
+ # @param page_token [::String]
1014
+ # A pagination token returned from a previous call to
1015
+ # `ListInventories` that indicates where this listing
1016
+ # should continue from.
1017
+ # @param filter [::String]
1018
+ # If provided, this field specifies the criteria that must be met by a
1019
+ # `Inventory` API resource to be included in the response.
1020
+ # @yield [result, operation] Access the result along with the TransportOperation object
1021
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::Inventory>]
1022
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1023
+ #
1024
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::Inventory>]
1025
+ #
1026
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1027
+ def list_inventories request, options = nil
1028
+ raise ::ArgumentError, "request must be provided" if request.nil?
1029
+
1030
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::ListInventoriesRequest
1031
+
1032
+ # Converts hash and nil to an options object
1033
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1034
+
1035
+ # Customize the options with defaults
1036
+ call_metadata = @config.rpcs.list_inventories.metadata.to_h
1037
+
1038
+ # Set x-goog-api-client and x-goog-user-project headers
1039
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1040
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1041
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
1042
+ transports_version_send: [:rest]
1043
+
1044
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1045
+
1046
+ options.apply_defaults timeout: @config.rpcs.list_inventories.timeout,
1047
+ metadata: call_metadata,
1048
+ retry_policy: @config.rpcs.list_inventories.retry_policy
1049
+
1050
+ options.apply_defaults timeout: @config.timeout,
1051
+ metadata: @config.metadata,
1052
+ retry_policy: @config.retry_policy
1053
+
1054
+ @os_config_zonal_service_stub.list_inventories request, options do |result, operation|
1055
+ result = ::Gapic::Rest::PagedEnumerable.new @os_config_zonal_service_stub, :list_inventories, "inventories", request, result, options
1056
+ yield result, operation if block_given?
1057
+ return result
1058
+ end
1059
+ rescue ::Gapic::Rest::Error => e
1060
+ raise ::Google::Cloud::Error.from_error(e)
1061
+ end
1062
+
1063
+ ##
1064
+ # Gets the vulnerability report for the specified VM instance. Only VMs with
1065
+ # inventory data have vulnerability reports associated with them.
1066
+ #
1067
+ # @overload get_vulnerability_report(request, options = nil)
1068
+ # Pass arguments to `get_vulnerability_report` via a request object, either of type
1069
+ # {::Google::Cloud::OsConfig::V1alpha::GetVulnerabilityReportRequest} or an equivalent Hash.
1070
+ #
1071
+ # @param request [::Google::Cloud::OsConfig::V1alpha::GetVulnerabilityReportRequest, ::Hash]
1072
+ # A request object representing the call parameters. Required. To specify no
1073
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1074
+ # @param options [::Gapic::CallOptions, ::Hash]
1075
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1076
+ #
1077
+ # @overload get_vulnerability_report(name: nil)
1078
+ # Pass arguments to `get_vulnerability_report` via keyword arguments. Note that at
1079
+ # least one keyword argument is required. To specify no parameters, or to keep all
1080
+ # the default parameter values, pass an empty Hash as a request object (see above).
1081
+ #
1082
+ # @param name [::String]
1083
+ # Required. API resource name for vulnerability resource.
1084
+ #
1085
+ # Format:
1086
+ # `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport`
1087
+ #
1088
+ # For `{project}`, either `project-number` or `project-id` can be provided.
1089
+ # For `{instance}`, either Compute Engine `instance-id` or `instance-name`
1090
+ # can be provided.
1091
+ # @yield [result, operation] Access the result along with the TransportOperation object
1092
+ # @yieldparam result [::Google::Cloud::OsConfig::V1alpha::VulnerabilityReport]
1093
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1094
+ #
1095
+ # @return [::Google::Cloud::OsConfig::V1alpha::VulnerabilityReport]
1096
+ #
1097
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1098
+ def get_vulnerability_report request, options = nil
1099
+ raise ::ArgumentError, "request must be provided" if request.nil?
1100
+
1101
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::GetVulnerabilityReportRequest
1102
+
1103
+ # Converts hash and nil to an options object
1104
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1105
+
1106
+ # Customize the options with defaults
1107
+ call_metadata = @config.rpcs.get_vulnerability_report.metadata.to_h
1108
+
1109
+ # Set x-goog-api-client and x-goog-user-project headers
1110
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1111
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1112
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
1113
+ transports_version_send: [:rest]
1114
+
1115
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1116
+
1117
+ options.apply_defaults timeout: @config.rpcs.get_vulnerability_report.timeout,
1118
+ metadata: call_metadata,
1119
+ retry_policy: @config.rpcs.get_vulnerability_report.retry_policy
1120
+
1121
+ options.apply_defaults timeout: @config.timeout,
1122
+ metadata: @config.metadata,
1123
+ retry_policy: @config.retry_policy
1124
+
1125
+ @os_config_zonal_service_stub.get_vulnerability_report request, options do |result, operation|
1126
+ yield result, operation if block_given?
1127
+ return result
1128
+ end
1129
+ rescue ::Gapic::Rest::Error => e
1130
+ raise ::Google::Cloud::Error.from_error(e)
1131
+ end
1132
+
1133
+ ##
1134
+ # List vulnerability reports for all VM instances in the specified zone.
1135
+ #
1136
+ # @overload list_vulnerability_reports(request, options = nil)
1137
+ # Pass arguments to `list_vulnerability_reports` via a request object, either of type
1138
+ # {::Google::Cloud::OsConfig::V1alpha::ListVulnerabilityReportsRequest} or an equivalent Hash.
1139
+ #
1140
+ # @param request [::Google::Cloud::OsConfig::V1alpha::ListVulnerabilityReportsRequest, ::Hash]
1141
+ # A request object representing the call parameters. Required. To specify no
1142
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1143
+ # @param options [::Gapic::CallOptions, ::Hash]
1144
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1145
+ #
1146
+ # @overload list_vulnerability_reports(parent: nil, page_size: nil, page_token: nil, filter: nil)
1147
+ # Pass arguments to `list_vulnerability_reports` via keyword arguments. Note that at
1148
+ # least one keyword argument is required. To specify no parameters, or to keep all
1149
+ # the default parameter values, pass an empty Hash as a request object (see above).
1150
+ #
1151
+ # @param parent [::String]
1152
+ # Required. The parent resource name.
1153
+ #
1154
+ # Format: `projects/{project}/locations/{location}/instances/-`
1155
+ #
1156
+ # For `{project}`, either `project-number` or `project-id` can be provided.
1157
+ # @param page_size [::Integer]
1158
+ # The maximum number of results to return.
1159
+ # @param page_token [::String]
1160
+ # A pagination token returned from a previous call to
1161
+ # `ListVulnerabilityReports` that indicates where this listing
1162
+ # should continue from.
1163
+ # @param filter [::String]
1164
+ # If provided, this field specifies the criteria that must be met by a
1165
+ # `vulnerabilityReport` API resource to be included in the response.
1166
+ # @yield [result, operation] Access the result along with the TransportOperation object
1167
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::VulnerabilityReport>]
1168
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1169
+ #
1170
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::VulnerabilityReport>]
1171
+ #
1172
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1173
+ def list_vulnerability_reports request, options = nil
1174
+ raise ::ArgumentError, "request must be provided" if request.nil?
1175
+
1176
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::ListVulnerabilityReportsRequest
1177
+
1178
+ # Converts hash and nil to an options object
1179
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1180
+
1181
+ # Customize the options with defaults
1182
+ call_metadata = @config.rpcs.list_vulnerability_reports.metadata.to_h
1183
+
1184
+ # Set x-goog-api-client and x-goog-user-project headers
1185
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1186
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1187
+ gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION,
1188
+ transports_version_send: [:rest]
1189
+
1190
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1191
+
1192
+ options.apply_defaults timeout: @config.rpcs.list_vulnerability_reports.timeout,
1193
+ metadata: call_metadata,
1194
+ retry_policy: @config.rpcs.list_vulnerability_reports.retry_policy
1195
+
1196
+ options.apply_defaults timeout: @config.timeout,
1197
+ metadata: @config.metadata,
1198
+ retry_policy: @config.retry_policy
1199
+
1200
+ @os_config_zonal_service_stub.list_vulnerability_reports request, options do |result, operation|
1201
+ result = ::Gapic::Rest::PagedEnumerable.new @os_config_zonal_service_stub, :list_vulnerability_reports, "vulnerability_reports", request, result, options
1202
+ yield result, operation if block_given?
1203
+ return result
1204
+ end
1205
+ rescue ::Gapic::Rest::Error => e
1206
+ raise ::Google::Cloud::Error.from_error(e)
1207
+ end
1208
+
1209
+ ##
1210
+ # Configuration class for the OsConfigZonalService REST API.
1211
+ #
1212
+ # This class represents the configuration for OsConfigZonalService REST,
1213
+ # providing control over timeouts, retry behavior, logging, transport
1214
+ # parameters, and other low-level controls. Certain parameters can also be
1215
+ # applied individually to specific RPCs. See
1216
+ # {::Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Rest::Client::Configuration::Rpcs}
1217
+ # for a list of RPCs that can be configured independently.
1218
+ #
1219
+ # Configuration can be applied globally to all clients, or to a single client
1220
+ # on construction.
1221
+ #
1222
+ # @example
1223
+ #
1224
+ # # Modify the global config, setting the timeout for
1225
+ # # create_os_policy_assignment to 20 seconds,
1226
+ # # and all remaining timeouts to 10 seconds.
1227
+ # ::Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Rest::Client.configure do |config|
1228
+ # config.timeout = 10.0
1229
+ # config.rpcs.create_os_policy_assignment.timeout = 20.0
1230
+ # end
1231
+ #
1232
+ # # Apply the above configuration only to a new client.
1233
+ # client = ::Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Rest::Client.new do |config|
1234
+ # config.timeout = 10.0
1235
+ # config.rpcs.create_os_policy_assignment.timeout = 20.0
1236
+ # end
1237
+ #
1238
+ # @!attribute [rw] endpoint
1239
+ # The hostname or hostname:port of the service endpoint.
1240
+ # Defaults to `"osconfig.googleapis.com"`.
1241
+ # @return [::String]
1242
+ # @!attribute [rw] credentials
1243
+ # Credentials to send with calls. You may provide any of the following types:
1244
+ # * (`String`) The path to a service account key file in JSON format
1245
+ # * (`Hash`) A service account key as a Hash
1246
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1247
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1248
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1249
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1250
+ # * (`nil`) indicating no credentials
1251
+ # @return [::Object]
1252
+ # @!attribute [rw] scope
1253
+ # The OAuth scopes
1254
+ # @return [::Array<::String>]
1255
+ # @!attribute [rw] lib_name
1256
+ # The library name as recorded in instrumentation and logging
1257
+ # @return [::String]
1258
+ # @!attribute [rw] lib_version
1259
+ # The library version as recorded in instrumentation and logging
1260
+ # @return [::String]
1261
+ # @!attribute [rw] timeout
1262
+ # The call timeout in seconds.
1263
+ # @return [::Numeric]
1264
+ # @!attribute [rw] metadata
1265
+ # Additional headers to be sent with the call.
1266
+ # @return [::Hash{::Symbol=>::String}]
1267
+ # @!attribute [rw] retry_policy
1268
+ # The retry policy. The value is a hash with the following keys:
1269
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1270
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1271
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1272
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1273
+ # trigger a retry.
1274
+ # @return [::Hash]
1275
+ # @!attribute [rw] quota_project
1276
+ # A separate project against which to charge quota.
1277
+ # @return [::String]
1278
+ #
1279
+ class Configuration
1280
+ extend ::Gapic::Config
1281
+
1282
+ DEFAULT_ENDPOINT = "osconfig.googleapis.com"
1283
+
1284
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1285
+ config_attr :credentials, nil do |value|
1286
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1287
+ allowed.any? { |klass| klass === value }
1288
+ end
1289
+ config_attr :scope, nil, ::String, ::Array, nil
1290
+ config_attr :lib_name, nil, ::String, nil
1291
+ config_attr :lib_version, nil, ::String, nil
1292
+ config_attr :timeout, nil, ::Numeric, nil
1293
+ config_attr :metadata, nil, ::Hash, nil
1294
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1295
+ config_attr :quota_project, nil, ::String, nil
1296
+
1297
+ # @private
1298
+ def initialize parent_config = nil
1299
+ @parent_config = parent_config unless parent_config.nil?
1300
+
1301
+ yield self if block_given?
1302
+ end
1303
+
1304
+ ##
1305
+ # Configurations for individual RPCs
1306
+ # @return [Rpcs]
1307
+ #
1308
+ def rpcs
1309
+ @rpcs ||= begin
1310
+ parent_rpcs = nil
1311
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1312
+ Rpcs.new parent_rpcs
1313
+ end
1314
+ end
1315
+
1316
+ ##
1317
+ # Configuration RPC class for the OsConfigZonalService API.
1318
+ #
1319
+ # Includes fields providing the configuration for each RPC in this service.
1320
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1321
+ # the following configuration fields:
1322
+ #
1323
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1324
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1325
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1326
+ # include the following keys:
1327
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1328
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1329
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1330
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1331
+ # trigger a retry.
1332
+ #
1333
+ class Rpcs
1334
+ ##
1335
+ # RPC-specific configuration for `create_os_policy_assignment`
1336
+ # @return [::Gapic::Config::Method]
1337
+ #
1338
+ attr_reader :create_os_policy_assignment
1339
+ ##
1340
+ # RPC-specific configuration for `update_os_policy_assignment`
1341
+ # @return [::Gapic::Config::Method]
1342
+ #
1343
+ attr_reader :update_os_policy_assignment
1344
+ ##
1345
+ # RPC-specific configuration for `get_os_policy_assignment`
1346
+ # @return [::Gapic::Config::Method]
1347
+ #
1348
+ attr_reader :get_os_policy_assignment
1349
+ ##
1350
+ # RPC-specific configuration for `list_os_policy_assignments`
1351
+ # @return [::Gapic::Config::Method]
1352
+ #
1353
+ attr_reader :list_os_policy_assignments
1354
+ ##
1355
+ # RPC-specific configuration for `list_os_policy_assignment_revisions`
1356
+ # @return [::Gapic::Config::Method]
1357
+ #
1358
+ attr_reader :list_os_policy_assignment_revisions
1359
+ ##
1360
+ # RPC-specific configuration for `delete_os_policy_assignment`
1361
+ # @return [::Gapic::Config::Method]
1362
+ #
1363
+ attr_reader :delete_os_policy_assignment
1364
+ ##
1365
+ # RPC-specific configuration for `get_instance_os_policies_compliance`
1366
+ # @return [::Gapic::Config::Method]
1367
+ #
1368
+ attr_reader :get_instance_os_policies_compliance
1369
+ ##
1370
+ # RPC-specific configuration for `list_instance_os_policies_compliances`
1371
+ # @return [::Gapic::Config::Method]
1372
+ #
1373
+ attr_reader :list_instance_os_policies_compliances
1374
+ ##
1375
+ # RPC-specific configuration for `get_os_policy_assignment_report`
1376
+ # @return [::Gapic::Config::Method]
1377
+ #
1378
+ attr_reader :get_os_policy_assignment_report
1379
+ ##
1380
+ # RPC-specific configuration for `list_os_policy_assignment_reports`
1381
+ # @return [::Gapic::Config::Method]
1382
+ #
1383
+ attr_reader :list_os_policy_assignment_reports
1384
+ ##
1385
+ # RPC-specific configuration for `get_inventory`
1386
+ # @return [::Gapic::Config::Method]
1387
+ #
1388
+ attr_reader :get_inventory
1389
+ ##
1390
+ # RPC-specific configuration for `list_inventories`
1391
+ # @return [::Gapic::Config::Method]
1392
+ #
1393
+ attr_reader :list_inventories
1394
+ ##
1395
+ # RPC-specific configuration for `get_vulnerability_report`
1396
+ # @return [::Gapic::Config::Method]
1397
+ #
1398
+ attr_reader :get_vulnerability_report
1399
+ ##
1400
+ # RPC-specific configuration for `list_vulnerability_reports`
1401
+ # @return [::Gapic::Config::Method]
1402
+ #
1403
+ attr_reader :list_vulnerability_reports
1404
+
1405
+ # @private
1406
+ def initialize parent_rpcs = nil
1407
+ create_os_policy_assignment_config = parent_rpcs.create_os_policy_assignment if parent_rpcs.respond_to? :create_os_policy_assignment
1408
+ @create_os_policy_assignment = ::Gapic::Config::Method.new create_os_policy_assignment_config
1409
+ update_os_policy_assignment_config = parent_rpcs.update_os_policy_assignment if parent_rpcs.respond_to? :update_os_policy_assignment
1410
+ @update_os_policy_assignment = ::Gapic::Config::Method.new update_os_policy_assignment_config
1411
+ get_os_policy_assignment_config = parent_rpcs.get_os_policy_assignment if parent_rpcs.respond_to? :get_os_policy_assignment
1412
+ @get_os_policy_assignment = ::Gapic::Config::Method.new get_os_policy_assignment_config
1413
+ list_os_policy_assignments_config = parent_rpcs.list_os_policy_assignments if parent_rpcs.respond_to? :list_os_policy_assignments
1414
+ @list_os_policy_assignments = ::Gapic::Config::Method.new list_os_policy_assignments_config
1415
+ list_os_policy_assignment_revisions_config = parent_rpcs.list_os_policy_assignment_revisions if parent_rpcs.respond_to? :list_os_policy_assignment_revisions
1416
+ @list_os_policy_assignment_revisions = ::Gapic::Config::Method.new list_os_policy_assignment_revisions_config
1417
+ delete_os_policy_assignment_config = parent_rpcs.delete_os_policy_assignment if parent_rpcs.respond_to? :delete_os_policy_assignment
1418
+ @delete_os_policy_assignment = ::Gapic::Config::Method.new delete_os_policy_assignment_config
1419
+ get_instance_os_policies_compliance_config = parent_rpcs.get_instance_os_policies_compliance if parent_rpcs.respond_to? :get_instance_os_policies_compliance
1420
+ @get_instance_os_policies_compliance = ::Gapic::Config::Method.new get_instance_os_policies_compliance_config
1421
+ list_instance_os_policies_compliances_config = parent_rpcs.list_instance_os_policies_compliances if parent_rpcs.respond_to? :list_instance_os_policies_compliances
1422
+ @list_instance_os_policies_compliances = ::Gapic::Config::Method.new list_instance_os_policies_compliances_config
1423
+ get_os_policy_assignment_report_config = parent_rpcs.get_os_policy_assignment_report if parent_rpcs.respond_to? :get_os_policy_assignment_report
1424
+ @get_os_policy_assignment_report = ::Gapic::Config::Method.new get_os_policy_assignment_report_config
1425
+ list_os_policy_assignment_reports_config = parent_rpcs.list_os_policy_assignment_reports if parent_rpcs.respond_to? :list_os_policy_assignment_reports
1426
+ @list_os_policy_assignment_reports = ::Gapic::Config::Method.new list_os_policy_assignment_reports_config
1427
+ get_inventory_config = parent_rpcs.get_inventory if parent_rpcs.respond_to? :get_inventory
1428
+ @get_inventory = ::Gapic::Config::Method.new get_inventory_config
1429
+ list_inventories_config = parent_rpcs.list_inventories if parent_rpcs.respond_to? :list_inventories
1430
+ @list_inventories = ::Gapic::Config::Method.new list_inventories_config
1431
+ get_vulnerability_report_config = parent_rpcs.get_vulnerability_report if parent_rpcs.respond_to? :get_vulnerability_report
1432
+ @get_vulnerability_report = ::Gapic::Config::Method.new get_vulnerability_report_config
1433
+ list_vulnerability_reports_config = parent_rpcs.list_vulnerability_reports if parent_rpcs.respond_to? :list_vulnerability_reports
1434
+ @list_vulnerability_reports = ::Gapic::Config::Method.new list_vulnerability_reports_config
1435
+
1436
+ yield self if block_given?
1437
+ end
1438
+ end
1439
+ end
1440
+ end
1441
+ end
1442
+ end
1443
+ end
1444
+ end
1445
+ end
1446
+ end