google-apis-containeranalysis_v1beta1 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -537,8 +537,748 @@ module Google
537
537
  end
538
538
  end
539
539
 
540
+ # Defines an object for the byproducts field in in-toto links. The suggested
541
+ # fields are "stderr", "stdout", and "return-value".
542
+ class ByProducts
543
+ include Google::Apis::Core::Hashable
544
+
545
+ #
546
+ # Corresponds to the JSON property `customValues`
547
+ # @return [Hash<String,String>]
548
+ attr_accessor :custom_values
549
+
550
+ def initialize(**args)
551
+ update!(**args)
552
+ end
553
+
554
+ # Update properties of this object
555
+ def update!(**args)
556
+ @custom_values = args[:custom_values] if args.key?(:custom_values)
557
+ end
558
+ end
559
+
560
+ # Common Vulnerability Scoring System version 3. For details, see https://www.
561
+ # first.org/cvss/specification-document
562
+ class CvsSv3
563
+ include Google::Apis::Core::Hashable
564
+
565
+ #
566
+ # Corresponds to the JSON property `attackComplexity`
567
+ # @return [String]
568
+ attr_accessor :attack_complexity
569
+
570
+ # Base Metrics Represents the intrinsic characteristics of a vulnerability that
571
+ # are constant over time and across user environments.
572
+ # Corresponds to the JSON property `attackVector`
573
+ # @return [String]
574
+ attr_accessor :attack_vector
575
+
576
+ #
577
+ # Corresponds to the JSON property `availabilityImpact`
578
+ # @return [String]
579
+ attr_accessor :availability_impact
580
+
581
+ # The base score is a function of the base metric scores.
582
+ # Corresponds to the JSON property `baseScore`
583
+ # @return [Float]
584
+ attr_accessor :base_score
585
+
586
+ #
587
+ # Corresponds to the JSON property `confidentialityImpact`
588
+ # @return [String]
589
+ attr_accessor :confidentiality_impact
590
+
591
+ #
592
+ # Corresponds to the JSON property `exploitabilityScore`
593
+ # @return [Float]
594
+ attr_accessor :exploitability_score
595
+
596
+ #
597
+ # Corresponds to the JSON property `impactScore`
598
+ # @return [Float]
599
+ attr_accessor :impact_score
600
+
601
+ #
602
+ # Corresponds to the JSON property `integrityImpact`
603
+ # @return [String]
604
+ attr_accessor :integrity_impact
605
+
606
+ #
607
+ # Corresponds to the JSON property `privilegesRequired`
608
+ # @return [String]
609
+ attr_accessor :privileges_required
610
+
611
+ #
612
+ # Corresponds to the JSON property `scope`
613
+ # @return [String]
614
+ attr_accessor :scope
615
+
616
+ #
617
+ # Corresponds to the JSON property `userInteraction`
618
+ # @return [String]
619
+ attr_accessor :user_interaction
620
+
621
+ def initialize(**args)
622
+ update!(**args)
623
+ end
624
+
625
+ # Update properties of this object
626
+ def update!(**args)
627
+ @attack_complexity = args[:attack_complexity] if args.key?(:attack_complexity)
628
+ @attack_vector = args[:attack_vector] if args.key?(:attack_vector)
629
+ @availability_impact = args[:availability_impact] if args.key?(:availability_impact)
630
+ @base_score = args[:base_score] if args.key?(:base_score)
631
+ @confidentiality_impact = args[:confidentiality_impact] if args.key?(:confidentiality_impact)
632
+ @exploitability_score = args[:exploitability_score] if args.key?(:exploitability_score)
633
+ @impact_score = args[:impact_score] if args.key?(:impact_score)
634
+ @integrity_impact = args[:integrity_impact] if args.key?(:integrity_impact)
635
+ @privileges_required = args[:privileges_required] if args.key?(:privileges_required)
636
+ @scope = args[:scope] if args.key?(:scope)
637
+ @user_interaction = args[:user_interaction] if args.key?(:user_interaction)
638
+ end
639
+ end
640
+
641
+ # A CloudRepoSourceContext denotes a particular revision in a Google Cloud
642
+ # Source Repo.
643
+ class CloudRepoSourceContext
644
+ include Google::Apis::Core::Hashable
645
+
646
+ # An alias to a repo revision.
647
+ # Corresponds to the JSON property `aliasContext`
648
+ # @return [Google::Apis::ContaineranalysisV1beta1::AliasContext]
649
+ attr_accessor :alias_context
650
+
651
+ # A unique identifier for a Cloud Repo.
652
+ # Corresponds to the JSON property `repoId`
653
+ # @return [Google::Apis::ContaineranalysisV1beta1::RepoId]
654
+ attr_accessor :repo_id
655
+
656
+ # A revision ID.
657
+ # Corresponds to the JSON property `revisionId`
658
+ # @return [String]
659
+ attr_accessor :revision_id
660
+
661
+ def initialize(**args)
662
+ update!(**args)
663
+ end
664
+
665
+ # Update properties of this object
666
+ def update!(**args)
667
+ @alias_context = args[:alias_context] if args.key?(:alias_context)
668
+ @repo_id = args[:repo_id] if args.key?(:repo_id)
669
+ @revision_id = args[:revision_id] if args.key?(:revision_id)
670
+ end
671
+ end
672
+
673
+ # Command describes a step performed as part of the build pipeline.
674
+ class Command
675
+ include Google::Apis::Core::Hashable
676
+
677
+ # Command-line arguments used when executing this command.
678
+ # Corresponds to the JSON property `args`
679
+ # @return [Array<String>]
680
+ attr_accessor :args
681
+
682
+ # Working directory (relative to project source root) used when running this
683
+ # command.
684
+ # Corresponds to the JSON property `dir`
685
+ # @return [String]
686
+ attr_accessor :dir
687
+
688
+ # Environment variables set before running this command.
689
+ # Corresponds to the JSON property `env`
690
+ # @return [Array<String>]
691
+ attr_accessor :env
692
+
693
+ # Optional unique identifier for this command, used in wait_for to reference
694
+ # this command as a dependency.
695
+ # Corresponds to the JSON property `id`
696
+ # @return [String]
697
+ attr_accessor :id
698
+
699
+ # Required. Name of the command, as presented on the command line, or if the
700
+ # command is packaged as a Docker container, as presented to `docker pull`.
701
+ # Corresponds to the JSON property `name`
702
+ # @return [String]
703
+ attr_accessor :name
704
+
705
+ # The ID(s) of the command(s) that this command depends on.
706
+ # Corresponds to the JSON property `waitFor`
707
+ # @return [Array<String>]
708
+ attr_accessor :wait_for
709
+
710
+ def initialize(**args)
711
+ update!(**args)
712
+ end
713
+
714
+ # Update properties of this object
715
+ def update!(**args)
716
+ @args = args[:args] if args.key?(:args)
717
+ @dir = args[:dir] if args.key?(:dir)
718
+ @env = args[:env] if args.key?(:env)
719
+ @id = args[:id] if args.key?(:id)
720
+ @name = args[:name] if args.key?(:name)
721
+ @wait_for = args[:wait_for] if args.key?(:wait_for)
722
+ end
723
+ end
724
+
725
+ # ApprovalConfig describes configuration for manual approval of a build.
726
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalConfig
727
+ include Google::Apis::Core::Hashable
728
+
729
+ # Whether or not approval is needed. If this is set on a build, it will become
730
+ # pending when created, and will need to be explicitly approved to start.
731
+ # Corresponds to the JSON property `approvalRequired`
732
+ # @return [Boolean]
733
+ attr_accessor :approval_required
734
+ alias_method :approval_required?, :approval_required
735
+
736
+ def initialize(**args)
737
+ update!(**args)
738
+ end
739
+
740
+ # Update properties of this object
741
+ def update!(**args)
742
+ @approval_required = args[:approval_required] if args.key?(:approval_required)
743
+ end
744
+ end
745
+
746
+ # ApprovalResult describes the decision and associated metadata of a manual
747
+ # approval of a build.
748
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalResult
749
+ include Google::Apis::Core::Hashable
750
+
751
+ # Output only. The time when the approval decision was made.
752
+ # Corresponds to the JSON property `approvalTime`
753
+ # @return [String]
754
+ attr_accessor :approval_time
755
+
756
+ # Output only. Email of the user that called the ApproveBuild API to approve or
757
+ # reject a build at the time that the API was called.
758
+ # Corresponds to the JSON property `approverAccount`
759
+ # @return [String]
760
+ attr_accessor :approver_account
761
+
762
+ # Optional. An optional comment for this manual approval result.
763
+ # Corresponds to the JSON property `comment`
764
+ # @return [String]
765
+ attr_accessor :comment
766
+
767
+ # Required. The decision of this manual approval.
768
+ # Corresponds to the JSON property `decision`
769
+ # @return [String]
770
+ attr_accessor :decision
771
+
772
+ # Optional. An optional URL tied to this manual approval result. This field is
773
+ # essentially the same as comment, except that it will be rendered by the UI
774
+ # differently. An example use case is a link to an external job that approved
775
+ # this Build.
776
+ # Corresponds to the JSON property `url`
777
+ # @return [String]
778
+ attr_accessor :url
779
+
780
+ def initialize(**args)
781
+ update!(**args)
782
+ end
783
+
784
+ # Update properties of this object
785
+ def update!(**args)
786
+ @approval_time = args[:approval_time] if args.key?(:approval_time)
787
+ @approver_account = args[:approver_account] if args.key?(:approver_account)
788
+ @comment = args[:comment] if args.key?(:comment)
789
+ @decision = args[:decision] if args.key?(:decision)
790
+ @url = args[:url] if args.key?(:url)
791
+ end
792
+ end
793
+
794
+ # Artifacts produced by a build that should be uploaded upon successful
795
+ # completion of all build steps.
796
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts
797
+ include Google::Apis::Core::Hashable
798
+
799
+ # A list of images to be pushed upon the successful completion of all build
800
+ # steps. The images will be pushed using the builder service account's
801
+ # credentials. The digests of the pushed images will be stored in the Build
802
+ # resource's results field. If any of the images fail to be pushed, the build is
803
+ # marked FAILURE.
804
+ # Corresponds to the JSON property `images`
805
+ # @return [Array<String>]
806
+ attr_accessor :images
807
+
808
+ # Files in the workspace to upload to Cloud Storage upon successful completion
809
+ # of all build steps.
810
+ # Corresponds to the JSON property `objects`
811
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects]
812
+ attr_accessor :objects
813
+
814
+ def initialize(**args)
815
+ update!(**args)
816
+ end
817
+
818
+ # Update properties of this object
819
+ def update!(**args)
820
+ @images = args[:images] if args.key?(:images)
821
+ @objects = args[:objects] if args.key?(:objects)
822
+ end
823
+ end
824
+
825
+ # Files in the workspace to upload to Cloud Storage upon successful completion
826
+ # of all build steps.
827
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1ArtifactsArtifactObjects
828
+ include Google::Apis::Core::Hashable
829
+
830
+ # Cloud Storage bucket and optional object path, in the form "gs://bucket/path/
831
+ # to/somewhere/". (see [Bucket Name Requirements](https://cloud.google.com/
832
+ # storage/docs/bucket-naming#requirements)). Files in the workspace matching any
833
+ # path pattern will be uploaded to Cloud Storage with this location as a prefix.
834
+ # Corresponds to the JSON property `location`
835
+ # @return [String]
836
+ attr_accessor :location
837
+
838
+ # Path globs used to match files in the build's workspace.
839
+ # Corresponds to the JSON property `paths`
840
+ # @return [Array<String>]
841
+ attr_accessor :paths
842
+
843
+ # Start and end times for a build execution phase.
844
+ # Corresponds to the JSON property `timing`
845
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan]
846
+ attr_accessor :timing
847
+
848
+ def initialize(**args)
849
+ update!(**args)
850
+ end
851
+
852
+ # Update properties of this object
853
+ def update!(**args)
854
+ @location = args[:location] if args.key?(:location)
855
+ @paths = args[:paths] if args.key?(:paths)
856
+ @timing = args[:timing] if args.key?(:timing)
857
+ end
858
+ end
859
+
860
+ # A build resource in the Cloud Build API. At a high level, a `Build` describes
861
+ # where to find source code, how to build it (for example, the builder image to
862
+ # run on the source), and where to store the built artifacts. Fields can include
863
+ # the following variables, which will be expanded when the build is created: - $
864
+ # PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number
865
+ # of the build. - $LOCATION: the location/region of the build. - $BUILD_ID: the
866
+ # autogenerated ID of the build. - $REPO_NAME: the source repository name
867
+ # specified by RepoSource. - $BRANCH_NAME: the branch name specified by
868
+ # RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID
869
+ # or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the
870
+ # specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $
871
+ # COMMIT_SHA.
872
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1Build
873
+ include Google::Apis::Core::Hashable
874
+
875
+ # BuildApproval describes a build's approval configuration, state, and result.
876
+ # Corresponds to the JSON property `approval`
877
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1BuildApproval]
878
+ attr_accessor :approval
879
+
880
+ # Artifacts produced by a build that should be uploaded upon successful
881
+ # completion of all build steps.
882
+ # Corresponds to the JSON property `artifacts`
883
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1Artifacts]
884
+ attr_accessor :artifacts
885
+
886
+ # Secrets and secret environment variables.
887
+ # Corresponds to the JSON property `availableSecrets`
888
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1Secrets]
889
+ attr_accessor :available_secrets
890
+
891
+ # Output only. The ID of the `BuildTrigger` that triggered this build, if it was
892
+ # triggered automatically.
893
+ # Corresponds to the JSON property `buildTriggerId`
894
+ # @return [String]
895
+ attr_accessor :build_trigger_id
896
+
897
+ # Output only. Time at which the request to create the build was received.
898
+ # Corresponds to the JSON property `createTime`
899
+ # @return [String]
900
+ attr_accessor :create_time
901
+
902
+ # A fatal problem encountered during the execution of the build.
903
+ # Corresponds to the JSON property `failureInfo`
904
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1BuildFailureInfo]
905
+ attr_accessor :failure_info
906
+
907
+ # Output only. Time at which execution of the build was finished. The difference
908
+ # between finish_time and start_time is the duration of the build's execution.
909
+ # Corresponds to the JSON property `finishTime`
910
+ # @return [String]
911
+ attr_accessor :finish_time
912
+
913
+ # Output only. Unique identifier of the build.
914
+ # Corresponds to the JSON property `id`
915
+ # @return [String]
916
+ attr_accessor :id
917
+
918
+ # A list of images to be pushed upon the successful completion of all build
919
+ # steps. The images are pushed using the builder service account's credentials.
920
+ # The digests of the pushed images will be stored in the `Build` resource's
921
+ # results field. If any of the images fail to be pushed, the build status is
922
+ # marked `FAILURE`.
923
+ # Corresponds to the JSON property `images`
924
+ # @return [Array<String>]
925
+ attr_accessor :images
926
+
927
+ # Output only. URL to logs for this build in Google Cloud Console.
928
+ # Corresponds to the JSON property `logUrl`
929
+ # @return [String]
930
+ attr_accessor :log_url
931
+
932
+ # Google Cloud Storage bucket where logs should be written (see [Bucket Name
933
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
934
+ # ). Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`.
935
+ # Corresponds to the JSON property `logsBucket`
936
+ # @return [String]
937
+ attr_accessor :logs_bucket
938
+
939
+ # Output only. The 'Build' name with format: `projects/`project`/locations/`
940
+ # location`/builds/`build``, where `build` is a unique identifier generated by
941
+ # the service.
942
+ # Corresponds to the JSON property `name`
943
+ # @return [String]
944
+ attr_accessor :name
945
+
946
+ # Optional arguments to enable specific features of builds.
947
+ # Corresponds to the JSON property `options`
948
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions]
949
+ attr_accessor :options
950
+
951
+ # Output only. ID of the project.
952
+ # Corresponds to the JSON property `projectId`
953
+ # @return [String]
954
+ attr_accessor :project_id
955
+
956
+ # TTL in queue for this build. If provided and the build is enqueued longer than
957
+ # this value, the build will expire and the build status will be `EXPIRED`. The
958
+ # TTL starts ticking from create_time.
959
+ # Corresponds to the JSON property `queueTtl`
960
+ # @return [String]
961
+ attr_accessor :queue_ttl
962
+
963
+ # Artifacts created by the build pipeline.
964
+ # Corresponds to the JSON property `results`
965
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1Results]
966
+ attr_accessor :results
967
+
968
+ # Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is
969
+ # the recommended technique for managing sensitive data with Cloud Build. Use `
970
+ # available_secrets` to configure builds to access secrets from Secret Manager.
971
+ # For instructions, see: https://cloud.google.com/cloud-build/docs/securing-
972
+ # builds/use-secrets
973
+ # Corresponds to the JSON property `secrets`
974
+ # @return [Array<Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1Secret>]
975
+ attr_accessor :secrets
976
+
977
+ # IAM service account whose credentials will be used at build runtime. Must be
978
+ # of the format `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. ACCOUNT can
979
+ # be email address or uniqueId of the service account.
980
+ # Corresponds to the JSON property `serviceAccount`
981
+ # @return [String]
982
+ attr_accessor :service_account
983
+
984
+ # Location of the source in a supported storage service.
985
+ # Corresponds to the JSON property `source`
986
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1Source]
987
+ attr_accessor :source
988
+
989
+ # Provenance of the source. Ways to find the original source, or verify that
990
+ # some source was used for this build.
991
+ # Corresponds to the JSON property `sourceProvenance`
992
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1SourceProvenance]
993
+ attr_accessor :source_provenance
994
+
995
+ # Output only. Time at which execution of the build was started.
996
+ # Corresponds to the JSON property `startTime`
997
+ # @return [String]
998
+ attr_accessor :start_time
999
+
1000
+ # Output only. Status of the build.
1001
+ # Corresponds to the JSON property `status`
1002
+ # @return [String]
1003
+ attr_accessor :status
1004
+
1005
+ # Output only. Customer-readable message about the current status.
1006
+ # Corresponds to the JSON property `statusDetail`
1007
+ # @return [String]
1008
+ attr_accessor :status_detail
1009
+
1010
+ # Required. The operations to be performed on the workspace.
1011
+ # Corresponds to the JSON property `steps`
1012
+ # @return [Array<Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep>]
1013
+ attr_accessor :steps
1014
+
1015
+ # Substitutions data for `Build` resource.
1016
+ # Corresponds to the JSON property `substitutions`
1017
+ # @return [Hash<String,String>]
1018
+ attr_accessor :substitutions
1019
+
1020
+ # Tags for annotation of a `Build`. These are not docker tags.
1021
+ # Corresponds to the JSON property `tags`
1022
+ # @return [Array<String>]
1023
+ attr_accessor :tags
1024
+
1025
+ # Amount of time that this build should be allowed to run, to second granularity.
1026
+ # If this amount of time elapses, work on the build will cease and the build
1027
+ # status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default
1028
+ # time is ten minutes.
1029
+ # Corresponds to the JSON property `timeout`
1030
+ # @return [String]
1031
+ attr_accessor :timeout
1032
+
1033
+ # Output only. Stores timing information for phases of the build. Valid keys are:
1034
+ # * BUILD: time to execute all build steps. * PUSH: time to push all specified
1035
+ # images. * FETCHSOURCE: time to fetch source. * SETUPBUILD: time to set up
1036
+ # build. If the build does not specify source or images, these keys will not be
1037
+ # included.
1038
+ # Corresponds to the JSON property `timing`
1039
+ # @return [Hash<String,Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan>]
1040
+ attr_accessor :timing
1041
+
1042
+ # Output only. Non-fatal problems encountered during the execution of the build.
1043
+ # Corresponds to the JSON property `warnings`
1044
+ # @return [Array<Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning>]
1045
+ attr_accessor :warnings
1046
+
1047
+ def initialize(**args)
1048
+ update!(**args)
1049
+ end
1050
+
1051
+ # Update properties of this object
1052
+ def update!(**args)
1053
+ @approval = args[:approval] if args.key?(:approval)
1054
+ @artifacts = args[:artifacts] if args.key?(:artifacts)
1055
+ @available_secrets = args[:available_secrets] if args.key?(:available_secrets)
1056
+ @build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id)
1057
+ @create_time = args[:create_time] if args.key?(:create_time)
1058
+ @failure_info = args[:failure_info] if args.key?(:failure_info)
1059
+ @finish_time = args[:finish_time] if args.key?(:finish_time)
1060
+ @id = args[:id] if args.key?(:id)
1061
+ @images = args[:images] if args.key?(:images)
1062
+ @log_url = args[:log_url] if args.key?(:log_url)
1063
+ @logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket)
1064
+ @name = args[:name] if args.key?(:name)
1065
+ @options = args[:options] if args.key?(:options)
1066
+ @project_id = args[:project_id] if args.key?(:project_id)
1067
+ @queue_ttl = args[:queue_ttl] if args.key?(:queue_ttl)
1068
+ @results = args[:results] if args.key?(:results)
1069
+ @secrets = args[:secrets] if args.key?(:secrets)
1070
+ @service_account = args[:service_account] if args.key?(:service_account)
1071
+ @source = args[:source] if args.key?(:source)
1072
+ @source_provenance = args[:source_provenance] if args.key?(:source_provenance)
1073
+ @start_time = args[:start_time] if args.key?(:start_time)
1074
+ @status = args[:status] if args.key?(:status)
1075
+ @status_detail = args[:status_detail] if args.key?(:status_detail)
1076
+ @steps = args[:steps] if args.key?(:steps)
1077
+ @substitutions = args[:substitutions] if args.key?(:substitutions)
1078
+ @tags = args[:tags] if args.key?(:tags)
1079
+ @timeout = args[:timeout] if args.key?(:timeout)
1080
+ @timing = args[:timing] if args.key?(:timing)
1081
+ @warnings = args[:warnings] if args.key?(:warnings)
1082
+ end
1083
+ end
1084
+
1085
+ # BuildApproval describes a build's approval configuration, state, and result.
1086
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1BuildApproval
1087
+ include Google::Apis::Core::Hashable
1088
+
1089
+ # ApprovalConfig describes configuration for manual approval of a build.
1090
+ # Corresponds to the JSON property `config`
1091
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalConfig]
1092
+ attr_accessor :config
1093
+
1094
+ # ApprovalResult describes the decision and associated metadata of a manual
1095
+ # approval of a build.
1096
+ # Corresponds to the JSON property `result`
1097
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1ApprovalResult]
1098
+ attr_accessor :result
1099
+
1100
+ # Output only. The state of this build's approval.
1101
+ # Corresponds to the JSON property `state`
1102
+ # @return [String]
1103
+ attr_accessor :state
1104
+
1105
+ def initialize(**args)
1106
+ update!(**args)
1107
+ end
1108
+
1109
+ # Update properties of this object
1110
+ def update!(**args)
1111
+ @config = args[:config] if args.key?(:config)
1112
+ @result = args[:result] if args.key?(:result)
1113
+ @state = args[:state] if args.key?(:state)
1114
+ end
1115
+ end
1116
+
1117
+ # A fatal problem encountered during the execution of the build.
1118
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1BuildFailureInfo
1119
+ include Google::Apis::Core::Hashable
1120
+
1121
+ # Explains the failure issue in more detail using hard-coded text.
1122
+ # Corresponds to the JSON property `detail`
1123
+ # @return [String]
1124
+ attr_accessor :detail
1125
+
1126
+ # The name of the failure.
1127
+ # Corresponds to the JSON property `type`
1128
+ # @return [String]
1129
+ attr_accessor :type
1130
+
1131
+ def initialize(**args)
1132
+ update!(**args)
1133
+ end
1134
+
1135
+ # Update properties of this object
1136
+ def update!(**args)
1137
+ @detail = args[:detail] if args.key?(:detail)
1138
+ @type = args[:type] if args.key?(:type)
1139
+ end
1140
+ end
1141
+
1142
+ # Optional arguments to enable specific features of builds.
1143
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions
1144
+ include Google::Apis::Core::Hashable
1145
+
1146
+ # Requested disk size for the VM that runs the build. Note that this is *NOT* "
1147
+ # disk free"; some of the space will be used by the operating system and build
1148
+ # utilities. Also note that this is the minimum disk size that will be allocated
1149
+ # for the build -- the build may run with a larger disk than requested. At
1150
+ # present, the maximum disk size is 1000GB; builds that request more than the
1151
+ # maximum are rejected with an error.
1152
+ # Corresponds to the JSON property `diskSizeGb`
1153
+ # @return [Fixnum]
1154
+ attr_accessor :disk_size_gb
1155
+
1156
+ # Option to specify whether or not to apply bash style string operations to the
1157
+ # substitutions. NOTE: this is always enabled for triggered builds and cannot be
1158
+ # overridden in the build configuration file.
1159
+ # Corresponds to the JSON property `dynamicSubstitutions`
1160
+ # @return [Boolean]
1161
+ attr_accessor :dynamic_substitutions
1162
+ alias_method :dynamic_substitutions?, :dynamic_substitutions
1163
+
1164
+ # A list of global environment variable definitions that will exist for all
1165
+ # build steps in this build. If a variable is defined in both globally and in a
1166
+ # build step, the variable will use the build step value. The elements are of
1167
+ # the form "KEY=VALUE" for the environment variable "KEY" being given the value "
1168
+ # VALUE".
1169
+ # Corresponds to the JSON property `env`
1170
+ # @return [Array<String>]
1171
+ attr_accessor :env
1172
+
1173
+ # Option to define build log streaming behavior to Google Cloud Storage.
1174
+ # Corresponds to the JSON property `logStreamingOption`
1175
+ # @return [String]
1176
+ attr_accessor :log_streaming_option
1177
+
1178
+ # Option to specify the logging mode, which determines if and where build logs
1179
+ # are stored.
1180
+ # Corresponds to the JSON property `logging`
1181
+ # @return [String]
1182
+ attr_accessor :logging
1183
+
1184
+ # Compute Engine machine type on which to run the build.
1185
+ # Corresponds to the JSON property `machineType`
1186
+ # @return [String]
1187
+ attr_accessor :machine_type
1188
+
1189
+ # Details about how a build should be executed on a `WorkerPool`. See [running
1190
+ # builds in a private pool](https://cloud.google.com/build/docs/private-pools/
1191
+ # run-builds-in-private-pool) for more information.
1192
+ # Corresponds to the JSON property `pool`
1193
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption]
1194
+ attr_accessor :pool
1195
+
1196
+ # Requested verifiability options.
1197
+ # Corresponds to the JSON property `requestedVerifyOption`
1198
+ # @return [String]
1199
+ attr_accessor :requested_verify_option
1200
+
1201
+ # A list of global environment variables, which are encrypted using a Cloud Key
1202
+ # Management Service crypto key. These values must be specified in the build's `
1203
+ # Secret`. These variables will be available to all build steps in this build.
1204
+ # Corresponds to the JSON property `secretEnv`
1205
+ # @return [Array<String>]
1206
+ attr_accessor :secret_env
1207
+
1208
+ # Requested hash for SourceProvenance.
1209
+ # Corresponds to the JSON property `sourceProvenanceHash`
1210
+ # @return [Array<String>]
1211
+ attr_accessor :source_provenance_hash
1212
+
1213
+ # Option to specify behavior when there is an error in the substitution checks.
1214
+ # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be
1215
+ # overridden in the build configuration file.
1216
+ # Corresponds to the JSON property `substitutionOption`
1217
+ # @return [String]
1218
+ attr_accessor :substitution_option
1219
+
1220
+ # Global list of volumes to mount for ALL build steps Each volume is created as
1221
+ # an empty volume prior to starting the build process. Upon completion of the
1222
+ # build, volumes and their contents are discarded. Global volume names and paths
1223
+ # cannot conflict with the volumes defined a build step. Using a global volume
1224
+ # in a build with only one step is not valid as it is indicative of a build
1225
+ # request with an incorrect configuration.
1226
+ # Corresponds to the JSON property `volumes`
1227
+ # @return [Array<Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1Volume>]
1228
+ attr_accessor :volumes
1229
+
1230
+ # This field deprecated; please use `pool.name` instead.
1231
+ # Corresponds to the JSON property `workerPool`
1232
+ # @return [String]
1233
+ attr_accessor :worker_pool
1234
+
1235
+ def initialize(**args)
1236
+ update!(**args)
1237
+ end
1238
+
1239
+ # Update properties of this object
1240
+ def update!(**args)
1241
+ @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
1242
+ @dynamic_substitutions = args[:dynamic_substitutions] if args.key?(:dynamic_substitutions)
1243
+ @env = args[:env] if args.key?(:env)
1244
+ @log_streaming_option = args[:log_streaming_option] if args.key?(:log_streaming_option)
1245
+ @logging = args[:logging] if args.key?(:logging)
1246
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
1247
+ @pool = args[:pool] if args.key?(:pool)
1248
+ @requested_verify_option = args[:requested_verify_option] if args.key?(:requested_verify_option)
1249
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
1250
+ @source_provenance_hash = args[:source_provenance_hash] if args.key?(:source_provenance_hash)
1251
+ @substitution_option = args[:substitution_option] if args.key?(:substitution_option)
1252
+ @volumes = args[:volumes] if args.key?(:volumes)
1253
+ @worker_pool = args[:worker_pool] if args.key?(:worker_pool)
1254
+ end
1255
+ end
1256
+
1257
+ # Details about how a build should be executed on a `WorkerPool`. See [running
1258
+ # builds in a private pool](https://cloud.google.com/build/docs/private-pools/
1259
+ # run-builds-in-private-pool) for more information.
1260
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptionsPoolOption
1261
+ include Google::Apis::Core::Hashable
1262
+
1263
+ # The `WorkerPool` resource to execute the build on. You must have `cloudbuild.
1264
+ # workerpools.use` on the project hosting the WorkerPool. Format projects/`
1265
+ # project`/locations/`location`/workerPools/`workerPoolId`
1266
+ # Corresponds to the JSON property `name`
1267
+ # @return [String]
1268
+ attr_accessor :name
1269
+
1270
+ def initialize(**args)
1271
+ update!(**args)
1272
+ end
1273
+
1274
+ # Update properties of this object
1275
+ def update!(**args)
1276
+ @name = args[:name] if args.key?(:name)
1277
+ end
1278
+ end
1279
+
540
1280
  # A step in the build pipeline.
