google-cloud-os_config-v1alpha 0.1.0

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