forked from googleapis/google-api-ruby-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclasses.rb
2848 lines (2412 loc) · 116 KB
/
classes.rb
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 2015 Google Inc.
#
# 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 ContaineranalysisV1alpha1
# 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
# Name of the artifact. 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`.
# This field is deprecated in favor of the plural `names` field; it continues
# to exist here to allow existing BuildProvenance serialized to json in
# google.devtools.containeranalysis.v1alpha1.BuildDetails.provenance_bytes to
# deserialize back into proto.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# 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)
@name = args[:name] if args.key?(:name)
@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
# AttestationAuthority to which this Attestation is attached is primarily
# useful for look-up (how to find this Attestation if you already know the
# Authority and artifact to be verified) and intent (which authority was this
# attestation intended to sign for).
class Attestation
include Google::Apis::Core::Hashable
# An attestation wrapper with a PGP-compatible signature.
# This message only supports `ATTACHED` signatures, where the payload that is
# signed is included alongside the signature itself in the same file.
# Corresponds to the JSON property `pgpSignedAttestation`
# @return [Google::Apis::ContaineranalysisV1alpha1::PgpSignedAttestation]
attr_accessor :pgp_signed_attestation
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@pgp_signed_attestation = args[:pgp_signed_attestation] if args.key?(:pgp_signed_attestation)
end
end
# Note kind that represents a logical attestation "role" or "authority". For
# example, an organization might have one `AttestationAuthority` for "QA" and
# one for "build". This Note is intended to act strictly as a grouping
# mechanism for the attached Occurrences (Attestations). This grouping
# mechanism also provides a security boundary, since IAM ACLs gate the ability
# for a principle to attach an Occurrence to a given Note. It also provides a
# single point of lookup to find all attached Attestation Occurrences, even if
# they don't all live in the same project.
class AttestationAuthority
include Google::Apis::Core::Hashable
# This submessage provides human-readable hints about the purpose of the
# AttestationAuthority. Because the name of a Note acts as its resource
# reference, it is important to disambiguate the canonical name of the Note
# (which might be a UUID for security purposes) from "readable" names more
# suitable for debug output. Note that these hints should NOT be used to
# look up AttestationAuthorities in security sensitive contexts, such as when
# looking up Attestations to verify.
# Corresponds to the JSON property `hint`
# @return [Google::Apis::ContaineranalysisV1alpha1::AttestationAuthorityHint]
attr_accessor :hint
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@hint = args[:hint] if args.key?(:hint)
end
end
# This submessage provides human-readable hints about the purpose of the
# AttestationAuthority. Because the name of a Note acts as its resource
# reference, it is important to disambiguate the canonical name of the Note
# (which might be a UUID for security purposes) from "readable" names more
# suitable for debug output. Note that these hints should NOT be used to
# look up AttestationAuthorities in security sensitive contexts, such as when
# looking up Attestations to verify.
class AttestationAuthorityHint
include Google::Apis::Core::Hashable
# The human readable name of this Attestation Authority, for example "qa".
# Corresponds to the JSON property `humanReadableName`
# @return [String]
attr_accessor :human_readable_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@human_readable_name = args[:human_readable_name] if args.key?(:human_readable_name)
end
end
# Basis describes the base image portion (Note) of the DockerImage
# relationship. Linked occurrences are derived from this or an
# equivalent image via:
# FROM <Basis.resource_url>
# Or an equivalent reference, e.g. a tag of the resource_url.
class Basis
include Google::Apis::Core::Hashable
# A set of properties that uniquely identify a given Docker image.
# Corresponds to the JSON property `fingerprint`
# @return [Google::Apis::ContaineranalysisV1alpha1::Fingerprint]
attr_accessor :fingerprint
# The resource_url for the resource representing the basis of
# associated occurrence images.
# Corresponds to the JSON property `resourceUrl`
# @return [String]
attr_accessor :resource_url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@fingerprint = args[:fingerprint] if args.key?(:fingerprint)
@resource_url = args[:resource_url] if args.key?(:resource_url)
end
end
# Associates `members` with a `role`.
class Binding
include Google::Apis::Core::Hashable
# Represents a textual expression in the Common Expression Language (CEL)
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL
# are documented at https://github.com/google/cel-spec.
# Example (Comparison):
# title: "Summary size limit"
# description: "Determines if a summary is less than 100 chars"
# expression: "document.summary.size() < 100"
# Example (Equality):
# title: "Requestor is owner"
# description: "Determines if requestor is the document owner"
# expression: "document.owner == request.auth.claims.email"
# Example (Logic):
# title: "Public documents"
# description: "Determine whether the document should be publicly visible"
# expression: "document.type != 'private' && document.type != 'internal'"
# Example (Data Manipulation):
# title: "Notification string"
# description: "Create a notification string with a timestamp."
# expression: "'New message received at ' + string(document.create_time)"
# The exact variables and functions that may be referenced within an expression
# are determined by the service that evaluates it. See the service
# documentation for additional information.
# Corresponds to the JSON property `condition`
# @return [Google::Apis::ContaineranalysisV1alpha1::Expr]
attr_accessor :condition
# Specifies the identities requesting access for a Cloud Platform resource.
# `members` can have the following values:
# * `allUsers`: A special identifier that represents anyone who is
# on the internet; with or without a Google account.
# * `allAuthenticatedUsers`: A special identifier that represents anyone
# who is authenticated with a Google account or a service account.
# * `user:`emailid``: An email address that represents a specific Google
# account. For example, `alice@example.com` .
# * `serviceAccount:`emailid``: An email address that represents a service
# account. For example, `my-other-app@appspot.gserviceaccount.com`.
# * `group:`emailid``: An email address that represents a Google group.
# For example, `admins@example.com`.
# * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a user that has been recently deleted. For
# example, `alice@example.com?uid=123456789012345678901`. If the user is
# recovered, this value reverts to `user:`emailid`` and the recovered user
# retains the role in the binding.
# * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus
# unique identifier) representing a service account that has been recently
# deleted. For example,
# `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
# If the service account is undeleted, this value reverts to
# `serviceAccount:`emailid`` and the undeleted service account retains the
# role in the binding.
# * `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
# identifier) representing a Google group that has been recently
# deleted. For example, `admins@example.com?uid=123456789012345678901`. If
# the group is recovered, this value reverts to `group:`emailid`` and the
# recovered group retains the role in the binding.
# * `domain:`domain``: The G Suite domain (primary) that represents all the
# users of that domain. For example, `google.com` or `example.com`.
# Corresponds to the JSON property `members`
# @return [Array<String>]
attr_accessor :members
# Role that is assigned to `members`.
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@condition = args[:condition] if args.key?(:condition)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
# Message encapsulating build provenance details.
class BuildDetails
include Google::Apis::Core::Hashable
# 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::ContaineranalysisV1alpha1::BuildProvenance]
attr_accessor :provenance
# Serialized JSON representation of the provenance, used in generating the
# `BuildSignature` in the corresponding Result. 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)
@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::ContaineranalysisV1alpha1::Artifact>]
attr_accessor :built_artifacts
# Commands requested by the build.
# Corresponds to the JSON property `commands`
# @return [Array<Google::Apis::ContaineranalysisV1alpha1::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 `finishTime`
# @return [String]
attr_accessor :finish_time
# Unique identifier of the build.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Google Cloud Storage bucket where logs were written.
# Corresponds to the JSON property `logsBucket`
# @return [String]
attr_accessor :logs_bucket
# 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::ContaineranalysisV1alpha1::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)
@finish_time = args[:finish_time] if args.key?(:finish_time)
@id = args[:id] if args.key?(:id)
@logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket)
@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
# Message encapsulating the signature of the verified build.
class BuildSignature
include Google::Apis::Core::Hashable
# An Id for the key used to sign. This could be either an Id for the key
# stored in `public_key` (such as the Id or fingerprint for a PGP key, or the
# CN for a cert), or a reference to an external key (such as a reference to a
# key in Cloud Key Management Service).
# Corresponds to the JSON property `keyId`
# @return [String]
attr_accessor :key_id
# The type of the key, either stored in `public_key` or referenced in
# `key_id`
# Corresponds to the JSON property `keyType`
# @return [String]
attr_accessor :key_type
# Public key of the builder which can be used to verify that the related
# findings are valid and unchanged. If `key_type` is empty, this defaults
# to PEM encoded public keys.
# This field may be empty if `key_id` references an external key.
# For Cloud Build based signatures, this is a PEM encoded public
# key. To verify the Cloud Build signature, place the contents of
# this field into a file (public.pem). The signature field is base64-decoded
# into its binary representation in signature.bin, and the provenance bytes
# from `BuildDetails` are base64-decoded into a binary representation in
# signed.bin. OpenSSL can then verify the signature:
# `openssl sha256 -verify public.pem -signature signature.bin signed.bin`
# Corresponds to the JSON property `publicKey`
# @return [String]
attr_accessor :public_key
# Signature of the related `BuildProvenance`, encoded in a base64 string.
# Corresponds to the JSON property `signature`
# @return [String]
attr_accessor :signature
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@key_id = args[:key_id] if args.key?(:key_id)
@key_type = args[:key_type] if args.key?(:key_type)
@public_key = args[:public_key] if args.key?(:public_key)
@signature = args[:signature] if args.key?(:signature)
end
end
# Note holding the version of the provider's builder and the signature of
# the provenance message in linked BuildDetails.
class BuildType
include Google::Apis::Core::Hashable
# Version of the builder which produced this Note.
# Corresponds to the JSON property `builderVersion`
# @return [String]
attr_accessor :builder_version
# Message encapsulating the signature of the verified build.
# Corresponds to the JSON property `signature`
# @return [Google::Apis::ContaineranalysisV1alpha1::BuildSignature]
attr_accessor :signature
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@builder_version = args[:builder_version] if args.key?(:builder_version)
@signature = args[:signature] if args.key?(:signature)
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
# 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
# Request for creating an operation
class CreateOperationRequest
include Google::Apis::Core::Hashable
# This resource represents a long-running operation that is the result of a
# network API call.
# Corresponds to the JSON property `operation`
# @return [Google::Apis::ContaineranalysisV1alpha1::Operation]
attr_accessor :operation
# The ID to use for this operation.
# Corresponds to the JSON property `operationId`
# @return [String]
attr_accessor :operation_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@operation = args[:operation] if args.key?(:operation)
@operation_id = args[:operation_id] if args.key?(:operation_id)
end
end
# An artifact that can be deployed in some runtime.
class Deployable
include Google::Apis::Core::Hashable
# Resource URI for the artifact being deployed.
# Corresponds to the JSON property `resourceUri`
# @return [Array<String>]
attr_accessor :resource_uri
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@resource_uri = args[:resource_uri] if args.key?(:resource_uri)
end
end
# The period during which some deployable was active in a runtime.
class Deployment
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
# 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
# Derived describes the derived image portion (Occurrence) of the
# DockerImage relationship. This image would be produced from a Dockerfile
# with FROM <DockerImage.Basis in attached Note>.
class Derived
include Google::Apis::Core::Hashable
# Output only. This contains the base image URL for the derived image
# occurrence.
# Corresponds to the JSON property `baseResourceUrl`
# @return [String]
attr_accessor :base_resource_url
# Output only. The number of layers by which this image differs from the
# associated image basis.
# Corresponds to the JSON property `distance`
# @return [Fixnum]
attr_accessor :distance
# A set of properties that uniquely identify a given Docker image.
# Corresponds to the JSON property `fingerprint`
# @return [Google::Apis::ContaineranalysisV1alpha1::Fingerprint]
attr_accessor :fingerprint
# This contains layer-specific metadata, if populated it has length
# "distance" and is ordered with [distance] being the layer immediately
# following the base image and [1] being the final layer.
# Corresponds to the JSON property `layerInfo`
# @return [Array<Google::Apis::ContaineranalysisV1alpha1::Layer>]
attr_accessor :layer_info
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@base_resource_url = args[:base_resource_url] if args.key?(:base_resource_url)
@distance = args[:distance] if args.key?(:distance)
@fingerprint = args[:fingerprint] if args.key?(:fingerprint)
@layer_info = args[:layer_info] if args.key?(:layer_info)
end
end
# Identifies all occurrences of this vulnerability in the package for a
# specific distro/location
# For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2
class Detail
include Google::Apis::Core::Hashable
# The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) in
# which the vulnerability manifests. Examples include distro or storage
# location for vulnerable jar.
# This field can be used as a filter in list requests.
# Corresponds to the JSON property `cpeUri`
# @return [String]
attr_accessor :cpe_uri
# A vendor-specific description of this note.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# The location of the vulnerability
# Corresponds to the JSON property `fixedLocation`
# @return [Google::Apis::ContaineranalysisV1alpha1::VulnerabilityLocation]
attr_accessor :fixed_location
# Whether this Detail is obsolete. Occurrences are expected not to point to
# obsolete details.
# Corresponds to the JSON property `isObsolete`
# @return [Boolean]
attr_accessor :is_obsolete
alias_method :is_obsolete?, :is_obsolete
# Version contains structured information about the version of the package.
# For a discussion of this in Debian/Ubuntu:
# http://serverfault.com/questions/604541/debian-packages-version-convention
# For a discussion of this in Redhat/Fedora/Centos:
# http://blog.jasonantman.com/2014/07/how-yum-and-rpm-compare-versions/
# Corresponds to the JSON property `maxAffectedVersion`
# @return [Google::Apis::ContaineranalysisV1alpha1::Version]
attr_accessor :max_affected_version
# Version contains structured information about the version of the package.
# For a discussion of this in Debian/Ubuntu:
# http://serverfault.com/questions/604541/debian-packages-version-convention
# For a discussion of this in Redhat/Fedora/Centos:
# http://blog.jasonantman.com/2014/07/how-yum-and-rpm-compare-versions/
# Corresponds to the JSON property `minAffectedVersion`
# @return [Google::Apis::ContaineranalysisV1alpha1::Version]
attr_accessor :min_affected_version
# The name of the package where the vulnerability was found.
# This field can be used as a filter in list requests.
# Corresponds to the JSON property `package`
# @return [String]
attr_accessor :package
# The type of package; whether native or non native(ruby gems,
# node.js packages etc)
# Corresponds to the JSON property `packageType`
# @return [String]
attr_accessor :package_type
# The severity (eg: distro assigned severity) for this vulnerability.
# Corresponds to the JSON property `severityName`
# @return [String]
attr_accessor :severity_name
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@cpe_uri = args[:cpe_uri] if args.key?(:cpe_uri)
@description = args[:description] if args.key?(:description)
@fixed_location = args[:fixed_location] if args.key?(:fixed_location)
@is_obsolete = args[:is_obsolete] if args.key?(:is_obsolete)
@max_affected_version = args[:max_affected_version] if args.key?(:max_affected_version)
@min_affected_version = args[:min_affected_version] if args.key?(:min_affected_version)
@package = args[:package] if args.key?(:package)
@package_type = args[:package_type] if args.key?(:package_type)
@severity_name = args[:severity_name] if args.key?(:severity_name)
end
end
# Provides information about the scan status of a discovered resource.
class Discovered
include Google::Apis::Core::Hashable
# The status of discovery for the resource.
# Corresponds to the JSON property `analysisStatus`
# @return [String]
attr_accessor :analysis_status
# The `Status` type defines a logical error model that is suitable for
# different programming environments, including REST APIs and RPC APIs. It is
# used by [gRPC](https://github.com/grpc). Each `Status` message contains
# three pieces of data: error code, error message, and error details.
# You can find out more about this error model and how to work with it in the
# [API Design Guide](https://cloud.google.com/apis/design/errors).
# Corresponds to the JSON property `analysisStatusError`
# @return [Google::Apis::ContaineranalysisV1alpha1::Status]
attr_accessor :analysis_status_error
# Whether the resource is continuously analyzed.
# Corresponds to the JSON property `continuousAnalysis`
# @return [String]
attr_accessor :continuous_analysis
# The CPE of the resource being scanned.
# Corresponds to the JSON property `cpe`
# @return [String]
attr_accessor :cpe
# This resource represents a long-running operation that is the result of a
# network API call.
# Corresponds to the JSON property `operation`
# @return [Google::Apis::ContaineranalysisV1alpha1::Operation]
attr_accessor :operation
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@analysis_status = args[:analysis_status] if args.key?(:analysis_status)
@analysis_status_error = args[:analysis_status_error] if args.key?(:analysis_status_error)
@continuous_analysis = args[:continuous_analysis] if args.key?(:continuous_analysis)
@cpe = args[:cpe] if args.key?(:cpe)
@operation = args[:operation] if args.key?(:operation)
end
end
# A note that indicates a type of analysis a provider would perform. This note
# exists in a provider's project. A `Discovery` occurrence is created in a
# consumer's project at the start of analysis. The occurrence's operation will
# indicate the status of the analysis. Absence of an occurrence linked to this
# note for a resource indicates that analysis hasn't started.
class Discovery
include Google::Apis::Core::Hashable
# The kind of analysis that is handled by this discovery.
# Corresponds to the JSON property `analysisKind`
# @return [String]
attr_accessor :analysis_kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@analysis_kind = args[:analysis_kind] if args.key?(:analysis_kind)
end
end
# This represents a particular channel of distribution for a given package.
# e.g. Debian's jessie-backports dpkg mirror
class Distribution
include Google::Apis::Core::Hashable
# The CPU architecture for which packages in this distribution
# channel were built
# Corresponds to the JSON property `architecture`
# @return [String]
attr_accessor :architecture
# The cpe_uri in [cpe format](https://cpe.mitre.org/specification/)
# denoting the package manager version distributing a package.
# Corresponds to the JSON property `cpeUri`
# @return [String]
attr_accessor :cpe_uri
# The distribution channel-specific description of this package.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Version contains structured information about the version of the package.
# For a discussion of this in Debian/Ubuntu:
# http://serverfault.com/questions/604541/debian-packages-version-convention
# For a discussion of this in Redhat/Fedora/Centos:
# http://blog.jasonantman.com/2014/07/how-yum-and-rpm-compare-versions/
# Corresponds to the JSON property `latestVersion`
# @return [Google::Apis::ContaineranalysisV1alpha1::Version]
attr_accessor :latest_version
# A freeform string denoting the maintainer of this package.
# Corresponds to the JSON property `maintainer`
# @return [String]
attr_accessor :maintainer
# The distribution channel-specific homepage for this package.
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@architecture = args[:architecture] if args.key?(:architecture)
@cpe_uri = args[:cpe_uri] if args.key?(:cpe_uri)
@description = args[:description] if args.key?(:description)
@latest_version = args[:latest_version] if args.key?(:latest_version)
@maintainer = args[:maintainer] if args.key?(:maintainer)
@url = args[:url] if args.key?(:url)
end
end
# A generic empty message that you can re-use to avoid defining duplicated
# empty messages in your APIs. A typical example is to use it as the request
# or the response type of an API method. For instance:
# service Foo `
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
# `
# The JSON representation for `Empty` is empty JSON object ````.
class Empty
include Google::Apis::Core::Hashable
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
end
end
# Represents a textual expression in the Common Expression Language (CEL)
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL
# are documented at https://github.com/google/cel-spec.
# Example (Comparison):
# title: "Summary size limit"
# description: "Determines if a summary is less than 100 chars"
# expression: "document.summary.size() < 100"
# Example (Equality):
# title: "Requestor is owner"
# description: "Determines if requestor is the document owner"
# expression: "document.owner == request.auth.claims.email"
# Example (Logic):
# title: "Public documents"
# description: "Determine whether the document should be publicly visible"
# expression: "document.type != 'private' && document.type != 'internal'"
# Example (Data Manipulation):
# title: "Notification string"
# description: "Create a notification string with a timestamp."
# expression: "'New message received at ' + string(document.create_time)"
# The exact variables and functions that may be referenced within an expression
# are determined by the service that evaluates it. See the service
# documentation for additional information.
class Expr
include Google::Apis::Core::Hashable
# Optional. Description of the expression. This is a longer text which
# describes the expression, e.g. when hovered over it in a UI.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# Textual representation of an expression in Common Expression Language
# syntax.
# Corresponds to the JSON property `expression`
# @return [String]
attr_accessor :expression
# Optional. String indicating the location of the expression for error
# reporting, e.g. a file name and a position in the file.
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
# Optional. Title for the expression, i.e. a short string describing
# its purpose. This can be used e.g. in UIs which allow to enter the
# expression.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@description = args[:description] if args.key?(:description)
@expression = args[:expression] if args.key?(:expression)
@location = args[:location] if args.key?(:location)
@title = args[:title] if args.key?(:title)
end
end
# Container message for hashes of byte content of files, used in Source
# messages to verify integrity of source input to the build.
class FileHashes
include Google::Apis::Core::Hashable
# Collection of file hashes.
# Corresponds to the JSON property `fileHash`
# @return [Array<Google::Apis::ContaineranalysisV1alpha1::HashProp>]
attr_accessor :file_hash
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@file_hash = args[:file_hash] if args.key?(:file_hash)
end
end
# A set of properties that uniquely identify a given Docker image.
class Fingerprint
include Google::Apis::Core::Hashable
# The layer-id of the final layer in the Docker image's v1
# representation.
# This field can be used as a filter in list requests.
# Corresponds to the JSON property `v1Name`
# @return [String]
attr_accessor :v1_name
# The ordered list of v2 blobs that represent a given image.