541
- class BuildStep
1281
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1BuildStep
542
1282
  include Google::Apis::Core::Hashable
543
1283
 
544
1284
  # A list of arguments that will be presented to the step when it is started. If
@@ -597,7 +1337,7 @@ module Google
597
1337
 
598
1338
  # Start and end times for a build execution phase.
599
1339
  # Corresponds to the JSON property `pullTiming`
600
- # @return [Google::Apis::ContaineranalysisV1beta1::TimeSpan]
1340
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan]
601
1341
  attr_accessor :pull_timing
602
1342
 
603
1343
  # A shell script to be executed in the step. When script is provided, the user
@@ -629,25 +1369,351 @@ module Google
629
1369
 
630
1370
  # Start and end times for a build execution phase.
631
1371
  # Corresponds to the JSON property `timing`
632
- # @return [Google::Apis::ContaineranalysisV1beta1::TimeSpan]
1372
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan]
633
1373
  attr_accessor :timing
634
1374
 
635
- # List of volumes to mount into the build step. Each volume is created as an
636
- # empty volume prior to execution of the build step. Upon completion of the
637
- # build, volumes and their contents are discarded. Using a named volume in only
638
- # one step is not valid as it is indicative of a build request with an incorrect
639
- # configuration.
640
- # Corresponds to the JSON property `volumes`
641
- # @return [Array<Google::Apis::ContaineranalysisV1beta1::Volume>]
642
- attr_accessor :volumes
1375
+ # List of volumes to mount into the build step. Each volume is created as an
1376
+ # empty volume prior to execution of the build step. Upon completion of the
1377
+ # build, volumes and their contents are discarded. Using a named volume in only
1378
+ # one step is not valid as it is indicative of a build request with an incorrect
1379
+ # configuration.
1380
+ # Corresponds to the JSON property `volumes`
1381
+ # @return [Array<Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1Volume>]
1382
+ attr_accessor :volumes
1383
+
1384
+ # The ID(s) of the step(s) that this build step depends on. This build step will
1385
+ # not start until all the build steps in `wait_for` have completed successfully.
1386
+ # If `wait_for` is empty, this build step will start when all previous build
1387
+ # steps in the `Build.Steps` list have completed successfully.
1388
+ # Corresponds to the JSON property `waitFor`
1389
+ # @return [Array<String>]
1390
+ attr_accessor :wait_for
1391
+
1392
+ def initialize(**args)
1393
+ update!(**args)
1394
+ end
1395
+
1396
+ # Update properties of this object
1397
+ def update!(**args)
1398
+ @args = args[:args] if args.key?(:args)
1399
+ @dir = args[:dir] if args.key?(:dir)
1400
+ @entrypoint = args[:entrypoint] if args.key?(:entrypoint)
1401
+ @env = args[:env] if args.key?(:env)
1402
+ @id = args[:id] if args.key?(:id)
1403
+ @name = args[:name] if args.key?(:name)
1404
+ @pull_timing = args[:pull_timing] if args.key?(:pull_timing)
1405
+ @script = args[:script] if args.key?(:script)
1406
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
1407
+ @status = args[:status] if args.key?(:status)
1408
+ @timeout = args[:timeout] if args.key?(:timeout)
1409
+ @timing = args[:timing] if args.key?(:timing)
1410
+ @volumes = args[:volumes] if args.key?(:volumes)
1411
+ @wait_for = args[:wait_for] if args.key?(:wait_for)
1412
+ end
1413
+ end
1414
+
1415
+ # A non-fatal problem encountered during the execution of the build.
1416
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1BuildWarning
1417
+ include Google::Apis::Core::Hashable
1418
+
1419
+ # The priority for this warning.
1420
+ # Corresponds to the JSON property `priority`
1421
+ # @return [String]
1422
+ attr_accessor :priority
1423
+
1424
+ # Explanation of the warning generated.
1425
+ # Corresponds to the JSON property `text`
1426
+ # @return [String]
1427
+ attr_accessor :text
1428
+
1429
+ def initialize(**args)
1430
+ update!(**args)
1431
+ end
1432
+
1433
+ # Update properties of this object
1434
+ def update!(**args)
1435
+ @priority = args[:priority] if args.key?(:priority)
1436
+ @text = args[:text] if args.key?(:text)
1437
+ end
1438
+ end
1439
+
1440
+ # An image built by the pipeline.
1441
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage
1442
+ include Google::Apis::Core::Hashable
1443
+
1444
+ # Docker Registry 2.0 digest.
1445
+ # Corresponds to the JSON property `digest`
1446
+ # @return [String]
1447
+ attr_accessor :digest
1448
+
1449
+ # Name used to push the container image to Google Container Registry, as
1450
+ # presented to `docker push`.
1451
+ # Corresponds to the JSON property `name`
1452
+ # @return [String]
1453
+ attr_accessor :name
1454
+
1455
+ # Start and end times for a build execution phase.
1456
+ # Corresponds to the JSON property `pushTiming`
1457
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan]
1458
+ attr_accessor :push_timing
1459
+
1460
+ def initialize(**args)
1461
+ update!(**args)
1462
+ end
1463
+
1464
+ # Update properties of this object
1465
+ def update!(**args)
1466
+ @digest = args[:digest] if args.key?(:digest)
1467
+ @name = args[:name] if args.key?(:name)
1468
+ @push_timing = args[:push_timing] if args.key?(:push_timing)
1469
+ end
1470
+ end
1471
+
1472
+ # Container message for hashes of byte content of files, used in
1473
+ # SourceProvenance messages to verify integrity of source input to the build.
1474
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes
1475
+ include Google::Apis::Core::Hashable
1476
+
1477
+ # Collection of file hashes.
1478
+ # Corresponds to the JSON property `fileHash`
1479
+ # @return [Array<Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1Hash>]
1480
+ attr_accessor :file_hash
1481
+
1482
+ def initialize(**args)
1483
+ update!(**args)
1484
+ end
1485
+
1486
+ # Update properties of this object
1487
+ def update!(**args)
1488
+ @file_hash = args[:file_hash] if args.key?(:file_hash)
1489
+ end
1490
+ end
1491
+
1492
+ # Container message for hash values.
1493
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1Hash
1494
+ include Google::Apis::Core::Hashable
1495
+
1496
+ # The type of hash that was performed.
1497
+ # Corresponds to the JSON property `type`
1498
+ # @return [String]
1499
+ attr_accessor :type
1500
+
1501
+ # The hash value.
1502
+ # Corresponds to the JSON property `value`
1503
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1504
+ # @return [String]
1505
+ attr_accessor :value
1506
+
1507
+ def initialize(**args)
1508
+ update!(**args)
1509
+ end
1510
+
1511
+ # Update properties of this object
1512
+ def update!(**args)
1513
+ @type = args[:type] if args.key?(:type)
1514
+ @value = args[:value] if args.key?(:value)
1515
+ end
1516
+ end
1517
+
1518
+ # Pairs a set of secret environment variables mapped to encrypted values with
1519
+ # the Cloud KMS key to use to decrypt the value.
1520
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1InlineSecret
1521
+ include Google::Apis::Core::Hashable
1522
+
1523
+ # Map of environment variable name to its encrypted value. Secret environment
1524
+ # variables must be unique across all of a build's secrets, and must be used by
1525
+ # at least one build step. Values can be at most 64 KB in size. There can be at
1526
+ # most 100 secret values across all of a build's secrets.
1527
+ # Corresponds to the JSON property `envMap`
1528
+ # @return [Hash<String,String>]
1529
+ attr_accessor :env_map
1530
+
1531
+ # Resource name of Cloud KMS crypto key to decrypt the encrypted value. In
1532
+ # format: projects/*/locations/*/keyRings/*/cryptoKeys/*
1533
+ # Corresponds to the JSON property `kmsKeyName`
1534
+ # @return [String]
1535
+ attr_accessor :kms_key_name
1536
+
1537
+ def initialize(**args)
1538
+ update!(**args)
1539
+ end
1540
+
1541
+ # Update properties of this object
1542
+ def update!(**args)
1543
+ @env_map = args[:env_map] if args.key?(:env_map)
1544
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
1545
+ end
1546
+ end
1547
+
1548
+ # Location of the source in a Google Cloud Source Repository.
1549
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource
1550
+ include Google::Apis::Core::Hashable
1551
+
1552
+ # Regex matching branches to build. The syntax of the regular expressions
1553
+ # accepted is the syntax accepted by RE2 and described at https://github.com/
1554
+ # google/re2/wiki/Syntax
1555
+ # Corresponds to the JSON property `branchName`
1556
+ # @return [String]
1557
+ attr_accessor :branch_name
1558
+
1559
+ # Explicit commit SHA to build.
1560
+ # Corresponds to the JSON property `commitSha`
1561
+ # @return [String]
1562
+ attr_accessor :commit_sha
1563
+
1564
+ # Directory, relative to the source root, in which to run the build. This must
1565
+ # be a relative path. If a step's `dir` is specified and is an absolute path,
1566
+ # this value is ignored for that step's execution.
1567
+ # Corresponds to the JSON property `dir`
1568
+ # @return [String]
1569
+ attr_accessor :dir
1570
+
1571
+ # Only trigger a build if the revision regex does NOT match the revision regex.
1572
+ # Corresponds to the JSON property `invertRegex`
1573
+ # @return [Boolean]
1574
+ attr_accessor :invert_regex
1575
+ alias_method :invert_regex?, :invert_regex
1576
+
1577
+ # ID of the project that owns the Cloud Source Repository. If omitted, the
1578
+ # project ID requesting the build is assumed.
1579
+ # Corresponds to the JSON property `projectId`
1580
+ # @return [String]
1581
+ attr_accessor :project_id
1582
+
1583
+ # Name of the Cloud Source Repository.
1584
+ # Corresponds to the JSON property `repoName`
1585
+ # @return [String]
1586
+ attr_accessor :repo_name
1587
+
1588
+ # Substitutions to use in a triggered build. Should only be used with
1589
+ # RunBuildTrigger
1590
+ # Corresponds to the JSON property `substitutions`
1591
+ # @return [Hash<String,String>]
1592
+ attr_accessor :substitutions
1593
+
1594
+ # Regex matching tags to build. The syntax of the regular expressions accepted
1595
+ # is the syntax accepted by RE2 and described at https://github.com/google/re2/
1596
+ # wiki/Syntax
1597
+ # Corresponds to the JSON property `tagName`
1598
+ # @return [String]
1599
+ attr_accessor :tag_name
1600
+
1601
+ def initialize(**args)
1602
+ update!(**args)
1603
+ end
1604
+
1605
+ # Update properties of this object
1606
+ def update!(**args)
1607
+ @branch_name = args[:branch_name] if args.key?(:branch_name)
1608
+ @commit_sha = args[:commit_sha] if args.key?(:commit_sha)
1609
+ @dir = args[:dir] if args.key?(:dir)
1610
+ @invert_regex = args[:invert_regex] if args.key?(:invert_regex)
1611
+ @project_id = args[:project_id] if args.key?(:project_id)
1612
+ @repo_name = args[:repo_name] if args.key?(:repo_name)
1613
+ @substitutions = args[:substitutions] if args.key?(:substitutions)
1614
+ @tag_name = args[:tag_name] if args.key?(:tag_name)
1615
+ end
1616
+ end
1617
+
1618
+ # Artifacts created by the build pipeline.
1619
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1Results
1620
+ include Google::Apis::Core::Hashable
1621
+
1622
+ # Path to the artifact manifest. Only populated when artifacts are uploaded.
1623
+ # Corresponds to the JSON property `artifactManifest`
1624
+ # @return [String]
1625
+ attr_accessor :artifact_manifest
1626
+
1627
+ # Start and end times for a build execution phase.
1628
+ # Corresponds to the JSON property `artifactTiming`
1629
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan]
1630
+ attr_accessor :artifact_timing
1631
+
1632
+ # List of build step digests, in the order corresponding to build step indices.
1633
+ # Corresponds to the JSON property `buildStepImages`
1634
+ # @return [Array<String>]
1635
+ attr_accessor :build_step_images
1636
+
1637
+ # List of build step outputs, produced by builder images, in the order
1638
+ # corresponding to build step indices. [Cloud Builders](https://cloud.google.com/
1639
+ # cloud-build/docs/cloud-builders) can produce this output by writing to `$
1640
+ # BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
1641
+ # Corresponds to the JSON property `buildStepOutputs`
1642
+ # @return [Array<String>]
1643
+ attr_accessor :build_step_outputs
1644
+
1645
+ # Container images that were built as a part of the build.
1646
+ # Corresponds to the JSON property `images`
1647
+ # @return [Array<Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1BuiltImage>]
1648
+ attr_accessor :images
1649
+
1650
+ # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1651
+ # Corresponds to the JSON property `numArtifacts`
1652
+ # @return [Fixnum]
1653
+ attr_accessor :num_artifacts
1654
+
1655
+ def initialize(**args)
1656
+ update!(**args)
1657
+ end
1658
+
1659
+ # Update properties of this object
1660
+ def update!(**args)
1661
+ @artifact_manifest = args[:artifact_manifest] if args.key?(:artifact_manifest)
1662
+ @artifact_timing = args[:artifact_timing] if args.key?(:artifact_timing)
1663
+ @build_step_images = args[:build_step_images] if args.key?(:build_step_images)
1664
+ @build_step_outputs = args[:build_step_outputs] if args.key?(:build_step_outputs)
1665
+ @images = args[:images] if args.key?(:images)
1666
+ @num_artifacts = args[:num_artifacts] if args.key?(:num_artifacts)
1667
+ end
1668
+ end
1669
+
1670
+ # Pairs a set of secret environment variables containing encrypted values with
1671
+ # the Cloud KMS key to use to decrypt the value. Note: Use `kmsKeyName` with `
1672
+ # available_secrets` instead of using `kmsKeyName` with `secret`. For
1673
+ # instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/
1674
+ # use-encrypted-credentials.
1675
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1Secret
1676
+ include Google::Apis::Core::Hashable
1677
+
1678
+ # Cloud KMS key name to use to decrypt these envs.
1679
+ # Corresponds to the JSON property `kmsKeyName`
1680
+ # @return [String]
1681
+ attr_accessor :kms_key_name
1682
+
1683
+ # Map of environment variable name to its encrypted value. Secret environment
1684
+ # variables must be unique across all of a build's secrets, and must be used by
1685
+ # at least one build step. Values can be at most 64 KB in size. There can be at
1686
+ # most 100 secret values across all of a build's secrets.
1687
+ # Corresponds to the JSON property `secretEnv`
1688
+ # @return [Hash<String,String>]
1689
+ attr_accessor :secret_env
1690
+
1691
+ def initialize(**args)
1692
+ update!(**args)
1693
+ end
1694
+
1695
+ # Update properties of this object
1696
+ def update!(**args)
1697
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
1698
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
1699
+ end
1700
+ end
1701
+
1702
+ # Pairs a secret environment variable with a SecretVersion in Secret Manager.
1703
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1SecretManagerSecret
1704
+ include Google::Apis::Core::Hashable
1705
+
1706
+ # Environment variable name to associate with the secret. Secret environment
1707
+ # variables must be unique across all of a build's secrets, and must be used by
1708
+ # at least one build step.
1709
+ # Corresponds to the JSON property `env`
1710
+ # @return [String]
1711
+ attr_accessor :env
643
1712
 
