forked from googleapis/google-api-ruby-client
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclasses.rb
More file actions
4218 lines (3494 loc) · 164 KB
/
classes.rb
File metadata and controls
4218 lines (3494 loc) · 164 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module OndemandscanningV1beta1
# An alias to a repo revision.
class AliasContext
include Google::Apis::Core::Hashable
# The alias kind.
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# The alias name.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
end
end
# Indicates which analysis completed successfully. Multiple types of analysis
# can be performed on a single resource.
class AnalysisCompleted
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `analysisType`
# @return [Array<String>]
attr_accessor :analysis_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@analysis_type = args[:analysis_type] if args.key?(:analysis_type)
end
end
# AnalyzePackagesMetadata contains metadata for an active scan of a container
# image.
class AnalyzePackagesMetadata
include Google::Apis::Core::Hashable
# When the scan was created.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# The resource URI of the container image being scanned.
# Corresponds to the JSON property `resourceUri`
# @return [String]
attr_accessor :resource_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@create_time = args[:create_time] if args.key?(:create_time)
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
end
end
# AnalyzePackagesMetadata contains metadata for an active scan of a container
# image.
class AnalyzePackagesMetadataV1
include Google::Apis::Core::Hashable
# When the scan was created.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# The resource URI of the container image being scanned.
# Corresponds to the JSON property `resourceUri`
# @return [String]
attr_accessor :resource_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@create_time = args[:create_time] if args.key?(:create_time)
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
end
end
# AnalyzePackagesRequest is the request to analyze a list of packages and create
# Vulnerability Occurrences for it.
class AnalyzePackagesRequest
include Google::Apis::Core::Hashable
# The packages to analyze.
# Corresponds to the JSON property `packages`
# @return [Array<Google::Apis::OndemandscanningV1beta1::PackageData>]
attr_accessor :packages
# Required. The resource URI of the container image being scanned.
# Corresponds to the JSON property `resourceUri`
# @return [String]
attr_accessor :resource_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@packages = args[:packages] if args.key?(:packages)
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
end
end
# AnalyzePackagesResponse contains the information necessary to find results for
# the given scan.
class AnalyzePackagesResponse
include Google::Apis::Core::Hashable
# The name of the scan resource created by this successful scan.
# Corresponds to the JSON property `scan`
# @return [String]
attr_accessor :scan
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@scan = args[:scan] if args.key?(:scan)
end
end
# AnalyzePackagesResponse contains the information necessary to find results for
# the given scan.
class AnalyzePackagesResponseV1
include Google::Apis::Core::Hashable
# The name of the scan resource created by this successful scan.
# Corresponds to the JSON property `scan`
# @return [String]
attr_accessor :scan
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@scan = args[:scan] if args.key?(:scan)
end
end
# Artifact describes a build product.
class Artifact
include Google::Apis::Core::Hashable
# Hash or checksum value of a binary, or Docker Registry 2.0 digest of a
# container.
# Corresponds to the JSON property `checksum`
# @return [String]
attr_accessor :checksum
# Artifact ID, if any; for container images, this will be a URL by digest like `
# gcr.io/projectID/imagename@sha256:123456`.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Related artifact names. This may be the path to a binary or jar file, or in
# the case of a container build, the name used to push the container image to
# Google Container Registry, as presented to `docker push`. Note that a single
# Artifact ID can have multiple names, for example if two tags are applied to
# one image.
# Corresponds to the JSON property `names`
# @return [Array<String>]
attr_accessor :names
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@checksum = args[:checksum] if args.key?(:checksum)
@id = args[:id] if args.key?(:id)
@names = args[:names] if args.key?(:names)
end
end
# Occurrence that represents a single "attestation". The authenticity of an
# attestation can be verified using the attached signature. If the verifier
# trusts the public key of the signer, then verifying the signature is
# sufficient to establish trust. In this circumstance, the authority to which
# this attestation is attached is primarily useful for lookup (how to find this
# attestation if you already know the authority and artifact to be verified) and
# intent (for which authority this attestation was intended to sign.
class AttestationOccurrence
include Google::Apis::Core::Hashable
# One or more JWTs encoding a self-contained attestation. Each JWT encodes the
# payload that it verifies within the JWT itself. Verifier implementation SHOULD
# ignore the `serialized_payload` field when verifying these JWTs. If only JWTs
# are present on this AttestationOccurrence, then the `serialized_payload`
# SHOULD be left empty. Each JWT SHOULD encode a claim specific to the `
# resource_uri` of this Occurrence, but this is not validated by Grafeas
# metadata API implementations. The JWT itself is opaque to Grafeas.
# Corresponds to the JSON property `jwts`
# @return [Array<Google::Apis::OndemandscanningV1beta1::Jwt>]
attr_accessor :jwts
# Required. The serialized payload that is verified by one or more `signatures`.
# Corresponds to the JSON property `serializedPayload`
# NOTE: Values are automatically base64 encoded/decoded in the client library.
# @return [String]
attr_accessor :serialized_payload
# One or more signatures over `serialized_payload`. Verifier implementations
# should consider this attestation message verified if at least one `signature`
# verifies `serialized_payload`. See `Signature` in common.proto for more
# details on signature structure and verification.
# Corresponds to the JSON property `signatures`
# @return [Array<Google::Apis::OndemandscanningV1beta1::Signature>]
attr_accessor :signatures
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@jwts = args[:jwts] if args.key?(:jwts)
@serialized_payload = args[:serialized_payload] if args.key?(:serialized_payload)
@signatures = args[:signatures] if args.key?(:signatures)
end
end
# BaseImage describes a base image of a container image.
class BaseImage
include Google::Apis::Core::Hashable
# The number of layers that the base image is composed of.
# Corresponds to the JSON property `layerCount`
# @return [Fixnum]
attr_accessor :layer_count
# The name of the base image.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The registry in which the base image is from.
# Corresponds to the JSON property `registry`
# @return [String]
attr_accessor :registry
# The repository name in which the base image is from.
# Corresponds to the JSON property `repository`
# @return [String]
attr_accessor :repository
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@layer_count = args[:layer_count] if args.key?(:layer_count)
@name = args[:name] if args.key?(:name)
@registry = args[:registry] if args.key?(:registry)
@repository = args[:repository] if args.key?(:repository)
end
end
#
class BinarySourceInfo
include Google::Apis::Core::Hashable
# The binary package. This is significant when the source is different than the
# binary itself. Historically if they've differed, we've stored the name of the
# source and its version in the package/version fields, but we should also store
# the binary package info, as that's what's actually installed.
# Corresponds to the JSON property `binaryVersion`
# @return [Google::Apis::OndemandscanningV1beta1::PackageVersion]
attr_accessor :binary_version
# The source package. Similar to the above, this is significant when the source
# is different than the binary itself. Since the top-level package/version
# fields are based on an if/else, we need a separate field for both binary and
# source if we want to know definitively where the data is coming from.
# Corresponds to the JSON property `sourceVersion`
# @return [Google::Apis::OndemandscanningV1beta1::PackageVersion]
attr_accessor :source_version
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@binary_version = args[:binary_version] if args.key?(:binary_version)
@source_version = args[:source_version] if args.key?(:source_version)
end
end
#
class BuildDefinition
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `buildType`
# @return [String]
attr_accessor :build_type
#
# Corresponds to the JSON property `externalParameters`
# @return [Hash<String,Object>]
attr_accessor :external_parameters
#
# Corresponds to the JSON property `internalParameters`
# @return [Hash<String,Object>]
attr_accessor :internal_parameters
#
# Corresponds to the JSON property `resolvedDependencies`
# @return [Array<Google::Apis::OndemandscanningV1beta1::ResourceDescriptor>]
attr_accessor :resolved_dependencies
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@build_type = args[:build_type] if args.key?(:build_type)
@external_parameters = args[:external_parameters] if args.key?(:external_parameters)
@internal_parameters = args[:internal_parameters] if args.key?(:internal_parameters)
@resolved_dependencies = args[:resolved_dependencies] if args.key?(:resolved_dependencies)
end
end
#
class BuildMetadata
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `finishedOn`
# @return [String]
attr_accessor :finished_on
#
# Corresponds to the JSON property `invocationId`
# @return [String]
attr_accessor :invocation_id
#
# Corresponds to the JSON property `startedOn`
# @return [String]
attr_accessor :started_on
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@finished_on = args[:finished_on] if args.key?(:finished_on)
@invocation_id = args[:invocation_id] if args.key?(:invocation_id)
@started_on = args[:started_on] if args.key?(:started_on)
end
end
# Details of a build occurrence.
class BuildOccurrence
include Google::Apis::Core::Hashable
# In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa spec,
# wrapped in an in-toto statement. This allows for direct jsonification of a to-
# spec in-toto slsa statement with a to-spec slsa provenance.
# Corresponds to the JSON property `inTotoSlsaProvenanceV1`
# @return [Google::Apis::OndemandscanningV1beta1::InTotoSlsaProvenanceV1]
attr_accessor :in_toto_slsa_provenance_v1
# Deprecated. See InTotoStatement for the replacement. In-toto Provenance
# representation as defined in spec.
# Corresponds to the JSON property `intotoProvenance`
# @return [Google::Apis::OndemandscanningV1beta1::InTotoProvenance]
attr_accessor :intoto_provenance
# Spec defined at https://github.com/in-toto/attestation/tree/main/spec#
# statement The serialized InTotoStatement will be stored as Envelope.payload.
# Envelope.payloadType is always "application/vnd.in-toto+json".
# Corresponds to the JSON property `intotoStatement`
# @return [Google::Apis::OndemandscanningV1beta1::InTotoStatement]
attr_accessor :intoto_statement
# Provenance of a build. Contains all information needed to verify the full
# details about the build from source to completion.
# Corresponds to the JSON property `provenance`
# @return [Google::Apis::OndemandscanningV1beta1::BuildProvenance]
attr_accessor :provenance
# Serialized JSON representation of the provenance, used in generating the build
# signature in the corresponding build note. After verifying the signature, `
# provenance_bytes` can be unmarshalled and compared to the provenance to
# confirm that it is unchanged. A base64-encoded string representation of the
# provenance bytes is used for the signature in order to interoperate with
# openssl which expects this format for signature verification. The serialized
# form is captured both to avoid ambiguity in how the provenance is marshalled
# to json as well to prevent incompatibilities with future changes.
# Corresponds to the JSON property `provenanceBytes`
# @return [String]
attr_accessor :provenance_bytes
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@in_toto_slsa_provenance_v1 = args[:in_toto_slsa_provenance_v1] if args.key?(:in_toto_slsa_provenance_v1)
@intoto_provenance = args[:intoto_provenance] if args.key?(:intoto_provenance)
@intoto_statement = args[:intoto_statement] if args.key?(:intoto_statement)
@provenance = args[:provenance] if args.key?(:provenance)
@provenance_bytes = args[:provenance_bytes] if args.key?(:provenance_bytes)
end
end
# Provenance of a build. Contains all information needed to verify the full
# details about the build from source to completion.
class BuildProvenance
include Google::Apis::Core::Hashable
# Special options applied to this build. This is a catch-all field where build
# providers can enter any desired additional details.
# Corresponds to the JSON property `buildOptions`
# @return [Hash<String,String>]
attr_accessor :build_options
# Version string of the builder at the time this build was executed.
# Corresponds to the JSON property `builderVersion`
# @return [String]
attr_accessor :builder_version
# Output of the build.
# Corresponds to the JSON property `builtArtifacts`
# @return [Array<Google::Apis::OndemandscanningV1beta1::Artifact>]
attr_accessor :built_artifacts
# Commands requested by the build.
# Corresponds to the JSON property `commands`
# @return [Array<Google::Apis::OndemandscanningV1beta1::Command>]
attr_accessor :commands
# Time at which the build was created.
# Corresponds to the JSON property `createTime`
# @return [String]
attr_accessor :create_time
# E-mail address of the user who initiated this build. Note that this was the
# user's e-mail address at the time the build was initiated; this address may
# not represent the same end-user for all time.
# Corresponds to the JSON property `creator`
# @return [String]
attr_accessor :creator
# Time at which execution of the build was finished.
# Corresponds to the JSON property `endTime`
# @return [String]
attr_accessor :end_time
# Required. Unique identifier of the build.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# URI where any logs for this provenance were written.
# Corresponds to the JSON property `logsUri`
# @return [String]
attr_accessor :logs_uri
# ID of the project.
# Corresponds to the JSON property `projectId`
# @return [String]
attr_accessor :project_id
# Source describes the location of the source used for the build.
# Corresponds to the JSON property `sourceProvenance`
# @return [Google::Apis::OndemandscanningV1beta1::Source]
attr_accessor :source_provenance
# Time at which execution of the build was started.
# Corresponds to the JSON property `startTime`
# @return [String]
attr_accessor :start_time
# Trigger identifier if the build was triggered automatically; empty if not.
# Corresponds to the JSON property `triggerId`
# @return [String]
attr_accessor :trigger_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@build_options = args[:build_options] if args.key?(:build_options)
@builder_version = args[:builder_version] if args.key?(:builder_version)
@built_artifacts = args[:built_artifacts] if args.key?(:built_artifacts)
@commands = args[:commands] if args.key?(:commands)
@create_time = args[:create_time] if args.key?(:create_time)
@creator = args[:creator] if args.key?(:creator)
@end_time = args[:end_time] if args.key?(:end_time)
@id = args[:id] if args.key?(:id)
@logs_uri = args[:logs_uri] if args.key?(:logs_uri)
@project_id = args[:project_id] if args.key?(:project_id)
@source_provenance = args[:source_provenance] if args.key?(:source_provenance)
@start_time = args[:start_time] if args.key?(:start_time)
@trigger_id = args[:trigger_id] if args.key?(:trigger_id)
end
end
#
class BuilderConfig
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@id = args[:id] if args.key?(:id)
end
end
#
class CisaKnownExploitedVulnerabilities
include Google::Apis::Core::Hashable
# Whether the vulnerability is known to have been leveraged as part of a
# ransomware campaign.
# Corresponds to the JSON property `knownRansomwareCampaignUse`
# @return [String]
attr_accessor :known_ransomware_campaign_use
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@known_ransomware_campaign_use = args[:known_ransomware_campaign_use] if args.key?(:known_ransomware_campaign_use)
end
end
# Common Vulnerability Scoring System. For details, see https://www.first.org/
# cvss/specification-document This is a message we will try to use for storing
# various versions of CVSS rather than making a separate proto for storing a
# specific version.
class Cvss
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `attackComplexity`
# @return [String]
attr_accessor :attack_complexity
# Base Metrics Represents the intrinsic characteristics of a vulnerability that
# are constant over time and across user environments.
# Corresponds to the JSON property `attackVector`
# @return [String]
attr_accessor :attack_vector
#
# Corresponds to the JSON property `authentication`
# @return [String]
attr_accessor :authentication
#
# Corresponds to the JSON property `availabilityImpact`
# @return [String]
attr_accessor :availability_impact
# The base score is a function of the base metric scores.
# Corresponds to the JSON property `baseScore`
# @return [Float]
attr_accessor :base_score
#
# Corresponds to the JSON property `confidentialityImpact`
# @return [String]
attr_accessor :confidentiality_impact
#
# Corresponds to the JSON property `exploitabilityScore`
# @return [Float]
attr_accessor :exploitability_score
#
# Corresponds to the JSON property `impactScore`
# @return [Float]
attr_accessor :impact_score
#
# Corresponds to the JSON property `integrityImpact`
# @return [String]
attr_accessor :integrity_impact
#
# Corresponds to the JSON property `privilegesRequired`
# @return [String]
attr_accessor :privileges_required
#
# Corresponds to the JSON property `scope`
# @return [String]
attr_accessor :scope
#
# Corresponds to the JSON property `userInteraction`
# @return [String]
attr_accessor :user_interaction
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@attack_complexity = args[:attack_complexity] if args.key?(:attack_complexity)
@attack_vector = args[:attack_vector] if args.key?(:attack_vector)
@authentication = args[:authentication] if args.key?(:authentication)
@availability_impact = args[:availability_impact] if args.key?(:availability_impact)
@base_score = args[:base_score] if args.key?(:base_score)
@confidentiality_impact = args[:confidentiality_impact] if args.key?(:confidentiality_impact)
@exploitability_score = args[:exploitability_score] if args.key?(:exploitability_score)
@impact_score = args[:impact_score] if args.key?(:impact_score)
@integrity_impact = args[:integrity_impact] if args.key?(:integrity_impact)
@privileges_required = args[:privileges_required] if args.key?(:privileges_required)
@scope = args[:scope] if args.key?(:scope)
@user_interaction = args[:user_interaction] if args.key?(:user_interaction)
end
end
# The category to which the update belongs.
class Category
include Google::Apis::Core::Hashable
# The identifier of the category.
# Corresponds to the JSON property `categoryId`
# @return [String]
attr_accessor :category_id
# The localized name of the category.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@category_id = args[:category_id] if args.key?(:category_id)
@name = args[:name] if args.key?(:name)
end
end
# A CloudRepoSourceContext denotes a particular revision in a Google Cloud
# Source Repo.
class CloudRepoSourceContext
include Google::Apis::Core::Hashable
# An alias to a repo revision.
# Corresponds to the JSON property `aliasContext`
# @return [Google::Apis::OndemandscanningV1beta1::AliasContext]
attr_accessor :alias_context
# A unique identifier for a Cloud Repo.
# Corresponds to the JSON property `repoId`
# @return [Google::Apis::OndemandscanningV1beta1::RepoId]
attr_accessor :repo_id
# A revision ID.
# Corresponds to the JSON property `revisionId`
# @return [String]
attr_accessor :revision_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@alias_context = args[:alias_context] if args.key?(:alias_context)
@repo_id = args[:repo_id] if args.key?(:repo_id)
@revision_id = args[:revision_id] if args.key?(:revision_id)
end
end
# Command describes a step performed as part of the build pipeline.
class Command
include Google::Apis::Core::Hashable
# Command-line arguments used when executing this command.
# Corresponds to the JSON property `args`
# @return [Array<String>]
attr_accessor :args
# Working directory (relative to project source root) used when running this
# command.
# Corresponds to the JSON property `dir`
# @return [String]
attr_accessor :dir
# Environment variables set before running this command.
# Corresponds to the JSON property `env`
# @return [Array<String>]
attr_accessor :env
# Optional unique identifier for this command, used in wait_for to reference
# this command as a dependency.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Required. Name of the command, as presented on the command line, or if the
# command is packaged as a Docker container, as presented to `docker pull`.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# The ID(s) of the command(s) that this command depends on.
# Corresponds to the JSON property `waitFor`
# @return [Array<String>]
attr_accessor :wait_for
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@args = args[:args] if args.key?(:args)
@dir = args[:dir] if args.key?(:dir)
@env = args[:env] if args.key?(:env)
@id = args[:id] if args.key?(:id)
@name = args[:name] if args.key?(:name)
@wait_for = args[:wait_for] if args.key?(:wait_for)
end
end
# Indicates that the builder claims certain fields in this message to be
# complete.
class Completeness
include Google::Apis::Core::Hashable
# If true, the builder claims that recipe.arguments is complete, meaning that
# all external inputs are properly captured in the recipe.
# Corresponds to the JSON property `arguments`
# @return [Boolean]
attr_accessor :arguments
alias_method :arguments?, :arguments
# If true, the builder claims that recipe.environment is claimed to be complete.
# Corresponds to the JSON property `environment`
# @return [Boolean]
attr_accessor :environment
alias_method :environment?, :environment
# If true, the builder claims that materials are complete, usually through some
# controls to prevent network access. Sometimes called "hermetic".
# Corresponds to the JSON property `materials`
# @return [Boolean]
attr_accessor :materials
alias_method :materials?, :materials
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@arguments = args[:arguments] if args.key?(:arguments)
@environment = args[:environment] if args.key?(:environment)
@materials = args[:materials] if args.key?(:materials)
end
end
# An indication that the compliance checks in the associated ComplianceNote were
# not satisfied for particular resources or a specified reason.
class ComplianceOccurrence
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `nonComplianceReason`
# @return [String]
attr_accessor :non_compliance_reason
#
# Corresponds to the JSON property `nonCompliantFiles`
# @return [Array<Google::Apis::OndemandscanningV1beta1::NonCompliantFile>]
attr_accessor :non_compliant_files
# Describes the CIS benchmark version that is applicable to a given OS and os
# version.
# Corresponds to the JSON property `version`
# @return [Google::Apis::OndemandscanningV1beta1::ComplianceVersion]
attr_accessor :version
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@non_compliance_reason = args[:non_compliance_reason] if args.key?(:non_compliance_reason)
@non_compliant_files = args[:non_compliant_files] if args.key?(:non_compliant_files)
@version = args[:version] if args.key?(:version)
end
end
# Describes the CIS benchmark version that is applicable to a given OS and os
# version.
class ComplianceVersion
include Google::Apis::Core::Hashable
# The name of the document that defines this benchmark, e.g. "CIS Container-
# Optimized OS".
# Corresponds to the JSON property `benchmarkDocument`
# @return [String]
attr_accessor :benchmark_document
# The CPE URI (https://cpe.mitre.org/specification/) this benchmark is
# applicable to.
# Corresponds to the JSON property `cpeUri`
# @return [String]
attr_accessor :cpe_uri
# The version of the benchmark. This is set to the version of the OS-specific
# CIS document the benchmark is defined in.
# Corresponds to the JSON property `version`
# @return [String]
attr_accessor :version
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@benchmark_document = args[:benchmark_document] if args.key?(:benchmark_document)
@cpe_uri = args[:cpe_uri] if args.key?(:cpe_uri)
@version = args[:version] if args.key?(:version)
end
end
# Deprecated. Prefer to use a regular Occurrence, and populate the Envelope at
# the top level of the Occurrence.
class DsseAttestationOccurrence
include Google::Apis::Core::Hashable
# MUST match https://github.com/secure-systems-lab/dsse/blob/master/envelope.
# proto. An authenticated message of arbitrary type.
# Corresponds to the JSON property `envelope`
# @return [Google::Apis::OndemandscanningV1beta1::Envelope]
attr_accessor :envelope
# Spec defined at https://github.com/in-toto/attestation/tree/main/spec#
# statement The serialized InTotoStatement will be stored as Envelope.payload.
# Envelope.payloadType is always "application/vnd.in-toto+json".
# Corresponds to the JSON property `statement`
# @return [Google::Apis::OndemandscanningV1beta1::InTotoStatement]
attr_accessor :statement
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@envelope = args[:envelope] if args.key?(:envelope)
@statement = args[:statement] if args.key?(:statement)
end
end
# The period during which some deployable was active in a runtime.
class DeploymentOccurrence
include Google::Apis::Core::Hashable
# Address of the runtime element hosting this deployment.
# Corresponds to the JSON property `address`
# @return [String]
attr_accessor :address
# Configuration used to create this deployment.
# Corresponds to the JSON property `config`
# @return [String]
attr_accessor :config
# Required. Beginning of the lifetime of this deployment.
# Corresponds to the JSON property `deployTime`
# @return [String]
attr_accessor :deploy_time
# Platform hosting this deployment.
# Corresponds to the JSON property `platform`
# @return [String]
attr_accessor :platform
# Output only. Resource URI for the artifact being deployed taken from the
# deployable field with the same name.
# Corresponds to the JSON property `resourceUri`
# @return [Array<String>]
attr_accessor :resource_uri
# End of the lifetime of this deployment.
# Corresponds to the JSON property `undeployTime`
# @return [String]
attr_accessor :undeploy_time
# Identity of the user that triggered this deployment.
# Corresponds to the JSON property `userEmail`
# @return [String]
attr_accessor :user_email
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@address = args[:address] if args.key?(:address)
@config = args[:config] if args.key?(:config)
@deploy_time = args[:deploy_time] if args.key?(:deploy_time)
@platform = args[:platform] if args.key?(:platform)
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
@undeploy_time = args[:undeploy_time] if args.key?(:undeploy_time)
@user_email = args[:user_email] if args.key?(:user_email)
end
end
# Provides information about the analysis status of a discovered resource.
class DiscoveryOccurrence
include Google::Apis::Core::Hashable
# Indicates which analysis completed successfully. Multiple types of analysis
# can be performed on a single resource.
# Corresponds to the JSON property `analysisCompleted`
# @return [Google::Apis::OndemandscanningV1beta1::AnalysisCompleted]
attr_accessor :analysis_completed
# Indicates any errors encountered during analysis of a resource. There could be
# 0 or more of these errors.
# Corresponds to the JSON property `analysisError`
# @return [Array<Google::Apis::OndemandscanningV1beta1::Status>]
attr_accessor :analysis_error