google-apis-cloudbuild_v1beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c2670909c52159c677ba381b0e0aa7e8101a1034229ed07088498381e3d19c19
4
+ data.tar.gz: d5e118c7a7b256f268edce41944b7f900d2417fa6bf6539e625ab87e5abe46f0
5
+ SHA512:
6
+ metadata.gz: b847b1f2d3a4af811c318698167e43cc35a0c4fe291b5e133ca443b19572b49d15c3897c01494c0a0fc740e9ff5f0241af951c46ff563568db72daf65092e8bb
7
+ data.tar.gz: 95aba373fc3c7fe655b430cdb514dcf062c953b20042d9e09502732e70610a07624534d513d9ff4ae495fb0ff38b8f05653cbe3231fff9319276eb979d961d2c
data/.yardopts ADDED
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-cloudbuild_v1beta1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/cloudbuild_v1beta1/*.rb
9
+ lib/google/apis/cloudbuild_v1beta1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-cloudbuild_v1beta1
2
+
3
+ ### v0.1.0 (2021-03-12)
4
+
5
+ * Regenerated from discovery document revision 20210308
6
+ * Regenerated using generator version 0.2.0
7
+
data/LICENSE.md ADDED
@@ -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.
data/OVERVIEW.md ADDED
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V1beta1 of the Cloud Build API
2
+
3
+ This is a simple client library for version V1beta1 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_v1beta1', '~> 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_v1beta1
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_v1beta1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::CloudbuildV1beta1::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::CloudbuildV1beta1::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_v1beta1`, 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_v1beta1"
@@ -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_v1beta1/service.rb'
16
+ require 'google/apis/cloudbuild_v1beta1/classes.rb'
17
+ require 'google/apis/cloudbuild_v1beta1/representations.rb'
18
+ require 'google/apis/cloudbuild_v1beta1/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 CloudbuildV1beta1
28
+ # Version of the Cloud Build API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V1beta1'
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,1624 @@
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 CloudbuildV1beta1
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::CloudbuildV1beta1::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::CloudbuildV1beta1::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::CloudbuildV1beta1::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. - $PROJECT_NUMBER: the project number
123
+ # of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME:
124
+ # the source repository name specified by RepoSource. - $BRANCH_NAME: the branch
125
+ # name specified by RepoSource. - $TAG_NAME: the tag name specified by
126
+ # RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by
127
+ # RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7
128
+ # characters of $REVISION_ID or $COMMIT_SHA.
129
+ class Build
130
+ include Google::Apis::Core::Hashable
131
+
132
+ # Artifacts produced by a build that should be uploaded upon successful
133
+ # completion of all build steps.
134
+ # Corresponds to the JSON property `artifacts`
135
+ # @return [Google::Apis::CloudbuildV1beta1::Artifacts]
136
+ attr_accessor :artifacts
137
+
138
+ # Secrets and secret environment variables.
139
+ # Corresponds to the JSON property `availableSecrets`
140
+ # @return [Google::Apis::CloudbuildV1beta1::Secrets]
141
+ attr_accessor :available_secrets
142
+
143
+ # Output only. The ID of the `BuildTrigger` that triggered this build, if it was
144
+ # triggered automatically.
145
+ # Corresponds to the JSON property `buildTriggerId`
146
+ # @return [String]
147
+ attr_accessor :build_trigger_id
148
+
149
+ # Output only. Time at which the request to create the build was received.
150
+ # Corresponds to the JSON property `createTime`
151
+ # @return [String]
152
+ attr_accessor :create_time
153
+
154
+ # Output only. Time at which execution of the build was finished. The difference
155
+ # between finish_time and start_time is the duration of the build's execution.
156
+ # Corresponds to the JSON property `finishTime`
157
+ # @return [String]
158
+ attr_accessor :finish_time
159
+
160
+ # Output only. Unique identifier of the build.
161
+ # Corresponds to the JSON property `id`
162
+ # @return [String]
163
+ attr_accessor :id
164
+
165
+ # A list of images to be pushed upon the successful completion of all build
166
+ # steps. The images are pushed using the builder service account's credentials.
167
+ # The digests of the pushed images will be stored in the `Build` resource's
168
+ # results field. If any of the images fail to be pushed, the build status is
169
+ # marked `FAILURE`.
170
+ # Corresponds to the JSON property `images`
171
+ # @return [Array<String>]
172
+ attr_accessor :images
173
+
174
+ # Output only. URL to logs for this build in Google Cloud Console.
175
+ # Corresponds to the JSON property `logUrl`
176
+ # @return [String]
177
+ attr_accessor :log_url
178
+
179
+ # Google Cloud Storage bucket where logs should be written (see [Bucket Name
180
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
181
+ # ). Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`.
182
+ # Corresponds to the JSON property `logsBucket`
183
+ # @return [String]
184
+ attr_accessor :logs_bucket
185
+
186
+ # Output only. The 'Build' name with format: `projects/`project`/locations/`
187
+ # location`/builds/`build``, where `build` is a unique identifier generated by
188
+ # the service.
189
+ # Corresponds to the JSON property `name`
190
+ # @return [String]
191
+ attr_accessor :name
192
+
193
+ # Optional arguments to enable specific features of builds.
194
+ # Corresponds to the JSON property `options`
195
+ # @return [Google::Apis::CloudbuildV1beta1::BuildOptions]
196
+ attr_accessor :options
197
+
198
+ # Output only. ID of the project.
199
+ # Corresponds to the JSON property `projectId`
200
+ # @return [String]
201
+ attr_accessor :project_id
202
+
203
+ # TTL in queue for this build. If provided and the build is enqueued longer than
204
+ # this value, the build will expire and the build status will be `EXPIRED`. The
205
+ # TTL starts ticking from create_time.
206
+ # Corresponds to the JSON property `queueTtl`
207
+ # @return [String]
208
+ attr_accessor :queue_ttl
209
+
210
+ # Artifacts created by the build pipeline.
211
+ # Corresponds to the JSON property `results`
212
+ # @return [Google::Apis::CloudbuildV1beta1::Results]
213
+ attr_accessor :results
214
+
215
+ # Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is
216
+ # the recommended technique for managing sensitive data with Cloud Build. Use `
217
+ # available_secrets` to configure builds to access secrets from Secret Manager.
218
+ # For instructions, see: https://cloud.google.com/cloud-build/docs/securing-
219
+ # builds/use-secrets
220
+ # Corresponds to the JSON property `secrets`
221
+ # @return [Array<Google::Apis::CloudbuildV1beta1::Secret>]
222
+ attr_accessor :secrets
223
+
224
+ # IAM service account whose credentials will be used at build runtime. Must be
225
+ # of the format `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. ACCOUNT can
226
+ # be email address or uniqueId of the service account. This field is in beta.
227
+ # Corresponds to the JSON property `serviceAccount`
228
+ # @return [String]
229
+ attr_accessor :service_account
230
+
231
+ # Location of the source in a supported storage service.
232
+ # Corresponds to the JSON property `source`
233
+ # @return [Google::Apis::CloudbuildV1beta1::Source]
234
+ attr_accessor :source
235
+
236
+ # Provenance of the source. Ways to find the original source, or verify that
237
+ # some source was used for this build.
238
+ # Corresponds to the JSON property `sourceProvenance`
239
+ # @return [Google::Apis::CloudbuildV1beta1::SourceProvenance]
240
+ attr_accessor :source_provenance
241
+
242
+ # Output only. Time at which execution of the build was started.
243
+ # Corresponds to the JSON property `startTime`
244
+ # @return [String]
245
+ attr_accessor :start_time
246
+
247
+ # Output only. Status of the build.
248
+ # Corresponds to the JSON property `status`
249
+ # @return [String]
250
+ attr_accessor :status
251
+
252
+ # Output only. Customer-readable message about the current status.
253
+ # Corresponds to the JSON property `statusDetail`
254
+ # @return [String]
255
+ attr_accessor :status_detail
256
+
257
+ # Required. The operations to be performed on the workspace.
258
+ # Corresponds to the JSON property `steps`
259
+ # @return [Array<Google::Apis::CloudbuildV1beta1::BuildStep>]
260
+ attr_accessor :steps
261
+
262
+ # Substitutions data for `Build` resource.
263
+ # Corresponds to the JSON property `substitutions`
264
+ # @return [Hash<String,String>]
265
+ attr_accessor :substitutions
266
+
267
+ # Tags for annotation of a `Build`. These are not docker tags.
268
+ # Corresponds to the JSON property `tags`
269
+ # @return [Array<String>]
270
+ attr_accessor :tags
271
+
272
+ # Amount of time that this build should be allowed to run, to second granularity.
273
+ # If this amount of time elapses, work on the build will cease and the build
274
+ # status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default
275
+ # time is ten minutes.
276
+ # Corresponds to the JSON property `timeout`
277
+ # @return [String]
278
+ attr_accessor :timeout
279
+
280
+ # Output only. Stores timing information for phases of the build. Valid keys are:
281
+ # * BUILD: time to execute all build steps * PUSH: time to push all specified
282
+ # images. * FETCHSOURCE: time to fetch source. If the build does not specify
283
+ # source or images, these keys will not be included.
284
+ # Corresponds to the JSON property `timing`
285
+ # @return [Hash<String,Google::Apis::CloudbuildV1beta1::TimeSpan>]
286
+ attr_accessor :timing
287
+
288
+ def initialize(**args)
289
+ update!(**args)
290
+ end
291
+
292
+ # Update properties of this object
293
+ def update!(**args)
294
+ @artifacts = args[:artifacts] if args.key?(:artifacts)
295
+ @available_secrets = args[:available_secrets] if args.key?(:available_secrets)
296
+ @build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id)
297
+ @create_time = args[:create_time] if args.key?(:create_time)
298
+ @finish_time = args[:finish_time] if args.key?(:finish_time)
299
+ @id = args[:id] if args.key?(:id)
300
+ @images = args[:images] if args.key?(:images)
301
+ @log_url = args[:log_url] if args.key?(:log_url)
302
+ @logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket)
303
+ @name = args[:name] if args.key?(:name)
304
+ @options = args[:options] if args.key?(:options)
305
+ @project_id = args[:project_id] if args.key?(:project_id)
306
+ @queue_ttl = args[:queue_ttl] if args.key?(:queue_ttl)
307
+ @results = args[:results] if args.key?(:results)
308
+ @secrets = args[:secrets] if args.key?(:secrets)
309
+ @service_account = args[:service_account] if args.key?(:service_account)
310
+ @source = args[:source] if args.key?(:source)
311
+ @source_provenance = args[:source_provenance] if args.key?(:source_provenance)
312
+ @start_time = args[:start_time] if args.key?(:start_time)
313
+ @status = args[:status] if args.key?(:status)
314
+ @status_detail = args[:status_detail] if args.key?(:status_detail)
315
+ @steps = args[:steps] if args.key?(:steps)
316
+ @substitutions = args[:substitutions] if args.key?(:substitutions)
317
+ @tags = args[:tags] if args.key?(:tags)
318
+ @timeout = args[:timeout] if args.key?(:timeout)
319
+ @timing = args[:timing] if args.key?(:timing)
320
+ end
321
+ end
322
+
323
+ # Metadata for build operations.
324
+ class BuildOperationMetadata
325
+ include Google::Apis::Core::Hashable
326
+
327
+ # A build resource in the Cloud Build API. At a high level, a `Build` describes
328
+ # where to find source code, how to build it (for example, the builder image to
329
+ # run on the source), and where to store the built artifacts. Fields can include
330
+ # the following variables, which will be expanded when the build is created: - $
331
+ # PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number
332
+ # of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME:
333
+ # the source repository name specified by RepoSource. - $BRANCH_NAME: the branch
334
+ # name specified by RepoSource. - $TAG_NAME: the tag name specified by
335
+ # RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by
336
+ # RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7
337
+ # characters of $REVISION_ID or $COMMIT_SHA.
338
+ # Corresponds to the JSON property `build`
339
+ # @return [Google::Apis::CloudbuildV1beta1::Build]
340
+ attr_accessor :build
341
+
342
+ def initialize(**args)
343
+ update!(**args)
344
+ end
345
+
346
+ # Update properties of this object
347
+ def update!(**args)
348
+ @build = args[:build] if args.key?(:build)
349
+ end
350
+ end
351
+
352
+ # Optional arguments to enable specific features of builds.
353
+ class BuildOptions
354
+ include Google::Apis::Core::Hashable
355
+
356
+ # Requested disk size for the VM that runs the build. Note that this is *NOT* "
357
+ # disk free"; some of the space will be used by the operating system and build
358
+ # utilities. Also note that this is the minimum disk size that will be allocated
359
+ # for the build -- the build may run with a larger disk than requested. At
360
+ # present, the maximum disk size is 1000GB; builds that request more than the
361
+ # maximum are rejected with an error.
362
+ # Corresponds to the JSON property `diskSizeGb`
363
+ # @return [Fixnum]
364
+ attr_accessor :disk_size_gb
365
+
366
+ # Option to specify whether or not to apply bash style string operations to the
367
+ # substitutions. NOTE: this is always enabled for triggered builds and cannot be
368
+ # overridden in the build configuration file.
369
+ # Corresponds to the JSON property `dynamicSubstitutions`
370
+ # @return [Boolean]
371
+ attr_accessor :dynamic_substitutions
372
+ alias_method :dynamic_substitutions?, :dynamic_substitutions
373
+
374
+ # A list of global environment variable definitions that will exist for all
375
+ # build steps in this build. If a variable is defined in both globally and in a
376
+ # build step, the variable will use the build step value. The elements are of
377
+ # the form "KEY=VALUE" for the environment variable "KEY" being given the value "
378
+ # VALUE".
379
+ # Corresponds to the JSON property `env`
380
+ # @return [Array<String>]
381
+ attr_accessor :env
382
+
383
+ # Option to define build log streaming behavior to Google Cloud Storage.
384
+ # Corresponds to the JSON property `logStreamingOption`
385
+ # @return [String]
386
+ attr_accessor :log_streaming_option
387
+
388
+ # Option to specify the logging mode, which determines if and where build logs
389
+ # are stored.
390
+ # Corresponds to the JSON property `logging`
391
+ # @return [String]
392
+ attr_accessor :logging
393
+
394
+ # Compute Engine machine type on which to run the build.
395
+ # Corresponds to the JSON property `machineType`
396
+ # @return [String]
397
+ attr_accessor :machine_type
398
+
399
+ # Requested verifiability options.
400
+ # Corresponds to the JSON property `requestedVerifyOption`
401
+ # @return [String]
402
+ attr_accessor :requested_verify_option
403
+
404
+ # A list of global environment variables, which are encrypted using a Cloud Key
405
+ # Management Service crypto key. These values must be specified in the build's `
406
+ # Secret`. These variables will be available to all build steps in this build.
407
+ # Corresponds to the JSON property `secretEnv`
408
+ # @return [Array<String>]
409
+ attr_accessor :secret_env
410
+
411
+ # Requested hash for SourceProvenance.
412
+ # Corresponds to the JSON property `sourceProvenanceHash`
413
+ # @return [Array<String>]
414
+ attr_accessor :source_provenance_hash
415
+
416
+ # Option to specify behavior when there is an error in the substitution checks.
417
+ # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be
418
+ # overridden in the build configuration file.
419
+ # Corresponds to the JSON property `substitutionOption`
420
+ # @return [String]
421
+ attr_accessor :substitution_option
422
+
423
+ # Global list of volumes to mount for ALL build steps Each volume is created as
424
+ # an empty volume prior to starting the build process. Upon completion of the
425
+ # build, volumes and their contents are discarded. Global volume names and paths
426
+ # cannot conflict with the volumes defined a build step. Using a global volume
427
+ # in a build with only one step is not valid as it is indicative of a build
428
+ # request with an incorrect configuration.
429
+ # Corresponds to the JSON property `volumes`
430
+ # @return [Array<Google::Apis::CloudbuildV1beta1::Volume>]
431
+ attr_accessor :volumes
432
+
433
+ # Option to specify a `WorkerPool` for the build. Format: projects/`project`/
434
+ # locations/`location`/workerPools/`workerPool` This field is in beta and is
435
+ # available only to restricted users.
436
+ # Corresponds to the JSON property `workerPool`
437
+ # @return [String]
438
+ attr_accessor :worker_pool
439
+
440
+ def initialize(**args)
441
+ update!(**args)
442
+ end
443
+
444
+ # Update properties of this object
445
+ def update!(**args)
446
+ @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
447
+ @dynamic_substitutions = args[:dynamic_substitutions] if args.key?(:dynamic_substitutions)
448
+ @env = args[:env] if args.key?(:env)
449
+ @log_streaming_option = args[:log_streaming_option] if args.key?(:log_streaming_option)
450
+ @logging = args[:logging] if args.key?(:logging)
451
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
452
+ @requested_verify_option = args[:requested_verify_option] if args.key?(:requested_verify_option)
453
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
454
+ @source_provenance_hash = args[:source_provenance_hash] if args.key?(:source_provenance_hash)
455
+ @substitution_option = args[:substitution_option] if args.key?(:substitution_option)
456
+ @volumes = args[:volumes] if args.key?(:volumes)
457
+ @worker_pool = args[:worker_pool] if args.key?(:worker_pool)
458
+ end
459
+ end
460
+
461
+ # A step in the build pipeline.
462
+ class BuildStep
463
+ include Google::Apis::Core::Hashable
464
+
465
+ # A list of arguments that will be presented to the step when it is started. If
466
+ # the image used to run the step's container has an entrypoint, the `args` are
467
+ # used as arguments to that entrypoint. If the image does not define an
468
+ # entrypoint, the first element in args is used as the entrypoint, and the
469
+ # remainder will be used as arguments.
470
+ # Corresponds to the JSON property `args`
471
+ # @return [Array<String>]
472
+ attr_accessor :args
473
+
474
+ # Working directory to use when running this step's container. If this value is
475
+ # a relative path, it is relative to the build's working directory. If this
476
+ # value is absolute, it may be outside the build's working directory, in which
477
+ # case the contents of the path may not be persisted across build step
478
+ # executions, unless a `volume` for that path is specified. If the build
479
+ # specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies
480
+ # an absolute path, the `RepoSource` `dir` is ignored for the step's execution.
481
+ # Corresponds to the JSON property `dir`
482
+ # @return [String]
483
+ attr_accessor :dir
484
+
485
+ # Entrypoint to be used instead of the build step image's default entrypoint. If
486
+ # unset, the image's default entrypoint is used.
487
+ # Corresponds to the JSON property `entrypoint`
488
+ # @return [String]
489
+ attr_accessor :entrypoint
490
+
491
+ # A list of environment variable definitions to be used when running a step. The
492
+ # elements are of the form "KEY=VALUE" for the environment variable "KEY" being
493
+ # given the value "VALUE".
494
+ # Corresponds to the JSON property `env`
495
+ # @return [Array<String>]
496
+ attr_accessor :env
497
+
498
+ # Unique identifier for this build step, used in `wait_for` to reference this
499
+ # build step as a dependency.
500
+ # Corresponds to the JSON property `id`
501
+ # @return [String]
502
+ attr_accessor :id
503
+
504
+ # Required. The name of the container image that will run this particular build
505
+ # step. If the image is available in the host's Docker daemon's cache, it will
506
+ # be run directly. If not, the host will attempt to pull the image first, using
507
+ # the builder service account's credentials if necessary. The Docker daemon's
508
+ # cache will already have the latest versions of all of the officially supported
509
+ # build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://
510
+ # github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also
511
+ # have cached many of the layers for some popular images, like "ubuntu", "debian"
512
+ # , but they will be refreshed at the time you attempt to use them. If you built
513
+ # an image in a previous build step, it will be stored in the host's Docker
514
+ # daemon's cache and is available to use as the name for a later build step.
515
+ # Corresponds to the JSON property `name`
516
+ # @return [String]
517
+ attr_accessor :name
518
+
519
+ # Start and end times for a build execution phase.
520
+ # Corresponds to the JSON property `pullTiming`
521
+ # @return [Google::Apis::CloudbuildV1beta1::TimeSpan]
522
+ attr_accessor :pull_timing
523
+
524
+ # A list of environment variables which are encrypted using a Cloud Key
525
+ # Management Service crypto key. These values must be specified in the build's `
526
+ # Secret`.
527
+ # Corresponds to the JSON property `secretEnv`
528
+ # @return [Array<String>]
529
+ attr_accessor :secret_env
530
+
531
+ # Output only. Status of the build step. At this time, build step status is only
532
+ # updated on build completion; step status is not updated in real-time as the
533
+ # build progresses.
534
+ # Corresponds to the JSON property `status`
535
+ # @return [String]
536
+ attr_accessor :status
537
+
538
+ # Time limit for executing this build step. If not defined, the step has no time
539
+ # limit and will be allowed to continue to run until either it completes or the
540
+ # build itself times out.
541
+ # Corresponds to the JSON property `timeout`
542
+ # @return [String]
543
+ attr_accessor :timeout
544
+
545
+ # Start and end times for a build execution phase.
546
+ # Corresponds to the JSON property `timing`
547
+ # @return [Google::Apis::CloudbuildV1beta1::TimeSpan]
548
+ attr_accessor :timing
549
+
550
+ # List of volumes to mount into the build step. Each volume is created as an
551
+ # empty volume prior to execution of the build step. Upon completion of the
552
+ # build, volumes and their contents are discarded. Using a named volume in only
553
+ # one step is not valid as it is indicative of a build request with an incorrect
554
+ # configuration.
555
+ # Corresponds to the JSON property `volumes`
556
+ # @return [Array<Google::Apis::CloudbuildV1beta1::Volume>]
557
+ attr_accessor :volumes
558
+
559
+ # The ID(s) of the step(s) that this build step depends on. This build step will
560
+ # not start until all the build steps in `wait_for` have completed successfully.
561
+ # If `wait_for` is empty, this build step will start when all previous build
562
+ # steps in the `Build.Steps` list have completed successfully.
563
+ # Corresponds to the JSON property `waitFor`
564
+ # @return [Array<String>]
565
+ attr_accessor :wait_for
566
+
567
+ def initialize(**args)
568
+ update!(**args)
569
+ end
570
+
571
+ # Update properties of this object
572
+ def update!(**args)
573
+ @args = args[:args] if args.key?(:args)
574
+ @dir = args[:dir] if args.key?(:dir)
575
+ @entrypoint = args[:entrypoint] if args.key?(:entrypoint)
576
+ @env = args[:env] if args.key?(:env)
577
+ @id = args[:id] if args.key?(:id)
578
+ @name = args[:name] if args.key?(:name)
579
+ @pull_timing = args[:pull_timing] if args.key?(:pull_timing)
580
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
581
+ @status = args[:status] if args.key?(:status)
582
+ @timeout = args[:timeout] if args.key?(:timeout)
583
+ @timing = args[:timing] if args.key?(:timing)
584
+ @volumes = args[:volumes] if args.key?(:volumes)
585
+ @wait_for = args[:wait_for] if args.key?(:wait_for)
586
+ end
587
+ end
588
+
589
+ # An image built by the pipeline.
590
+ class BuiltImage
591
+ include Google::Apis::Core::Hashable
592
+
593
+ # Docker Registry 2.0 digest.
594
+ # Corresponds to the JSON property `digest`
595
+ # @return [String]
596
+ attr_accessor :digest
597
+
598
+ # Name used to push the container image to Google Container Registry, as
599
+ # presented to `docker push`.
600
+ # Corresponds to the JSON property `name`
601
+ # @return [String]
602
+ attr_accessor :name
603
+
604
+ # Start and end times for a build execution phase.
605
+ # Corresponds to the JSON property `pushTiming`
606
+ # @return [Google::Apis::CloudbuildV1beta1::TimeSpan]
607
+ attr_accessor :push_timing
608
+
609
+ def initialize(**args)
610
+ update!(**args)
611
+ end
612
+
613
+ # Update properties of this object
614
+ def update!(**args)
615
+ @digest = args[:digest] if args.key?(:digest)
616
+ @name = args[:name] if args.key?(:name)
617
+ @push_timing = args[:push_timing] if args.key?(:push_timing)
618
+ end
619
+ end
620
+
621
+ # The request message for Operations.CancelOperation.
622
+ class CancelOperationRequest
623
+ include Google::Apis::Core::Hashable
624
+
625
+ def initialize(**args)
626
+ update!(**args)
627
+ end
628
+
629
+ # Update properties of this object
630
+ def update!(**args)
631
+ end
632
+ end
633
+
634
+ # A generic empty message that you can re-use to avoid defining duplicated empty
635
+ # messages in your APIs. A typical example is to use it as the request or the
636
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
637
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
638
+ # `Empty` is empty JSON object ````.
639
+ class Empty
640
+ include Google::Apis::Core::Hashable
641
+
642
+ def initialize(**args)
643
+ update!(**args)
644
+ end
645
+
646
+ # Update properties of this object
647
+ def update!(**args)
648
+ end
649
+ end
650
+
651
+ # Container message for hashes of byte content of files, used in
652
+ # SourceProvenance messages to verify integrity of source input to the build.
653
+ class FileHashes
654
+ include Google::Apis::Core::Hashable
655
+
656
+ # Collection of file hashes.
657
+ # Corresponds to the JSON property `fileHash`
658
+ # @return [Array<Google::Apis::CloudbuildV1beta1::HashProp>]
659
+ attr_accessor :file_hash
660
+
661
+ def initialize(**args)
662
+ update!(**args)
663
+ end
664
+
665
+ # Update properties of this object
666
+ def update!(**args)
667
+ @file_hash = args[:file_hash] if args.key?(:file_hash)
668
+ end
669
+ end
670
+
671
+ # HTTPDelivery is the delivery configuration for an HTTP notification.
672
+ class HttpDelivery
673
+ include Google::Apis::Core::Hashable
674
+
675
+ # The URI to which JSON-containing HTTP POST requests should be sent.
676
+ # Corresponds to the JSON property `uri`
677
+ # @return [String]
678
+ attr_accessor :uri
679
+
680
+ def initialize(**args)
681
+ update!(**args)
682
+ end
683
+
684
+ # Update properties of this object
685
+ def update!(**args)
686
+ @uri = args[:uri] if args.key?(:uri)
687
+ end
688
+ end
689
+
690
+ # Container message for hash values.
691
+ class HashProp
692
+ include Google::Apis::Core::Hashable
693
+
694
+ # The type of hash that was performed.
695
+ # Corresponds to the JSON property `type`
696
+ # @return [String]
697
+ attr_accessor :type
698
+
699
+ # The hash value.
700
+ # Corresponds to the JSON property `value`
701
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
702
+ # @return [String]
703
+ attr_accessor :value
704
+
705
+ def initialize(**args)
706
+ update!(**args)
707
+ end
708
+
709
+ # Update properties of this object
710
+ def update!(**args)
711
+ @type = args[:type] if args.key?(:type)
712
+ @value = args[:value] if args.key?(:value)
713
+ end
714
+ end
715
+
716
+ # Pairs a set of secret environment variables mapped to encrypted values with
717
+ # the Cloud KMS key to use to decrypt the value.
718
+ class InlineSecret
719
+ include Google::Apis::Core::Hashable
720
+
721
+ # Map of environment variable name to its encrypted value. Secret environment
722
+ # variables must be unique across all of a build's secrets, and must be used by
723
+ # at least one build step. Values can be at most 64 KB in size. There can be at
724
+ # most 100 secret values across all of a build's secrets.
725
+ # Corresponds to the JSON property `envMap`
726
+ # @return [Hash<String,String>]
727
+ attr_accessor :env_map
728
+
729
+ # Resource name of Cloud KMS crypto key to decrypt the encrypted value. In
730
+ # format: projects/*/locations/*/keyRings/*/cryptoKeys/*
731
+ # Corresponds to the JSON property `kmsKeyName`
732
+ # @return [String]
733
+ attr_accessor :kms_key_name
734
+
735
+ def initialize(**args)
736
+ update!(**args)
737
+ end
738
+
739
+ # Update properties of this object
740
+ def update!(**args)
741
+ @env_map = args[:env_map] if args.key?(:env_map)
742
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
743
+ end
744
+ end
745
+
746
+ # Response containing existing `WorkerPools`.
747
+ class ListWorkerPoolsResponse
748
+ include Google::Apis::Core::Hashable
749
+
750
+ # `WorkerPools` for the specified project.
751
+ # Corresponds to the JSON property `workerPools`
752
+ # @return [Array<Google::Apis::CloudbuildV1beta1::WorkerPool>]
753
+ attr_accessor :worker_pools
754
+
755
+ def initialize(**args)
756
+ update!(**args)
757
+ end
758
+
759
+ # Update properties of this object
760
+ def update!(**args)
761
+ @worker_pools = args[:worker_pools] if args.key?(:worker_pools)
762
+ end
763
+ end
764
+
765
+ # Network describes the network configuration for a `WorkerPool`.
766
+ class NetworkConfig
767
+ include Google::Apis::Core::Hashable
768
+
769
+ # Required. Immutable. The network definition that the workers are peered to. If
770
+ # this section is left empty, the workers will be peered to `WorkerPool.
771
+ # project_id` on the service producer network. Must be in the format `projects/`
772
+ # project`/global/networks/`network``, where ``project`` is a project number,
773
+ # such as `12345`, and ``network`` is the name of a VPC network in the project.
774
+ # See [Understanding network configuration options](https://cloud.google.com/
775
+ # cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#
776
+ # understanding_the_network_configuration_options)
777
+ # Corresponds to the JSON property `peeredNetwork`
778
+ # @return [String]
779
+ attr_accessor :peered_network
780
+
781
+ def initialize(**args)
782
+ update!(**args)
783
+ end
784
+
785
+ # Update properties of this object
786
+ def update!(**args)
787
+ @peered_network = args[:peered_network] if args.key?(:peered_network)
788
+ end
789
+ end
790
+
791
+ # Notification is the container which holds the data that is relevant to this
792
+ # particular notification.
793
+ class Notification
794
+ include Google::Apis::Core::Hashable
795
+
796
+ # The filter string to use for notification filtering. Currently, this is
797
+ # assumed to be a CEL program. See https://opensource.google/projects/cel for
798
+ # more.
799
+ # Corresponds to the JSON property `filter`
800
+ # @return [String]
801
+ attr_accessor :filter
802
+
803
+ # HTTPDelivery is the delivery configuration for an HTTP notification.
804
+ # Corresponds to the JSON property `httpDelivery`
805
+ # @return [Google::Apis::CloudbuildV1beta1::HttpDelivery]
806
+ attr_accessor :http_delivery
807
+
808
+ # SlackDelivery is the delivery configuration for delivering Slack messages via
809
+ # webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/
810
+ # webhooks.
811
+ # Corresponds to the JSON property `slackDelivery`
812
+ # @return [Google::Apis::CloudbuildV1beta1::SlackDelivery]
813
+ attr_accessor :slack_delivery
814
+
815
+ # SMTPDelivery is the delivery configuration for an SMTP (email) notification.
816
+ # Corresponds to the JSON property `smtpDelivery`
817
+ # @return [Google::Apis::CloudbuildV1beta1::SmtpDelivery]
818
+ attr_accessor :smtp_delivery
819
+
820
+ # Escape hatch for users to supply custom delivery configs.
821
+ # Corresponds to the JSON property `structDelivery`
822
+ # @return [Hash<String,Object>]
823
+ attr_accessor :struct_delivery
824
+
825
+ def initialize(**args)
826
+ update!(**args)
827
+ end
828
+
829
+ # Update properties of this object
830
+ def update!(**args)
831
+ @filter = args[:filter] if args.key?(:filter)
832
+ @http_delivery = args[:http_delivery] if args.key?(:http_delivery)
833
+ @slack_delivery = args[:slack_delivery] if args.key?(:slack_delivery)
834
+ @smtp_delivery = args[:smtp_delivery] if args.key?(:smtp_delivery)
835
+ @struct_delivery = args[:struct_delivery] if args.key?(:struct_delivery)
836
+ end
837
+ end
838
+
839
+ # NotifierConfig is the top-level configuration message.
840
+ class NotifierConfig
841
+ include Google::Apis::Core::Hashable
842
+
843
+ # The API version of this configuration format.
844
+ # Corresponds to the JSON property `apiVersion`
845
+ # @return [String]
846
+ attr_accessor :api_version
847
+
848
+ # The type of notifier to use (e.g. SMTPNotifier).
849
+ # Corresponds to the JSON property `kind`
850
+ # @return [String]
851
+ attr_accessor :kind
852
+
853
+ # NotifierMetadata contains the data which can be used to reference or describe
854
+ # this notifier.
855
+ # Corresponds to the JSON property `metadata`
856
+ # @return [Google::Apis::CloudbuildV1beta1::NotifierMetadata]
857
+ attr_accessor :metadata
858
+
859
+ # NotifierSpec is the configuration container for notifications.
860
+ # Corresponds to the JSON property `spec`
861
+ # @return [Google::Apis::CloudbuildV1beta1::NotifierSpec]
862
+ attr_accessor :spec
863
+
864
+ def initialize(**args)
865
+ update!(**args)
866
+ end
867
+
868
+ # Update properties of this object
869
+ def update!(**args)
870
+ @api_version = args[:api_version] if args.key?(:api_version)
871
+ @kind = args[:kind] if args.key?(:kind)
872
+ @metadata = args[:metadata] if args.key?(:metadata)
873
+ @spec = args[:spec] if args.key?(:spec)
874
+ end
875
+ end
876
+
877
+ # NotifierMetadata contains the data which can be used to reference or describe
878
+ # this notifier.
879
+ class NotifierMetadata
880
+ include Google::Apis::Core::Hashable
881
+
882
+ # The human-readable and user-given name for the notifier. For example: "repo-
883
+ # merge-email-notifier".
884
+ # Corresponds to the JSON property `name`
885
+ # @return [String]
886
+ attr_accessor :name
887
+
888
+ # The string representing the name and version of notifier to deploy. Expected
889
+ # to be of the form of "/:". For example: "gcr.io/my-project/notifiers/smtp:1.2.
890
+ # 34".
891
+ # Corresponds to the JSON property `notifier`
892
+ # @return [String]
893
+ attr_accessor :notifier
894
+
895
+ def initialize(**args)
896
+ update!(**args)
897
+ end
898
+
899
+ # Update properties of this object
900
+ def update!(**args)
901
+ @name = args[:name] if args.key?(:name)
902
+ @notifier = args[:notifier] if args.key?(:notifier)
903
+ end
904
+ end
905
+
906
+ # NotifierSecret is the container that maps a secret name (reference) to its
907
+ # Google Cloud Secret Manager resource path.
908
+ class NotifierSecret
909
+ include Google::Apis::Core::Hashable
910
+
911
+ # Name is the local name of the secret, such as the verbatim string "my-smtp-
912
+ # password".
913
+ # Corresponds to the JSON property `name`
914
+ # @return [String]
915
+ attr_accessor :name
916
+
917
+ # Value is interpreted to be a resource path for fetching the actual (versioned)
918
+ # secret data for this secret. For example, this would be a Google Cloud Secret
919
+ # Manager secret version resource path like: "projects/my-project/secrets/my-
920
+ # secret/versions/latest".
921
+ # Corresponds to the JSON property `value`
922
+ # @return [String]
923
+ attr_accessor :value
924
+
925
+ def initialize(**args)
926
+ update!(**args)
927
+ end
928
+
929
+ # Update properties of this object
930
+ def update!(**args)
931
+ @name = args[:name] if args.key?(:name)
932
+ @value = args[:value] if args.key?(:value)
933
+ end
934
+ end
935
+
936
+ # NotifierSecretRef contains the reference to a secret stored in the
937
+ # corresponding NotifierSpec.
938
+ class NotifierSecretRef
939
+ include Google::Apis::Core::Hashable
940
+
941
+ # The value of `secret_ref` should be a `name` that is registered in a `Secret`
942
+ # in the `secrets` list of the `Spec`.
943
+ # Corresponds to the JSON property `secretRef`
944
+ # @return [String]
945
+ attr_accessor :secret_ref
946
+
947
+ def initialize(**args)
948
+ update!(**args)
949
+ end
950
+
951
+ # Update properties of this object
952
+ def update!(**args)
953
+ @secret_ref = args[:secret_ref] if args.key?(:secret_ref)
954
+ end
955
+ end
956
+
957
+ # NotifierSpec is the configuration container for notifications.
958
+ class NotifierSpec
959
+ include Google::Apis::Core::Hashable
960
+
961
+ # Notification is the container which holds the data that is relevant to this
962
+ # particular notification.
963
+ # Corresponds to the JSON property `notification`
964
+ # @return [Google::Apis::CloudbuildV1beta1::Notification]
965
+ attr_accessor :notification
966
+
967
+ # Configurations for secret resources used by this particular notifier.
968
+ # Corresponds to the JSON property `secrets`
969
+ # @return [Array<Google::Apis::CloudbuildV1beta1::NotifierSecret>]
970
+ attr_accessor :secrets
971
+
972
+ def initialize(**args)
973
+ update!(**args)
974
+ end
975
+
976
+ # Update properties of this object
977
+ def update!(**args)
978
+ @notification = args[:notification] if args.key?(:notification)
979
+ @secrets = args[:secrets] if args.key?(:secrets)
980
+ end
981
+ end
982
+
983
+ # This resource represents a long-running operation that is the result of a
984
+ # network API call.
985
+ class Operation
986
+ include Google::Apis::Core::Hashable
987
+
988
+ # If the value is `false`, it means the operation is still in progress. If `true`
989
+ # , the operation is completed, and either `error` or `response` is available.
990
+ # Corresponds to the JSON property `done`
991
+ # @return [Boolean]
992
+ attr_accessor :done
993
+ alias_method :done?, :done
994
+
995
+ # The `Status` type defines a logical error model that is suitable for different
996
+ # programming environments, including REST APIs and RPC APIs. It is used by [
997
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
998
+ # data: error code, error message, and error details. You can find out more
999
+ # about this error model and how to work with it in the [API Design Guide](https:
1000
+ # //cloud.google.com/apis/design/errors).
1001
+ # Corresponds to the JSON property `error`
1002
+ # @return [Google::Apis::CloudbuildV1beta1::Status]
1003
+ attr_accessor :error
1004
+
1005
+ # Service-specific metadata associated with the operation. It typically contains
1006
+ # progress information and common metadata such as create time. Some services
1007
+ # might not provide such metadata. Any method that returns a long-running
1008
+ # operation should document the metadata type, if any.
1009
+ # Corresponds to the JSON property `metadata`
1010
+ # @return [Hash<String,Object>]
1011
+ attr_accessor :metadata
1012
+
1013
+ # The server-assigned name, which is only unique within the same service that
1014
+ # originally returns it. If you use the default HTTP mapping, the `name` should
1015
+ # be a resource name ending with `operations/`unique_id``.
1016
+ # Corresponds to the JSON property `name`
1017
+ # @return [String]
1018
+ attr_accessor :name
1019
+
1020
+ # The normal response of the operation in case of success. If the original
1021
+ # method returns no data on success, such as `Delete`, the response is `google.
1022
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
1023
+ # the response should be the resource. For other methods, the response should
1024
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
1025
+ # example, if the original method name is `TakeSnapshot()`, the inferred
1026
+ # response type is `TakeSnapshotResponse`.
1027
+ # Corresponds to the JSON property `response`
1028
+ # @return [Hash<String,Object>]
1029
+ attr_accessor :response
1030
+
1031
+ def initialize(**args)
1032
+ update!(**args)
1033
+ end
1034
+
1035
+ # Update properties of this object
1036
+ def update!(**args)
1037
+ @done = args[:done] if args.key?(:done)
1038
+ @error = args[:error] if args.key?(:error)
1039
+ @metadata = args[:metadata] if args.key?(:metadata)
1040
+ @name = args[:name] if args.key?(:name)
1041
+ @response = args[:response] if args.key?(:response)
1042
+ end
1043
+ end
1044
+
1045
+ # Location of the source in a Google Cloud Source Repository.
1046
+ class RepoSource
1047
+ include Google::Apis::Core::Hashable
1048
+
1049
+ # Regex matching branches to build. The syntax of the regular expressions
1050
+ # accepted is the syntax accepted by RE2 and described at https://github.com/
1051
+ # google/re2/wiki/Syntax
1052
+ # Corresponds to the JSON property `branchName`
1053
+ # @return [String]
1054
+ attr_accessor :branch_name
1055
+
1056
+ # Explicit commit SHA to build.
1057
+ # Corresponds to the JSON property `commitSha`
1058
+ # @return [String]
1059
+ attr_accessor :commit_sha
1060
+
1061
+ # Directory, relative to the source root, in which to run the build. This must
1062
+ # be a relative path. If a step's `dir` is specified and is an absolute path,
1063
+ # this value is ignored for that step's execution.
1064
+ # Corresponds to the JSON property `dir`
1065
+ # @return [String]
1066
+ attr_accessor :dir
1067
+
1068
+ # Only trigger a build if the revision regex does NOT match the revision regex.
1069
+ # Corresponds to the JSON property `invertRegex`
1070
+ # @return [Boolean]
1071
+ attr_accessor :invert_regex
1072
+ alias_method :invert_regex?, :invert_regex
1073
+
1074
+ # ID of the project that owns the Cloud Source Repository. If omitted, the
1075
+ # project ID requesting the build is assumed.
1076
+ # Corresponds to the JSON property `projectId`
1077
+ # @return [String]
1078
+ attr_accessor :project_id
1079
+
1080
+ # Name of the Cloud Source Repository.
1081
+ # Corresponds to the JSON property `repoName`
1082
+ # @return [String]
1083
+ attr_accessor :repo_name
1084
+
1085
+ # Substitutions to use in a triggered build. Should only be used with
1086
+ # RunBuildTrigger
1087
+ # Corresponds to the JSON property `substitutions`
1088
+ # @return [Hash<String,String>]
1089
+ attr_accessor :substitutions
1090
+
1091
+ # Regex matching tags to build. The syntax of the regular expressions accepted
1092
+ # is the syntax accepted by RE2 and described at https://github.com/google/re2/
1093
+ # wiki/Syntax
1094
+ # Corresponds to the JSON property `tagName`
1095
+ # @return [String]
1096
+ attr_accessor :tag_name
1097
+
1098
+ def initialize(**args)
1099
+ update!(**args)
1100
+ end
1101
+
1102
+ # Update properties of this object
1103
+ def update!(**args)
1104
+ @branch_name = args[:branch_name] if args.key?(:branch_name)
1105
+ @commit_sha = args[:commit_sha] if args.key?(:commit_sha)
1106
+ @dir = args[:dir] if args.key?(:dir)
1107
+ @invert_regex = args[:invert_regex] if args.key?(:invert_regex)
1108
+ @project_id = args[:project_id] if args.key?(:project_id)
1109
+ @repo_name = args[:repo_name] if args.key?(:repo_name)
1110
+ @substitutions = args[:substitutions] if args.key?(:substitutions)
1111
+ @tag_name = args[:tag_name] if args.key?(:tag_name)
1112
+ end
1113
+ end
1114
+
1115
+ # Artifacts created by the build pipeline.
1116
+ class Results
1117
+ include Google::Apis::Core::Hashable
1118
+
1119
+ # Path to the artifact manifest. Only populated when artifacts are uploaded.
1120
+ # Corresponds to the JSON property `artifactManifest`
1121
+ # @return [String]
1122
+ attr_accessor :artifact_manifest
1123
+
1124
+ # Start and end times for a build execution phase.
1125
+ # Corresponds to the JSON property `artifactTiming`
1126
+ # @return [Google::Apis::CloudbuildV1beta1::TimeSpan]
1127
+ attr_accessor :artifact_timing
1128
+
1129
+ # List of build step digests, in the order corresponding to build step indices.
1130
+ # Corresponds to the JSON property `buildStepImages`
1131
+ # @return [Array<String>]
1132
+ attr_accessor :build_step_images
1133
+
1134
+ # List of build step outputs, produced by builder images, in the order
1135
+ # corresponding to build step indices. [Cloud Builders](https://cloud.google.com/
1136
+ # cloud-build/docs/cloud-builders) can produce this output by writing to `$
1137
+ # BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.
1138
+ # Corresponds to the JSON property `buildStepOutputs`
1139
+ # @return [Array<String>]
1140
+ attr_accessor :build_step_outputs
1141
+
1142
+ # Container images that were built as a part of the build.
1143
+ # Corresponds to the JSON property `images`
1144
+ # @return [Array<Google::Apis::CloudbuildV1beta1::BuiltImage>]
1145
+ attr_accessor :images
1146
+
1147
+ # Number of artifacts uploaded. Only populated when artifacts are uploaded.
1148
+ # Corresponds to the JSON property `numArtifacts`
1149
+ # @return [Fixnum]
1150
+ attr_accessor :num_artifacts
1151
+
1152
+ def initialize(**args)
1153
+ update!(**args)
1154
+ end
1155
+
1156
+ # Update properties of this object
1157
+ def update!(**args)
1158
+ @artifact_manifest = args[:artifact_manifest] if args.key?(:artifact_manifest)
1159
+ @artifact_timing = args[:artifact_timing] if args.key?(:artifact_timing)
1160
+ @build_step_images = args[:build_step_images] if args.key?(:build_step_images)
1161
+ @build_step_outputs = args[:build_step_outputs] if args.key?(:build_step_outputs)
1162
+ @images = args[:images] if args.key?(:images)
1163
+ @num_artifacts = args[:num_artifacts] if args.key?(:num_artifacts)
1164
+ end
1165
+ end
1166
+
1167
+ # SMTPDelivery is the delivery configuration for an SMTP (email) notification.
1168
+ class SmtpDelivery
1169
+ include Google::Apis::Core::Hashable
1170
+
1171
+ # This is the SMTP account/email that appears in the `From:` of the email. If
1172
+ # empty, it is assumed to be sender.
1173
+ # Corresponds to the JSON property `fromAddress`
1174
+ # @return [String]
1175
+ attr_accessor :from_address
1176
+
1177
+ # NotifierSecretRef contains the reference to a secret stored in the
1178
+ # corresponding NotifierSpec.
1179
+ # Corresponds to the JSON property `password`
1180
+ # @return [Google::Apis::CloudbuildV1beta1::NotifierSecretRef]
1181
+ attr_accessor :password
1182
+
1183
+ # The SMTP port of the server.
1184
+ # Corresponds to the JSON property `port`
1185
+ # @return [String]
1186
+ attr_accessor :port
1187
+
1188
+ # This is the list of addresses to which we send the email (i.e. in the `To:` of
1189
+ # the email).
1190
+ # Corresponds to the JSON property `recipientAddresses`
1191
+ # @return [Array<String>]
1192
+ attr_accessor :recipient_addresses
1193
+
1194
+ # This is the SMTP account/email that is used to send the message.
1195
+ # Corresponds to the JSON property `senderAddress`
1196
+ # @return [String]
1197
+ attr_accessor :sender_address
1198
+
1199
+ # The address of the SMTP server.
1200
+ # Corresponds to the JSON property `server`
1201
+ # @return [String]
1202
+ attr_accessor :server
1203
+
1204
+ def initialize(**args)
1205
+ update!(**args)
1206
+ end
1207
+
1208
+ # Update properties of this object
1209
+ def update!(**args)
1210
+ @from_address = args[:from_address] if args.key?(:from_address)
1211
+ @password = args[:password] if args.key?(:password)
1212
+ @port = args[:port] if args.key?(:port)
1213
+ @recipient_addresses = args[:recipient_addresses] if args.key?(:recipient_addresses)
1214
+ @sender_address = args[:sender_address] if args.key?(:sender_address)
1215
+ @server = args[:server] if args.key?(:server)
1216
+ end
1217
+ end
1218
+
1219
+ # Pairs a set of secret environment variables containing encrypted values with
1220
+ # the Cloud KMS key to use to decrypt the value. Note: Use `kmsKeyName` with `
1221
+ # available_secrets` instead of using `kmsKeyName` with `secret`. For
1222
+ # instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/
1223
+ # use-encrypted-credentials.
1224
+ class Secret
1225
+ include Google::Apis::Core::Hashable
1226
+
1227
+ # Cloud KMS key name to use to decrypt these envs.
1228
+ # Corresponds to the JSON property `kmsKeyName`
1229
+ # @return [String]
1230
+ attr_accessor :kms_key_name
1231
+
1232
+ # Map of environment variable name to its encrypted value. Secret environment
1233
+ # variables must be unique across all of a build's secrets, and must be used by
1234
+ # at least one build step. Values can be at most 64 KB in size. There can be at
1235
+ # most 100 secret values across all of a build's secrets.
1236
+ # Corresponds to the JSON property `secretEnv`
1237
+ # @return [Hash<String,String>]
1238
+ attr_accessor :secret_env
1239
+
1240
+ def initialize(**args)
1241
+ update!(**args)
1242
+ end
1243
+
1244
+ # Update properties of this object
1245
+ def update!(**args)
1246
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
1247
+ @secret_env = args[:secret_env] if args.key?(:secret_env)
1248
+ end
1249
+ end
1250
+
1251
+ # Pairs a secret environment variable with a SecretVersion in Secret Manager.
1252
+ class SecretManagerSecret
1253
+ include Google::Apis::Core::Hashable
1254
+
1255
+ # Environment variable name to associate with the secret. Secret environment
1256
+ # variables must be unique across all of a build's secrets, and must be used by
1257
+ # at least one build step.
1258
+ # Corresponds to the JSON property `env`
1259
+ # @return [String]
1260
+ attr_accessor :env
1261
+
1262
+ # Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*
1263
+ # Corresponds to the JSON property `versionName`
1264
+ # @return [String]
1265
+ attr_accessor :version_name
1266
+
1267
+ def initialize(**args)
1268
+ update!(**args)
1269
+ end
1270
+
1271
+ # Update properties of this object
1272
+ def update!(**args)
1273
+ @env = args[:env] if args.key?(:env)
1274
+ @version_name = args[:version_name] if args.key?(:version_name)
1275
+ end
1276
+ end
1277
+
1278
+ # Secrets and secret environment variables.
1279
+ class Secrets
1280
+ include Google::Apis::Core::Hashable
1281
+
1282
+ # Secrets encrypted with KMS key and the associated secret environment variable.
1283
+ # Corresponds to the JSON property `inline`
1284
+ # @return [Array<Google::Apis::CloudbuildV1beta1::InlineSecret>]
1285
+ attr_accessor :inline
1286
+
1287
+ # Secrets in Secret Manager and associated secret environment variable.
1288
+ # Corresponds to the JSON property `secretManager`
1289
+ # @return [Array<Google::Apis::CloudbuildV1beta1::SecretManagerSecret>]
1290
+ attr_accessor :secret_manager
1291
+
1292
+ def initialize(**args)
1293
+ update!(**args)
1294
+ end
1295
+
1296
+ # Update properties of this object
1297
+ def update!(**args)
1298
+ @inline = args[:inline] if args.key?(:inline)
1299
+ @secret_manager = args[:secret_manager] if args.key?(:secret_manager)
1300
+ end
1301
+ end
1302
+
1303
+ # SlackDelivery is the delivery configuration for delivering Slack messages via
1304
+ # webhooks. See Slack webhook documentation at: https://api.slack.com/messaging/
1305
+ # webhooks.
1306
+ class SlackDelivery
1307
+ include Google::Apis::Core::Hashable
1308
+
1309
+ # NotifierSecretRef contains the reference to a secret stored in the
1310
+ # corresponding NotifierSpec.
1311
+ # Corresponds to the JSON property `webhookUri`
1312
+ # @return [Google::Apis::CloudbuildV1beta1::NotifierSecretRef]
1313
+ attr_accessor :webhook_uri
1314
+
1315
+ def initialize(**args)
1316
+ update!(**args)
1317
+ end
1318
+
1319
+ # Update properties of this object
1320
+ def update!(**args)
1321
+ @webhook_uri = args[:webhook_uri] if args.key?(:webhook_uri)
1322
+ end
1323
+ end
1324
+
1325
+ # Location of the source in a supported storage service.
1326
+ class Source
1327
+ include Google::Apis::Core::Hashable
1328
+
1329
+ # Location of the source in a Google Cloud Source Repository.
1330
+ # Corresponds to the JSON property `repoSource`
1331
+ # @return [Google::Apis::CloudbuildV1beta1::RepoSource]
1332
+ attr_accessor :repo_source
1333
+
1334
+ # Location of the source in an archive file in Google Cloud Storage.
1335
+ # Corresponds to the JSON property `storageSource`
1336
+ # @return [Google::Apis::CloudbuildV1beta1::StorageSource]
1337
+ attr_accessor :storage_source
1338
+
1339
+ def initialize(**args)
1340
+ update!(**args)
1341
+ end
1342
+
1343
+ # Update properties of this object
1344
+ def update!(**args)
1345
+ @repo_source = args[:repo_source] if args.key?(:repo_source)
1346
+ @storage_source = args[:storage_source] if args.key?(:storage_source)
1347
+ end
1348
+ end
1349
+
1350
+ # Provenance of the source. Ways to find the original source, or verify that
1351
+ # some source was used for this build.
1352
+ class SourceProvenance
1353
+ include Google::Apis::Core::Hashable
1354
+
1355
+ # Output only. Hash(es) of the build source, which can be used to verify that
1356
+ # the original source integrity was maintained in the build. Note that `
1357
+ # FileHashes` will only be populated if `BuildOptions` has requested a `
1358
+ # SourceProvenanceHash`. The keys to this map are file paths used as build
1359
+ # source and the values contain the hash values for those files. If the build
1360
+ # source came in a single package such as a gzipped tarfile (`.tar.gz`), the `
1361
+ # FileHash` will be for the single path to that file.
1362
+ # Corresponds to the JSON property `fileHashes`
1363
+ # @return [Hash<String,Google::Apis::CloudbuildV1beta1::FileHashes>]
1364
+ attr_accessor :file_hashes
1365
+
1366
+ # Location of the source in a Google Cloud Source Repository.
1367
+ # Corresponds to the JSON property `resolvedRepoSource`
1368
+ # @return [Google::Apis::CloudbuildV1beta1::RepoSource]
1369
+ attr_accessor :resolved_repo_source
1370
+
1371
+ # Location of the source in an archive file in Google Cloud Storage.
1372
+ # Corresponds to the JSON property `resolvedStorageSource`
1373
+ # @return [Google::Apis::CloudbuildV1beta1::StorageSource]
1374
+ attr_accessor :resolved_storage_source
1375
+
1376
+ def initialize(**args)
1377
+ update!(**args)
1378
+ end
1379
+
1380
+ # Update properties of this object
1381
+ def update!(**args)
1382
+ @file_hashes = args[:file_hashes] if args.key?(:file_hashes)
1383
+ @resolved_repo_source = args[:resolved_repo_source] if args.key?(:resolved_repo_source)
1384
+ @resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source)
1385
+ end
1386
+ end
1387
+
1388
+ # The `Status` type defines a logical error model that is suitable for different
1389
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1390
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1391
+ # data: error code, error message, and error details. You can find out more
1392
+ # about this error model and how to work with it in the [API Design Guide](https:
1393
+ # //cloud.google.com/apis/design/errors).
1394
+ class Status
1395
+ include Google::Apis::Core::Hashable
1396
+
1397
+ # The status code, which should be an enum value of google.rpc.Code.
1398
+ # Corresponds to the JSON property `code`
1399
+ # @return [Fixnum]
1400
+ attr_accessor :code
1401
+
1402
+ # A list of messages that carry the error details. There is a common set of
1403
+ # message types for APIs to use.
1404
+ # Corresponds to the JSON property `details`
1405
+ # @return [Array<Hash<String,Object>>]
1406
+ attr_accessor :details
1407
+
1408
+ # A developer-facing error message, which should be in English. Any user-facing
1409
+ # error message should be localized and sent in the google.rpc.Status.details
1410
+ # field, or localized by the client.
1411
+ # Corresponds to the JSON property `message`
1412
+ # @return [String]
1413
+ attr_accessor :message
1414
+
1415
+ def initialize(**args)
1416
+ update!(**args)
1417
+ end
1418
+
1419
+ # Update properties of this object
1420
+ def update!(**args)
1421
+ @code = args[:code] if args.key?(:code)
1422
+ @details = args[:details] if args.key?(:details)
1423
+ @message = args[:message] if args.key?(:message)
1424
+ end
1425
+ end
1426
+
1427
+ # Location of the source in an archive file in Google Cloud Storage.
1428
+ class StorageSource
1429
+ include Google::Apis::Core::Hashable
1430
+
1431
+ # Google Cloud Storage bucket containing the source (see [Bucket Name
1432
+ # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
1433
+ # ).
1434
+ # Corresponds to the JSON property `bucket`
1435
+ # @return [String]
1436
+ attr_accessor :bucket
1437
+
1438
+ # Google Cloud Storage generation for the object. If the generation is omitted,
1439
+ # the latest generation will be used.
1440
+ # Corresponds to the JSON property `generation`
1441
+ # @return [Fixnum]
1442
+ attr_accessor :generation
1443
+
1444
+ # Google Cloud Storage object containing the source. This object must be a
1445
+ # gzipped archive file (`.tar.gz`) containing source to build.
1446
+ # Corresponds to the JSON property `object`
1447
+ # @return [String]
1448
+ attr_accessor :object
1449
+
1450
+ def initialize(**args)
1451
+ update!(**args)
1452
+ end
1453
+
1454
+ # Update properties of this object
1455
+ def update!(**args)
1456
+ @bucket = args[:bucket] if args.key?(:bucket)
1457
+ @generation = args[:generation] if args.key?(:generation)
1458
+ @object = args[:object] if args.key?(:object)
1459
+ end
1460
+ end
1461
+
1462
+ # Start and end times for a build execution phase.
1463
+ class TimeSpan
1464
+ include Google::Apis::Core::Hashable
1465
+
1466
+ # End of time span.
1467
+ # Corresponds to the JSON property `endTime`
1468
+ # @return [String]
1469
+ attr_accessor :end_time
1470
+
1471
+ # Start of time span.
1472
+ # Corresponds to the JSON property `startTime`
1473
+ # @return [String]
1474
+ attr_accessor :start_time
1475
+
1476
+ def initialize(**args)
1477
+ update!(**args)
1478
+ end
1479
+
1480
+ # Update properties of this object
1481
+ def update!(**args)
1482
+ @end_time = args[:end_time] if args.key?(:end_time)
1483
+ @start_time = args[:start_time] if args.key?(:start_time)
1484
+ end
1485
+ end
1486
+
1487
+ # Volume describes a Docker container volume which is mounted into build steps
1488
+ # in order to persist files across build step execution.
1489
+ class Volume
1490
+ include Google::Apis::Core::Hashable
1491
+
1492
+ # Name of the volume to mount. Volume names must be unique per build step and
1493
+ # must be valid names for Docker volumes. Each named volume must be used by at
1494
+ # least two build steps.
1495
+ # Corresponds to the JSON property `name`
1496
+ # @return [String]
1497
+ attr_accessor :name
1498
+
1499
+ # Path at which to mount the volume. Paths must be absolute and cannot conflict
1500
+ # with other volume paths on the same build step or with certain reserved volume
1501
+ # paths.
1502
+ # Corresponds to the JSON property `path`
1503
+ # @return [String]
1504
+ attr_accessor :path
1505
+
1506
+ def initialize(**args)
1507
+ update!(**args)
1508
+ end
1509
+
1510
+ # Update properties of this object
1511
+ def update!(**args)
1512
+ @name = args[:name] if args.key?(:name)
1513
+ @path = args[:path] if args.key?(:path)
1514
+ end
1515
+ end
1516
+
1517
+ # Defines the configuration to be used for creating workers in the pool.
1518
+ class WorkerConfig
1519
+ include Google::Apis::Core::Hashable
1520
+
1521
+ # Size of the disk attached to the worker, in GB. See [Worker pool config file](
1522
+ # https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-config-
1523
+ # file). Specify a value of up to 1000. If `0` is specified, Cloud Build will
1524
+ # use a standard disk size.
1525
+ # Corresponds to the JSON property `diskSizeGb`
1526
+ # @return [Fixnum]
1527
+ attr_accessor :disk_size_gb
1528
+
1529
+ # Machine type of a worker, such as `n1-standard-1`. See [Worker pool config
1530
+ # file](https://cloud.google.com/cloud-build/docs/custom-workers/worker-pool-
1531
+ # config-file). If left blank, Cloud Build will use `n1-standard-1`.
1532
+ # Corresponds to the JSON property `machineType`
1533
+ # @return [String]
1534
+ attr_accessor :machine_type
1535
+
1536
+ # If true, workers are created without any public address, which prevents
1537
+ # network egress to public IPs.
1538
+ # Corresponds to the JSON property `noExternalIp`
1539
+ # @return [Boolean]
1540
+ attr_accessor :no_external_ip
1541
+ alias_method :no_external_ip?, :no_external_ip
1542
+
1543
+ def initialize(**args)
1544
+ update!(**args)
1545
+ end
1546
+
1547
+ # Update properties of this object
1548
+ def update!(**args)
1549
+ @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
1550
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
1551
+ @no_external_ip = args[:no_external_ip] if args.key?(:no_external_ip)
1552
+ end
1553
+ end
1554
+
1555
+ # Configuration for a `WorkerPool` to run the builds. Workers provide a build
1556
+ # environment where Cloud Build runs your builds. Cloud Build owns and maintains
1557
+ # a pool of workers for general use. By default, when you submit a build, Cloud
1558
+ # Build uses one of the workers from this pool. Builds that run in the default
1559
+ # worker pool have access to the public internet. If your build needs access to
1560
+ # resources on a private network, create and use a `WorkerPool` to run your
1561
+ # builds. Custom `WorkerPool`s give your builds access to any single VPC network
1562
+ # that you administer, including any on-prem resources connected to that VPC
1563
+ # network. For an overview of custom worker pools, see [Custom workers overview](
1564
+ # https://cloud.google.com/cloud-build/docs/custom-workers/custom-workers-
1565
+ # overview).
1566
+ class WorkerPool
1567
+ include Google::Apis::Core::Hashable
1568
+
1569
+ # Output only. Time at which the request to create the `WorkerPool` was received.
1570
+ # Corresponds to the JSON property `createTime`
1571
+ # @return [String]
1572
+ attr_accessor :create_time
1573
+
1574
+ # Output only. Time at which the request to delete the `WorkerPool` was received.
1575
+ # Corresponds to the JSON property `deleteTime`
1576
+ # @return [String]
1577
+ attr_accessor :delete_time
1578
+
1579
+ # Output only. The resource name of the `WorkerPool`, with format `projects/`
1580
+ # project`/locations/`location`/workerPools/`worker_pool``. The value of ``
1581
+ # worker_pool`` is provided by `worker_pool_id` in `CreateWorkerPool` request
1582
+ # and the value of ``location`` is determined by the endpoint accessed.
1583
+ # Corresponds to the JSON property `name`
1584
+ # @return [String]
1585
+ attr_accessor :name
1586
+
1587
+ # Network describes the network configuration for a `WorkerPool`.
1588
+ # Corresponds to the JSON property `networkConfig`
1589
+ # @return [Google::Apis::CloudbuildV1beta1::NetworkConfig]
1590
+ attr_accessor :network_config
1591
+
1592
+ # Output only. `WorkerPool` state.
1593
+ # Corresponds to the JSON property `state`
1594
+ # @return [String]
1595
+ attr_accessor :state
1596
+
1597
+ # Output only. Time at which the request to update the `WorkerPool` was received.
1598
+ # Corresponds to the JSON property `updateTime`
1599
+ # @return [String]
1600
+ attr_accessor :update_time
1601
+
1602
+ # Defines the configuration to be used for creating workers in the pool.
1603
+ # Corresponds to the JSON property `workerConfig`
1604
+ # @return [Google::Apis::CloudbuildV1beta1::WorkerConfig]
1605
+ attr_accessor :worker_config
1606
+
1607
+ def initialize(**args)
1608
+ update!(**args)
1609
+ end
1610
+
1611
+ # Update properties of this object
1612
+ def update!(**args)
1613
+ @create_time = args[:create_time] if args.key?(:create_time)
1614
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
1615
+ @name = args[:name] if args.key?(:name)
1616
+ @network_config = args[:network_config] if args.key?(:network_config)
1617
+ @state = args[:state] if args.key?(:state)
1618
+ @update_time = args[:update_time] if args.key?(:update_time)
1619
+ @worker_config = args[:worker_config] if args.key?(:worker_config)
1620
+ end
1621
+ end
1622
+ end
1623
+ end
1624
+ end