644
- # The ID(s) of the step(s) that this build step depends on. This build step will
645
- # not start until all the build steps in `wait_for` have completed successfully.
646
- # If `wait_for` is empty, this build step will start when all previous build
647
- # steps in the `Build.Steps` list have completed successfully.
648
- # Corresponds to the JSON property `waitFor`
649
- # @return [Array<String>]
650
- attr_accessor :wait_for
1713
+ # Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*
1714
+ # Corresponds to the JSON property `versionName`
1715
+ # @return [String]
1716
+ attr_accessor :version_name
651
1717
 
652
1718
  def initialize(**args)
653
1719
  update!(**args)
@@ -655,32 +1721,24 @@ module Google
655
1721
 
656
1722
  # Update properties of this object
657
1723
  def update!(**args)
658
- @args = args[:args] if args.key?(:args)
659
- @dir = args[:dir] if args.key?(:dir)
660
- @entrypoint = args[:entrypoint] if args.key?(:entrypoint)
661
1724
  @env = args[:env] if args.key?(:env)
662
- @id = args[:id] if args.key?(:id)
663
- @name = args[:name] if args.key?(:name)
664
- @pull_timing = args[:pull_timing] if args.key?(:pull_timing)
665
- @script = args[:script] if args.key?(:script)
666
- @secret_env = args[:secret_env] if args.key?(:secret_env)
667
- @status = args[:status] if args.key?(:status)
668
- @timeout = args[:timeout] if args.key?(:timeout)
669
- @timing = args[:timing] if args.key?(:timing)
670
- @volumes = args[:volumes] if args.key?(:volumes)
671
- @wait_for = args[:wait_for] if args.key?(:wait_for)
1725
+ @version_name = args[:version_name] if args.key?(:version_name)
672
1726
  end
