google-cloud-workload_manager-v1 0.a → 0.1.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 (34) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/workload_manager/v1/bindings_override.rb +75 -0
  6. data/lib/google/cloud/workload_manager/v1/rest.rb +38 -0
  7. data/lib/google/cloud/workload_manager/v1/version.rb +7 -2
  8. data/lib/google/cloud/workload_manager/v1/workload_manager/client.rb +1772 -0
  9. data/lib/google/cloud/workload_manager/v1/workload_manager/credentials.rb +47 -0
  10. data/lib/google/cloud/workload_manager/v1/workload_manager/operations.rb +841 -0
  11. data/lib/google/cloud/workload_manager/v1/workload_manager/paths.rb +111 -0
  12. data/lib/google/cloud/workload_manager/v1/workload_manager/rest/client.rb +1653 -0
  13. data/lib/google/cloud/workload_manager/v1/workload_manager/rest/operations.rb +925 -0
  14. data/lib/google/cloud/workload_manager/v1/workload_manager/rest/service_stub.rb +816 -0
  15. data/lib/google/cloud/workload_manager/v1/workload_manager/rest.rb +55 -0
  16. data/lib/google/cloud/workload_manager/v1/workload_manager.rb +57 -0
  17. data/lib/google/cloud/workload_manager/v1.rb +45 -0
  18. data/lib/google/cloud/workloadmanager/v1/service_pb.rb +75 -0
  19. data/lib/google/cloud/workloadmanager/v1/service_services_pb.rb +68 -0
  20. data/lib/google-cloud-workload_manager-v1.rb +21 -0
  21. data/proto_docs/README.md +4 -0
  22. data/proto_docs/google/api/client.rb +593 -0
  23. data/proto_docs/google/api/field_behavior.rb +85 -0
  24. data/proto_docs/google/api/launch_stage.rb +71 -0
  25. data/proto_docs/google/api/resource.rb +227 -0
  26. data/proto_docs/google/cloud/workloadmanager/v1/service.rb +991 -0
  27. data/proto_docs/google/longrunning/operations.rb +191 -0
  28. data/proto_docs/google/protobuf/any.rb +145 -0
  29. data/proto_docs/google/protobuf/duration.rb +98 -0
  30. data/proto_docs/google/protobuf/empty.rb +34 -0
  31. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  32. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  33. data/proto_docs/google/rpc/status.rb +48 -0
  34. metadata +83 -9
