google-apis-cloudbuild_v1alpha2 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: 7296ba437a532961bf38a7cb102f14f2665e667a67507c329ee0bb102d53ce54
4
+ data.tar.gz: b3a50d55d8b1c478653d65ddd71d2a4d8b6969c536932260b015d198f95be7fa
5
+ SHA512:
6
+ metadata.gz: cb04f85cb56d11f20c4235dcadc03039ea856c3b234b846088d4ed150850969334972c5f748ab5a825f55b3d620ff9827da397d9ddbc0e598becbdf9d9a63f9b
7
+ data.tar.gz: 8c5b36194472b68b5b5576103a7b21ebe02a7b7b56f0562d12d20b5ccc2b9b1b5edf0a52fa00d895432d44053bd2ed7c4956d8f16b206965b720c7ee68d25ef0
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-cloudbuild_v1alpha2
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/cloudbuild_v1alpha2/*.rb
9
+ lib/google/apis/cloudbuild_v1alpha2.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-cloudbuild_v1alpha2
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 V1alpha2 of the Cloud Build API
2
+
3
+ This is a simple client library for version V1alpha2 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_v1alpha2', '~> 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_v1alpha2
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_v1alpha2"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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_v1alpha2`, 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_v1alpha2"
@@ -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_v1alpha2/service.rb'
16
+ require 'google/apis/cloudbuild_v1alpha2/classes.rb'
17
+ require 'google/apis/cloudbuild_v1alpha2/representations.rb'
18
+ require 'google/apis/cloudbuild_v1alpha2/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 CloudbuildV1alpha2
28
+ # Version of the Cloud Build API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V1alpha2'
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,1519 @@
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 CloudbuildV1alpha2
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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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::CloudbuildV1alpha2::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 specified project.
709
+ # Corresponds to the JSON property `workerPools`
710
+ # @return [Array<Google::Apis::CloudbuildV1alpha2::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 network configuration for a `WorkerPool`.
724
+ class NetworkConfig
725
+ include Google::Apis::Core::Hashable
726
+
727
+ # Required. Immutable. The network definition that the workers are peered to. If
728
+ # this section is left empty, the workers will be peered to WorkerPool.
729
+ # project_id on the default network. Must be in the format `projects/`project`/
730
+ # global/networks/`network``, where `project` is a project number, such as `
731
+ # 12345`, and `network` is the name of a VPC network in the project.
732
+ # Corresponds to the JSON property `peeredNetwork`
733
+ # @return [String]
734
+ attr_accessor :peered_network
735
+
736
+ def initialize(**args)
737
+ update!(**args)
738
+ end
739
+
740
+ # Update properties of this object
741
+ def update!(**args)
742
+ @peered_network = args[:peered_network] if args.key?(:peered_network)
743
+ end
744
+ end
745
+
746
+ # Notification is the container which holds the data that is relevant to this
747
+ # particular notification.
748
+ class Notification
749
+ include Google::Apis::Core::Hashable
750
+
751
+ # The filter string to use for notification filtering. Currently, this is
752
+ # assumed to be a CEL program. See https://opensource.google/projects/cel for
753
+ # more.
754
+ # Corresponds to the JSON property `filter`
755
+ # @return [String]
756
+ attr_accessor :filter
757
+
758
+ # HTTPDelivery is the delivery configuration for an HTTP notification.
759
+ # Corresponds to the JSON property `httpDelivery`
760
+ # @return [Google::Apis::CloudbuildV1alpha2::HttpDelivery]
761
+ attr_accessor :http_delivery
762
+
763
+ # SlackDelivery is the delivery configuration for delivering Slack messages via
764
+ # webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/
765
+ # webhooks.
766
+ # Corresponds to the JSON property `slackDelivery`
767
+ # @return [Google::Apis::CloudbuildV1alpha2::SlackDelivery]
768
+ attr_accessor :slack_delivery
769
+
770
+ # SMTPDelivery is the delivery configuration for an SMTP (email) notification.
771
+ # Corresponds to the JSON property `smtpDelivery`
772
+ # @return [Google::Apis::CloudbuildV1alpha2::SmtpDelivery]
773
+ attr_accessor :smtp_delivery
774
+
775
+ # Escape hatch for users to supply custom delivery configs.
776
+ # Corresponds to the JSON property `structDelivery`
777
+ # @return [Hash<String,Object>]
778
+ attr_accessor :struct_delivery
779
+
780
+ def initialize(**args)
781
+ update!(**args)
782
+ end
783
+
784
+ # Update properties of this object
785
+ def update!(**args)
786
+ @filter = args[:filter] if args.key?(:filter)
787
+ @http_delivery = args[:http_delivery] if args.key?(:http_delivery)
788
+ @slack_delivery = args[:slack_delivery] if args.key?(:slack_delivery)
789
+ @smtp_delivery = args[:smtp_delivery] if args.key?(:smtp_delivery)
790
+ @struct_delivery = args[:struct_delivery] if args.key?(:struct_delivery)
791
+ end
792
+ end
793
+
794
+ # NotifierConfig is the top-level configuration message.
795
+ class NotifierConfig
796
+ include Google::Apis::Core::Hashable
797
+
798
+ # The API version of this configuration format.
799
+ # Corresponds to the JSON property `apiVersion`
800
+ # @return [String]
801
+ attr_accessor :api_version
802
+
803
+ # The type of notifier to use (e.g. SMTPNotifier).
804
+ # Corresponds to the JSON property `kind`
805
+ # @return [String]
806
+ attr_accessor :kind
807
+
808
+ # NotifierMetadata contains the data which can be used to reference or describe
809
+ # this notifier.
810
+ # Corresponds to the JSON property `metadata`
811
+ # @return [Google::Apis::CloudbuildV1alpha2::NotifierMetadata]
812
+ attr_accessor :metadata
813
+
814
+ # NotifierSpec is the configuration container for notifications.
815
+ # Corresponds to the JSON property `spec`
816
+ # @return [Google::Apis::CloudbuildV1alpha2::NotifierSpec]
817
+ attr_accessor :spec
818
+
819
+ def initialize(**args)
820
+ update!(**args)
821
+ end
822
+
823
+ # Update properties of this object
824
+ def update!(**args)
825
+ @api_version = args[:api_version] if args.key?(:api_version)
826
+ @kind = args[:kind] if args.key?(:kind)
827
+ @metadata = args[:metadata] if args.key?(:metadata)
828
+ @spec = args[:spec] if args.key?(:spec)
829
+ end
830
+ end
831
+
832
+ # NotifierMetadata contains the data which can be used to reference or describe
833
+ # this notifier.
834
+ class NotifierMetadata
835
+ include Google::Apis::Core::Hashable
836
+
837
+ # The human-readable and user-given name for the notifier. For example: "repo-
838
+ # merge-email-notifier".
839
+ # Corresponds to the JSON property `name`
840
+ # @return [String]
841
+ attr_accessor :name
842
+
843
+ # The string representing the name and version of notifier to deploy. Expected
844
+ # to be of the form of "/:". For example: "gcr.io/my-project/notifiers/smtp:1.2.
845
+ # 34".
846
+ # Corresponds to the JSON property `notifier`
847
+ # @return [String]
848
+ attr_accessor :notifier
849
+
850
+ def initialize(**args)
851
+ update!(**args)
852
+ end
853
+
854
+ # Update properties of this object
855
+ def update!(**args)
856
+ @name = args[:name] if args.key?(:name)
857
+ @notifier = args[:notifier] if args.key?(:notifier)
858
+ end
859
+ end
860
+
861
+ # NotifierSecret is the container that maps a secret name (reference) to its
862
+ # Google Cloud Secret Manager resource path.
863
+ class NotifierSecret
864
+ include Google::Apis::Core::Hashable
865
+
866
+ # Name is the local name of the secret, such as the verbatim string "my-smtp-
867
+ # password".
868
+ # Corresponds to the JSON property `name`
869
+ # @return [String]
870
+ attr_accessor :name
871
+
872
+ # Value is interpreted to be a resource path for fetching the actual (versioned)
873
+ # secret data for this secret. For example, this would be a Google Cloud Secret
874
+ # Manager secret version resource path like: "projects/my-project/secrets/my-
875
+ # secret/versions/latest".
876
+ # Corresponds to the JSON property `value`
877
+ # @return [String]
878
+ attr_accessor :value
879
+
880
+ def initialize(**args)
881
+ update!(**args)
882
+ end
883
+
884
+ # Update properties of this object
885
+ def update!(**args)
886
+ @name = args[:name] if args.key?(:name)
887
+ @value = args[:value] if args.key?(:value)
888
+ end
889
+ end
890
+
891
+ # NotifierSecretRef contains the reference to a secret stored in the
892
+ # corresponding NotifierSpec.
893
+ class NotifierSecretRef
894
+ include Google::Apis::Core::Hashable
895
+
896
+ # The value of `secret_ref` should be a `name` that is registered in a `Secret`
897
+ # in the `secrets` list of the `Spec`.
898
+ # Corresponds to the JSON property `secretRef`
899
+ # @return [String]
900
+ attr_accessor :secret_ref
901
+
902
+ def initialize(**args)
903
+ update!(**args)
904
+ end
905
+
906
+ # Update properties of this object
907
+ def update!(**args)
908
+ @secret_ref = args[:secret_ref] if args.key?(:secret_ref)
909
+ end
910
+ end
911
+
912
+ # NotifierSpec is the configuration container for notifications.
913
+ class NotifierSpec
914
+ include Google::Apis::Core::Hashable
915
+
916
+ # Notification is the container which holds the data that is relevant to this
917
+ # particular notification.
918
+ # Corresponds to the JSON property `notification`
919
+ # @return [Google::Apis::CloudbuildV1alpha2::Notification]
920
+ attr_accessor :notification
921
+
922
+ # Configurations for secret resources used by this particular notifier.
923
+ # Corresponds to the JSON property `secrets`
924
+ # @return [Array<Google::Apis::CloudbuildV1alpha2::NotifierSecret>]
925
+ attr_accessor :secrets
926
+
927
+ def initialize(**args)
928
+ update!(**args)
929
+ end
930
+
931
+ # Update properties of this object
932
+ def update!(**args)
933
+ @notification = args[:notification] if args.key?(:notification)
934
+ @secrets = args[:secrets] if args.key?(:secrets)
935
+ end
936
+ end
937
+
938
+ # This resource represents a long-running operation that is the result of a
939
+ # network API call.
940
+ class Operation
941
+ include Google::Apis::Core::Hashable
942
+
943
+ # If the value is `false`, it means the operation is still in progress. If `true`
944
+ # , the operation is completed, and either `error` or `response` is available.
945
+ # Corresponds to the JSON property `done`
946
+ # @return [Boolean]
947
+ attr_accessor :done
948
+ alias_method :done?, :done
949
+
950
+ # The `Status` type defines a logical error model that is suitable for different
951
+ # programming environments, including REST APIs and RPC APIs. It is used by [
952
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
953
+ # data: error code, error message, and error details. You can find out more
954
+ # about this error model and how to work with it in the [API Design Guide](https:
955
+ # //cloud.google.com/apis/design/errors).
956
+ # Corresponds to the JSON property `error`
957
+ # @return [Google::Apis::CloudbuildV1alpha2::Status]
958
+ attr_accessor :error
959
+
960
+ # Service-specific metadata associated with the operation. It typically contains
961
+ # progress information and common metadata such as create time. Some services
962
+ # might not provide such metadata. Any method that returns a long-running
963
+ # operation should document the metadata type, if any.
964
+ # Corresponds to the JSON property `metadata`
965
+ # @return [Hash<String,Object>]
966
+ attr_accessor :metadata
967
+
968
+ # The server-assigned name, which is only unique within the same service that
969
+ # originally returns it. If you use the default HTTP mapping, the `name` should
970
+ # be a resource name ending with `operations/`unique_id``.
971
+ # Corresponds to the JSON property `name`
972
+ # @return [String]
973
+ attr_accessor :name
974
+
975
+ # The normal response of the operation in case of success. If the original
976
+ # method returns no data on success, such as `Delete`, the response is `google.
977
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
978
+ # the response should be the resource. For other methods, the response should
979
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
980
+ # example, if the original method name is `TakeSnapshot()`, the inferred
981
+ # response type is `TakeSnapshotResponse`.
982
+ # Corresponds to the JSON property `response`
983
+ # @return [Hash<String,Object>]
984
+ attr_accessor :response
985
+
986
+ def initialize(**args)
987
+ update!(**args)
988
+ end
989
+
990
+ # Update properties of this object
991
+ def update!(**args)
992
+ @done = args[:done] if args.key?(:done)
993
+ @error = args[:error] if args.key?(:error)
994
+ @metadata = args[:metadata] if args.key?(:metadata)
995
+ @name = args[:name] if args.key?(:name)
996
+ @response = args[:response] if args.key?(:response)
997
+ end
998
+ end
999
+
1000
+ # Location of the source in a Google Cloud Source Repository.
1001
+ class RepoSource
1002
+ include Google::Apis::Core::Hashable
1003
+
1004
+ # Regex matching branches to build. The syntax of the regular expressions
1005
+ # accepted is the syntax accepted by RE2 and described at https://github.com/
1006
+ # google/re2/wiki/Syntax
1007
+ # Corresponds to the JSON property `branchName`
1008
+ # @return [String]
1009
+ attr_accessor :branch_name
1010
+
1011
+ # Explicit commit SHA to build.
1012
+ # Corresponds to the JSON property `commitSha`
1013
+ # @return [String]
1014
+ attr_accessor :commit_sha
1015
+
1016
+ # Directory, relative to the source root, in which to run the build. This must
1017
+ # be a relative path. If a step's `dir` is specified and is an absolute path,
1018
+ # this value is ignored for that step's execution.
1019
+ # Corresponds to the JSON property `dir`
1020
+ # @return [String]
1021
+ attr_accessor :dir
1022
+
1023
+ # Only trigger a build if the revision regex does NOT match the revision regex.
1024
+ # Corresponds to the JSON property `invertRegex`
1025
+ # @return [Boolean]
1026
+ attr_accessor :invert_regex
1027
+ alias_method :invert_regex?, :invert_regex
1028
+
1029
+ # ID of the project that owns the Cloud Source Repository. If omitted, the
1030
+ # project ID requesting the build is assumed.
1031
+ # Corresponds to the JSON property `projectId`
1032
+ # @return [String]
1033
+ attr_accessor :project_id
1034
+
1035
+ # Required. Name of the Cloud Source Repository.
1036
+ # Corresponds to the JSON property `repoName`
1037
+ # @return [String]
1038
+ attr_accessor :repo_name
1039
+
1040
+ # Substitutions to use in a triggered build. Should only be used with
1041
+ # RunBuildTrigger
1042
+ # Corresponds to the JSON property `substitutions`
1043
+ # @return [Hash<String,String>]
1044
+ attr_accessor :substitutions
1045
+
1046
+ # Regex matching tags to build. The syntax of the regular expressions accepted
1047
+ # is the syntax accepted by RE2 and described at https://github.com/google/re2/
1048
+ # wiki/Syntax
1049
+ # Corresponds to the JSON property `tagName`
1050
+ # @return [String]
1051
+ attr_accessor :tag_name
1052
+
1053
+ def initialize(**args)
1054
+ update!(**args)
1055
+ end
1056
+
1057
+ # Update properties of this object
1058
+ def update!(**args)
1059
+ @branch_name = args[:branch_name] if args.key?(:branch_name)
1060
+ @commit_sha = args[:commit_sha] if args.key?(:commit_sha)
1061
+ @dir = args[:dir] if args.key?(:dir)
1062
+ @invert_regex = args[:invert_regex] if args.key?(:invert_regex)
1063
+ @project_id = args[:project_id] if args.key?(:project_id)
1064
+ @repo_name = args[:repo_name] if args.key?(:repo_name)
1065
+ @substitutions = args[:substitutions] if args.key?(:substitutions)
1066
+ @tag_name = args[:tag_name] if args.key?(:tag_name)
1067
+ end
1068
+ end
1069
+
1070
+ # Artifacts created by the build pipeline.
1071
+ class Results
1072
+ include Google::Apis::Core::Hashable
1073
+
1074
+ # Path to the artifact manifest. Only populated when artifacts are uploaded.
1075
+ # Corresponds to the JSON property `artifactManifest`
1076
+ # @return [String]
1077
+ attr_accessor :artifact_manifest
1078
+
1079
+ # Start and end times for a build execution phase.
1080
+ # Corresponds to the JSON property `artifactTiming`
1081
+ # @return [Google::Apis::CloudbuildV1alpha2::TimeSpan]
1082
+ attr_accessor :artifact_timing
1083
+
1084
+ # List of build step digests, in the order corresponding to build step indices.
1085
+ # Corresponds to the JSON property `buildStepImages`
1086
+ # @return [Array<String>]
1087
+ attr_accessor :build_step_images
1088
+
1089
+ # List of build step outputs, produced by builder images, in the order
1090
+ # corresponding to build step indices. [Cloud Builders](https://cloud.google.com/
1091
+ # cloud-build/docs/cloud-builders) can produce this output by writing to `$
1092
+ # BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
1093
+ # Corresponds to the JSON property `buildStepOutputs`
1094
+ # @return [Array<String>]
1095
+ attr_accessor :build_step_outputs
1096
+
1097
+ # Container images that were built as a part of the build.
1098
+ # Corresponds to the JSON property `images`
1099
+ # @return [Array<Google::Apis::CloudbuildV1alpha2::BuiltImage>]
1100
+ attr_accessor :images
1101
+
1102
+ # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1103
+ # Corresponds to the JSON property `numArtifacts`
1104
+ # @return [Fixnum]
1105
+ attr_accessor :num_artifacts
1106
+
1107
+ def initialize(**args)
1108
+ update!(**args)
1109
+ end
1110
+
1111
+ # Update properties of this object
1112
+ def update!(**args)
1113
+ @artifact_manifest = args[:artifact_manifest] if args.key?(:artifact_manifest)
1114
+ @artifact_timing = args[:artifact_timing] if args.key?(:artifact_timing)
1115
+ @build_step_images = args[:build_step_images] if args.key?(:build_step_images)
1116
+ @build_step_outputs = args[:build_step_outputs] if args.key?(:build_step_outputs)
1117
+ @images = args[:images] if args.key?(:images)
1118
+ @num_artifacts = args[:num_artifacts] if args.key?(:num_artifacts)
1119
+ end
1120
+ end
1121
+
1122
+ # SMTPDelivery is the delivery configuration for an SMTP (email) notification.
1123
+ class SmtpDelivery
1124
+ include Google::Apis::Core::Hashable
1125
+
1126
+ # This is the SMTP account/email that appears in the `From:` of the email. If
1127
+ # empty, it is assumed to be sender.
1128
+ # Corresponds to the JSON property `fromAddress`
1129
+ # @return [String]
1130
+ attr_accessor :from_address
1131
+
1132
+ # NotifierSecretRef contains the reference to a secret stored in the
1133
+ # corresponding NotifierSpec.
1134
+ # Corresponds to the JSON property `password`
1135
+ # @return [Google::Apis::CloudbuildV1alpha2::NotifierSecretRef]
1136
+ attr_accessor :password
1137
+
1138
+ # The SMTP port of the server.
1139
+ # Corresponds to the JSON property `port`
1140
+ # @return [String]
1141
+ attr_accessor :port
1142
+
1143
+ # This is the list of addresses to which we send the email (i.e. in the `To:` of
1144
+ # the email).
1145
+ # Corresponds to the JSON property `recipientAddresses`
1146
+ # @return [Array<String>]
1147
+ attr_accessor :recipient_addresses
1148
+
1149
+ # This is the SMTP account/email that is used to send the message.
1150
+ # Corresponds to the JSON property `senderAddress`
1151
+ # @return [String]
1152
+ attr_accessor :sender_address
1153
+
1154
+ # The address of the SMTP server.
1155
+ # Corresponds to the JSON property `server`
1156
+ # @return [String]
1157
+ attr_accessor :server
1158
+
1159
+ def initialize(**args)
1160
+ update!(**args)
1161
+ end
1162
+
1163
+ # Update properties of this object
1164
+ def update!(**args)
1165
+ @from_address = args[:from_address] if args.key?(:from_address)
1166
+ @password = args[:password] if args.key?(:password)
1167
+ @port = args[:port] if args.key?(:port)
1168
+ @recipient_addresses = args[:recipient_addresses] if args.key?(:recipient_addresses)
1169
+ @sender_address = args[:sender_address] if args.key?(:sender_address)
1170
+ @server = args[:server] if args.key?(:server)
1171
+ end
1172
+ end
1173
+
1174
+ # Pairs a set of secret environment variables containing encrypted values with
1175
+ # the Cloud KMS key to use to decrypt the value.
1176
+ class Secret
1177
+ include Google::Apis::Core::Hashable
1178
+
1179
+ # Cloud KMS key name to use to decrypt these envs.
1180
+ # Corresponds to the JSON property `kmsKeyName`
1181
+ # @return [String]
1182
+ attr_accessor :kms_key_name
1183
+
1184
+ # Map of environment variable name to its encrypted value. Secret environment
1185
+ # variables must be unique across all of a build's secrets, and must be used by
1186
+ # at least one build step. Values can be at most 64 KB in size. There can be at
1187
+ # most 100 secret values across all of a build's secrets.
1188
+ # Corresponds to the JSON property `secretEnv`
1189
+ # @return [Hash<String,String>]
1190
+ attr_accessor :secret_env
1191
+
1192
+ def initialize(**args)
1193
+ update!(**args)
1194
+ end
1195
+
1196
+ # Update properties of this object
1197
+ def update!(**args)
1198
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
1199
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
1200
+ end
1201
+ end
1202
+
1203
+ # SlackDelivery is the delivery configuration for delivering Slack messages via
1204
+ # webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/
1205
+ # webhooks.
1206
+ class SlackDelivery
1207
+ include Google::Apis::Core::Hashable
1208
+
1209
+ # NotifierSecretRef contains the reference to a secret stored in the
1210
+ # corresponding NotifierSpec.
1211
+ # Corresponds to the JSON property `webhookUri`
1212
+ # @return [Google::Apis::CloudbuildV1alpha2::NotifierSecretRef]
1213
+ attr_accessor :webhook_uri
1214
+
1215
+ def initialize(**args)
1216
+ update!(**args)
1217
+ end
1218
+
1219
+ # Update properties of this object
1220
+ def update!(**args)
1221
+ @webhook_uri = args[:webhook_uri] if args.key?(:webhook_uri)
1222
+ end
1223
+ end
1224
+
1225
+ # Location of the source in a supported storage service.
1226
+ class Source
1227
+ include Google::Apis::Core::Hashable
1228
+
1229
+ # Location of the source in a Google Cloud Source Repository.
1230
+ # Corresponds to the JSON property `repoSource`
1231
+ # @return [Google::Apis::CloudbuildV1alpha2::RepoSource]
1232
+ attr_accessor :repo_source
1233
+
1234
+ # Location of the source in an archive file in Google Cloud Storage.
1235
+ # Corresponds to the JSON property `storageSource`
1236
+ # @return [Google::Apis::CloudbuildV1alpha2::StorageSource]
1237
+ attr_accessor :storage_source
1238
+
1239
+ def initialize(**args)
1240
+ update!(**args)
1241
+ end
1242
+
1243
+ # Update properties of this object
1244
+ def update!(**args)
1245
+ @repo_source = args[:repo_source] if args.key?(:repo_source)
1246
+ @storage_source = args[:storage_source] if args.key?(:storage_source)
1247
+ end
1248
+ end
1249
+
1250
+ # Provenance of the source. Ways to find the original source, or verify that
1251
+ # some source was used for this build.
1252
+ class SourceProvenance
1253
+ include Google::Apis::Core::Hashable
1254
+
1255
+ # Output only. Hash(es) of the build source, which can be used to verify that
1256
+ # the original source integrity was maintained in the build. Note that `
1257
+ # FileHashes` will only be populated if `BuildOptions` has requested a `
1258
+ # SourceProvenanceHash`. The keys to this map are file paths used as build
1259
+ # source and the values contain the hash values for those files. If the build
1260
+ # source came in a single package such as a gzipped tarfile (`.tar.gz`), the `
1261
+ # FileHash` will be for the single path to that file.
1262
+ # Corresponds to the JSON property `fileHashes`
1263
+ # @return [Hash<String,Google::Apis::CloudbuildV1alpha2::FileHashes>]
1264
+ attr_accessor :file_hashes
1265
+
1266
+ # Location of the source in a Google Cloud Source Repository.
1267
+ # Corresponds to the JSON property `resolvedRepoSource`
1268
+ # @return [Google::Apis::CloudbuildV1alpha2::RepoSource]
1269
+ attr_accessor :resolved_repo_source
1270
+
1271
+ # Location of the source in an archive file in Google Cloud Storage.
1272
+ # Corresponds to the JSON property `resolvedStorageSource`
1273
+ # @return [Google::Apis::CloudbuildV1alpha2::StorageSource]
1274
+ attr_accessor :resolved_storage_source
1275
+
1276
+ def initialize(**args)
1277
+ update!(**args)
1278
+ end
1279
+
1280
+ # Update properties of this object
1281
+ def update!(**args)
1282
+ @file_hashes = args[:file_hashes] if args.key?(:file_hashes)
1283
+ @resolved_repo_source = args[:resolved_repo_source] if args.key?(:resolved_repo_source)
1284
+ @resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source)
1285
+ end
1286
+ end
1287
+
1288
+ # The `Status` type defines a logical error model that is suitable for different
1289
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1290
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1291
+ # data: error code, error message, and error details. You can find out more
1292
+ # about this error model and how to work with it in the [API Design Guide](https:
1293
+ # //cloud.google.com/apis/design/errors).
1294
+ class Status
1295
+ include Google::Apis::Core::Hashable
1296
+
1297
+ # The status code, which should be an enum value of google.rpc.Code.
1298
+ # Corresponds to the JSON property `code`
1299
+ # @return [Fixnum]
1300
+ attr_accessor :code
1301
+
1302
+ # A list of messages that carry the error details. There is a common set of
1303
+ # message types for APIs to use.
1304
+ # Corresponds to the JSON property `details`
1305
+ # @return [Array<Hash<String,Object>>]
1306
+ attr_accessor :details
1307
+
1308
+ # A developer-facing error message, which should be in English. Any user-facing
1309
+ # error message should be localized and sent in the google.rpc.Status.details
1310
+ # field, or localized by the client.
1311
+ # Corresponds to the JSON property `message`
1312
+ # @return [String]
1313
+ attr_accessor :message
1314
+
1315
+ def initialize(**args)
1316
+ update!(**args)
1317
+ end
1318
+
1319
+ # Update properties of this object
1320
+ def update!(**args)
1321
+ @code = args[:code] if args.key?(:code)
1322
+ @details = args[:details] if args.key?(:details)
1323
+ @message = args[:message] if args.key?(:message)
1324
+ end
1325
+ end
1326
+
1327
+ # Location of the source in an archive file in Google Cloud Storage.
1328
+ class StorageSource
1329
+ include Google::Apis::Core::Hashable
1330
+
1331
+ # Google Cloud Storage bucket containing the source (see [Bucket Name
1332
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
1333
+ # ).
1334
+ # Corresponds to the JSON property `bucket`
1335
+ # @return [String]
1336
+ attr_accessor :bucket
1337
+
1338
+ # Google Cloud Storage generation for the object. If the generation is omitted,
1339
+ # the latest generation will be used.
1340
+ # Corresponds to the JSON property `generation`
1341
+ # @return [Fixnum]
1342
+ attr_accessor :generation
1343
+
1344
+ # Google Cloud Storage object containing the source. This object must be a
1345
+ # gzipped archive file (`.tar.gz`) containing source to build.
1346
+ # Corresponds to the JSON property `object`
1347
+ # @return [String]
1348
+ attr_accessor :object
1349
+
1350
+ def initialize(**args)
1351
+ update!(**args)
1352
+ end
1353
+
1354
+ # Update properties of this object
1355
+ def update!(**args)
1356
+ @bucket = args[:bucket] if args.key?(:bucket)
1357
+ @generation = args[:generation] if args.key?(:generation)
1358
+ @object = args[:object] if args.key?(:object)
1359
+ end
1360
+ end
1361
+
1362
+ # Start and end times for a build execution phase.
1363
+ class TimeSpan
1364
+ include Google::Apis::Core::Hashable
1365
+
1366
+ # End of time span.
1367
+ # Corresponds to the JSON property `endTime`
1368
+ # @return [String]
1369
+ attr_accessor :end_time
1370
+
1371
+ # Start of time span.
1372
+ # Corresponds to the JSON property `startTime`
1373
+ # @return [String]
1374
+ attr_accessor :start_time
1375
+
1376
+ def initialize(**args)
1377
+ update!(**args)
1378
+ end
1379
+
1380
+ # Update properties of this object
1381
+ def update!(**args)
1382
+ @end_time = args[:end_time] if args.key?(:end_time)
1383
+ @start_time = args[:start_time] if args.key?(:start_time)
1384
+ end
1385
+ end
1386
+
1387
+ # Volume describes a Docker container volume which is mounted into build steps
1388
+ # in order to persist files across build step execution.
1389
+ class Volume
1390
+ include Google::Apis::Core::Hashable
1391
+
1392
+ # Name of the volume to mount. Volume names must be unique per build step and
1393
+ # must be valid names for Docker volumes. Each named volume must be used by at
1394
+ # least two build steps.
1395
+ # Corresponds to the JSON property `name`
1396
+ # @return [String]
1397
+ attr_accessor :name
1398
+
1399
+ # Path at which to mount the volume. Paths must be absolute and cannot conflict
1400
+ # with other volume paths on the same build step or with certain reserved volume
1401
+ # paths.
1402
+ # Corresponds to the JSON property `path`
1403
+ # @return [String]
1404
+ attr_accessor :path
1405
+
1406
+ def initialize(**args)
1407
+ update!(**args)
1408
+ end
1409
+
1410
+ # Update properties of this object
1411
+ def update!(**args)
1412
+ @name = args[:name] if args.key?(:name)
1413
+ @path = args[:path] if args.key?(:path)
1414
+ end
1415
+ end
1416
+
1417
+ # WorkerConfig defines the configuration to be used for a creating workers in
1418
+ # the pool.
1419
+ class WorkerConfig
1420
+ include Google::Apis::Core::Hashable
1421
+
1422
+ # Size of the disk attached to the worker, in GB. See https://cloud.google.com/
1423
+ # compute/docs/disks/ If `0` is specified, Cloud Build will use a standard disk
1424
+ # size.
1425
+ # Corresponds to the JSON property `diskSizeGb`
1426
+ # @return [Fixnum]
1427
+ attr_accessor :disk_size_gb
1428
+
1429
+ # Machine Type of the worker, such as n1-standard-1. See https://cloud.google.
1430
+ # com/compute/docs/machine-types. If left blank, Cloud Build will use a standard
1431
+ # unspecified machine to create the worker pool.
1432
+ # Corresponds to the JSON property `machineType`
1433
+ # @return [String]
1434
+ attr_accessor :machine_type
1435
+
1436
+ def initialize(**args)
1437
+ update!(**args)
1438
+ end
1439
+
1440
+ # Update properties of this object
1441
+ def update!(**args)
1442
+ @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
1443
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
1444
+ end
1445
+ end
1446
+
1447
+ # Configuration for a WorkerPool to run the builds. Workers are machines that
1448
+ # Cloud Build uses to run your builds. By default, all workers run in a project
1449
+ # owned by Cloud Build. To have full control over the workers that execute your
1450
+ # builds -- such as enabling them to access private resources on your private
1451
+ # network -- you can request Cloud Build to run the workers in your own project
1452
+ # by creating a custom workers pool.
1453
+ class WorkerPool
1454
+ include Google::Apis::Core::Hashable
1455
+
1456
+ # Output only. Time at which the request to create the `WorkerPool` was received.
1457
+ # Corresponds to the JSON property `createTime`
1458
+ # @return [String]
1459
+ attr_accessor :create_time
1460
+
1461
+ # Output only. Time at which the request to delete the `WorkerPool` was received.
1462
+ # Corresponds to the JSON property `deleteTime`
1463
+ # @return [String]
1464
+ attr_accessor :delete_time
1465
+
1466
+ # Output only. The resource name of the `WorkerPool`. Format of the name is `
1467
+ # projects/`project_id`/workerPools/`worker_pool_id``, where the value of `
1468
+ # worker_pool_id` is provided in the CreateWorkerPool request.
1469
+ # Corresponds to the JSON property `name`
1470
+ # @return [String]
1471
+ attr_accessor :name
1472
+
1473
+ # Network describes the network configuration for a `WorkerPool`.
1474
+ # Corresponds to the JSON property `networkConfig`
1475
+ # @return [Google::Apis::CloudbuildV1alpha2::NetworkConfig]
1476
+ attr_accessor :network_config
1477
+
1478
+ # Required. Immutable. The region where the `WorkerPool` runs. Only "us-central1"
1479
+ # is currently supported. Note that `region` cannot be changed once the `
1480
+ # WorkerPool` is created.
1481
+ # Corresponds to the JSON property `region`
1482
+ # @return [String]
1483
+ attr_accessor :region
1484
+
1485
+ # Output only. WorkerPool state.
1486
+ # Corresponds to the JSON property `state`
1487
+ # @return [String]
1488
+ attr_accessor :state
1489
+
1490
+ # Output only. Time at which the request to update the `WorkerPool` was received.
1491
+ # Corresponds to the JSON property `updateTime`
1492
+ # @return [String]
1493
+ attr_accessor :update_time
1494
+
1495
+ # WorkerConfig defines the configuration to be used for a creating workers in
1496
+ # the pool.
1497
+ # Corresponds to the JSON property `workerConfig`
1498
+ # @return [Google::Apis::CloudbuildV1alpha2::WorkerConfig]
1499
+ attr_accessor :worker_config
1500
+
1501
+ def initialize(**args)
1502
+ update!(**args)
1503
+ end
1504
+
1505
+ # Update properties of this object
1506
+ def update!(**args)
1507
+ @create_time = args[:create_time] if args.key?(:create_time)
1508
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
1509
+ @name = args[:name] if args.key?(:name)
1510
+ @network_config = args[:network_config] if args.key?(:network_config)
1511
+ @region = args[:region] if args.key?(:region)
1512
+ @state = args[:state] if args.key?(:state)
1513
+ @update_time = args[:update_time] if args.key?(:update_time)
1514
+ @worker_config = args[:worker_config] if args.key?(:worker_config)
1515
+ end
1516
+ end
1517
+ end
1518
+ end
1519
+ end