673
1727
  end
674
1728
 
675
- # Defines an object for the byproducts field in in-toto links. The suggested
676
- # fields are "stderr", "stdout", and "return-value".
677
- class ByProducts
1729
+ # Secrets and secret environment variables.
1730
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1Secrets
678
1731
  include Google::Apis::Core::Hashable
679
1732
 
680
- #
681
- # Corresponds to the JSON property `customValues`
682
- # @return [Hash<String,String>]
683
- attr_accessor :custom_values
1733
+ # Secrets encrypted with KMS key and the associated secret environment variable.
1734
+ # Corresponds to the JSON property `inline`
1735
+ # @return [Array<Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1InlineSecret>]
1736
+ attr_accessor :inline
1737
+
1738
+ # Secrets in Secret Manager and associated secret environment variable.
1739
+ # Corresponds to the JSON property `secretManager`
1740
+ # @return [Array<Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1SecretManagerSecret>]
1741
+ attr_accessor :secret_manager
684
1742
 
685
1743
  def initialize(**args)
686
1744
  update!(**args)
@@ -688,70 +1746,112 @@ module Google
688
1746
 
689
1747
  # Update properties of this object
690
1748
  def update!(**args)
691
- @custom_values = args[:custom_values] if args.key?(:custom_values)
1749
+ @inline = args[:inline] if args.key?(:inline)
1750
+ @secret_manager = args[:secret_manager] if args.key?(:secret_manager)
692
1751
  end