@@ -0,0 +1,991 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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
+
20
+ module Google
21
+ module Cloud
22
+ module WorkloadManager
23
+ module V1
24
+ # Represents a Workload Manager Evaluation configuration.
25
+ # An Evaluation defines a set of rules to be validated against a scope
26
+ # of Cloud resources.
27
+ # @!attribute [rw] name
28
+ # @return [::String]
29
+ # Name of resource that has the form
30
+ # `projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}`.
31
+ # @!attribute [rw] description
32
+ # @return [::String]
33
+ # Description of the Evaluation.
34
+ # @!attribute [rw] resource_filter
35
+ # @return [::Google::Cloud::WorkloadManager::V1::ResourceFilter]
36
+ # Resource filter for an evaluation defining the scope of resources to be
37
+ # evaluated.
38
+ # @!attribute [rw] rule_names
39
+ # @return [::Array<::String>]
40
+ # The names of the rules used for this evaluation.
41
+ # @!attribute [r] resource_status
42
+ # @return [::Google::Cloud::WorkloadManager::V1::ResourceStatus]
43
+ # Output only. [Output only] The current lifecycle state of the evaluation
44
+ # resource.
45
+ # @!attribute [r] create_time
46
+ # @return [::Google::Protobuf::Timestamp]
47
+ # Output only. [Output only] Create time stamp.
48
+ # @!attribute [r] update_time
49
+ # @return [::Google::Protobuf::Timestamp]
50
+ # Output only. [Output only] Update time stamp.
51
+ # @!attribute [rw] labels
52
+ # @return [::Google::Protobuf::Map{::String => ::String}]
53
+ # Labels as key value pairs.
54
+ # @!attribute [rw] schedule
55
+ # @return [::String]
56
+ # Crontab format schedule for scheduled evaluation, currently only supports
57
+ # the following fixed schedules:
58
+ # * `0 */1 * * *` # Hourly
59
+ # * `0 */6 * * *` # Every 6 hours
60
+ # * `0 */12 * * *` # Every 12 hours
61
+ # * `0 0 */1 * *` # Daily
62
+ # * `0 0 */7 * *` # Weekly
63
+ # * `0 0 */14 * *` # Every 14 days
64
+ # * `0 0 1 */1 *` # Monthly
65
+ # @!attribute [rw] custom_rules_bucket
66
+ # @return [::String]
67
+ # The Cloud Storage bucket name for custom rules.
68
+ # @!attribute [rw] evaluation_type
69
+ # @return [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType]
70
+ # Evaluation type.
71
+ # @!attribute [rw] big_query_destination
72
+ # @return [::Google::Cloud::WorkloadManager::V1::BigQueryDestination]
73
+ # Optional. The BigQuery destination for detailed evaluation results.
74
+ # If this field is specified, the results of each evaluation execution are
75
+ # exported to BigQuery.
76
+ # @!attribute [rw] kms_key
77
+ # @return [::String]
78
+ # Optional. Immutable. Customer-managed encryption key name, in the format
79
+ # projects/*/locations/*/keyRings/*/cryptoKeys/*.
80
+ # The key will be used for CMEK encryption of the evaluation resource.
81
+ class Evaluation
82
+ include ::Google::Protobuf::MessageExts
83
+ extend ::Google::Protobuf::MessageExts::ClassMethods
84
+
85
+ # @!attribute [rw] key
86
+ # @return [::String]
87
+ # @!attribute [rw] value
88
+ # @return [::String]
89
+ class LabelsEntry
90
+ include ::Google::Protobuf::MessageExts
91
+ extend ::Google::Protobuf::MessageExts::ClassMethods
92
+ end
93
+
94
+ # Possible types of workload evaluations like SAP, SQL Server, etc.
95
+ module EvaluationType
96
+ # Not specified.
97
+ EVALUATION_TYPE_UNSPECIFIED = 0
98
+
99
+ # SAP best practices.
100
+ SAP = 1
101
+
102
+ # SQL best practices.
103
+ SQL_SERVER = 2
104
+
105
+ # Customized best practices.
106
+ OTHER = 3
107
+ end
108
+ end
109
+
110
+ # Resource filter for an evaluation defining the scope of resources to be
111
+ # evaluated.
112
+ # @!attribute [rw] scopes
113
+ # @return [::Array<::String>]
114
+ # The scopes of evaluation resource.
115
+ # Format:
116
+ # * `projects/{project_id}`
117
+ # * `folders/{folder_id}`
118
+ # * `organizations/{organization_id}`
119
+ # @!attribute [rw] resource_id_patterns
120
+ # @return [::Array<::String>]
121
+ # The pattern to filter resources by their id
122
+ # For example, a pattern of ".*prod-cluster.*" will match all resources that
123
+ # contain "prod-cluster" in their ID.
124
+ # @!attribute [rw] inclusion_labels
125
+ # @return [::Google::Protobuf::Map{::String => ::String}]
126
+ # Labels to filter resources by. Each key-value pair in the map must exist
127
+ # on the resource for it to be included (e.g. VM instance labels).
128
+ # For example, specifying `{ "env": "prod", "database": "nosql" }` will only
129
+ # include resources that have labels `env=prod` and `database=nosql`.
130
+ # @!attribute [rw] gce_instance_filter
131
+ # @return [::Google::Cloud::WorkloadManager::V1::GceInstanceFilter]
132
+ # Filter compute engine resources.
133
+ class ResourceFilter
134
+ include ::Google::Protobuf::MessageExts
135
+ extend ::Google::Protobuf::MessageExts::ClassMethods
136
+
137
+ # @!attribute [rw] key
138
+ # @return [::String]
139
+ # @!attribute [rw] value
140
+ # @return [::String]
141
+ class InclusionLabelsEntry
142
+ include ::Google::Protobuf::MessageExts
143
+ extend ::Google::Protobuf::MessageExts::ClassMethods
144
+ end
145
+ end
146
+
147
+ # A filter for matching Compute Engine instances.
148
+ # @!attribute [rw] service_accounts
149
+ # @return [::Array<::String>]
150
+ # If non-empty, only Compute Engine instances associated with at least one of
151
+ # the provided service accounts will be included in the evaluation.
152
+ class GceInstanceFilter
153
+ include ::Google::Protobuf::MessageExts
154
+ extend ::Google::Protobuf::MessageExts::ClassMethods
155
+ end
156
+
157
+ # The lifecycle status of an Evaluation resource.
158
+ # @!attribute [rw] state
159
+ # @return [::Google::Cloud::WorkloadManager::V1::ResourceStatus::State]
160
+ # State of the Evaluation resource.
161
+ class ResourceStatus
162
+ include ::Google::Protobuf::MessageExts
163
+ extend ::Google::Protobuf::MessageExts::ClassMethods
164
+
165
+ # Possible states of an evaluation, such as CREATING, ACTIVE, and DELETING.
166
+ module State
167
+ # The state has not been populated in this message.
168
+ STATE_UNSPECIFIED = 0
169
+
170
+ # Resource has an active Create operation.
171
+ CREATING = 1
172
+
173
+ # Resource has no outstanding operations on it or has active Update
174
+ # operations.
175
+ ACTIVE = 2
176
+
177
+ # Resource has an active Delete operation.
178
+ DELETING = 3
179
+ end
180
+ end
181
+
182
+ # BigQuery destination for evaluation results.
183
+ # @!attribute [rw] destination_dataset
184
+ # @return [::String]
185
+ # Optional. Destination dataset to save evaluation results.
186
+ # @!attribute [rw] create_new_results_table
187
+ # @return [::Boolean]
188
+ # Optional. Determines if a new results table will be created when an
189
+ # Execution is created.
190
+ class BigQueryDestination
191
+ include ::Google::Protobuf::MessageExts
192
+ extend ::Google::Protobuf::MessageExts::ClassMethods
193
+ end
194
+
195
+ # Request message for the ListEvaluations RPC.
196
+ # @!attribute [rw] parent
197
+ # @return [::String]
198
+ # Required. Parent value for ListEvaluationsRequest.
199
+ # @!attribute [rw] page_size
200
+ # @return [::Integer]
201
+ # Requested page size. Server may return fewer items than requested.
202
+ # If unspecified, server will pick an appropriate default.
203
+ # @!attribute [rw] page_token
204
+ # @return [::String]
205
+ # A token identifying a page of results the server should return.
206
+ # @!attribute [rw] filter
207
+ # @return [::String]
208
+ # Filter to be applied when listing the evaluation results.
209
+ # @!attribute [rw] order_by
210
+ # @return [::String]
211
+ # Hint for how to order the results.
212
+ class ListEvaluationsRequest
213
+ include ::Google::Protobuf::MessageExts
214
+ extend ::Google::Protobuf::MessageExts::ClassMethods
215
+ end
216
+
217
+ # Response message for the ListEvaluations RPC.
218
+ # @!attribute [rw] evaluations
219
+ # @return [::Array<::Google::Cloud::WorkloadManager::V1::Evaluation>]
220
+ # The list of evaluations.
221
+ # @!attribute [rw] next_page_token
222
+ # @return [::String]
223
+ # A token identifying a page of results the server should return.
224
+ # @!attribute [rw] unreachable
225
+ # @return [::Array<::String>]
226
+ # Locations that could not be reached.
227
+ class ListEvaluationsResponse
228
+ include ::Google::Protobuf::MessageExts
229
+ extend ::Google::Protobuf::MessageExts::ClassMethods
230
+ end
231
+
232
+ # Request message for the GetEvaluation RPC.
233
+ # @!attribute [rw] name
234
+ # @return [::String]
235
+ # Required. Name of the resource.
236
+ class GetEvaluationRequest
237
+ include ::Google::Protobuf::MessageExts
238
+ extend ::Google::Protobuf::MessageExts::ClassMethods
239
+ end
240
+
241
+ # Request message for the CreateEvaluation RPC.
242
+ # @!attribute [rw] parent
243
+ # @return [::String]
244
+ # Required. The resource prefix of the evaluation location using the form:
245
+ # `projects/{project_id}/locations/{location_id}`.
246
+ # @!attribute [rw] evaluation_id
247
+ # @return [::String]
248
+ # Required. Id of the requesting object.
249
+ # @!attribute [rw] evaluation
250
+ # @return [::Google::Cloud::WorkloadManager::V1::Evaluation]
251
+ # Required. The resource being created.
252
+ # @!attribute [rw] request_id
253
+ # @return [::String]
254
+ # Optional. An optional request ID to identify requests. Specify a unique
255
+ # request ID so that if you must retry your request, the server will know to
256
+ # ignore the request if it has already been completed. The server will
257
+ # guarantee that for at least 60 minutes since the first request.
258
+ #
259
+ # For example, consider a situation where you make an initial request and
260
+ # the request times out. If you make the request again with the same request
261
+ # ID, the server can check if original operation with the same request ID
262
+ # was received, and if so, will ignore the second request. This prevents
263
+ # clients from accidentally creating duplicate commitments.
264
+ #
265
+ # The request ID must be a valid UUID with the exception that zero UUID is
266
+ # not supported (00000000-0000-0000-0000-000000000000).
267
+ class CreateEvaluationRequest
268
+ include ::Google::Protobuf::MessageExts
269
+ extend ::Google::Protobuf::MessageExts::ClassMethods
270
+ end
271
+
272
+ # Request message for the UpdateEvaluation RPC.
273
+ # @!attribute [rw] update_mask
274
+ # @return [::Google::Protobuf::FieldMask]
275
+ # Required. Field mask is used to specify the fields to be overwritten in the
276
+ # Evaluation resource by the update.
277
+ # The fields specified in the update_mask are relative to the resource, not
278
+ # the full request. A field will be overwritten if it is in the mask.
279
+ # @!attribute [rw] evaluation
280
+ # @return [::Google::Cloud::WorkloadManager::V1::Evaluation]
281
+ # Required. The resource being updated.
282
+ # @!attribute [rw] request_id
283
+ # @return [::String]
284
+ # Optional. An optional request ID to identify requests. Specify a unique
285
+ # request ID so that if you must retry your request, the server will know to
286
+ # ignore the request if it has already been completed. The server will
287
+ # guarantee that for at least 60 minutes since the first request.
288
+ #
289
+ # For example, consider a situation where you make an initial request and
290
+ # the request times out. If you make the request again with the same request
291
+ # ID, the server can check if original operation with the same request ID
292
+ # was received, and if so, will ignore the second request. This prevents
293
+ # clients from accidentally creating duplicate commitments.
294
+ #
295
+ # The request ID must be a valid UUID with the exception that zero UUID is
296
+ # not supported (00000000-0000-0000-0000-000000000000).
297
+ class UpdateEvaluationRequest
298
+ include ::Google::Protobuf::MessageExts
299
+ extend ::Google::Protobuf::MessageExts::ClassMethods
300
+ end
301
+
302
+ # Request message for the DeleteEvaluation RPC.
303
+ # @!attribute [rw] name
304
+ # @return [::String]
305
+ # Required. Name of the resource.
306
+ # @!attribute [rw] request_id
307
+ # @return [::String]
308
+ # Optional. An optional request ID to identify requests. Specify a unique
309
+ # request ID so that if you must retry your request, the server will know to
310
+ # ignore the request if it has already been completed. The server will
311
+ # guarantee that for at least 60 minutes after the first request.
312
+ #
313
+ # For example, consider a situation where you make an initial request and
314
+ # the request times out. If you make the request again with the same request
315
+ # ID, the server can check if original operation with the same request ID
316
+ # was received, and if so, will ignore the second request. This prevents
317
+ # clients from accidentally creating duplicate commitments.
318
+ #
319
+ # The request ID must be a valid UUID with the exception that zero UUID is
320
+ # not supported (00000000-0000-0000-0000-000000000000).
321
+ # @!attribute [rw] force
322
+ # @return [::Boolean]
323
+ # Optional. Followed the best practice from
324
+ # https://aip.dev/135#cascading-delete.
325
+ class DeleteEvaluationRequest
326
+ include ::Google::Protobuf::MessageExts
327
+ extend ::Google::Protobuf::MessageExts::ClassMethods
328
+ end
329
+
330
+ # Execution that represents a single run of an Evaluation.
331
+ # @!attribute [rw] name
332
+ # @return [::String]
333
+ # The name of execution resource. The format is
334
+ # projects/\\{project}/locations/\\{location}/evaluations/\\{evaluation}/executions/\\{execution}.
335
+ # @!attribute [r] start_time
336
+ # @return [::Google::Protobuf::Timestamp]
337
+ # Output only. [Output only] Start time stamp.
338
+ # @!attribute [r] end_time
339
+ # @return [::Google::Protobuf::Timestamp]
340
+ # Output only. [Output only] End time stamp.
341
+ # @!attribute [r] inventory_time
342
+ # @return [::Google::Protobuf::Timestamp]
343
+ # Output only. [Output only] Inventory time stamp.
344
+ # @!attribute [r] state
345
+ # @return [::Google::Cloud::WorkloadManager::V1::Execution::State]
346
+ # Output only. [Output only] State.
347
+ # @!attribute [r] evaluation_id
348
+ # @return [::String]
349
+ # Output only. [Output only] Evaluation ID.
350
+ # @!attribute [rw] labels
351
+ # @return [::Google::Protobuf::Map{::String => ::String}]
352
+ # Labels as key value pairs.
353
+ # @!attribute [rw] run_type
354
+ # @return [::Google::Cloud::WorkloadManager::V1::Execution::Type]
355
+ # Type which represents whether the execution executed directly by user or
356
+ # scheduled according to the `Evaluation.schedule` field.
357
+ # @!attribute [r] rule_results
358
+ # @return [::Array<::Google::Cloud::WorkloadManager::V1::RuleExecutionResult>]
359
+ # Output only. Execution result summary per rule.
360
+ # @!attribute [rw] external_data_sources
361
+ # @return [::Array<::Google::Cloud::WorkloadManager::V1::Execution::ExternalDataSources>]
362
+ # Optional. External data sources.
363
+ # @!attribute [r] notices
364
+ # @return [::Array<::Google::Cloud::WorkloadManager::V1::Execution::Notice>]
365
+ # Output only. Additional information generated by the execution.
366
+ # @!attribute [rw] engine
367
+ # @return [::Google::Cloud::WorkloadManager::V1::Execution::Engine]
368
+ # Optional. Engine.
369
+ # @!attribute [r] result_summary
370
+ # @return [::Google::Cloud::WorkloadManager::V1::Execution::Summary]
371
+ # Output only. [Output only] Result summary for the execution.
372
+ class Execution
373
+ include ::Google::Protobuf::MessageExts
374
+ extend ::Google::Protobuf::MessageExts::ClassMethods
375
+
376
+ # External data sources for an execution.
377
+ # @!attribute [rw] name
378
+ # @return [::String]
379
+ # Optional. Name of external data source. The name will be used inside the
380
+ # rego/sql to refer the external data.
381
+ # @!attribute [rw] uri
382
+ # @return [::String]
383
+ # Required. URI of external data source. example of bq table
384
+ # \\{project_ID}.\\{dataset_ID}.\\{table_ID}.
385
+ # @!attribute [rw] type
386
+ # @return [::Google::Cloud::WorkloadManager::V1::Execution::ExternalDataSources::Type]
387
+ # Required. Type of external data source.
388
+ # @!attribute [rw] asset_type
389
+ # @return [::String]
390
+ # Required. The asset type of the external data source.
391
+ # This can be a supported Cloud Asset Inventory asset type
392
+ # (see https://cloud.google.com/asset-inventory/docs/supported-asset-types)
393
+ # to override the default asset type, or it can be a custom type defined by
394
+ # the user.
395
+ class ExternalDataSources
396
+ include ::Google::Protobuf::MessageExts
397
+ extend ::Google::Protobuf::MessageExts::ClassMethods
398
+
399
+ # Possible types of external data sources like BigQuery table, etc.
400
+ module Type
401
+ # Unknown type.
402
+ TYPE_UNSPECIFIED = 0
403
+
404
+ # BigQuery table.
405
+ BIG_QUERY_TABLE = 1
406
+ end
407
+ end
408
+
409
+ # Additional information generated by an execution.
410
+ # @!attribute [r] message
411
+ # @return [::String]
412
+ # Output only. Message of the notice.
413
+ class Notice
414
+ include ::Google::Protobuf::MessageExts
415
+ extend ::Google::Protobuf::MessageExts::ClassMethods
416
+ end
417
+
418
+ # Execution summary.
419
+ # @!attribute [r] failures
420
+ # @return [::Integer]
421
+ # Output only. Number of failures.
422
+ # @!attribute [r] new_failures
423
+ # @return [::Integer]
424
+ # Output only. Number of new failures compared to the previous execution.
425
+ # @!attribute [r] new_fixes
426
+ # @return [::Integer]
427
+ # Output only. Number of new fixes compared to the previous execution.
428
+ class Summary
429
+ include ::Google::Protobuf::MessageExts
430
+ extend ::Google::Protobuf::MessageExts::ClassMethods
431
+ end
432
+
433
+ # @!attribute [rw] key
434
+ # @return [::String]
435
+ # @!attribute [rw] value
436
+ # @return [::String]
437
+ class LabelsEntry
438
+ include ::Google::Protobuf::MessageExts
439
+ extend ::Google::Protobuf::MessageExts::ClassMethods
440
+ end
441
+
442
+ # The possible states of an execution like RUNNING, SUCCEEDED, FAILED, etc.
443
+ module State
444
+ # State of execution is unspecified.
445
+ STATE_UNSPECIFIED = 0
446
+
447
+ # The execution is running in backend service.
448
+ RUNNING = 1
449
+
450
+ # The execution run succeeded.
451
+ SUCCEEDED = 2
452
+
453
+ # The execution run failed.
454
+ FAILED = 3
455
+ end
456
+
457
+ # The type of execution, could be on demand execute or scheduled execute.
458
+ module Type
459
+ # Type of execution is unspecified.
460
+ TYPE_UNSPECIFIED = 0
461
+
462
+ # Type of execution is one time.
463
+ ONE_TIME = 1
464
+
465
+ # Type of execution is scheduled.
466
+ SCHEDULED = 2
467
+ end
468
+
469
+ # The engine used for the execution.
470
+ module Engine
471
+ # The original CG.
472
+ ENGINE_UNSPECIFIED = 0
473
+
474
+ # SlimCG / Scanner.
475
+ ENGINE_SCANNER = 1
476
+
477
+ # Evaluation Engine V2.
478
+ V2 = 2
479
+ end
480
+ end
481
+
482
+ # Execution result summary per rule.
483
+ # @!attribute [rw] rule
484
+ # @return [::String]
485
+ # Rule name as plain text like `sap-hana-configured`.
486
+ # @!attribute [r] state
487
+ # @return [::Google::Cloud::WorkloadManager::V1::RuleExecutionResult::State]
488
+ # Output only. The execution status.
489
+ # @!attribute [rw] message
490
+ # @return [::String]
491
+ # Execution message, if any.
492
+ # @!attribute [rw] result_count
493
+ # @return [::Integer]
494
+ # Number of violations.
495
+ # @!attribute [rw] scanned_resource_count
496
+ # @return [::Integer]
497
+ # Number of total scanned resources.
498
+ class RuleExecutionResult
499
+ include ::Google::Protobuf::MessageExts
500
+ extend ::Google::Protobuf::MessageExts::ClassMethods
501
+
502
+ # Possible states of a rule execution like SUCCESS, FAILURE, etc.
503
+ module State
504
+ # Unknown state
505
+ STATE_UNSPECIFIED = 0
506
+
507
+ # Execution completed successfully
508
+ STATE_SUCCESS = 1
509
+
510
+ # Execution completed with failures
511
+ STATE_FAILURE = 2
512
+
513
+ # Execution was not executed
514
+ STATE_SKIPPED = 3
515
+ end
516
+ end
517
+
518
+ # Request message for the ListExecutions RPC.
519
+ # @!attribute [rw] parent
520
+ # @return [::String]
521
+ # Required. The resource prefix of the Execution using the form:
522
+ # `projects/{project}/locations/{location}/evaluations/{evaluation}`.
523
+ # @!attribute [rw] page_size
524
+ # @return [::Integer]
525
+ # Requested page size. Server may return fewer items than requested.
526
+ # If unspecified, server will pick an appropriate default.
527
+ # @!attribute [rw] page_token
528
+ # @return [::String]
529
+ # A token identifying a page of results the server should return.
530
+ # @!attribute [rw] filter
531
+ # @return [::String]
532
+ # Filtering results.
533
+ # @!attribute [rw] order_by
534
+ # @return [::String]
535
+ # Field to sort by. See https://google.aip.dev/132#ordering for more details.
536
+ class ListExecutionsRequest
537
+ include ::Google::Protobuf::MessageExts
538
+ extend ::Google::Protobuf::MessageExts::ClassMethods
539
+ end
540
+
541
+ # Response message for the ListExecutions RPC.
542
+ # @!attribute [rw] executions
543
+ # @return [::Array<::Google::Cloud::WorkloadManager::V1::Execution>]
544
+ # The list of Execution.
545
+ # @!attribute [rw] next_page_token
546
+ # @return [::String]
547
+ # A token identifying a page of results the server should return.
548
+ # @!attribute [rw] unreachable
549
+ # @return [::Array<::String>]
550
+ # Locations that could not be reached.
551
+ class ListExecutionsResponse
552
+ include ::Google::Protobuf::MessageExts
553
+ extend ::Google::Protobuf::MessageExts::ClassMethods
554
+ end
555
+
556
+ # Request message for the GetExecution RPC.
557
+ # @!attribute [rw] name
558
+ # @return [::String]
559
+ # Required. Name of the resource.
560
+ class GetExecutionRequest
561
+ include ::Google::Protobuf::MessageExts
562
+ extend ::Google::Protobuf::MessageExts::ClassMethods
563
+ end
564
+
565
+ # Request message for the RunEvaluation RPC.
566
+ # @!attribute [rw] name
567
+ # @return [::String]
568
+ # Required. The resource name of the Evaluation using the form:
569
+ # `projects/{project}/locations/{location}/evaluations/{evaluation}`.
570
+ # @!attribute [rw] execution_id
571
+ # @return [::String]
572
+ # Required. ID of the execution which will be created.
573
+ # @!attribute [rw] execution
574
+ # @return [::Google::Cloud::WorkloadManager::V1::Execution]
575
+ # Required. The resource being created.
576
+ # @!attribute [rw] request_id
577
+ # @return [::String]
578
+ # Optional. An optional request ID to identify requests. Specify a unique
579
+ # request ID so that if you must retry your request, the server will know to
580
+ # ignore the request if it has already been completed. The server will
581
+ # guarantee that for at least 60 minutes since the first request.
582
+ #
583
+ # For example, consider a situation where you make an initial request and
584
+ # the request times out. If you make the request again with the same request
585
+ # ID, the server can check if original operation with the same request ID
586
+ # was received, and if so, will ignore the second request. This prevents
587
+ # clients from accidentally creating duplicate commitments.
588
+ #
589
+ # The request ID must be a valid UUID with the exception that zero UUID is
590
+ # not supported (00000000-0000-0000-0000-000000000000).
591
+ class RunEvaluationRequest
592
+ include ::Google::Protobuf::MessageExts
593
+ extend ::Google::Protobuf::MessageExts::ClassMethods
594
+ end
595
+
596
+ # Request message for the DeleteExecution RPC.
597
+ # @!attribute [rw] name
598
+ # @return [::String]
599
+ # Required. Name of the resource.
600
+ # @!attribute [rw] request_id
601
+ # @return [::String]
602
+ # Optional. An optional request ID to identify requests. Specify a unique
603
+ # request ID so that if you must retry your request, the server will know to
604
+ # ignore the request if it has already been completed. The server will
605
+ # guarantee that for at least 60 minutes after the first request.
606
+ #
607
+ # For example, consider a situation where you make an initial request and
608
+ # the request times out. If you make the request again with the same request
609
+ # ID, the server can check if original operation with the same request ID
610
+ # was received, and if so, will ignore the second request. This prevents
611
+ # clients from accidentally creating duplicate commitments.
612
+ #
613
+ # The request ID must be a valid UUID with the exception that zero UUID is
614
+ # not supported (00000000-0000-0000-0000-000000000000).
615
+ class DeleteExecutionRequest
616
+ include ::Google::Protobuf::MessageExts
617
+ extend ::Google::Protobuf::MessageExts::ClassMethods
618
+ end
619
+
620
+ # Request message for the ListExecutionResults RPC.
621
+ # @!attribute [rw] parent
622
+ # @return [::String]
623
+ # Required. The execution results.
624
+ # Format: \\{parent}/evaluations/*/executions/*/results.
625
+ # @!attribute [rw] page_size
626
+ # @return [::Integer]
627
+ # Requested page size. Server may return fewer items than requested.
628
+ # If unspecified, server will pick an appropriate default.
629
+ # @!attribute [rw] page_token
630
+ # @return [::String]
631
+ # A token identifying a page of results the server should return.
632
+ # @!attribute [rw] filter
633
+ # @return [::String]
634
+ # Filtering results.
635
+ class ListExecutionResultsRequest
636
+ include ::Google::Protobuf::MessageExts
637
+ extend ::Google::Protobuf::MessageExts::ClassMethods
638
+ end
639
+
640
+ # Response message for the ListExecutionResults RPC.
641
+ # @!attribute [rw] execution_results
642
+ # @return [::Array<::Google::Cloud::WorkloadManager::V1::ExecutionResult>]
643
+ # The versions from the specified publisher.
644
+ # @!attribute [rw] next_page_token
645
+ # @return [::String]
646
+ # A token, which can be sent as `page_token` to retrieve the next page.
647
+ # If this field is omitted, there are no subsequent pages.
648
+ class ListExecutionResultsResponse
649
+ include ::Google::Protobuf::MessageExts
650
+ extend ::Google::Protobuf::MessageExts::ClassMethods
651
+ end
652
+
653
+ # The result of an execution.
654
+ # @!attribute [rw] violation_message
655
+ # @return [::String]
656
+ # The violation message of an execution.
657
+ # @!attribute [rw] severity
658
+ # @return [::String]
659
+ # The severity of violation.
660
+ # @!attribute [rw] rule
661
+ # @return [::String]
662
+ # The rule that is violated in an evaluation.
663
+ # @!attribute [rw] documentation_url
664
+ # @return [::String]
665
+ # The URL for the documentation of the rule.
666
+ # @!attribute [rw] resource
667
+ # @return [::Google::Cloud::WorkloadManager::V1::Resource]
668
+ # The resource that violates the rule.
669
+ # @!attribute [rw] violation_details
670
+ # @return [::Google::Cloud::WorkloadManager::V1::ViolationDetails]
671
+ # The details of violation in an evaluation result.
672
+ # @!attribute [rw] commands
673
+ # @return [::Array<::Google::Cloud::WorkloadManager::V1::Command>]
674
+ # The commands to remediate the violation.
675
+ # @!attribute [rw] type
676
+ # @return [::Google::Cloud::WorkloadManager::V1::ExecutionResult::Type]
677
+ # Execution result type of the scanned resource.
678
+ class ExecutionResult
679
+ include ::Google::Protobuf::MessageExts
680
+ extend ::Google::Protobuf::MessageExts::ClassMethods
681
+
682
+ # Enum of execution result type.
683
+ module Type
684
+ # Unknown state.
685
+ TYPE_UNSPECIFIED = 0
686
+
687
+ # Resource successfully passed the rule.
688
+ TYPE_PASSED = 1
689
+
690
+ # Resource violated the rule.
691
+ TYPE_VIOLATED = 2
692
+ end
693
+ end
694
+
695
+ # Command specifies the type of command to execute.
696
+ # @!attribute [rw] agent_command
697
+ # @return [::Google::Cloud::WorkloadManager::V1::AgentCommand]
698
+ # AgentCommand specifies a one-time executable program for the agent to
699
+ # run.
700
+ #
701
+ # Note: The following fields are mutually exclusive: `agent_command`, `shell_command`. If a field in that set is populated, all other fields in the set will automatically be cleared.
702
+ # @!attribute [rw] shell_command
703
+ # @return [::Google::Cloud::WorkloadManager::V1::ShellCommand]
704
+ # ShellCommand is invoked via the agent's command line executor.
705
+ #
706
+ # Note: The following fields are mutually exclusive: `shell_command`, `agent_command`. If a field in that set is populated, all other fields in the set will automatically be cleared.
707
+ class Command
708
+ include ::Google::Protobuf::MessageExts
709
+ extend ::Google::Protobuf::MessageExts::ClassMethods
710
+ end
711
+
712
+ # An AgentCommand specifies a one-time executable program for the agent to run.
713
+ # @!attribute [rw] command
714
+ # @return [::String]
715
+ # The name of the agent one-time executable that will be invoked.
716
+ # @!attribute [rw] parameters
717
+ # @return [::Google::Protobuf::Map{::String => ::String}]
718
+ # A map of key/value pairs that can be used to specify
719
+ # additional one-time executable settings.
720
+ class AgentCommand
721
+ include ::Google::Protobuf::MessageExts
722
+ extend ::Google::Protobuf::MessageExts::ClassMethods
723
+
724
+ # @!attribute [rw] key
725
+ # @return [::String]
726
+ # @!attribute [rw] value
727
+ # @return [::String]
728
+ class ParametersEntry
729
+ include ::Google::Protobuf::MessageExts
730
+ extend ::Google::Protobuf::MessageExts::ClassMethods
731
+ end
732
+ end
733
+
734
+ # A ShellCommand is invoked via the agent's command line executor.
735
+ # @!attribute [rw] command
736
+ # @return [::String]
737
+ # The name of the command to be executed.
738
+ # @!attribute [rw] args
739
+ # @return [::String]
740
+ # Arguments to be passed to the command.
741
+ # @!attribute [rw] timeout_seconds
742
+ # @return [::Integer]
743
+ # Optional. If not specified, the default timeout is 60 seconds.
744
+ class ShellCommand
745
+ include ::Google::Protobuf::MessageExts
746
+ extend ::Google::Protobuf::MessageExts::ClassMethods
747
+ end
748
+
749
+ # The rule output of the violation.
750
+ # @!attribute [r] details
751
+ # @return [::Google::Protobuf::Map{::String => ::String}]
752
+ # Output only. Violation details generated by rule.
753
+ # @!attribute [r] message
754
+ # @return [::String]
755
+ # Output only. The message generated by rule.
756
+ class RuleOutput
757
+ include ::Google::Protobuf::MessageExts
758
+ extend ::Google::Protobuf::MessageExts::ClassMethods
759
+
760
+ # @!attribute [rw] key
761
+ # @return [::String]
762
+ # @!attribute [rw] value
763
+ # @return [::String]
764
+ class DetailsEntry
765
+ include ::Google::Protobuf::MessageExts
766
+ extend ::Google::Protobuf::MessageExts::ClassMethods
767
+ end
768
+ end
769
+
770
+ # The violation in an evaluation result.
771
+ # @!attribute [rw] asset
772
+ # @return [::String]
773
+ # The name of the asset.
774
+ # @!attribute [rw] service_account
775
+ # @return [::String]
776
+ # The service account associated with the resource.
777
+ # @!attribute [rw] observed
778
+ # @return [::Google::Protobuf::Map{::String => ::String}]
779
+ # Details of the violation.
780
+ # @!attribute [r] rule_output
781
+ # @return [::Array<::Google::Cloud::WorkloadManager::V1::RuleOutput>]
782
+ # Output only. The rule output of the violation.
783
+ class ViolationDetails
784
+ include ::Google::Protobuf::MessageExts
785
+ extend ::Google::Protobuf::MessageExts::ClassMethods
786
+
787
+ # @!attribute [rw] key
788
+ # @return [::String]
789
+ # @!attribute [rw] value
790
+ # @return [::String]
791
+ class ObservedEntry
792
+ include ::Google::Protobuf::MessageExts
793
+ extend ::Google::Protobuf::MessageExts::ClassMethods
794
+ end
795
+ end
796
+
797
+ # Resource in execution result.
798
+ # @!attribute [rw] type
799
+ # @return [::String]
800
+ # The type of resource.
801
+ # @!attribute [rw] name
802
+ # @return [::String]
803
+ # The name of the resource.
804
+ # @!attribute [rw] service_account
805
+ # @return [::String]
806
+ # The service account associated with the resource.
807
+ class Resource
808
+ include ::Google::Protobuf::MessageExts
809
+ extend ::Google::Protobuf::MessageExts::ClassMethods
810
+ end
811
+
812
+ # Represents the metadata of the long-running operation.
813
+ # @!attribute [r] create_time
814
+ # @return [::Google::Protobuf::Timestamp]
815
+ # Output only. The time the operation was created.
816
+ # @!attribute [r] end_time
817
+ # @return [::Google::Protobuf::Timestamp]
818
+ # Output only. The time the operation finished running.
819
+ # @!attribute [r] target
820
+ # @return [::String]
821
+ # Output only. Server-defined resource path for the target of the operation.
822
+ # @!attribute [r] verb
823
+ # @return [::String]
824
+ # Output only. Name of the verb executed by the operation.
825
+ # @!attribute [r] status_message
826
+ # @return [::String]
827
+ # Output only. Human-readable status of the operation, if any.
828
+ # @!attribute [r] requested_cancellation
829
+ # @return [::Boolean]
830
+ # Output only. Identifies whether the user has requested cancellation
831
+ # of the operation. Operations that have been cancelled successfully
832
+ # have [Operation.error][] value with a
833
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to
834
+ # `Code.CANCELLED`.
835
+ # @!attribute [r] api_version
836
+ # @return [::String]
837
+ # Output only. API version used to start the operation.
838
+ class OperationMetadata
839
+ include ::Google::Protobuf::MessageExts
840
+ extend ::Google::Protobuf::MessageExts::ClassMethods
841
+ end
842
+
843
+ # A rule to be evaluated.
844
+ # @!attribute [rw] name
845
+ # @return [::String]
846
+ # Rule name.
847
+ # @!attribute [r] revision_id
848
+ # @return [::String]
849
+ # Output only. The version of the rule.
850
+ # @!attribute [rw] display_name
851
+ # @return [::String]
852
+ # The name display in UI.
853
+ # @!attribute [rw] description
854
+ # @return [::String]
855
+ # Describe rule in plain language.
856
+ # @!attribute [rw] severity
857
+ # @return [::String]
858
+ # The severity of the rule.
859
+ # @!attribute [rw] primary_category
860
+ # @return [::String]
861
+ # The primary category.
862
+ # @!attribute [rw] secondary_category
863
+ # @return [::String]
864
+ # The secondary category.
865
+ # @!attribute [rw] error_message
866
+ # @return [::String]
867
+ # The message template for rule.
868
+ # @!attribute [rw] uri
869
+ # @return [::String]
870
+ # The document url for the rule.
871
+ # @!attribute [rw] remediation
872
+ # @return [::String]
873
+ # The remediation for the rule.
874
+ # @!attribute [rw] tags
875
+ # @return [::Array<::String>]
876
+ # List of user-defined tags.
877
+ # @!attribute [rw] rule_type
878
+ # @return [::Google::Cloud::WorkloadManager::V1::Rule::RuleType]
879
+ # The type of the rule.
880
+ # @!attribute [rw] asset_type
881
+ # @return [::String]
882
+ # The CAI asset type of the rule is evaluating, for joined asset types, it
883
+ # will be the corresponding primary asset types.
884
+ class Rule
885
+ include ::Google::Protobuf::MessageExts
886
+ extend ::Google::Protobuf::MessageExts::ClassMethods
887
+
888
+ # The type of the rule.
889
+ module RuleType
890
+ # Not specified.
891
+ RULE_TYPE_UNSPECIFIED = 0
892
+
893
+ # Baseline rules.
894
+ BASELINE = 1
895
+
896
+ # Custom rules.
897
+ CUSTOM = 2
898
+ end
899
+ end
900
+
901
+ # Request message for the ListRules RPC.
902
+ # @!attribute [rw] parent
903
+ # @return [::String]
904
+ # Required. The [project] on which to execute the request. The format is:
905
+ # projects/\\{project_id}/locations/\\{location}
906
+ # Currently, the pre-defined rules are global available to all projects and
907
+ # all regions.
908
+ # @!attribute [rw] page_size
909
+ # @return [::Integer]
910
+ # Requested page size. Server may return fewer items than requested.
911
+ # If unspecified, server will pick an appropriate default.
912
+ # @!attribute [rw] page_token
913
+ # @return [::String]
914
+ # A token identifying a page of results the server should return.
915
+ # @!attribute [rw] filter
916
+ # @return [::String]
917
+ # Filter based on primary_category, secondary_category.
918
+ # @!attribute [rw] custom_rules_bucket
919
+ # @return [::String]
920
+ # The Cloud Storage bucket name for custom rules.
921
+ # @!attribute [rw] evaluation_type
922
+ # @return [::Google::Cloud::WorkloadManager::V1::Evaluation::EvaluationType]
923
+ # Optional. The evaluation type of the rules will be applied to.
924
+ # The Cloud Storage bucket name for custom rules.
925
+ class ListRulesRequest
926
+ include ::Google::Protobuf::MessageExts
927
+ extend ::Google::Protobuf::MessageExts::ClassMethods
928
+ end
929
+
930
+ # Response message for the ListRules RPC.
931
+ # @!attribute [rw] rules
932
+ # @return [::Array<::Google::Cloud::WorkloadManager::V1::Rule>]
933
+ # All rules in response.
934
+ class ListRulesResponse
935
+ include ::Google::Protobuf::MessageExts
936
+ extend ::Google::Protobuf::MessageExts::ClassMethods
937
+ end
938
+
939
+ # Request message for the ListScannedResources RPC.
940
+ # @!attribute [rw] parent
941
+ # @return [::String]
942
+ # Required. Parent for ListScannedResourcesRequest.
943
+ # @!attribute [rw] rule
944
+ # @return [::String]
945
+ # Rule name.
946
+ # @!attribute [rw] page_size
947
+ # @return [::Integer]
948
+ # Requested page size. Server may return fewer items than requested.
949
+ # If unspecified, server will pick an appropriate default.
950
+ # @!attribute [rw] page_token
951
+ # @return [::String]
952
+ # A token identifying a page of results the server should return.
953
+ # @!attribute [rw] filter
954
+ # @return [::String]
955
+ # Filtering results.
956
+ # @!attribute [rw] order_by
957
+ # @return [::String]
958
+ # Field to sort by. See https://google.aip.dev/132#ordering for more details.
959
+ class ListScannedResourcesRequest
960
+ include ::Google::Protobuf::MessageExts
961
+ extend ::Google::Protobuf::MessageExts::ClassMethods
962
+ end
963
+
964
+ # Response message for the ListScannedResources RPC.
965
+ # @!attribute [rw] scanned_resources
966
+ # @return [::Array<::Google::Cloud::WorkloadManager::V1::ScannedResource>]
967
+ # All scanned resources in response.
968
+ # @!attribute [rw] next_page_token
969
+ # @return [::String]
970
+ # A token, which can be sent as `page_token` to retrieve the next page.
971
+ # If this field is omitted, there are no subsequent pages.
972
+ class ListScannedResourcesResponse
973
+ include ::Google::Protobuf::MessageExts
974
+ extend ::Google::Protobuf::MessageExts::ClassMethods
975
+ end
976
+
977
+ # A scanned resource.
978
+ # @!attribute [rw] resource
979
+ # @return [::String]
980
+ # Resource name.
981
+ # @!attribute [rw] type
982
+ # @return [::String]
983
+ # Resource type.
984
+ class ScannedResource
985
+ include ::Google::Protobuf::MessageExts
986
+ extend ::Google::Protobuf::MessageExts::ClassMethods
987
+ end
988
+ end
989
+ end
990
+ end
991
+ end