google-apis-cloudbuild_v1alpha1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 75755e35a819730f5f796c8e7ab2c160d2de9c74a521a7b82e82b1fbc7d5336a
4
+ data.tar.gz: fa564103369071a1b8be0dd690c393c3fb0047c39b2e13f941bba30eabeb3232
5
+ SHA512:
6
+ metadata.gz: 8f231a90123078ec87ff9ce8a070d61f80931f435b3881a7fbe09142adfdd03595b35b2e93de2585630e7c7ebfc84182dd53ab10c59c7ebe2742e52e0058a0d5
7
+ data.tar.gz: 4399c684189cefec7b9436b97d9928839efba0af478d7d9a99fb1a540d76042ceda41b62f31ad3bc82829f92cb0e2de2ee1b7ec574f5860954fdc75667eff214
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-cloudbuild_v1alpha1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/cloudbuild_v1alpha1/*.rb
9
+ lib/google/apis/cloudbuild_v1alpha1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-cloudbuild_v1alpha1
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201211
7
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V1alpha1 of the Cloud Build API
2
+
3
+ This is a simple client library for version V1alpha1 of the Cloud Build API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/cloudbuild.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-cloudbuild_v1alpha1', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-cloudbuild_v1alpha1
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/cloudbuild_v1alpha1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::CloudbuildV1alpha1::CloudBuildService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Cloudbuild service in particular.)
67
+
68
+ For reference information on specific calls in the Cloud Build API, see the {Google::Apis::CloudbuildV1alpha1::CloudBuildService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-cloudbuild_v1alpha1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](https://cloud.google.com/cloud-build/docs/) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "google/apis/cloudbuild_v1alpha1"
@@ -0,0 +1,36 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/cloudbuild_v1alpha1/service.rb'
16
+ require 'google/apis/cloudbuild_v1alpha1/classes.rb'
17
+ require 'google/apis/cloudbuild_v1alpha1/representations.rb'
18
+ require 'google/apis/cloudbuild_v1alpha1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Cloud Build API
23
+ #
24
+ # Creates and manages builds on Google Cloud Platform.
25
+ #
26
+ # @see https://cloud.google.com/cloud-build/docs/
27
+ module CloudbuildV1alpha1
28
+ # Version of the Cloud Build API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V1alpha1'
31
+
32
+ # View and manage your data across Google Cloud Platform services
33
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,1567 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module CloudbuildV1alpha1
24
+
25
+ # Files in the workspace to upload to Cloud Storage upon successful completion
26
+ # of all build steps.
27
+ class ArtifactObjects
28
+ include Google::Apis::Core::Hashable
29
+
30
+ # Cloud Storage bucket and optional object path, in the form "gs://bucket/path/
31
+ # to/somewhere/". (see [Bucket Name Requirements](https://cloud.google.com/
32
+ # storage/docs/bucket-naming#requirements)). Files in the workspace matching any
33
+ # path pattern will be uploaded to Cloud Storage with this location as a prefix.
34
+ # Corresponds to the JSON property `location`
35
+ # @return [String]
36
+ attr_accessor :location
37
+
38
+ # Path globs used to match files in the build's workspace.
39
+ # Corresponds to the JSON property `paths`
40
+ # @return [Array<String>]
41
+ attr_accessor :paths
42
+
43
+ # Start and end times for a build execution phase.
44
+ # Corresponds to the JSON property `timing`
45
+ # @return [Google::Apis::CloudbuildV1alpha1::TimeSpan]
46
+ attr_accessor :timing
47
+
48
+ def initialize(**args)
49
+ update!(**args)
50
+ end
51
+
52
+ # Update properties of this object
53
+ def update!(**args)
54
+ @location = args[:location] if args.key?(:location)
55
+ @paths = args[:paths] if args.key?(:paths)
56
+ @timing = args[:timing] if args.key?(:timing)
57
+ end
58
+ end
59
+
60
+ # An artifact that was uploaded during a build. This is a single record in the
61
+ # artifact manifest JSON file.
62
+ class ArtifactResult
63
+ include Google::Apis::Core::Hashable
64
+
65
+ # The file hash of the artifact.
66
+ # Corresponds to the JSON property `fileHash`
67
+ # @return [Array<Google::Apis::CloudbuildV1alpha1::FileHashes>]
68
+ attr_accessor :file_hash
69
+
70
+ # The path of an artifact in a Google Cloud Storage bucket, with the generation
71
+ # number. For example, `gs://mybucket/path/to/output.jar#generation`.
72
+ # Corresponds to the JSON property `location`
73
+ # @return [String]
74
+ attr_accessor :location
75
+
76
+ def initialize(**args)
77
+ update!(**args)
78
+ end
79
+
80
+ # Update properties of this object
81
+ def update!(**args)
82
+ @file_hash = args[:file_hash] if args.key?(:file_hash)
83
+ @location = args[:location] if args.key?(:location)
84
+ end
85
+ end
86
+
87
+ # Artifacts produced by a build that should be uploaded upon successful
88
+ # completion of all build steps.
89
+ class Artifacts
90
+ include Google::Apis::Core::Hashable
91
+
92
+ # A list of images to be pushed upon the successful completion of all build
93
+ # steps. The images will be pushed using the builder service account's
94
+ # credentials. The digests of the pushed images will be stored in the Build
95
+ # resource's results field. If any of the images fail to be pushed, the build is
96
+ # marked FAILURE.
97
+ # Corresponds to the JSON property `images`
98
+ # @return [Array<String>]
99
+ attr_accessor :images
100
+
101
+ # Files in the workspace to upload to Cloud Storage upon successful completion
102
+ # of all build steps.
103
+ # Corresponds to the JSON property `objects`
104
+ # @return [Google::Apis::CloudbuildV1alpha1::ArtifactObjects]
105
+ attr_accessor :objects
106
+
107
+ def initialize(**args)
108
+ update!(**args)
109
+ end
110
+
111
+ # Update properties of this object
112
+ def update!(**args)
113
+ @images = args[:images] if args.key?(:images)
114
+ @objects = args[:objects] if args.key?(:objects)
115
+ end
116
+ end
117
+
118
+ # A build resource in the Cloud Build API. At a high level, a `Build` describes
119
+ # where to find source code, how to build it (for example, the builder image to
120
+ # run on the source), and where to store the built artifacts. Fields can include
121
+ # the following variables, which will be expanded when the build is created: - $
122
+ # PROJECT_ID: the project ID of the build. - $BUILD_ID: the autogenerated ID of
123
+ # the build. - $REPO_NAME: the source repository name specified by RepoSource. -
124
+ # $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag
125
+ # name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA
126
+ # specified by RepoSource or resolved from the specified branch or tag. - $
127
+ # SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
128
+ class Build
129
+ include Google::Apis::Core::Hashable
130
+
131
+ # Artifacts produced by a build that should be uploaded upon successful
132
+ # completion of all build steps.
133
+ # Corresponds to the JSON property `artifacts`
134
+ # @return [Google::Apis::CloudbuildV1alpha1::Artifacts]
135
+ attr_accessor :artifacts
136
+
137
+ # Output only. The ID of the `BuildTrigger` that triggered this build, if it was
138
+ # triggered automatically.
139
+ # Corresponds to the JSON property `buildTriggerId`
140
+ # @return [String]
141
+ attr_accessor :build_trigger_id
142
+
143
+ # Output only. Time at which the request to create the build was received.
144
+ # Corresponds to the JSON property `createTime`
145
+ # @return [String]
146
+ attr_accessor :create_time
147
+
148
+ # Output only. Time at which execution of the build was finished. The difference
149
+ # between finish_time and start_time is the duration of the build's execution.
150
+ # Corresponds to the JSON property `finishTime`
151
+ # @return [String]
152
+ attr_accessor :finish_time
153
+
154
+ # Output only. Unique identifier of the build.
155
+ # Corresponds to the JSON property `id`
156
+ # @return [String]
157
+ attr_accessor :id
158
+
159
+ # A list of images to be pushed upon the successful completion of all build
160
+ # steps. The images are pushed using the builder service account's credentials.
161
+ # The digests of the pushed images will be stored in the `Build` resource's
162
+ # results field. If any of the images fail to be pushed, the build status is
163
+ # marked `FAILURE`.
164
+ # Corresponds to the JSON property `images`
165
+ # @return [Array<String>]
166
+ attr_accessor :images
167
+
168
+ # Output only. URL to logs for this build in Google Cloud Console.
169
+ # Corresponds to the JSON property `logUrl`
170
+ # @return [String]
171
+ attr_accessor :log_url
172
+
173
+ # Google Cloud Storage bucket where logs should be written (see [Bucket Name
174
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
175
+ # ). Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`.
176
+ # Corresponds to the JSON property `logsBucket`
177
+ # @return [String]
178
+ attr_accessor :logs_bucket
179
+
180
+ # Output only. The 'Build' name with format: `projects/`project`/locations/`
181
+ # location`/builds/`build``, where `build` is a unique identifier generated by
182
+ # the service.
183
+ # Corresponds to the JSON property `name`
184
+ # @return [String]
185
+ attr_accessor :name
186
+
187
+ # Optional arguments to enable specific features of builds.
188
+ # Corresponds to the JSON property `options`
189
+ # @return [Google::Apis::CloudbuildV1alpha1::BuildOptions]
190
+ attr_accessor :options
191
+
192
+ # Output only. ID of the project.
193
+ # Corresponds to the JSON property `projectId`
194
+ # @return [String]
195
+ attr_accessor :project_id
196
+
197
+ # TTL in queue for this build. If provided and the build is enqueued longer than
198
+ # this value, the build will expire and the build status will be `EXPIRED`. The
199
+ # TTL starts ticking from create_time.
200
+ # Corresponds to the JSON property `queueTtl`
201
+ # @return [String]
202
+ attr_accessor :queue_ttl
203
+
204
+ # Artifacts created by the build pipeline.
205
+ # Corresponds to the JSON property `results`
206
+ # @return [Google::Apis::CloudbuildV1alpha1::Results]
207
+ attr_accessor :results
208
+
209
+ # Secrets to decrypt using Cloud Key Management Service.
210
+ # Corresponds to the JSON property `secrets`
211
+ # @return [Array<Google::Apis::CloudbuildV1alpha1::Secret>]
212
+ attr_accessor :secrets
213
+
214
+ # IAM service account whose credentials will be used at build runtime. Must be
215
+ # of the format `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. ACCOUNT can
216
+ # be email address or uniqueId of the service account. This field is in beta.
217
+ # Corresponds to the JSON property `serviceAccount`
218
+ # @return [String]
219
+ attr_accessor :service_account
220
+
221
+ # Location of the source in a supported storage service.
222
+ # Corresponds to the JSON property `source`
223
+ # @return [Google::Apis::CloudbuildV1alpha1::Source]
224
+ attr_accessor :source
225
+
226
+ # Provenance of the source. Ways to find the original source, or verify that
227
+ # some source was used for this build.
228
+ # Corresponds to the JSON property `sourceProvenance`
229
+ # @return [Google::Apis::CloudbuildV1alpha1::SourceProvenance]
230
+ attr_accessor :source_provenance
231
+
232
+ # Output only. Time at which execution of the build was started.
233
+ # Corresponds to the JSON property `startTime`
234
+ # @return [String]
235
+ attr_accessor :start_time
236
+
237
+ # Output only. Status of the build.
238
+ # Corresponds to the JSON property `status`
239
+ # @return [String]
240
+ attr_accessor :status
241
+
242
+ # Output only. Customer-readable message about the current status.
243
+ # Corresponds to the JSON property `statusDetail`
244
+ # @return [String]
245
+ attr_accessor :status_detail
246
+
247
+ # Required. The operations to be performed on the workspace.
248
+ # Corresponds to the JSON property `steps`
249
+ # @return [Array<Google::Apis::CloudbuildV1alpha1::BuildStep>]
250
+ attr_accessor :steps
251
+
252
+ # Substitutions data for `Build` resource.
253
+ # Corresponds to the JSON property `substitutions`
254
+ # @return [Hash<String,String>]
255
+ attr_accessor :substitutions
256
+
257
+ # Tags for annotation of a `Build`. These are not docker tags.
258
+ # Corresponds to the JSON property `tags`
259
+ # @return [Array<String>]
260
+ attr_accessor :tags
261
+
262
+ # Amount of time that this build should be allowed to run, to second granularity.
263
+ # If this amount of time elapses, work on the build will cease and the build
264
+ # status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default
265
+ # time is ten minutes.
266
+ # Corresponds to the JSON property `timeout`
267
+ # @return [String]
268
+ attr_accessor :timeout
269
+
270
+ # Output only. Stores timing information for phases of the build. Valid keys are:
271
+ # * BUILD: time to execute all build steps * PUSH: time to push all specified
272
+ # images. * FETCHSOURCE: time to fetch source. If the build does not specify
273
+ # source or images, these keys will not be included.
274
+ # Corresponds to the JSON property `timing`
275
+ # @return [Hash<String,Google::Apis::CloudbuildV1alpha1::TimeSpan>]
276
+ attr_accessor :timing
277
+
278
+ def initialize(**args)
279
+ update!(**args)
280
+ end
281
+
282
+ # Update properties of this object
283
+ def update!(**args)
284
+ @artifacts = args[:artifacts] if args.key?(:artifacts)
285
+ @build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id)
286
+ @create_time = args[:create_time] if args.key?(:create_time)
287
+ @finish_time = args[:finish_time] if args.key?(:finish_time)
288
+ @id = args[:id] if args.key?(:id)
289
+ @images = args[:images] if args.key?(:images)
290
+ @log_url = args[:log_url] if args.key?(:log_url)
291
+ @logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket)
292
+ @name = args[:name] if args.key?(:name)
293
+ @options = args[:options] if args.key?(:options)
294
+ @project_id = args[:project_id] if args.key?(:project_id)
295
+ @queue_ttl = args[:queue_ttl] if args.key?(:queue_ttl)
296
+ @results = args[:results] if args.key?(:results)
297
+ @secrets = args[:secrets] if args.key?(:secrets)
298
+ @service_account = args[:service_account] if args.key?(:service_account)
299
+ @source = args[:source] if args.key?(:source)
300
+ @source_provenance = args[:source_provenance] if args.key?(:source_provenance)
301
+ @start_time = args[:start_time] if args.key?(:start_time)
302
+ @status = args[:status] if args.key?(:status)
303
+ @status_detail = args[:status_detail] if args.key?(:status_detail)
304
+ @steps = args[:steps] if args.key?(:steps)
305
+ @substitutions = args[:substitutions] if args.key?(:substitutions)
306
+ @tags = args[:tags] if args.key?(:tags)
307
+ @timeout = args[:timeout] if args.key?(:timeout)
308
+ @timing = args[:timing] if args.key?(:timing)
309
+ end
310
+ end
311
+
312
+ # Metadata for build operations.
313
+ class BuildOperationMetadata
314
+ include Google::Apis::Core::Hashable
315
+
316
+ # A build resource in the Cloud Build API. At a high level, a `Build` describes
317
+ # where to find source code, how to build it (for example, the builder image to
318
+ # run on the source), and where to store the built artifacts. Fields can include
319
+ # the following variables, which will be expanded when the build is created: - $
320
+ # PROJECT_ID: the project ID of the build. - $BUILD_ID: the autogenerated ID of
321
+ # the build. - $REPO_NAME: the source repository name specified by RepoSource. -
322
+ # $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag
323
+ # name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA
324
+ # specified by RepoSource or resolved from the specified branch or tag. - $
325
+ # SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
326
+ # Corresponds to the JSON property `build`
327
+ # @return [Google::Apis::CloudbuildV1alpha1::Build]
328
+ attr_accessor :build
329
+
330
+ def initialize(**args)
331
+ update!(**args)
332
+ end
333
+
334
+ # Update properties of this object
335
+ def update!(**args)
336
+ @build = args[:build] if args.key?(:build)
337
+ end
338
+ end
339
+
340
+ # Optional arguments to enable specific features of builds.
341
+ class BuildOptions
342
+ include Google::Apis::Core::Hashable
343
+
344
+ # Requested disk size for the VM that runs the build. Note that this is *NOT* "
345
+ # disk free"; some of the space will be used by the operating system and build
346
+ # utilities. Also note that this is the minimum disk size that will be allocated
347
+ # for the build -- the build may run with a larger disk than requested. At
348
+ # present, the maximum disk size is 1000GB; builds that request more than the
349
+ # maximum are rejected with an error.
350
+ # Corresponds to the JSON property `diskSizeGb`
351
+ # @return [Fixnum]
352
+ attr_accessor :disk_size_gb
353
+
354
+ # Option to specify whether or not to apply bash style string operations to the
355
+ # substitutions. NOTE: this is always enabled for triggered builds and cannot be
356
+ # overridden in the build configuration file.
357
+ # Corresponds to the JSON property `dynamicSubstitutions`
358
+ # @return [Boolean]
359
+ attr_accessor :dynamic_substitutions
360
+ alias_method :dynamic_substitutions?, :dynamic_substitutions
361
+
362
+ # A list of global environment variable definitions that will exist for all
363
+ # build steps in this build. If a variable is defined in both globally and in a
364
+ # build step, the variable will use the build step value. The elements are of
365
+ # the form "KEY=VALUE" for the environment variable "KEY" being given the value "
366
+ # VALUE".
367
+ # Corresponds to the JSON property `env`
368
+ # @return [Array<String>]
369
+ attr_accessor :env
370
+
371
+ # Option to define build log streaming behavior to Google Cloud Storage.
372
+ # Corresponds to the JSON property `logStreamingOption`
373
+ # @return [String]
374
+ attr_accessor :log_streaming_option
375
+
376
+ # Option to specify the logging mode, which determines if and where build logs
377
+ # are stored.
378
+ # Corresponds to the JSON property `logging`
379
+ # @return [String]
380
+ attr_accessor :logging
381
+
382
+ # Compute Engine machine type on which to run the build.
383
+ # Corresponds to the JSON property `machineType`
384
+ # @return [String]
385
+ attr_accessor :machine_type
386
+
387
+ # Requested verifiability options.
388
+ # Corresponds to the JSON property `requestedVerifyOption`
389
+ # @return [String]
390
+ attr_accessor :requested_verify_option
391
+
392
+ # A list of global environment variables, which are encrypted using a Cloud Key
393
+ # Management Service crypto key. These values must be specified in the build's `
394
+ # Secret`. These variables will be available to all build steps in this build.
395
+ # Corresponds to the JSON property `secretEnv`
396
+ # @return [Array<String>]
397
+ attr_accessor :secret_env
398
+
399
+ # Requested hash for SourceProvenance.
400
+ # Corresponds to the JSON property `sourceProvenanceHash`
401
+ # @return [Array<String>]
402
+ attr_accessor :source_provenance_hash
403
+
404
+ # Option to specify behavior when there is an error in the substitution checks.
405
+ # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be
406
+ # overridden in the build configuration file.
407
+ # Corresponds to the JSON property `substitutionOption`
408
+ # @return [String]
409
+ attr_accessor :substitution_option
410
+
411
+ # Global list of volumes to mount for ALL build steps Each volume is created as
412
+ # an empty volume prior to starting the build process. Upon completion of the
413
+ # build, volumes and their contents are discarded. Global volume names and paths
414
+ # cannot conflict with the volumes defined a build step. Using a global volume
415
+ # in a build with only one step is not valid as it is indicative of a build
416
+ # request with an incorrect configuration.
417
+ # Corresponds to the JSON property `volumes`
418
+ # @return [Array<Google::Apis::CloudbuildV1alpha1::Volume>]
419
+ attr_accessor :volumes
420
+
421
+ # Option to specify a `WorkerPool` for the build. Format: projects/`project`/
422
+ # locations/`location`/workerPools/`workerPool` This field is in beta and is
423
+ # available only to restricted users.
424
+ # Corresponds to the JSON property `workerPool`
425
+ # @return [String]
426
+ attr_accessor :worker_pool
427
+
428
+ def initialize(**args)
429
+ update!(**args)
430
+ end
431
+
432
+ # Update properties of this object
433
+ def update!(**args)
434
+ @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
435
+ @dynamic_substitutions = args[:dynamic_substitutions] if args.key?(:dynamic_substitutions)
436
+ @env = args[:env] if args.key?(:env)
437
+ @log_streaming_option = args[:log_streaming_option] if args.key?(:log_streaming_option)
438
+ @logging = args[:logging] if args.key?(:logging)
439
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
440
+ @requested_verify_option = args[:requested_verify_option] if args.key?(:requested_verify_option)
441
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
442
+ @source_provenance_hash = args[:source_provenance_hash] if args.key?(:source_provenance_hash)
443
+ @substitution_option = args[:substitution_option] if args.key?(:substitution_option)
444
+ @volumes = args[:volumes] if args.key?(:volumes)
445
+ @worker_pool = args[:worker_pool] if args.key?(:worker_pool)
446
+ end
447
+ end
448
+
449
+ # A step in the build pipeline.
450
+ class BuildStep
451
+ include Google::Apis::Core::Hashable
452
+
453
+ # A list of arguments that will be presented to the step when it is started. If
454
+ # the image used to run the step's container has an entrypoint, the `args` are
455
+ # used as arguments to that entrypoint. If the image does not define an
456
+ # entrypoint, the first element in args is used as the entrypoint, and the
457
+ # remainder will be used as arguments.
458
+ # Corresponds to the JSON property `args`
459
+ # @return [Array<String>]
460
+ attr_accessor :args
461
+
462
+ # Working directory to use when running this step's container. If this value is
463
+ # a relative path, it is relative to the build's working directory. If this
464
+ # value is absolute, it may be outside the build's working directory, in which
465
+ # case the contents of the path may not be persisted across build step
466
+ # executions, unless a `volume` for that path is specified. If the build
467
+ # specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies
468
+ # an absolute path, the `RepoSource` `dir` is ignored for the step's execution.
469
+ # Corresponds to the JSON property `dir`
470
+ # @return [String]
471
+ attr_accessor :dir
472
+
473
+ # Entrypoint to be used instead of the build step image's default entrypoint. If
474
+ # unset, the image's default entrypoint is used.
475
+ # Corresponds to the JSON property `entrypoint`
476
+ # @return [String]
477
+ attr_accessor :entrypoint
478
+
479
+ # A list of environment variable definitions to be used when running a step. The
480
+ # elements are of the form "KEY=VALUE" for the environment variable "KEY" being
481
+ # given the value "VALUE".
482
+ # Corresponds to the JSON property `env`
483
+ # @return [Array<String>]
484
+ attr_accessor :env
485
+
486
+ # Unique identifier for this build step, used in `wait_for` to reference this
487
+ # build step as a dependency.
488
+ # Corresponds to the JSON property `id`
489
+ # @return [String]
490
+ attr_accessor :id
491
+
492
+ # Required. The name of the container image that will run this particular build
493
+ # step. If the image is available in the host's Docker daemon's cache, it will
494
+ # be run directly. If not, the host will attempt to pull the image first, using
495
+ # the builder service account's credentials if necessary. The Docker daemon's
496
+ # cache will already have the latest versions of all of the officially supported
497
+ # build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://
498
+ # github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also
499
+ # have cached many of the layers for some popular images, like "ubuntu", "debian"
500
+ # , but they will be refreshed at the time you attempt to use them. If you built
501
+ # an image in a previous build step, it will be stored in the host's Docker
502
+ # daemon's cache and is available to use as the name for a later build step.
503
+ # Corresponds to the JSON property `name`
504
+ # @return [String]
505
+ attr_accessor :name
506
+
507
+ # Start and end times for a build execution phase.
508
+ # Corresponds to the JSON property `pullTiming`
509
+ # @return [Google::Apis::CloudbuildV1alpha1::TimeSpan]
510
+ attr_accessor :pull_timing
511
+
512
+ # A list of environment variables which are encrypted using a Cloud Key
513
+ # Management Service crypto key. These values must be specified in the build's `
514
+ # Secret`.
515
+ # Corresponds to the JSON property `secretEnv`
516
+ # @return [Array<String>]
517
+ attr_accessor :secret_env
518
+
519
+ # Output only. Status of the build step. At this time, build step status is only
520
+ # updated on build completion; step status is not updated in real-time as the
521
+ # build progresses.
522
+ # Corresponds to the JSON property `status`
523
+ # @return [String]
524
+ attr_accessor :status
525
+
526
+ # Time limit for executing this build step. If not defined, the step has no time
527
+ # limit and will be allowed to continue to run until either it completes or the
528
+ # build itself times out.
529
+ # Corresponds to the JSON property `timeout`
530
+ # @return [String]
531
+ attr_accessor :timeout
532
+
533
+ # Start and end times for a build execution phase.
534
+ # Corresponds to the JSON property `timing`
535
+ # @return [Google::Apis::CloudbuildV1alpha1::TimeSpan]
536
+ attr_accessor :timing
537
+
538
+ # List of volumes to mount into the build step. Each volume is created as an
539
+ # empty volume prior to execution of the build step. Upon completion of the
540
+ # build, volumes and their contents are discarded. Using a named volume in only
541
+ # one step is not valid as it is indicative of a build request with an incorrect
542
+ # configuration.
543
+ # Corresponds to the JSON property `volumes`
544
+ # @return [Array<Google::Apis::CloudbuildV1alpha1::Volume>]
545
+ attr_accessor :volumes
546
+
547
+ # The ID(s) of the step(s) that this build step depends on. This build step will
548
+ # not start until all the build steps in `wait_for` have completed successfully.
549
+ # If `wait_for` is empty, this build step will start when all previous build
550
+ # steps in the `Build.Steps` list have completed successfully.
551
+ # Corresponds to the JSON property `waitFor`
552
+ # @return [Array<String>]
553
+ attr_accessor :wait_for
554
+
555
+ def initialize(**args)
556
+ update!(**args)
557
+ end
558
+
559
+ # Update properties of this object
560
+ def update!(**args)
561
+ @args = args[:args] if args.key?(:args)
562
+ @dir = args[:dir] if args.key?(:dir)
563
+ @entrypoint = args[:entrypoint] if args.key?(:entrypoint)
564
+ @env = args[:env] if args.key?(:env)
565
+ @id = args[:id] if args.key?(:id)
566
+ @name = args[:name] if args.key?(:name)
567
+ @pull_timing = args[:pull_timing] if args.key?(:pull_timing)
568
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
569
+ @status = args[:status] if args.key?(:status)
570
+ @timeout = args[:timeout] if args.key?(:timeout)
571
+ @timing = args[:timing] if args.key?(:timing)
572
+ @volumes = args[:volumes] if args.key?(:volumes)
573
+ @wait_for = args[:wait_for] if args.key?(:wait_for)
574
+ end
575
+ end
576
+
577
+ # An image built by the pipeline.
578
+ class BuiltImage
579
+ include Google::Apis::Core::Hashable
580
+
581
+ # Docker Registry 2.0 digest.
582
+ # Corresponds to the JSON property `digest`
583
+ # @return [String]
584
+ attr_accessor :digest
585
+
586
+ # Name used to push the container image to Google Container Registry, as
587
+ # presented to `docker push`.
588
+ # Corresponds to the JSON property `name`
589
+ # @return [String]
590
+ attr_accessor :name
591
+
592
+ # Start and end times for a build execution phase.
593
+ # Corresponds to the JSON property `pushTiming`
594
+ # @return [Google::Apis::CloudbuildV1alpha1::TimeSpan]
595
+ attr_accessor :push_timing
596
+
597
+ def initialize(**args)
598
+ update!(**args)
599
+ end
600
+
601
+ # Update properties of this object
602
+ def update!(**args)
603
+ @digest = args[:digest] if args.key?(:digest)
604
+ @name = args[:name] if args.key?(:name)
605
+ @push_timing = args[:push_timing] if args.key?(:push_timing)
606
+ end
607
+ end
608
+
609
+ # The request message for Operations.CancelOperation.
610
+ class CancelOperationRequest
611
+ include Google::Apis::Core::Hashable
612
+
613
+ def initialize(**args)
614
+ update!(**args)
615
+ end
616
+
617
+ # Update properties of this object
618
+ def update!(**args)
619
+ end
620
+ end
621
+
622
+ # A generic empty message that you can re-use to avoid defining duplicated empty
623
+ # messages in your APIs. A typical example is to use it as the request or the
624
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
625
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
626
+ # `Empty` is empty JSON object ````.
627
+ class Empty
628
+ include Google::Apis::Core::Hashable
629
+
630
+ def initialize(**args)
631
+ update!(**args)
632
+ end
633
+
634
+ # Update properties of this object
635
+ def update!(**args)
636
+ end
637
+ end
638
+
639
+ # Container message for hashes of byte content of files, used in
640
+ # SourceProvenance messages to verify integrity of source input to the build.
641
+ class FileHashes
642
+ include Google::Apis::Core::Hashable
643
+
644
+ # Collection of file hashes.
645
+ # Corresponds to the JSON property `fileHash`
646
+ # @return [Array<Google::Apis::CloudbuildV1alpha1::HashProp>]
647
+ attr_accessor :file_hash
648
+
649
+ def initialize(**args)
650
+ update!(**args)
651
+ end
652
+
653
+ # Update properties of this object
654
+ def update!(**args)
655
+ @file_hash = args[:file_hash] if args.key?(:file_hash)
656
+ end
657
+ end
658
+
659
+ # HTTPDelivery is the delivery configuration for an HTTP notification.
660
+ class HttpDelivery
661
+ include Google::Apis::Core::Hashable
662
+
663
+ # The URI to which JSON-containing HTTP POST requests should be sent.
664
+ # Corresponds to the JSON property `uri`
665
+ # @return [String]
666
+ attr_accessor :uri
667
+
668
+ def initialize(**args)
669
+ update!(**args)
670
+ end
671
+
672
+ # Update properties of this object
673
+ def update!(**args)
674
+ @uri = args[:uri] if args.key?(:uri)
675
+ end
676
+ end
677
+
678
+ # Container message for hash values.
679
+ class HashProp
680
+ include Google::Apis::Core::Hashable
681
+
682
+ # The type of hash that was performed.
683
+ # Corresponds to the JSON property `type`
684
+ # @return [String]
685
+ attr_accessor :type
686
+
687
+ # The hash value.
688
+ # Corresponds to the JSON property `value`
689
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
690
+ # @return [String]
691
+ attr_accessor :value
692
+
693
+ def initialize(**args)
694
+ update!(**args)
695
+ end
696
+
697
+ # Update properties of this object
698
+ def update!(**args)
699
+ @type = args[:type] if args.key?(:type)
700
+ @value = args[:value] if args.key?(:value)
701
+ end
702
+ end
703
+
704
+ # Response containing existing `WorkerPools`.
705
+ class ListWorkerPoolsResponse
706
+ include Google::Apis::Core::Hashable
707
+
708
+ # `WorkerPools` for the project.
709
+ # Corresponds to the JSON property `workerPools`
710
+ # @return [Array<Google::Apis::CloudbuildV1alpha1::WorkerPool>]
711
+ attr_accessor :worker_pools
712
+
713
+ def initialize(**args)
714
+ update!(**args)
715
+ end
716
+
717
+ # Update properties of this object
718
+ def update!(**args)
719
+ @worker_pools = args[:worker_pools] if args.key?(:worker_pools)
720
+ end
721
+ end
722
+
723
+ # Network describes the GCP network used to create workers in.
724
+ class Network
725
+ include Google::Apis::Core::Hashable
726
+
727
+ # Network on which the workers are created. "default" network is used if empty.
728
+ # Corresponds to the JSON property `network`
729
+ # @return [String]
730
+ attr_accessor :network
731
+
732
+ # Project id containing the defined network and subnetwork. For a peered VPC,
733
+ # this will be the same as the project_id in which the workers are created. For
734
+ # a shared VPC, this will be the project sharing the network with the project_id
735
+ # project in which workers will be created. For custom workers with no VPC, this
736
+ # will be the same as project_id.
737
+ # Corresponds to the JSON property `projectId`
738
+ # @return [String]
739
+ attr_accessor :project_id
740
+
741
+ # Subnetwork on which the workers are created. "default" subnetwork is used if
742
+ # empty.
743
+ # Corresponds to the JSON property `subnetwork`
744
+ # @return [String]
745
+ attr_accessor :subnetwork
746
+
747
+ def initialize(**args)
748
+ update!(**args)
749
+ end
750
+
751
+ # Update properties of this object
752
+ def update!(**args)
753
+ @network = args[:network] if args.key?(:network)
754
+ @project_id = args[:project_id] if args.key?(:project_id)
755
+ @subnetwork = args[:subnetwork] if args.key?(:subnetwork)
756
+ end
757
+ end
758
+
759
+ # Notification is the container which holds the data that is relevant to this
760
+ # particular notification.
761
+ class Notification
762
+ include Google::Apis::Core::Hashable
763
+
764
+ # The filter string to use for notification filtering. Currently, this is
765
+ # assumed to be a CEL program. See https://opensource.google/projects/cel for
766
+ # more.
767
+ # Corresponds to the JSON property `filter`
768
+ # @return [String]
769
+ attr_accessor :filter
770
+
771
+ # HTTPDelivery is the delivery configuration for an HTTP notification.
772
+ # Corresponds to the JSON property `httpDelivery`
773
+ # @return [Google::Apis::CloudbuildV1alpha1::HttpDelivery]
774
+ attr_accessor :http_delivery
775
+
776
+ # SlackDelivery is the delivery configuration for delivering Slack messages via
777
+ # webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/
778
+ # webhooks.
779
+ # Corresponds to the JSON property `slackDelivery`
780
+ # @return [Google::Apis::CloudbuildV1alpha1::SlackDelivery]
781
+ attr_accessor :slack_delivery
782
+
783
+ # SMTPDelivery is the delivery configuration for an SMTP (email) notification.
784
+ # Corresponds to the JSON property `smtpDelivery`
785
+ # @return [Google::Apis::CloudbuildV1alpha1::SmtpDelivery]
786
+ attr_accessor :smtp_delivery
787
+
788
+ # Escape hatch for users to supply custom delivery configs.
789
+ # Corresponds to the JSON property `structDelivery`
790
+ # @return [Hash<String,Object>]
791
+ attr_accessor :struct_delivery
792
+
793
+ def initialize(**args)
794
+ update!(**args)
795
+ end
796
+
797
+ # Update properties of this object
798
+ def update!(**args)
799
+ @filter = args[:filter] if args.key?(:filter)
800
+ @http_delivery = args[:http_delivery] if args.key?(:http_delivery)
801
+ @slack_delivery = args[:slack_delivery] if args.key?(:slack_delivery)
802
+ @smtp_delivery = args[:smtp_delivery] if args.key?(:smtp_delivery)
803
+ @struct_delivery = args[:struct_delivery] if args.key?(:struct_delivery)
804
+ end
805
+ end
806
+
807
+ # NotifierConfig is the top-level configuration message.
808
+ class NotifierConfig
809
+ include Google::Apis::Core::Hashable
810
+
811
+ # The API version of this configuration format.
812
+ # Corresponds to the JSON property `apiVersion`
813
+ # @return [String]
814
+ attr_accessor :api_version
815
+
816
+ # The type of notifier to use (e.g. SMTPNotifier).
817
+ # Corresponds to the JSON property `kind`
818
+ # @return [String]
819
+ attr_accessor :kind
820
+
821
+ # NotifierMetadata contains the data which can be used to reference or describe
822
+ # this notifier.
823
+ # Corresponds to the JSON property `metadata`
824
+ # @return [Google::Apis::CloudbuildV1alpha1::NotifierMetadata]
825
+ attr_accessor :metadata
826
+
827
+ # NotifierSpec is the configuration container for notifications.
828
+ # Corresponds to the JSON property `spec`
829
+ # @return [Google::Apis::CloudbuildV1alpha1::NotifierSpec]
830
+ attr_accessor :spec
831
+
832
+ def initialize(**args)
833
+ update!(**args)
834
+ end
835
+
836
+ # Update properties of this object
837
+ def update!(**args)
838
+ @api_version = args[:api_version] if args.key?(:api_version)
839
+ @kind = args[:kind] if args.key?(:kind)
840
+ @metadata = args[:metadata] if args.key?(:metadata)
841
+ @spec = args[:spec] if args.key?(:spec)
842
+ end
843
+ end
844
+
845
+ # NotifierMetadata contains the data which can be used to reference or describe
846
+ # this notifier.
847
+ class NotifierMetadata
848
+ include Google::Apis::Core::Hashable
849
+
850
+ # The human-readable and user-given name for the notifier. For example: "repo-
851
+ # merge-email-notifier".
852
+ # Corresponds to the JSON property `name`
853
+ # @return [String]
854
+ attr_accessor :name
855
+
856
+ # The string representing the name and version of notifier to deploy. Expected
857
+ # to be of the form of "/:". For example: "gcr.io/my-project/notifiers/smtp:1.2.
858
+ # 34".
859
+ # Corresponds to the JSON property `notifier`
860
+ # @return [String]
861
+ attr_accessor :notifier
862
+
863
+ def initialize(**args)
864
+ update!(**args)
865
+ end
866
+
867
+ # Update properties of this object
868
+ def update!(**args)
869
+ @name = args[:name] if args.key?(:name)
870
+ @notifier = args[:notifier] if args.key?(:notifier)
871
+ end
872
+ end
873
+
874
+ # NotifierSecret is the container that maps a secret name (reference) to its
875
+ # Google Cloud Secret Manager resource path.
876
+ class NotifierSecret
877
+ include Google::Apis::Core::Hashable
878
+
879
+ # Name is the local name of the secret, such as the verbatim string "my-smtp-
880
+ # password".
881
+ # Corresponds to the JSON property `name`
882
+ # @return [String]
883
+ attr_accessor :name
884
+
885
+ # Value is interpreted to be a resource path for fetching the actual (versioned)
886
+ # secret data for this secret. For example, this would be a Google Cloud Secret
887
+ # Manager secret version resource path like: "projects/my-project/secrets/my-
888
+ # secret/versions/latest".
889
+ # Corresponds to the JSON property `value`
890
+ # @return [String]
891
+ attr_accessor :value
892
+
893
+ def initialize(**args)
894
+ update!(**args)
895
+ end
896
+
897
+ # Update properties of this object
898
+ def update!(**args)
899
+ @name = args[:name] if args.key?(:name)
900
+ @value = args[:value] if args.key?(:value)
901
+ end
902
+ end
903
+
904
+ # NotifierSecretRef contains the reference to a secret stored in the
905
+ # corresponding NotifierSpec.
906
+ class NotifierSecretRef
907
+ include Google::Apis::Core::Hashable
908
+
909
+ # The value of `secret_ref` should be a `name` that is registered in a `Secret`
910
+ # in the `secrets` list of the `Spec`.
911
+ # Corresponds to the JSON property `secretRef`
912
+ # @return [String]
913
+ attr_accessor :secret_ref
914
+
915
+ def initialize(**args)
916
+ update!(**args)
917
+ end
918
+
919
+ # Update properties of this object
920
+ def update!(**args)
921
+ @secret_ref = args[:secret_ref] if args.key?(:secret_ref)
922
+ end
923
+ end
924
+
925
+ # NotifierSpec is the configuration container for notifications.
926
+ class NotifierSpec
927
+ include Google::Apis::Core::Hashable
928
+
929
+ # Notification is the container which holds the data that is relevant to this
930
+ # particular notification.
931
+ # Corresponds to the JSON property `notification`
932
+ # @return [Google::Apis::CloudbuildV1alpha1::Notification]
933
+ attr_accessor :notification
934
+
935
+ # Configurations for secret resources used by this particular notifier.
936
+ # Corresponds to the JSON property `secrets`
937
+ # @return [Array<Google::Apis::CloudbuildV1alpha1::NotifierSecret>]
938
+ attr_accessor :secrets
939
+
940
+ def initialize(**args)
941
+ update!(**args)
942
+ end
943
+
944
+ # Update properties of this object
945
+ def update!(**args)
946
+ @notification = args[:notification] if args.key?(:notification)
947
+ @secrets = args[:secrets] if args.key?(:secrets)
948
+ end
949
+ end
950
+
951
+ # This resource represents a long-running operation that is the result of a
952
+ # network API call.
953
+ class Operation
954
+ include Google::Apis::Core::Hashable
955
+
956
+ # If the value is `false`, it means the operation is still in progress. If `true`
957
+ # , the operation is completed, and either `error` or `response` is available.
958
+ # Corresponds to the JSON property `done`
959
+ # @return [Boolean]
960
+ attr_accessor :done
961
+ alias_method :done?, :done
962
+
963
+ # The `Status` type defines a logical error model that is suitable for different
964
+ # programming environments, including REST APIs and RPC APIs. It is used by [
965
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
966
+ # data: error code, error message, and error details. You can find out more
967
+ # about this error model and how to work with it in the [API Design Guide](https:
968
+ # //cloud.google.com/apis/design/errors).
969
+ # Corresponds to the JSON property `error`
970
+ # @return [Google::Apis::CloudbuildV1alpha1::Status]
971
+ attr_accessor :error
972
+
973
+ # Service-specific metadata associated with the operation. It typically contains
974
+ # progress information and common metadata such as create time. Some services
975
+ # might not provide such metadata. Any method that returns a long-running
976
+ # operation should document the metadata type, if any.
977
+ # Corresponds to the JSON property `metadata`
978
+ # @return [Hash<String,Object>]
979
+ attr_accessor :metadata
980
+
981
+ # The server-assigned name, which is only unique within the same service that
982
+ # originally returns it. If you use the default HTTP mapping, the `name` should
983
+ # be a resource name ending with `operations/`unique_id``.
984
+ # Corresponds to the JSON property `name`
985
+ # @return [String]
986
+ attr_accessor :name
987
+
988
+ # The normal response of the operation in case of success. If the original
989
+ # method returns no data on success, such as `Delete`, the response is `google.
990
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
991
+ # the response should be the resource. For other methods, the response should
992
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
993
+ # example, if the original method name is `TakeSnapshot()`, the inferred
994
+ # response type is `TakeSnapshotResponse`.
995
+ # Corresponds to the JSON property `response`
996
+ # @return [Hash<String,Object>]
997
+ attr_accessor :response
998
+
999
+ def initialize(**args)
1000
+ update!(**args)
1001
+ end
1002
+
1003
+ # Update properties of this object
1004
+ def update!(**args)
1005
+ @done = args[:done] if args.key?(:done)
1006
+ @error = args[:error] if args.key?(:error)
1007
+ @metadata = args[:metadata] if args.key?(:metadata)
1008
+ @name = args[:name] if args.key?(:name)
1009
+ @response = args[:response] if args.key?(:response)
1010
+ end
1011
+ end
1012
+
1013
+ # Location of the source in a Google Cloud Source Repository.
1014
+ class RepoSource
1015
+ include Google::Apis::Core::Hashable
1016
+
1017
+ # Regex matching branches to build. The syntax of the regular expressions
1018
+ # accepted is the syntax accepted by RE2 and described at https://github.com/
1019
+ # google/re2/wiki/Syntax
1020
+ # Corresponds to the JSON property `branchName`
1021
+ # @return [String]
1022
+ attr_accessor :branch_name
1023
+
1024
+ # Explicit commit SHA to build.
1025
+ # Corresponds to the JSON property `commitSha`
1026
+ # @return [String]
1027
+ attr_accessor :commit_sha
1028
+
1029
+ # Directory, relative to the source root, in which to run the build. This must
1030
+ # be a relative path. If a step's `dir` is specified and is an absolute path,
1031
+ # this value is ignored for that step's execution.
1032
+ # Corresponds to the JSON property `dir`
1033
+ # @return [String]
1034
+ attr_accessor :dir
1035
+
1036
+ # Only trigger a build if the revision regex does NOT match the revision regex.
1037
+ # Corresponds to the JSON property `invertRegex`
1038
+ # @return [Boolean]
1039
+ attr_accessor :invert_regex
1040
+ alias_method :invert_regex?, :invert_regex
1041
+
1042
+ # ID of the project that owns the Cloud Source Repository. If omitted, the
1043
+ # project ID requesting the build is assumed.
1044
+ # Corresponds to the JSON property `projectId`
1045
+ # @return [String]
1046
+ attr_accessor :project_id
1047
+
1048
+ # Required. Name of the Cloud Source Repository.
1049
+ # Corresponds to the JSON property `repoName`
1050
+ # @return [String]
1051
+ attr_accessor :repo_name
1052
+
1053
+ # Substitutions to use in a triggered build. Should only be used with
1054
+ # RunBuildTrigger
1055
+ # Corresponds to the JSON property `substitutions`
1056
+ # @return [Hash<String,String>]
1057
+ attr_accessor :substitutions
1058
+
1059
+ # Regex matching tags to build. The syntax of the regular expressions accepted
1060
+ # is the syntax accepted by RE2 and described at https://github.com/google/re2/
1061
+ # wiki/Syntax
1062
+ # Corresponds to the JSON property `tagName`
1063
+ # @return [String]
1064
+ attr_accessor :tag_name
1065
+
1066
+ def initialize(**args)
1067
+ update!(**args)
1068
+ end
1069
+
1070
+ # Update properties of this object
1071
+ def update!(**args)
1072
+ @branch_name = args[:branch_name] if args.key?(:branch_name)
1073
+ @commit_sha = args[:commit_sha] if args.key?(:commit_sha)
1074
+ @dir = args[:dir] if args.key?(:dir)
1075
+ @invert_regex = args[:invert_regex] if args.key?(:invert_regex)
1076
+ @project_id = args[:project_id] if args.key?(:project_id)
1077
+ @repo_name = args[:repo_name] if args.key?(:repo_name)
1078
+ @substitutions = args[:substitutions] if args.key?(:substitutions)
1079
+ @tag_name = args[:tag_name] if args.key?(:tag_name)
1080
+ end
1081
+ end
1082
+
1083
+ # Artifacts created by the build pipeline.
1084
+ class Results
1085
+ include Google::Apis::Core::Hashable
1086
+
1087
+ # Path to the artifact manifest. Only populated when artifacts are uploaded.
1088
+ # Corresponds to the JSON property `artifactManifest`
1089
+ # @return [String]
1090
+ attr_accessor :artifact_manifest
1091
+
1092
+ # Start and end times for a build execution phase.
1093
+ # Corresponds to the JSON property `artifactTiming`
1094
+ # @return [Google::Apis::CloudbuildV1alpha1::TimeSpan]
1095
+ attr_accessor :artifact_timing
1096
+
1097
+ # List of build step digests, in the order corresponding to build step indices.
1098
+ # Corresponds to the JSON property `buildStepImages`
1099
+ # @return [Array<String>]
1100
+ attr_accessor :build_step_images
1101
+
1102
+ # List of build step outputs, produced by builder images, in the order
1103
+ # corresponding to build step indices. [Cloud Builders](https://cloud.google.com/
1104
+ # cloud-build/docs/cloud-builders) can produce this output by writing to `$
1105
+ # BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
1106
+ # Corresponds to the JSON property `buildStepOutputs`
1107
+ # @return [Array<String>]
1108
+ attr_accessor :build_step_outputs
1109
+
1110
+ # Container images that were built as a part of the build.
1111
+ # Corresponds to the JSON property `images`
1112
+ # @return [Array<Google::Apis::CloudbuildV1alpha1::BuiltImage>]
1113
+ attr_accessor :images
1114
+
1115
+ # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1116
+ # Corresponds to the JSON property `numArtifacts`
1117
+ # @return [Fixnum]
1118
+ attr_accessor :num_artifacts
1119
+
1120
+ def initialize(**args)
1121
+ update!(**args)
1122
+ end
1123
+
1124
+ # Update properties of this object
1125
+ def update!(**args)
1126
+ @artifact_manifest = args[:artifact_manifest] if args.key?(:artifact_manifest)
1127
+ @artifact_timing = args[:artifact_timing] if args.key?(:artifact_timing)
1128
+ @build_step_images = args[:build_step_images] if args.key?(:build_step_images)
1129
+ @build_step_outputs = args[:build_step_outputs] if args.key?(:build_step_outputs)
1130
+ @images = args[:images] if args.key?(:images)
1131
+ @num_artifacts = args[:num_artifacts] if args.key?(:num_artifacts)
1132
+ end
1133
+ end
1134
+
1135
+ # SMTPDelivery is the delivery configuration for an SMTP (email) notification.
1136
+ class SmtpDelivery
1137
+ include Google::Apis::Core::Hashable
1138
+
1139
+ # This is the SMTP account/email that appears in the `From:` of the email. If
1140
+ # empty, it is assumed to be sender.
1141
+ # Corresponds to the JSON property `fromAddress`
1142
+ # @return [String]
1143
+ attr_accessor :from_address
1144
+
1145
+ # NotifierSecretRef contains the reference to a secret stored in the
1146
+ # corresponding NotifierSpec.
1147
+ # Corresponds to the JSON property `password`
1148
+ # @return [Google::Apis::CloudbuildV1alpha1::NotifierSecretRef]
1149
+ attr_accessor :password
1150
+
1151
+ # The SMTP port of the server.
1152
+ # Corresponds to the JSON property `port`
1153
+ # @return [String]
1154
+ attr_accessor :port
1155
+
1156
+ # This is the list of addresses to which we send the email (i.e. in the `To:` of
1157
+ # the email).
1158
+ # Corresponds to the JSON property `recipientAddresses`
1159
+ # @return [Array<String>]
1160
+ attr_accessor :recipient_addresses
1161
+
1162
+ # This is the SMTP account/email that is used to send the message.
1163
+ # Corresponds to the JSON property `senderAddress`
1164
+ # @return [String]
1165
+ attr_accessor :sender_address
1166
+
1167
+ # The address of the SMTP server.
1168
+ # Corresponds to the JSON property `server`
1169
+ # @return [String]
1170
+ attr_accessor :server
1171
+
1172
+ def initialize(**args)
1173
+ update!(**args)
1174
+ end
1175
+
1176
+ # Update properties of this object
1177
+ def update!(**args)
1178
+ @from_address = args[:from_address] if args.key?(:from_address)
1179
+ @password = args[:password] if args.key?(:password)
1180
+ @port = args[:port] if args.key?(:port)
1181
+ @recipient_addresses = args[:recipient_addresses] if args.key?(:recipient_addresses)
1182
+ @sender_address = args[:sender_address] if args.key?(:sender_address)
1183
+ @server = args[:server] if args.key?(:server)
1184
+ end
1185
+ end
1186
+
1187
+ # Pairs a set of secret environment variables containing encrypted values with
1188
+ # the Cloud KMS key to use to decrypt the value.
1189
+ class Secret
1190
+ include Google::Apis::Core::Hashable
1191
+
1192
+ # Cloud KMS key name to use to decrypt these envs.
1193
+ # Corresponds to the JSON property `kmsKeyName`
1194
+ # @return [String]
1195
+ attr_accessor :kms_key_name
1196
+
1197
+ # Map of environment variable name to its encrypted value. Secret environment
1198
+ # variables must be unique across all of a build's secrets, and must be used by
1199
+ # at least one build step. Values can be at most 64 KB in size. There can be at
1200
+ # most 100 secret values across all of a build's secrets.
1201
+ # Corresponds to the JSON property `secretEnv`
1202
+ # @return [Hash<String,String>]
1203
+ attr_accessor :secret_env
1204
+
1205
+ def initialize(**args)
1206
+ update!(**args)
1207
+ end
1208
+
1209
+ # Update properties of this object
1210
+ def update!(**args)
1211
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
1212
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
1213
+ end
1214
+ end
1215
+
1216
+ # SlackDelivery is the delivery configuration for delivering Slack messages via
1217
+ # webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/
1218
+ # webhooks.
1219
+ class SlackDelivery
1220
+ include Google::Apis::Core::Hashable
1221
+
1222
+ # NotifierSecretRef contains the reference to a secret stored in the
1223
+ # corresponding NotifierSpec.
1224
+ # Corresponds to the JSON property `webhookUri`
1225
+ # @return [Google::Apis::CloudbuildV1alpha1::NotifierSecretRef]
1226
+ attr_accessor :webhook_uri
1227
+
1228
+ def initialize(**args)
1229
+ update!(**args)
1230
+ end
1231
+
1232
+ # Update properties of this object
1233
+ def update!(**args)
1234
+ @webhook_uri = args[:webhook_uri] if args.key?(:webhook_uri)
1235
+ end
1236
+ end
1237
+
1238
+ # Location of the source in a supported storage service.
1239
+ class Source
1240
+ include Google::Apis::Core::Hashable
1241
+
1242
+ # Location of the source in a Google Cloud Source Repository.
1243
+ # Corresponds to the JSON property `repoSource`
1244
+ # @return [Google::Apis::CloudbuildV1alpha1::RepoSource]
1245
+ attr_accessor :repo_source
1246
+
1247
+ # Location of the source in an archive file in Google Cloud Storage.
1248
+ # Corresponds to the JSON property `storageSource`
1249
+ # @return [Google::Apis::CloudbuildV1alpha1::StorageSource]
1250
+ attr_accessor :storage_source
1251
+
1252
+ def initialize(**args)
1253
+ update!(**args)
1254
+ end
1255
+
1256
+ # Update properties of this object
1257
+ def update!(**args)
1258
+ @repo_source = args[:repo_source] if args.key?(:repo_source)
1259
+ @storage_source = args[:storage_source] if args.key?(:storage_source)
1260
+ end
1261
+ end
1262
+
1263
+ # Provenance of the source. Ways to find the original source, or verify that
1264
+ # some source was used for this build.
1265
+ class SourceProvenance
1266
+ include Google::Apis::Core::Hashable
1267
+
1268
+ # Output only. Hash(es) of the build source, which can be used to verify that
1269
+ # the original source integrity was maintained in the build. Note that `
1270
+ # FileHashes` will only be populated if `BuildOptions` has requested a `
1271
+ # SourceProvenanceHash`. The keys to this map are file paths used as build
1272
+ # source and the values contain the hash values for those files. If the build
1273
+ # source came in a single package such as a gzipped tarfile (`.tar.gz`), the `
1274
+ # FileHash` will be for the single path to that file.
1275
+ # Corresponds to the JSON property `fileHashes`
1276
+ # @return [Hash<String,Google::Apis::CloudbuildV1alpha1::FileHashes>]
1277
+ attr_accessor :file_hashes
1278
+
1279
+ # Location of the source in a Google Cloud Source Repository.
1280
+ # Corresponds to the JSON property `resolvedRepoSource`
1281
+ # @return [Google::Apis::CloudbuildV1alpha1::RepoSource]
1282
+ attr_accessor :resolved_repo_source
1283
+
1284
+ # Location of the source in an archive file in Google Cloud Storage.
1285
+ # Corresponds to the JSON property `resolvedStorageSource`
1286
+ # @return [Google::Apis::CloudbuildV1alpha1::StorageSource]
1287
+ attr_accessor :resolved_storage_source
1288
+
1289
+ def initialize(**args)
1290
+ update!(**args)
1291
+ end
1292
+
1293
+ # Update properties of this object
1294
+ def update!(**args)
1295
+ @file_hashes = args[:file_hashes] if args.key?(:file_hashes)
1296
+ @resolved_repo_source = args[:resolved_repo_source] if args.key?(:resolved_repo_source)
1297
+ @resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source)
1298
+ end
1299
+ end
1300
+
1301
+ # The `Status` type defines a logical error model that is suitable for different
1302
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1303
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1304
+ # data: error code, error message, and error details. You can find out more
1305
+ # about this error model and how to work with it in the [API Design Guide](https:
1306
+ # //cloud.google.com/apis/design/errors).
1307
+ class Status
1308
+ include Google::Apis::Core::Hashable
1309
+
1310
+ # The status code, which should be an enum value of google.rpc.Code.
1311
+ # Corresponds to the JSON property `code`
1312
+ # @return [Fixnum]
1313
+ attr_accessor :code
1314
+
1315
+ # A list of messages that carry the error details. There is a common set of
1316
+ # message types for APIs to use.
1317
+ # Corresponds to the JSON property `details`
1318
+ # @return [Array<Hash<String,Object>>]
1319
+ attr_accessor :details
1320
+
1321
+ # A developer-facing error message, which should be in English. Any user-facing
1322
+ # error message should be localized and sent in the google.rpc.Status.details
1323
+ # field, or localized by the client.
1324
+ # Corresponds to the JSON property `message`
1325
+ # @return [String]
1326
+ attr_accessor :message
1327
+
1328
+ def initialize(**args)
1329
+ update!(**args)
1330
+ end
1331
+
1332
+ # Update properties of this object
1333
+ def update!(**args)
1334
+ @code = args[:code] if args.key?(:code)
1335
+ @details = args[:details] if args.key?(:details)
1336
+ @message = args[:message] if args.key?(:message)
1337
+ end
1338
+ end
1339
+
1340
+ # Location of the source in an archive file in Google Cloud Storage.
1341
+ class StorageSource
1342
+ include Google::Apis::Core::Hashable
1343
+
1344
+ # Google Cloud Storage bucket containing the source (see [Bucket Name
1345
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
1346
+ # ).
1347
+ # Corresponds to the JSON property `bucket`
1348
+ # @return [String]
1349
+ attr_accessor :bucket
1350
+
1351
+ # Google Cloud Storage generation for the object. If the generation is omitted,
1352
+ # the latest generation will be used.
1353
+ # Corresponds to the JSON property `generation`
1354
+ # @return [Fixnum]
1355
+ attr_accessor :generation
1356
+
1357
+ # Google Cloud Storage object containing the source. This object must be a
1358
+ # gzipped archive file (`.tar.gz`) containing source to build.
1359
+ # Corresponds to the JSON property `object`
1360
+ # @return [String]
1361
+ attr_accessor :object
1362
+
1363
+ def initialize(**args)
1364
+ update!(**args)
1365
+ end
1366
+
1367
+ # Update properties of this object
1368
+ def update!(**args)
1369
+ @bucket = args[:bucket] if args.key?(:bucket)
1370
+ @generation = args[:generation] if args.key?(:generation)
1371
+ @object = args[:object] if args.key?(:object)
1372
+ end
1373
+ end
1374
+
1375
+ # Start and end times for a build execution phase.
1376
+ class TimeSpan
1377
+ include Google::Apis::Core::Hashable
1378
+
1379
+ # End of time span.
1380
+ # Corresponds to the JSON property `endTime`
1381
+ # @return [String]
1382
+ attr_accessor :end_time
1383
+
1384
+ # Start of time span.
1385
+ # Corresponds to the JSON property `startTime`
1386
+ # @return [String]
1387
+ attr_accessor :start_time
1388
+
1389
+ def initialize(**args)
1390
+ update!(**args)
1391
+ end
1392
+
1393
+ # Update properties of this object
1394
+ def update!(**args)
1395
+ @end_time = args[:end_time] if args.key?(:end_time)
1396
+ @start_time = args[:start_time] if args.key?(:start_time)
1397
+ end
1398
+ end
1399
+
1400
+ # Volume describes a Docker container volume which is mounted into build steps
1401
+ # in order to persist files across build step execution.
1402
+ class Volume
1403
+ include Google::Apis::Core::Hashable
1404
+
1405
+ # Name of the volume to mount. Volume names must be unique per build step and
1406
+ # must be valid names for Docker volumes. Each named volume must be used by at
1407
+ # least two build steps.
1408
+ # Corresponds to the JSON property `name`
1409
+ # @return [String]
1410
+ attr_accessor :name
1411
+
1412
+ # Path at which to mount the volume. Paths must be absolute and cannot conflict
1413
+ # with other volume paths on the same build step or with certain reserved volume
1414
+ # paths.
1415
+ # Corresponds to the JSON property `path`
1416
+ # @return [String]
1417
+ attr_accessor :path
1418
+
1419
+ def initialize(**args)
1420
+ update!(**args)
1421
+ end
1422
+
1423
+ # Update properties of this object
1424
+ def update!(**args)
1425
+ @name = args[:name] if args.key?(:name)
1426
+ @path = args[:path] if args.key?(:path)
1427
+ end
1428
+ end
1429
+
1430
+ # WorkerConfig defines the configuration to be used for a creating workers in
1431
+ # the pool.
1432
+ class WorkerConfig
1433
+ include Google::Apis::Core::Hashable
1434
+
1435
+ # Size of the disk attached to the worker, in GB. See https://cloud.google.com/
1436
+ # compute/docs/disks/ If `0` is specified, Cloud Build will use a standard disk
1437
+ # size. `disk_size` is overridden if you specify a different disk size in `
1438
+ # build_options`. In this case, a VM with a disk size specified in the `
1439
+ # build_options` will be created on demand at build time. For more information
1440
+ # see https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.
1441
+ # builds#buildoptions
1442
+ # Corresponds to the JSON property `diskSizeGb`
1443
+ # @return [Fixnum]
1444
+ attr_accessor :disk_size_gb
1445
+
1446
+ # Machine Type of the worker, such as n1-standard-1. See https://cloud.google.
1447
+ # com/compute/docs/machine-types. If left blank, Cloud Build will use a standard
1448
+ # unspecified machine to create the worker pool. `machine_type` is overridden if
1449
+ # you specify a different machine type in `build_options`. In this case, the VM
1450
+ # specified in the `build_options` will be created on demand at build time. For
1451
+ # more information see https://cloud.google.com/cloud-build/docs/speeding-up-
1452
+ # builds#using_custom_virtual_machine_sizes
1453
+ # Corresponds to the JSON property `machineType`
1454
+ # @return [String]
1455
+ attr_accessor :machine_type
1456
+
1457
+ # Network describes the GCP network used to create workers in.
1458
+ # Corresponds to the JSON property `network`
1459
+ # @return [Google::Apis::CloudbuildV1alpha1::Network]
1460
+ attr_accessor :network
1461
+
1462
+ # The tag applied to the worker, and the same tag used by the firewall rule. It
1463
+ # is used to identify the Cloud Build workers among other VMs. The default value
1464
+ # for tag is `worker`.
1465
+ # Corresponds to the JSON property `tag`
1466
+ # @return [String]
1467
+ attr_accessor :tag
1468
+
1469
+ def initialize(**args)
1470
+ update!(**args)
1471
+ end
1472
+
1473
+ # Update properties of this object
1474
+ def update!(**args)
1475
+ @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
1476
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
1477
+ @network = args[:network] if args.key?(:network)
1478
+ @tag = args[:tag] if args.key?(:tag)
1479
+ end
1480
+ end
1481
+
1482
+ # Configuration for a WorkerPool to run the builds. Workers are machines that
1483
+ # Cloud Build uses to run your builds. By default, all workers run in a project
1484
+ # owned by Cloud Build. To have full control over the workers that execute your
1485
+ # builds -- such as enabling them to access private resources on your private
1486
+ # network -- you can request Cloud Build to run the workers in your own project
1487
+ # by creating a custom workers pool.
1488
+ class WorkerPool
1489
+ include Google::Apis::Core::Hashable
1490
+
1491
+ # Output only. Time at which the request to create the `WorkerPool` was received.
1492
+ # Corresponds to the JSON property `createTime`
1493
+ # @return [String]
1494
+ attr_accessor :create_time
1495
+
1496
+ # Output only. Time at which the request to delete the `WorkerPool` was received.
1497
+ # Corresponds to the JSON property `deleteTime`
1498
+ # @return [String]
1499
+ attr_accessor :delete_time
1500
+
1501
+ # User-defined name of the `WorkerPool`.
1502
+ # Corresponds to the JSON property `name`
1503
+ # @return [String]
1504
+ attr_accessor :name
1505
+
1506
+ # The project ID of the GCP project for which the `WorkerPool` is created.
1507
+ # Corresponds to the JSON property `projectId`
1508
+ # @return [String]
1509
+ attr_accessor :project_id
1510
+
1511
+ # List of regions to create the `WorkerPool`. Regions can't be empty. If Cloud
1512
+ # Build adds a new GCP region in the future, the existing `WorkerPool` will not
1513
+ # be enabled in the new region automatically; you must add the new region to the
1514
+ # `regions` field to enable the `WorkerPool` in that region.
1515
+ # Corresponds to the JSON property `regions`
1516
+ # @return [Array<String>]
1517
+ attr_accessor :regions
1518
+
1519
+ # Output only. The service account used to manage the `WorkerPool`. The service
1520
+ # account must have the Compute Instance Admin (Beta) permission at the project
1521
+ # level.
1522
+ # Corresponds to the JSON property `serviceAccountEmail`
1523
+ # @return [String]
1524
+ attr_accessor :service_account_email
1525
+
1526
+ # Output only. WorkerPool Status.
1527
+ # Corresponds to the JSON property `status`
1528
+ # @return [String]
1529
+ attr_accessor :status
1530
+
1531
+ # Output only. Time at which the request to update the `WorkerPool` was received.
1532
+ # Corresponds to the JSON property `updateTime`
1533
+ # @return [String]
1534
+ attr_accessor :update_time
1535
+
1536
+ # WorkerConfig defines the configuration to be used for a creating workers in
1537
+ # the pool.
1538
+ # Corresponds to the JSON property `workerConfig`
1539
+ # @return [Google::Apis::CloudbuildV1alpha1::WorkerConfig]
1540
+ attr_accessor :worker_config
1541
+
1542
+ # Total number of workers to be created across all requested regions.
1543
+ # Corresponds to the JSON property `workerCount`
1544
+ # @return [Fixnum]
1545
+ attr_accessor :worker_count
1546
+
1547
+ def initialize(**args)
1548
+ update!(**args)
1549
+ end
1550
+
1551
+ # Update properties of this object
1552
+ def update!(**args)
1553
+ @create_time = args[:create_time] if args.key?(:create_time)
1554
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
1555
+ @name = args[:name] if args.key?(:name)
1556
+ @project_id = args[:project_id] if args.key?(:project_id)
1557
+ @regions = args[:regions] if args.key?(:regions)
1558
+ @service_account_email = args[:service_account_email] if args.key?(:service_account_email)
1559
+ @status = args[:status] if args.key?(:status)
1560
+ @update_time = args[:update_time] if args.key?(:update_time)
1561
+ @worker_config = args[:worker_config] if args.key?(:worker_config)
1562
+ @worker_count = args[:worker_count] if args.key?(:worker_count)
1563
+ end
1564
+ end
1565
+ end
1566
+ end
1567
+ end