693
1752
  end
694
1753
 
695
- # Common Vulnerability Scoring System version 3. For details, see https://www.
696
- # first.org/cvss/specification-document
697
- class CvsSv3
1754
+ # Location of the source in a supported storage service.
1755
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1Source
698
1756
  include Google::Apis::Core::Hashable
699
1757
 
700
- #
701
- # Corresponds to the JSON property `attackComplexity`
702
- # @return [String]
703
- attr_accessor :attack_complexity
1758
+ # Location of the source in a Google Cloud Source Repository.
1759
+ # Corresponds to the JSON property `repoSource`
1760
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource]
1761
+ attr_accessor :repo_source
704
1762
 
705
- # Base Metrics Represents the intrinsic characteristics of a vulnerability that
706
- # are constant over time and across user environments.
707
- # Corresponds to the JSON property `attackVector`
708
- # @return [String]
709
- attr_accessor :attack_vector
1763
+ # Location of the source in an archive file in Google Cloud Storage.
1764
+ # Corresponds to the JSON property `storageSource`
1765
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource]
1766
+ attr_accessor :storage_source
710
1767
 
711
- #
712
- # Corresponds to the JSON property `availabilityImpact`
713
- # @return [String]
714
- attr_accessor :availability_impact
1768
+ # Location of the source manifest in Google Cloud Storage. This feature is in
1769
+ # Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-
1770
+ # builders/tree/master/gcs-fetcher).
1771
+ # Corresponds to the JSON property `storageSourceManifest`
1772
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest]
1773
+ attr_accessor :storage_source_manifest
715
1774
 
716
- # The base score is a function of the base metric scores.
717
- # Corresponds to the JSON property `baseScore`
718
- # @return [Float]
719
- attr_accessor :base_score
1775
+ def initialize(**args)
1776
+ update!(**args)
1777
+ end
720
1778
 
721
- #
722
- # Corresponds to the JSON property `confidentialityImpact`
723
- # @return [String]
724
- attr_accessor :confidentiality_impact
1779
+ # Update properties of this object
1780
+ def update!(**args)
1781
+ @repo_source = args[:repo_source] if args.key?(:repo_source)
1782
+ @storage_source = args[:storage_source] if args.key?(:storage_source)
1783
+ @storage_source_manifest = args[:storage_source_manifest] if args.key?(:storage_source_manifest)
1784
+ end
1785
+ end
725
1786
 
726
- #
727
- # Corresponds to the JSON property `exploitabilityScore`
728
- # @return [Float]
729
- attr_accessor :exploitability_score
1787
+ # Provenance of the source. Ways to find the original source, or verify that
1788
+ # some source was used for this build.
1789
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1SourceProvenance
1790
+ include Google::Apis::Core::Hashable
730
1791
 
731
- #
732
- # Corresponds to the JSON property `impactScore`
733
- # @return [Float]
734
- attr_accessor :impact_score
1792
+ # Output only. Hash(es) of the build source, which can be used to verify that
1793
+ # the original source integrity was maintained in the build. Note that `
1794
+ # FileHashes` will only be populated if `BuildOptions` has requested a `
1795
+ # SourceProvenanceHash`. The keys to this map are file paths used as build
1796
+ # source and the values contain the hash values for those files. If the build
1797
+ # source came in a single package such as a gzipped tarfile (`.tar.gz`), the `
1798
+ # FileHash` will be for the single path to that file.
1799
+ # Corresponds to the JSON property `fileHashes`
1800
+ # @return [Hash<String,Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1FileHashes>]
1801
+ attr_accessor :file_hashes
735
1802
 
736
- #
737
- # Corresponds to the JSON property `integrityImpact`
738
- # @return [String]
739
- attr_accessor :integrity_impact
1803
+ # Location of the source in a Google Cloud Source Repository.
1804
+ # Corresponds to the JSON property `resolvedRepoSource`
1805
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1RepoSource]
1806
+ attr_accessor :resolved_repo_source
740
1807
 
741
- #
742
- # Corresponds to the JSON property `privilegesRequired`
743
- # @return [String]
744
- attr_accessor :privileges_required
1808
+ # Location of the source in an archive file in Google Cloud Storage.
1809
+ # Corresponds to the JSON property `resolvedStorageSource`
1810
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource]
1811
+ attr_accessor :resolved_storage_source
745
1812
 
746
- #
747
- # Corresponds to the JSON property `scope`
1813
+ # Location of the source manifest in Google Cloud Storage. This feature is in
1814
+ # Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-
1815
+ # builders/tree/master/gcs-fetcher).
1816
+ # Corresponds to the JSON property `resolvedStorageSourceManifest`
1817
+ # @return [Google::Apis::ContaineranalysisV1beta1::ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest]
1818
+ attr_accessor :resolved_storage_source_manifest
1819
+
1820
+ def initialize(**args)
1821
+ update!(**args)
1822
+ end
1823
+
1824
+ # Update properties of this object
1825
+ def update!(**args)
1826
+ @file_hashes = args[:file_hashes] if args.key?(:file_hashes)
1827
+ @resolved_repo_source = args[:resolved_repo_source] if args.key?(:resolved_repo_source)
1828
+ @resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source)
1829
+ @resolved_storage_source_manifest = args[:resolved_storage_source_manifest] if args.key?(:resolved_storage_source_manifest)
1830
+ end
1831
+ end
1832
+
1833
+ # Location of the source in an archive file in Google Cloud Storage.
1834
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSource
1835
+ include Google::Apis::Core::Hashable
1836
+
1837
+ # Google Cloud Storage bucket containing the source (see [Bucket Name
1838
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
1839
+ # ).
1840
+ # Corresponds to the JSON property `bucket`
748
1841
  # @return [String]
749
- attr_accessor :scope
1842
+ attr_accessor :bucket
750
1843
 
751
- #
752
- # Corresponds to the JSON property `userInteraction`
1844
+ # Google Cloud Storage generation for the object. If the generation is omitted,
1845
+ # the latest generation will be used.
1846
+ # Corresponds to the JSON property `generation`
1847
+ # @return [Fixnum]
1848
+ attr_accessor :generation
1849
+
1850
+ # Google Cloud Storage object containing the source. This object must be a
1851
+ # zipped (`.zip`) or gzipped archive file (`.tar.gz`) containing source to build.
1852
+ # Corresponds to the JSON property `object`
753
1853
  # @return [String]
754
- attr_accessor :user_interaction
1854
+ attr_accessor :object
755
1855
 
756
1856
  def initialize(**args)
757
1857
  update!(**args)
@@ -759,39 +1859,36 @@ module Google
759
1859
 
760
1860
  # Update properties of this object
761
1861
  def update!(**args)
762
- @attack_complexity = args[:attack_complexity] if args.key?(:attack_complexity)
763
- @attack_vector = args[:attack_vector] if args.key?(:attack_vector)
764
- @availability_impact = args[:availability_impact] if args.key?(:availability_impact)
765
- @base_score = args[:base_score] if args.key?(:base_score)
766
- @confidentiality_impact = args[:confidentiality_impact] if args.key?(:confidentiality_impact)
767
- @exploitability_score = args[:exploitability_score] if args.key?(:exploitability_score)
768
- @impact_score = args[:impact_score] if args.key?(:impact_score)
769
- @integrity_impact = args[:integrity_impact] if args.key?(:integrity_impact)
770
- @privileges_required = args[:privileges_required] if args.key?(:privileges_required)
771
- @scope = args[:scope] if args.key?(:scope)
772
- @user_interaction = args[:user_interaction] if args.key?(:user_interaction)
1862
+ @bucket = args[:bucket] if args.key?(:bucket)
1863
+ @generation = args[:generation] if args.key?(:generation)
1864
+ @object = args[:object] if args.key?(:object)
773
1865
  end
774
1866
  end
775
1867
 
776
- # A CloudRepoSourceContext denotes a particular revision in a Google Cloud
777
- # Source Repo.
778
- class CloudRepoSourceContext
1868
+ # Location of the source manifest in Google Cloud Storage. This feature is in
1869
+ # Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-
1870
+ # builders/tree/master/gcs-fetcher).
1871
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1StorageSourceManifest
779
1872
  include Google::Apis::Core::Hashable
780
1873
 
781
- # An alias to a repo revision.
782
- # Corresponds to the JSON property `aliasContext`
783
- # @return [Google::Apis::ContaineranalysisV1beta1::AliasContext]
784
- attr_accessor :alias_context
1874
+ # Google Cloud Storage bucket containing the source manifest (see [Bucket Name
1875
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
1876
+ # ).
1877
+ # Corresponds to the JSON property `bucket`
1878
+ # @return [String]
1879
+ attr_accessor :bucket
785
1880
 
786
- # A unique identifier for a Cloud Repo.
787
- # Corresponds to the JSON property `repoId`
788
- # @return [Google::Apis::ContaineranalysisV1beta1::RepoId]
789
- attr_accessor :repo_id
1881
+ # Google Cloud Storage generation for the object. If the generation is omitted,
1882
+ # the latest generation will be used.
1883
+ # Corresponds to the JSON property `generation`
1884
+ # @return [Fixnum]
1885
+ attr_accessor :generation
790
1886
 
791
- # A revision ID.
792
- # Corresponds to the JSON property `revisionId`
1887
+ # Google Cloud Storage object containing the source manifest. This object must
1888
+ # be a JSON file.
1889
+ # Corresponds to the JSON property `object`
793
1890
  # @return [String]
794
- attr_accessor :revision_id
1891
+ attr_accessor :object
795
1892
 
796
1893
  def initialize(**args)
797
1894
  update!(**args)
@@ -799,48 +1896,55 @@ module Google
799
1896
 
800
1897
  # Update properties of this object
801
1898
  def update!(**args)
802
- @alias_context = args[:alias_context] if args.key?(:alias_context)
803
- @repo_id = args[:repo_id] if args.key?(:repo_id)
804
- @revision_id = args[:revision_id] if args.key?(:revision_id)
1899
+ @bucket = args[:bucket] if args.key?(:bucket)
1900
+ @generation = args[:generation] if args.key?(:generation)
1901
+ @object = args[:object] if args.key?(:object)
805
1902
  end
806
1903
  end
807
1904
 
808
- # Command describes a step performed as part of the build pipeline.
809
- class Command
1905
+ # Start and end times for a build execution phase.
1906
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1TimeSpan
810
1907
  include Google::Apis::Core::Hashable
811
1908
 
812
- # Command-line arguments used when executing this command.
813
- # Corresponds to the JSON property `args`
814
- # @return [Array<String>]
815
- attr_accessor :args
1909
+ # End of time span.
1910
+ # Corresponds to the JSON property `endTime`
1911
+ # @return [String]
1912
+ attr_accessor :end_time
816
1913
 
817
- # Working directory (relative to project source root) used when running this
818
- # command.
819
- # Corresponds to the JSON property `dir`
1914
+ # Start of time span.
1915
+ # Corresponds to the JSON property `startTime`
820
1916
  # @return [String]
821
- attr_accessor :dir
1917
+ attr_accessor :start_time
822
1918
 
823
- # Environment variables set before running this command.
824
- # Corresponds to the JSON property `env`
825
- # @return [Array<String>]
826
- attr_accessor :env
1919
+ def initialize(**args)
1920
+ update!(**args)
1921
+ end
827
1922
 
828
- # Optional unique identifier for this command, used in wait_for to reference
829
- # this command as a dependency.
830
- # Corresponds to the JSON property `id`
831
- # @return [String]
832
- attr_accessor :id
1923
+ # Update properties of this object
1924
+ def update!(**args)
1925
+ @end_time = args[:end_time] if args.key?(:end_time)
1926
+ @start_time = args[:start_time] if args.key?(:start_time)
1927
+ end
1928
+ end
833
1929
 
834
- # Required. Name of the command, as presented on the command line, or if the
835
- # command is packaged as a Docker container, as presented to `docker pull`.
1930
+ # Volume describes a Docker container volume which is mounted into build steps
1931
+ # in order to persist files across build step execution.
1932
+ class ContaineranalysisGoogleDevtoolsCloudbuildV1Volume
1933
+ include Google::Apis::Core::Hashable
1934
+
1935
+ # Name of the volume to mount. Volume names must be unique per build step and
1936
+ # must be valid names for Docker volumes. Each named volume must be used by at
1937
+ # least two build steps.
836
1938
  # Corresponds to the JSON property `name`
837
1939
  # @return [String]
838
1940
  attr_accessor :name
839
1941
 
840
- # The ID(s) of the command(s) that this command depends on.
841
- # Corresponds to the JSON property `waitFor`
842
- # @return [Array<String>]
843
- attr_accessor :wait_for
1942
+ # Path at which to mount the volume. Paths must be absolute and cannot conflict
1943
+ # with other volume paths on the same build step or with certain reserved volume
1944
+ # paths.
1945
+ # Corresponds to the JSON property `path`
1946
+ # @return [String]
1947
+ attr_accessor :path
844
1948
 
845
1949
  def initialize(**args)
846
1950
  update!(**args)
@@ -848,12 +1952,8 @@ module Google
848
1952
 
849
1953
  # Update properties of this object
850
1954
  def update!(**args)
851
- @args = args[:args] if args.key?(:args)
852
- @dir = args[:dir] if args.key?(:dir)
853
- @env = args[:env] if args.key?(:env)
854
- @id = args[:id] if args.key?(:id)
855
1955
  @name = args[:name] if args.key?(:name)
856
- @wait_for = args[:wait_for] if args.key?(:wait_for)
1956
+ @path = args[:path] if args.key?(:path)
857
1957
  end
858
1958
  end
859
1959
 
@@ -1745,13 +2845,16 @@ module Google
1745
2845
  class GetPolicyOptions
1746
2846
  include Google::Apis::Core::Hashable
1747
2847
 
1748
- # Optional. The policy format version to be returned. Valid values are 0, 1, and
1749
- # 3. Requests specifying an invalid value will be rejected. Requests for
1750
- # policies with any conditional bindings must specify version 3. Policies
1751
- # without any conditional bindings may specify any valid value or leave the
1752
- # field unset. To learn which resources support conditions in their IAM policies,
1753
- # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
1754
- # resource-policies).
2848
+ # Optional. The maximum policy version that will be used to format the policy.
2849
+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
2850
+ # rejected. Requests for policies with any conditional role bindings must
2851
+ # specify version 3. Policies with no conditional role bindings may specify any
2852
+ # valid value or leave the field unset. The policy in the response might use the
2853
+ # policy version that you specified, or it might use a lower policy version. For
2854
+ # example, if you specify version 3, but the policy has no conditional role
2855
+ # bindings, the response uses version 1. To learn which resources support
2856
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
2857
+ # google.com/iam/help/conditions/resource-policies).
1755
2858
  # Corresponds to the JSON property `requestedPolicyVersion`
1756
2859
  # @return [Fixnum]
1757
2860
  attr_accessor :requested_policy_version
@@ -3734,31 +4837,6 @@ module Google
3734
4837
  end
3735
4838
  end
3736
4839
 
3737
- # Start and end times for a build execution phase.
3738
- class TimeSpan
3739
- include Google::Apis::Core::Hashable
3740
-
3741
- # End of time span.
3742
- # Corresponds to the JSON property `endTime`
3743
- # @return [String]
3744
- attr_accessor :end_time
3745
-
3746
- # Start of time span.
3747
- # Corresponds to the JSON property `startTime`
3748
- # @return [String]
3749
- attr_accessor :start_time
3750
-
3751
- def initialize(**args)
3752
- update!(**args)
3753
- end
3754
-
3755
- # Update properties of this object
3756
- def update!(**args)
3757
- @end_time = args[:end_time] if args.key?(:end_time)
3758
- @start_time = args[:start_time] if args.key?(:start_time)
3759
- end
3760
- end
3761
-
3762
4840
  # Version contains structured information about the version of a package.
3763
4841
  class Version
3764
4842
  include Google::Apis::Core::Hashable
@@ -3808,36 +4886,6 @@ module Google
3808
4886
  end
3809
4887
  end
3810
4888
 
3811
- # Volume describes a Docker container volume which is mounted into build steps
3812
- # in order to persist files across build step execution.
3813
- class Volume
3814
- include Google::Apis::Core::Hashable
3815
-
3816
- # Name of the volume to mount. Volume names must be unique per build step and
3817
- # must be valid names for Docker volumes. Each named volume must be used by at
3818
- # least two build steps.
3819
- # Corresponds to the JSON property `name`
3820
- # @return [String]
3821
- attr_accessor :name
3822
-
3823
- # Path at which to mount the volume. Paths must be absolute and cannot conflict
3824
- # with other volume paths on the same build step or with certain reserved volume
3825
- # paths.
3826
- # Corresponds to the JSON property `path`
3827
- # @return [String]
3828
- attr_accessor :path
3829
-
3830
- def initialize(**args)
3831
- update!(**args)
3832
- end
3833
-
3834
- # Update properties of this object
3835
- def update!(**args)
3836
- @name = args[:name] if args.key?(:name)
3837
- @path = args[:path] if args.key?(:path)
3838
- end
3839
- end
3840
-
3841
4889
  # Vulnerability provides metadata about a security vulnerability in a Note.
3842
4890
  class Vulnerability
3843
4891
  include Google::Apis::Core::Hashable