Skip to main content

googleapis_tonic_google_devtools_cloudbuild_v1/vec_u8_hash_map/
google.devtools.cloudbuild.v1.rs

1// This file is @generated by prost-build.
2/// Returns the default service account that will be used for `Builds`.
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct GetDefaultServiceAccountRequest {
5    /// Required. The name of the `DefaultServiceAccount` to retrieve.
6    /// Format:
7    /// `projects/{project}/locations/{location}/defaultServiceAccount`
8    #[prost(string, tag = "1")]
9    pub name: ::prost::alloc::string::String,
10}
11/// The default service account used for `Builds`.
12#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
13pub struct DefaultServiceAccount {
14    /// Identifier. Format:
15    /// `projects/{project}/locations/{location}/defaultServiceAccount`
16    #[prost(string, tag = "1")]
17    pub name: ::prost::alloc::string::String,
18    /// Output only. The email address of the service account identity that will be
19    /// used for a build by default.
20    ///
21    /// This is returned in the format
22    /// `projects/{project}/serviceAccounts/{service_account}` where
23    /// `{service_account}` could be the legacy Cloud Build SA, in the format
24    /// \[PROJECT_NUMBER\]@cloudbuild.gserviceaccount.com or the Compute SA, in the
25    /// format \[PROJECT_NUMBER\]-compute@developer.gserviceaccount.com.
26    ///
27    /// If no service account will be used by default, this will be empty.
28    #[prost(string, tag = "2")]
29    pub service_account_email: ::prost::alloc::string::String,
30}
31/// Specifies a build to retry.
32#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
33pub struct RetryBuildRequest {
34    /// The name of the `Build` to retry.
35    /// Format: `projects/{project}/locations/{location}/builds/{build}`
36    #[prost(string, tag = "3")]
37    pub name: ::prost::alloc::string::String,
38    /// Required. ID of the project.
39    #[prost(string, tag = "1")]
40    pub project_id: ::prost::alloc::string::String,
41    /// Required. Build ID of the original build.
42    #[prost(string, tag = "2")]
43    pub id: ::prost::alloc::string::String,
44}
45/// Specifies a build trigger to run and the source to use.
46#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct RunBuildTriggerRequest {
48    /// The name of the `Trigger` to run.
49    /// Format: `projects/{project}/locations/{location}/triggers/{trigger}`
50    #[prost(string, tag = "4")]
51    pub name: ::prost::alloc::string::String,
52    /// Required. ID of the project.
53    #[prost(string, tag = "1")]
54    pub project_id: ::prost::alloc::string::String,
55    /// Required. ID of the trigger.
56    #[prost(string, tag = "2")]
57    pub trigger_id: ::prost::alloc::string::String,
58    /// Source to build against this trigger.
59    /// Branch and tag names cannot consist of regular expressions.
60    #[prost(message, optional, tag = "3")]
61    pub source: ::core::option::Option<RepoSource>,
62}
63/// Location of the source in an archive file in Cloud Storage.
64#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
65pub struct StorageSource {
66    /// Cloud Storage bucket containing the source (see
67    /// [Bucket Name
68    /// Requirements](<https://cloud.google.com/storage/docs/bucket-naming#requirements>)).
69    #[prost(string, tag = "1")]
70    pub bucket: ::prost::alloc::string::String,
71    /// Required. Cloud Storage object containing the source.
72    ///
73    /// This object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`)
74    /// containing source to build.
75    #[prost(string, tag = "2")]
76    pub object: ::prost::alloc::string::String,
77    /// Optional. Cloud Storage generation for the object. If the generation is
78    /// omitted, the latest generation will be used.
79    #[prost(int64, tag = "3")]
80    pub generation: i64,
81    /// Optional. Option to specify the tool to fetch the source file for the
82    /// build.
83    #[prost(enumeration = "storage_source::SourceFetcher", tag = "5")]
84    pub source_fetcher: i32,
85}
86/// Nested message and enum types in `StorageSource`.
87pub mod storage_source {
88    /// Specifies the tool to fetch the source file for the build.
89    #[derive(
90        Clone,
91        Copy,
92        Debug,
93        PartialEq,
94        Eq,
95        Hash,
96        PartialOrd,
97        Ord,
98        ::prost::Enumeration
99    )]
100    #[repr(i32)]
101    pub enum SourceFetcher {
102        /// Unspecified defaults to GSUTIL.
103        Unspecified = 0,
104        /// Use the "gsutil" tool to download the source file.
105        Gsutil = 1,
106        /// Use the Cloud Storage Fetcher tool to download the source file.
107        GcsFetcher = 2,
108    }
109    impl SourceFetcher {
110        /// String value of the enum field names used in the ProtoBuf definition.
111        ///
112        /// The values are not transformed in any way and thus are considered stable
113        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
114        pub fn as_str_name(&self) -> &'static str {
115            match self {
116                Self::Unspecified => "SOURCE_FETCHER_UNSPECIFIED",
117                Self::Gsutil => "GSUTIL",
118                Self::GcsFetcher => "GCS_FETCHER",
119            }
120        }
121        /// Creates an enum from field names used in the ProtoBuf definition.
122        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
123            match value {
124                "SOURCE_FETCHER_UNSPECIFIED" => Some(Self::Unspecified),
125                "GSUTIL" => Some(Self::Gsutil),
126                "GCS_FETCHER" => Some(Self::GcsFetcher),
127                _ => None,
128            }
129        }
130    }
131}
132/// Location of the source in any accessible Git repository.
133#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
134pub struct GitSource {
135    /// Required. Location of the Git repo to build.
136    ///
137    /// This will be used as a `git remote`, see
138    /// <https://git-scm.com/docs/git-remote.>
139    #[prost(string, tag = "1")]
140    pub url: ::prost::alloc::string::String,
141    /// Optional. Directory, relative to the source root, in which to run the
142    /// build.
143    ///
144    /// This must be a relative path. If a step's `dir` is specified and is an
145    /// absolute path, this value is ignored for that step's execution.
146    #[prost(string, tag = "5")]
147    pub dir: ::prost::alloc::string::String,
148    /// Optional. The revision to fetch from the Git repository such as a branch, a
149    /// tag, a commit SHA, or any Git ref.
150    ///
151    /// Cloud Build uses `git fetch` to fetch the revision from the Git
152    /// repository; therefore make sure that the string you provide for `revision`
153    /// is parsable  by the command. For information on string values accepted by
154    /// `git fetch`, see
155    /// <https://git-scm.com/docs/gitrevisions#\_specifying_revisions.> For
156    /// information on `git fetch`, see <https://git-scm.com/docs/git-fetch.>
157    #[prost(string, tag = "6")]
158    pub revision: ::prost::alloc::string::String,
159}
160/// Location of the source in a Google Cloud Source Repository.
161#[derive(Clone, PartialEq, ::prost::Message)]
162pub struct RepoSource {
163    /// Optional. ID of the project that owns the Cloud Source Repository. If
164    /// omitted, the project ID requesting the build is assumed.
165    #[prost(string, tag = "1")]
166    pub project_id: ::prost::alloc::string::String,
167    /// Required. Name of the Cloud Source Repository.
168    #[prost(string, tag = "2")]
169    pub repo_name: ::prost::alloc::string::String,
170    /// Optional. Directory, relative to the source root, in which to run the
171    /// build.
172    ///
173    /// This must be a relative path. If a step's `dir` is specified and is an
174    /// absolute path, this value is ignored for that step's execution.
175    #[prost(string, tag = "7")]
176    pub dir: ::prost::alloc::string::String,
177    /// Optional. Only trigger a build if the revision regex does NOT match the
178    /// revision regex.
179    #[prost(bool, tag = "8")]
180    pub invert_regex: bool,
181    /// Optional. Substitutions to use in a triggered build.
182    /// Should only be used with RunBuildTrigger
183    #[prost(map = "string, string", tag = "9")]
184    pub substitutions: ::std::collections::HashMap<
185        ::prost::alloc::string::String,
186        ::prost::alloc::string::String,
187    >,
188    /// A revision within the Cloud Source Repository must be specified in
189    /// one of these ways.
190    #[prost(oneof = "repo_source::Revision", tags = "3, 4, 5")]
191    pub revision: ::core::option::Option<repo_source::Revision>,
192}
193/// Nested message and enum types in `RepoSource`.
194pub mod repo_source {
195    /// A revision within the Cloud Source Repository must be specified in
196    /// one of these ways.
197    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
198    pub enum Revision {
199        /// Regex matching branches to build.
200        ///
201        /// The syntax of the regular expressions accepted is the syntax accepted by
202        /// RE2 and described at <https://github.com/google/re2/wiki/Syntax>
203        #[prost(string, tag = "3")]
204        BranchName(::prost::alloc::string::String),
205        /// Regex matching tags to build.
206        ///
207        /// The syntax of the regular expressions accepted is the syntax accepted by
208        /// RE2 and described at <https://github.com/google/re2/wiki/Syntax>
209        #[prost(string, tag = "4")]
210        TagName(::prost::alloc::string::String),
211        /// Explicit commit SHA to build.
212        #[prost(string, tag = "5")]
213        CommitSha(::prost::alloc::string::String),
214    }
215}
216/// Location of the source manifest in Cloud Storage.
217/// This feature is in Preview; see description
218/// [here](<https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher>).
219#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
220pub struct StorageSourceManifest {
221    /// Required. Cloud Storage bucket containing the source manifest (see [Bucket
222    /// Name
223    /// Requirements](<https://cloud.google.com/storage/docs/bucket-naming#requirements>)).
224    #[prost(string, tag = "1")]
225    pub bucket: ::prost::alloc::string::String,
226    /// Required. Cloud Storage object containing the source manifest.
227    ///
228    /// This object must be a JSON file.
229    #[prost(string, tag = "2")]
230    pub object: ::prost::alloc::string::String,
231    /// Cloud Storage generation for the object. If the generation is
232    /// omitted, the latest generation will be used.
233    #[prost(int64, tag = "3")]
234    pub generation: i64,
235}
236/// Location of the source in a 2nd-gen Google Cloud Build repository resource.
237#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
238pub struct ConnectedRepository {
239    /// Required. Name of the Google Cloud Build repository, formatted as
240    /// `projects/*/locations/*/connections/*/repositories/*`.
241    #[prost(string, tag = "1")]
242    pub repository: ::prost::alloc::string::String,
243    /// Optional. Directory, relative to the source root, in which to run the
244    /// build.
245    #[prost(string, tag = "2")]
246    pub dir: ::prost::alloc::string::String,
247    /// Required. The revision to fetch from the Git repository such as a branch, a
248    /// tag, a commit SHA, or any Git ref.
249    #[prost(string, tag = "3")]
250    pub revision: ::prost::alloc::string::String,
251}
252/// Location of the source in a supported storage service.
253#[derive(Clone, PartialEq, ::prost::Message)]
254pub struct Source {
255    /// Location of source.
256    #[prost(oneof = "source::Source", tags = "2, 3, 5, 8, 9")]
257    pub source: ::core::option::Option<source::Source>,
258}
259/// Nested message and enum types in `Source`.
260pub mod source {
261    /// Location of source.
262    #[derive(Clone, PartialEq, ::prost::Oneof)]
263    pub enum Source {
264        /// If provided, get the source from this location in Cloud Storage.
265        #[prost(message, tag = "2")]
266        StorageSource(super::StorageSource),
267        /// If provided, get the source from this location in a Cloud Source
268        /// Repository.
269        #[prost(message, tag = "3")]
270        RepoSource(super::RepoSource),
271        /// If provided, get the source from this Git repository.
272        #[prost(message, tag = "5")]
273        GitSource(super::GitSource),
274        /// If provided, get the source from this manifest in Cloud Storage.
275        /// This feature is in Preview; see description
276        /// [here](<https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher>).
277        #[prost(message, tag = "8")]
278        StorageSourceManifest(super::StorageSourceManifest),
279        /// Optional. If provided, get the source from this 2nd-gen Google Cloud
280        /// Build repository resource.
281        #[prost(message, tag = "9")]
282        ConnectedRepository(super::ConnectedRepository),
283    }
284}
285/// An image built by the pipeline.
286#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
287pub struct BuiltImage {
288    /// Name used to push the container image to Google Container Registry, as
289    /// presented to `docker push`.
290    #[prost(string, tag = "1")]
291    pub name: ::prost::alloc::string::String,
292    /// Docker Registry 2.0 digest.
293    #[prost(string, tag = "3")]
294    pub digest: ::prost::alloc::string::String,
295    /// Output only. Stores timing information for pushing the specified image.
296    #[prost(message, optional, tag = "4")]
297    pub push_timing: ::core::option::Option<TimeSpan>,
298    /// Output only. Path to the artifact in Artifact Registry.
299    #[prost(string, tag = "5")]
300    pub artifact_registry_package: ::prost::alloc::string::String,
301}
302/// Artifact uploaded using the PythonPackage directive.
303#[derive(Clone, PartialEq, ::prost::Message)]
304pub struct UploadedPythonPackage {
305    /// URI of the uploaded artifact.
306    #[prost(string, tag = "1")]
307    pub uri: ::prost::alloc::string::String,
308    /// Hash types and values of the Python Artifact.
309    #[prost(message, optional, tag = "2")]
310    pub file_hashes: ::core::option::Option<FileHashes>,
311    /// Output only. Stores timing information for pushing the specified artifact.
312    #[prost(message, optional, tag = "3")]
313    pub push_timing: ::core::option::Option<TimeSpan>,
314    /// Output only. Path to the artifact in Artifact Registry.
315    #[prost(string, tag = "4")]
316    pub artifact_registry_package: ::prost::alloc::string::String,
317}
318/// A Maven artifact uploaded using the MavenArtifact directive.
319#[derive(Clone, PartialEq, ::prost::Message)]
320pub struct UploadedMavenArtifact {
321    /// URI of the uploaded artifact.
322    #[prost(string, tag = "1")]
323    pub uri: ::prost::alloc::string::String,
324    /// Hash types and values of the Maven Artifact.
325    #[prost(message, optional, tag = "2")]
326    pub file_hashes: ::core::option::Option<FileHashes>,
327    /// Output only. Stores timing information for pushing the specified artifact.
328    #[prost(message, optional, tag = "3")]
329    pub push_timing: ::core::option::Option<TimeSpan>,
330    /// Output only. Path to the artifact in Artifact Registry.
331    #[prost(string, tag = "4")]
332    pub artifact_registry_package: ::prost::alloc::string::String,
333}
334/// A Go module artifact uploaded to Artifact Registry using the GoModule
335/// directive.
336#[derive(Clone, PartialEq, ::prost::Message)]
337pub struct UploadedGoModule {
338    /// URI of the uploaded artifact.
339    #[prost(string, tag = "1")]
340    pub uri: ::prost::alloc::string::String,
341    /// Hash types and values of the Go Module Artifact.
342    #[prost(message, optional, tag = "2")]
343    pub file_hashes: ::core::option::Option<FileHashes>,
344    /// Output only. Stores timing information for pushing the specified artifact.
345    #[prost(message, optional, tag = "3")]
346    pub push_timing: ::core::option::Option<TimeSpan>,
347    /// Output only. Path to the artifact in Artifact Registry.
348    #[prost(string, tag = "4")]
349    pub artifact_registry_package: ::prost::alloc::string::String,
350}
351/// An npm package uploaded to Artifact Registry using the NpmPackage
352/// directive.
353#[derive(Clone, PartialEq, ::prost::Message)]
354pub struct UploadedNpmPackage {
355    /// URI of the uploaded npm package.
356    #[prost(string, tag = "1")]
357    pub uri: ::prost::alloc::string::String,
358    /// Hash types and values of the npm package.
359    #[prost(message, optional, tag = "2")]
360    pub file_hashes: ::core::option::Option<FileHashes>,
361    /// Output only. Stores timing information for pushing the specified artifact.
362    #[prost(message, optional, tag = "3")]
363    pub push_timing: ::core::option::Option<TimeSpan>,
364    /// Output only. Path to the artifact in Artifact Registry.
365    #[prost(string, tag = "7")]
366    pub artifact_registry_package: ::prost::alloc::string::String,
367}
368/// A step in the build pipeline.
369#[derive(Clone, PartialEq, ::prost::Message)]
370pub struct BuildStep {
371    /// Required. The name of the container image that will run this particular
372    /// build step.
373    ///
374    /// If the image is available in the host's Docker daemon's cache, it
375    /// will be run directly. If not, the host will attempt to pull the image
376    /// first, using the builder service account's credentials if necessary.
377    ///
378    /// The Docker daemon's cache will already have the latest versions of all of
379    /// the officially supported build steps
380    /// ([<https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders>)).
381    /// The Docker daemon will also have cached many of the layers for some popular
382    /// images, like "ubuntu", "debian", but they will be refreshed at the time you
383    /// attempt to use them.
384    ///
385    /// If you built an image in a previous build step, it will be stored in the
386    /// host's Docker daemon's cache and is available to use as the name for a
387    /// later build step.
388    #[prost(string, tag = "1")]
389    pub name: ::prost::alloc::string::String,
390    /// A list of environment variable definitions to be used when running a step.
391    ///
392    /// The elements are of the form "KEY=VALUE" for the environment variable "KEY"
393    /// being given the value "VALUE".
394    #[prost(string, repeated, tag = "2")]
395    pub env: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
396    /// A list of arguments that will be presented to the step when it is started.
397    ///
398    /// If the image used to run the step's container has an entrypoint, the `args`
399    /// are used as arguments to that entrypoint. If the image does not define
400    /// an entrypoint, the first element in args is used as the entrypoint,
401    /// and the remainder will be used as arguments.
402    #[prost(string, repeated, tag = "3")]
403    pub args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
404    /// Working directory to use when running this step's container.
405    ///
406    /// If this value is a relative path, it is relative to the build's working
407    /// directory. If this value is absolute, it may be outside the build's working
408    /// directory, in which case the contents of the path may not be persisted
409    /// across build step executions, unless a `volume` for that path is specified.
410    ///
411    /// If the build specifies a `RepoSource` with `dir` and a step with a `dir`,
412    /// which specifies an absolute path, the `RepoSource` `dir` is ignored for
413    /// the step's execution.
414    #[prost(string, tag = "4")]
415    pub dir: ::prost::alloc::string::String,
416    /// Unique identifier for this build step, used in `wait_for` to
417    /// reference this build step as a dependency.
418    #[prost(string, tag = "5")]
419    pub id: ::prost::alloc::string::String,
420    /// The ID(s) of the step(s) that this build step depends on.
421    /// This build step will not start until all the build steps in `wait_for`
422    /// have completed successfully. If `wait_for` is empty, this build step will
423    /// start when all previous build steps in the `Build.Steps` list have
424    /// completed successfully.
425    #[prost(string, repeated, tag = "6")]
426    pub wait_for: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
427    /// Entrypoint to be used instead of the build step image's default entrypoint.
428    /// If unset, the image's default entrypoint is used.
429    #[prost(string, tag = "7")]
430    pub entrypoint: ::prost::alloc::string::String,
431    /// A list of environment variables which are encrypted using a Cloud Key
432    /// Management Service crypto key. These values must be specified in the
433    /// build's `Secret`.
434    #[prost(string, repeated, tag = "8")]
435    pub secret_env: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
436    /// List of volumes to mount into the build step.
437    ///
438    /// Each volume is created as an empty volume prior to execution of the
439    /// build step. Upon completion of the build, volumes and their contents are
440    /// discarded.
441    ///
442    /// Using a named volume in only one step is not valid as it is indicative
443    /// of a build request with an incorrect configuration.
444    #[prost(message, repeated, tag = "9")]
445    pub volumes: ::prost::alloc::vec::Vec<Volume>,
446    /// Output only. Stores timing information for executing this build step.
447    #[prost(message, optional, tag = "10")]
448    pub timing: ::core::option::Option<TimeSpan>,
449    /// Output only. Stores timing information for pulling this build step's
450    /// builder image only.
451    #[prost(message, optional, tag = "13")]
452    pub pull_timing: ::core::option::Option<TimeSpan>,
453    /// Time limit for executing this build step. If not defined, the step has no
454    /// time limit and will be allowed to continue to run until either it completes
455    /// or the build itself times out.
456    #[prost(message, optional, tag = "11")]
457    pub timeout: ::core::option::Option<::prost_types::Duration>,
458    /// Output only. Status of the build step. At this time, build step status is
459    /// only updated on build completion; step status is not updated in real-time
460    /// as the build progresses.
461    #[prost(enumeration = "build::Status", tag = "12")]
462    pub status: i32,
463    /// Allow this build step to fail without failing the entire build.
464    ///
465    /// If false, the entire build will fail if this step fails. Otherwise, the
466    /// build will succeed, but this step will still have a failure status.
467    /// Error information will be reported in the failure_detail field.
468    #[prost(bool, tag = "14")]
469    pub allow_failure: bool,
470    /// Output only. Return code from running the step.
471    #[prost(int32, tag = "16")]
472    pub exit_code: i32,
473    /// Allow this build step to fail without failing the entire build if and
474    /// only if the exit code is one of the specified codes. If allow_failure
475    /// is also specified, this field will take precedence.
476    #[prost(int32, repeated, tag = "18")]
477    pub allow_exit_codes: ::prost::alloc::vec::Vec<i32>,
478    /// A shell script to be executed in the step.
479    ///
480    /// When script is provided, the user cannot specify the entrypoint or args.
481    #[prost(string, tag = "19")]
482    pub script: ::prost::alloc::string::String,
483    /// Option to include built-in and custom substitutions as env variables
484    /// for this build step. This option will override the global option
485    /// in BuildOption.
486    #[prost(bool, optional, tag = "20")]
487    pub automap_substitutions: ::core::option::Option<bool>,
488}
489/// Volume describes a Docker container volume which is mounted into build steps
490/// in order to persist files across build step execution.
491#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
492pub struct Volume {
493    /// Name of the volume to mount.
494    ///
495    /// Volume names must be unique per build step and must be valid names for
496    /// Docker volumes. Each named volume must be used by at least two build steps.
497    #[prost(string, tag = "1")]
498    pub name: ::prost::alloc::string::String,
499    /// Path at which to mount the volume.
500    ///
501    /// Paths must be absolute and cannot conflict with other volume paths on the
502    /// same build step or with certain reserved volume paths.
503    #[prost(string, tag = "2")]
504    pub path: ::prost::alloc::string::String,
505}
506/// Artifacts created by the build pipeline.
507#[derive(Clone, PartialEq, ::prost::Message)]
508pub struct Results {
509    /// Container images that were built as a part of the build.
510    #[prost(message, repeated, tag = "2")]
511    pub images: ::prost::alloc::vec::Vec<BuiltImage>,
512    /// List of build step digests, in the order corresponding to build step
513    /// indices.
514    #[prost(string, repeated, tag = "3")]
515    pub build_step_images: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
516    /// Path to the artifact manifest for non-container artifacts uploaded to Cloud
517    /// Storage. Only populated when artifacts are uploaded to Cloud Storage.
518    #[prost(string, tag = "4")]
519    pub artifact_manifest: ::prost::alloc::string::String,
520    /// Number of non-container artifacts uploaded to Cloud Storage. Only populated
521    /// when artifacts are uploaded to Cloud Storage.
522    #[prost(int64, tag = "5")]
523    pub num_artifacts: i64,
524    /// List of build step outputs, produced by builder images, in the order
525    /// corresponding to build step indices.
526    ///
527    /// [Cloud Builders](<https://cloud.google.com/cloud-build/docs/cloud-builders>)
528    /// can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the
529    /// first 50KB of data is stored. Note that the `$BUILDER_OUTPUT` variable is
530    /// read-only and can't be substituted.
531    #[prost(bytes = "vec", repeated, tag = "6")]
532    pub build_step_outputs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
533    /// Time to push all non-container artifacts to Cloud Storage.
534    #[prost(message, optional, tag = "7")]
535    pub artifact_timing: ::core::option::Option<TimeSpan>,
536    /// Python artifacts uploaded to Artifact Registry at the end of the build.
537    #[prost(message, repeated, tag = "8")]
538    pub python_packages: ::prost::alloc::vec::Vec<UploadedPythonPackage>,
539    /// Maven artifacts uploaded to Artifact Registry at the end of the build.
540    #[prost(message, repeated, tag = "9")]
541    pub maven_artifacts: ::prost::alloc::vec::Vec<UploadedMavenArtifact>,
542    /// Optional. Go module artifacts uploaded to Artifact Registry at the end of
543    /// the build.
544    #[prost(message, repeated, tag = "10")]
545    pub go_modules: ::prost::alloc::vec::Vec<UploadedGoModule>,
546    /// Npm packages uploaded to Artifact Registry at the end of the build.
547    #[prost(message, repeated, tag = "12")]
548    pub npm_packages: ::prost::alloc::vec::Vec<UploadedNpmPackage>,
549}
550/// An artifact that was uploaded during a build. This
551/// is a single record in the artifact manifest JSON file.
552#[derive(Clone, PartialEq, ::prost::Message)]
553pub struct ArtifactResult {
554    /// The path of an artifact in a Cloud Storage bucket, with the
555    /// generation number. For example,
556    /// `gs://mybucket/path/to/output.jar#generation`.
557    #[prost(string, tag = "1")]
558    pub location: ::prost::alloc::string::String,
559    /// The file hash of the artifact.
560    #[prost(message, repeated, tag = "2")]
561    pub file_hash: ::prost::alloc::vec::Vec<FileHashes>,
562}
563/// A build resource in the Cloud Build API.
564///
565/// At a high level, a `Build` describes where to find source code, how to build
566/// it (for example, the builder image to run on the source), and where to store
567/// the built artifacts.
568///
569/// Fields can include the following variables, which will be expanded when the
570/// build is created:
571///
572/// * $PROJECT_ID: the project ID of the build.
573/// * $PROJECT_NUMBER: the project number of the build.
574/// * $LOCATION: the location/region of the build.
575/// * $BUILD_ID: the autogenerated ID of the build.
576/// * $REPO_NAME: the source repository name specified by RepoSource.
577/// * $BRANCH_NAME: the branch name specified by RepoSource.
578/// * $TAG_NAME: the tag name specified by RepoSource.
579/// * $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or
580///   resolved from the specified branch or tag.
581/// * $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
582#[derive(Clone, PartialEq, ::prost::Message)]
583pub struct Build {
584    /// Output only. The 'Build' name with format:
585    /// `projects/{project}/locations/{location}/builds/{build}`, where {build}
586    /// is a unique identifier generated by the service.
587    #[prost(string, tag = "45")]
588    pub name: ::prost::alloc::string::String,
589    /// Output only. Unique identifier of the build.
590    #[prost(string, tag = "1")]
591    pub id: ::prost::alloc::string::String,
592    /// Output only. ID of the project.
593    #[prost(string, tag = "16")]
594    pub project_id: ::prost::alloc::string::String,
595    /// Output only. Status of the build.
596    #[prost(enumeration = "build::Status", tag = "2")]
597    pub status: i32,
598    /// Output only. Customer-readable message about the current status.
599    #[prost(string, tag = "24")]
600    pub status_detail: ::prost::alloc::string::String,
601    /// Optional. The location of the source files to build.
602    #[prost(message, optional, tag = "3")]
603    pub source: ::core::option::Option<Source>,
604    /// Required. The operations to be performed on the workspace.
605    #[prost(message, repeated, tag = "11")]
606    pub steps: ::prost::alloc::vec::Vec<BuildStep>,
607    /// Output only. Results of the build.
608    #[prost(message, optional, tag = "10")]
609    pub results: ::core::option::Option<Results>,
610    /// Output only. Time at which the request to create the build was received.
611    #[prost(message, optional, tag = "6")]
612    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
613    /// Output only. Time at which execution of the build was started.
614    #[prost(message, optional, tag = "7")]
615    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
616    /// Output only. Time at which execution of the build was finished.
617    ///
618    /// The difference between finish_time and start_time is the duration of the
619    /// build's execution.
620    #[prost(message, optional, tag = "8")]
621    pub finish_time: ::core::option::Option<::prost_types::Timestamp>,
622    /// Amount of time that this build should be allowed to run, to second
623    /// granularity. If this amount of time elapses, work on the build will cease
624    /// and the build status will be `TIMEOUT`.
625    ///
626    /// `timeout` starts ticking from `startTime`.
627    ///
628    /// Default time is 60 minutes.
629    #[prost(message, optional, tag = "12")]
630    pub timeout: ::core::option::Option<::prost_types::Duration>,
631    /// A list of images to be pushed upon the successful completion of all build
632    /// steps.
633    ///
634    /// The images are pushed using the builder service account's credentials.
635    ///
636    /// The digests of the pushed images will be stored in the `Build` resource's
637    /// results field.
638    ///
639    /// If any of the images fail to be pushed, the build status is marked
640    /// `FAILURE`.
641    #[prost(string, repeated, tag = "13")]
642    pub images: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
643    /// TTL in queue for this build. If provided and the build is enqueued longer
644    /// than this value, the build will expire and the build status will be
645    /// `EXPIRED`.
646    ///
647    /// The TTL starts ticking from create_time.
648    #[prost(message, optional, tag = "40")]
649    pub queue_ttl: ::core::option::Option<::prost_types::Duration>,
650    /// Artifacts produced by the build that should be uploaded upon
651    /// successful completion of all build steps.
652    #[prost(message, optional, tag = "37")]
653    pub artifacts: ::core::option::Option<Artifacts>,
654    /// Cloud Storage bucket where logs should be written (see
655    /// [Bucket Name
656    /// Requirements](<https://cloud.google.com/storage/docs/bucket-naming#requirements>)).
657    /// Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
658    #[prost(string, tag = "19")]
659    pub logs_bucket: ::prost::alloc::string::String,
660    /// Output only. A permanent fixed identifier for source.
661    #[prost(message, optional, tag = "21")]
662    pub source_provenance: ::core::option::Option<SourceProvenance>,
663    /// Output only. The ID of the `BuildTrigger` that triggered this build, if it
664    /// was triggered automatically.
665    #[prost(string, tag = "22")]
666    pub build_trigger_id: ::prost::alloc::string::String,
667    /// Special options for this build.
668    #[prost(message, optional, tag = "23")]
669    pub options: ::core::option::Option<BuildOptions>,
670    /// Output only. URL to logs for this build in Google Cloud Console.
671    #[prost(string, tag = "25")]
672    pub log_url: ::prost::alloc::string::String,
673    /// Substitutions data for `Build` resource.
674    #[prost(map = "string, string", tag = "29")]
675    pub substitutions: ::std::collections::HashMap<
676        ::prost::alloc::string::String,
677        ::prost::alloc::string::String,
678    >,
679    /// Tags for annotation of a `Build`. These are not docker tags.
680    #[prost(string, repeated, tag = "31")]
681    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
682    /// Secrets to decrypt using Cloud Key Management Service.
683    /// Note: Secret Manager is the recommended technique
684    /// for managing sensitive data with Cloud Build. Use `available_secrets` to
685    /// configure builds to access secrets from Secret Manager. For instructions,
686    /// see: <https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets>
687    #[prost(message, repeated, tag = "32")]
688    pub secrets: ::prost::alloc::vec::Vec<Secret>,
689    /// Output only. Stores timing information for phases of the build. Valid keys
690    /// are:
691    ///
692    /// * BUILD: time to execute all build steps.
693    /// * PUSH: time to push all artifacts including docker images and non docker
694    ///   artifacts.
695    /// * FETCHSOURCE: time to fetch source.
696    /// * SETUPBUILD: time to set up build.
697    ///
698    /// If the build does not specify source or images,
699    /// these keys will not be included.
700    #[prost(map = "string, message", tag = "33")]
701    pub timing: ::std::collections::HashMap<::prost::alloc::string::String, TimeSpan>,
702    /// Output only. Describes this build's approval configuration, status,
703    /// and result.
704    #[prost(message, optional, tag = "44")]
705    pub approval: ::core::option::Option<BuildApproval>,
706    /// IAM service account whose credentials will be used at build runtime.
707    /// Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
708    /// ACCOUNT can be email address or uniqueId of the service account.
709    #[prost(string, tag = "42")]
710    pub service_account: ::prost::alloc::string::String,
711    /// Secrets and secret environment variables.
712    #[prost(message, optional, tag = "47")]
713    pub available_secrets: ::core::option::Option<Secrets>,
714    /// Output only. Non-fatal problems encountered during the execution of the
715    /// build.
716    #[prost(message, repeated, tag = "49")]
717    pub warnings: ::prost::alloc::vec::Vec<build::Warning>,
718    /// Optional. Configuration for git operations.
719    #[prost(message, optional, tag = "48")]
720    pub git_config: ::core::option::Option<GitConfig>,
721    /// Output only. Contains information about the build when status=FAILURE.
722    #[prost(message, optional, tag = "51")]
723    pub failure_info: ::core::option::Option<build::FailureInfo>,
724    /// Optional. Dependencies that the Cloud Build worker will fetch before
725    /// executing user steps.
726    #[prost(message, repeated, tag = "56")]
727    pub dependencies: ::prost::alloc::vec::Vec<Dependency>,
728}
729/// Nested message and enum types in `Build`.
730pub mod build {
731    /// A non-fatal problem encountered during the execution of the build.
732    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
733    pub struct Warning {
734        /// Explanation of the warning generated.
735        #[prost(string, tag = "1")]
736        pub text: ::prost::alloc::string::String,
737        /// The priority for this warning.
738        #[prost(enumeration = "warning::Priority", tag = "2")]
739        pub priority: i32,
740    }
741    /// Nested message and enum types in `Warning`.
742    pub mod warning {
743        /// The relative importance of this warning.
744        #[derive(
745            Clone,
746            Copy,
747            Debug,
748            PartialEq,
749            Eq,
750            Hash,
751            PartialOrd,
752            Ord,
753            ::prost::Enumeration
754        )]
755        #[repr(i32)]
756        pub enum Priority {
757            /// Should not be used.
758            Unspecified = 0,
759            /// e.g. deprecation warnings and alternative feature highlights.
760            Info = 1,
761            /// e.g. automated detection of possible issues with the build.
762            Warning = 2,
763            /// e.g. alerts that a feature used in the build is pending removal
764            Alert = 3,
765        }
766        impl Priority {
767            /// String value of the enum field names used in the ProtoBuf definition.
768            ///
769            /// The values are not transformed in any way and thus are considered stable
770            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
771            pub fn as_str_name(&self) -> &'static str {
772                match self {
773                    Self::Unspecified => "PRIORITY_UNSPECIFIED",
774                    Self::Info => "INFO",
775                    Self::Warning => "WARNING",
776                    Self::Alert => "ALERT",
777                }
778            }
779            /// Creates an enum from field names used in the ProtoBuf definition.
780            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
781                match value {
782                    "PRIORITY_UNSPECIFIED" => Some(Self::Unspecified),
783                    "INFO" => Some(Self::Info),
784                    "WARNING" => Some(Self::Warning),
785                    "ALERT" => Some(Self::Alert),
786                    _ => None,
787                }
788            }
789        }
790    }
791    /// A fatal problem encountered during the execution of the build.
792    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
793    pub struct FailureInfo {
794        /// The name of the failure.
795        #[prost(enumeration = "failure_info::FailureType", tag = "1")]
796        pub r#type: i32,
797        /// Explains the failure issue in more detail using hard-coded text.
798        #[prost(string, tag = "2")]
799        pub detail: ::prost::alloc::string::String,
800    }
801    /// Nested message and enum types in `FailureInfo`.
802    pub mod failure_info {
803        /// The name of a fatal problem encountered during the execution of the
804        /// build.
805        #[derive(
806            Clone,
807            Copy,
808            Debug,
809            PartialEq,
810            Eq,
811            Hash,
812            PartialOrd,
813            Ord,
814            ::prost::Enumeration
815        )]
816        #[repr(i32)]
817        pub enum FailureType {
818            /// Type unspecified
819            Unspecified = 0,
820            /// Unable to push the image to the repository.
821            PushFailed = 1,
822            /// Final image not found.
823            PushImageNotFound = 2,
824            /// Unauthorized push of the final image.
825            PushNotAuthorized = 3,
826            /// Backend logging failures. Should retry.
827            LoggingFailure = 4,
828            /// A build step has failed.
829            UserBuildStep = 5,
830            /// The source fetching has failed.
831            FetchSourceFailed = 6,
832        }
833        impl FailureType {
834            /// String value of the enum field names used in the ProtoBuf definition.
835            ///
836            /// The values are not transformed in any way and thus are considered stable
837            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
838            pub fn as_str_name(&self) -> &'static str {
839                match self {
840                    Self::Unspecified => "FAILURE_TYPE_UNSPECIFIED",
841                    Self::PushFailed => "PUSH_FAILED",
842                    Self::PushImageNotFound => "PUSH_IMAGE_NOT_FOUND",
843                    Self::PushNotAuthorized => "PUSH_NOT_AUTHORIZED",
844                    Self::LoggingFailure => "LOGGING_FAILURE",
845                    Self::UserBuildStep => "USER_BUILD_STEP",
846                    Self::FetchSourceFailed => "FETCH_SOURCE_FAILED",
847                }
848            }
849            /// Creates an enum from field names used in the ProtoBuf definition.
850            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
851                match value {
852                    "FAILURE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
853                    "PUSH_FAILED" => Some(Self::PushFailed),
854                    "PUSH_IMAGE_NOT_FOUND" => Some(Self::PushImageNotFound),
855                    "PUSH_NOT_AUTHORIZED" => Some(Self::PushNotAuthorized),
856                    "LOGGING_FAILURE" => Some(Self::LoggingFailure),
857                    "USER_BUILD_STEP" => Some(Self::UserBuildStep),
858                    "FETCH_SOURCE_FAILED" => Some(Self::FetchSourceFailed),
859                    _ => None,
860                }
861            }
862        }
863    }
864    /// Possible status of a build or build step.
865    #[derive(
866        Clone,
867        Copy,
868        Debug,
869        PartialEq,
870        Eq,
871        Hash,
872        PartialOrd,
873        Ord,
874        ::prost::Enumeration
875    )]
876    #[repr(i32)]
877    pub enum Status {
878        /// Status of the build is unknown.
879        Unknown = 0,
880        /// Build has been created and is pending execution and queuing. It has not
881        /// been queued.
882        Pending = 10,
883        /// Build or step is queued; work has not yet begun.
884        Queued = 1,
885        /// Build or step is being executed.
886        Working = 2,
887        /// Build or step finished successfully.
888        Success = 3,
889        /// Build or step failed to complete successfully.
890        Failure = 4,
891        /// Build or step failed due to an internal cause.
892        InternalError = 5,
893        /// Build or step took longer than was allowed.
894        Timeout = 6,
895        /// Build or step was canceled by a user.
896        Cancelled = 7,
897        /// Build was enqueued for longer than the value of `queue_ttl`.
898        Expired = 9,
899    }
900    impl Status {
901        /// String value of the enum field names used in the ProtoBuf definition.
902        ///
903        /// The values are not transformed in any way and thus are considered stable
904        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
905        pub fn as_str_name(&self) -> &'static str {
906            match self {
907                Self::Unknown => "STATUS_UNKNOWN",
908                Self::Pending => "PENDING",
909                Self::Queued => "QUEUED",
910                Self::Working => "WORKING",
911                Self::Success => "SUCCESS",
912                Self::Failure => "FAILURE",
913                Self::InternalError => "INTERNAL_ERROR",
914                Self::Timeout => "TIMEOUT",
915                Self::Cancelled => "CANCELLED",
916                Self::Expired => "EXPIRED",
917            }
918        }
919        /// Creates an enum from field names used in the ProtoBuf definition.
920        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
921            match value {
922                "STATUS_UNKNOWN" => Some(Self::Unknown),
923                "PENDING" => Some(Self::Pending),
924                "QUEUED" => Some(Self::Queued),
925                "WORKING" => Some(Self::Working),
926                "SUCCESS" => Some(Self::Success),
927                "FAILURE" => Some(Self::Failure),
928                "INTERNAL_ERROR" => Some(Self::InternalError),
929                "TIMEOUT" => Some(Self::Timeout),
930                "CANCELLED" => Some(Self::Cancelled),
931                "EXPIRED" => Some(Self::Expired),
932                _ => None,
933            }
934        }
935    }
936}
937/// A dependency that the Cloud Build worker will fetch before executing user
938/// steps.
939#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
940pub struct Dependency {
941    /// The type of dependency to fetch.
942    #[prost(oneof = "dependency::Dep", tags = "1, 2")]
943    pub dep: ::core::option::Option<dependency::Dep>,
944}
945/// Nested message and enum types in `Dependency`.
946pub mod dependency {
947    /// Represents a git repository as a build dependency.
948    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
949    pub struct GitSourceDependency {
950        /// Required. The kind of repo (url or dev connect).
951        #[prost(message, optional, tag = "1")]
952        pub repository: ::core::option::Option<GitSourceRepository>,
953        /// Required. The revision that we will fetch the repo at.
954        #[prost(string, tag = "2")]
955        pub revision: ::prost::alloc::string::String,
956        /// Optional. True if submodules should be fetched too (default false).
957        #[prost(bool, tag = "3")]
958        pub recurse_submodules: bool,
959        /// Optional. How much history should be fetched for the build (default 1, -1
960        /// for all history).
961        #[prost(int64, tag = "4")]
962        pub depth: i64,
963        /// Required. Where should the files be placed on the worker.
964        #[prost(string, tag = "5")]
965        pub dest_path: ::prost::alloc::string::String,
966    }
967    /// A repository for a git source.
968    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
969    pub struct GitSourceRepository {
970        /// The type of git source repo (url or dev connect).
971        #[prost(oneof = "git_source_repository::Repotype", tags = "1, 2")]
972        pub repotype: ::core::option::Option<git_source_repository::Repotype>,
973    }
974    /// Nested message and enum types in `GitSourceRepository`.
975    pub mod git_source_repository {
976        /// The type of git source repo (url or dev connect).
977        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
978        pub enum Repotype {
979            /// Location of the Git repository.
980            #[prost(string, tag = "1")]
981            Url(::prost::alloc::string::String),
982            /// The Developer Connect Git repository link formatted as
983            /// `projects/*/locations/*/connections/*/gitRepositoryLink/*`
984            #[prost(string, tag = "2")]
985            DeveloperConnect(::prost::alloc::string::String),
986        }
987    }
988    /// The type of dependency to fetch.
989    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
990    pub enum Dep {
991        /// If set to true disable all dependency fetching (ignoring the default
992        /// source as well).
993        #[prost(bool, tag = "1")]
994        Empty(bool),
995        /// Represents a git repository as a build dependency.
996        #[prost(message, tag = "2")]
997        GitSource(GitSourceDependency),
998    }
999}
1000/// GitConfig is a configuration for git operations.
1001#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1002pub struct GitConfig {
1003    /// Configuration for HTTP related git operations.
1004    #[prost(message, optional, tag = "1")]
1005    pub http: ::core::option::Option<git_config::HttpConfig>,
1006}
1007/// Nested message and enum types in `GitConfig`.
1008pub mod git_config {
1009    /// HttpConfig is a configuration for HTTP related git operations.
1010    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1011    pub struct HttpConfig {
1012        /// SecretVersion resource of the HTTP proxy URL. The Service Account used in
1013        /// the build (either the default Service Account or
1014        /// user-specified Service Account) should have
1015        /// `secretmanager.versions.access` permissions on this secret. The proxy URL
1016        /// should be in format `[protocol://][user\[:password\]@]proxyhost\[:port\]`.
1017        #[prost(string, tag = "1")]
1018        pub proxy_secret_version_name: ::prost::alloc::string::String,
1019    }
1020}
1021/// Artifacts produced by a build that should be uploaded upon
1022/// successful completion of all build steps.
1023#[derive(Clone, PartialEq, ::prost::Message)]
1024pub struct Artifacts {
1025    /// A list of images to be pushed upon the successful completion of all build
1026    /// steps.
1027    ///
1028    /// The images will be pushed using the builder service account's credentials.
1029    ///
1030    /// The digests of the pushed images will be stored in the Build resource's
1031    /// results field.
1032    ///
1033    /// If any of the images fail to be pushed, the build is marked FAILURE.
1034    #[prost(string, repeated, tag = "1")]
1035    pub images: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1036    /// A list of objects to be uploaded to Cloud Storage upon successful
1037    /// completion of all build steps.
1038    ///
1039    /// Files in the workspace matching specified paths globs will be uploaded to
1040    /// the specified Cloud Storage location using the builder service account's
1041    /// credentials.
1042    ///
1043    /// The location and generation of the uploaded objects will be stored in the
1044    /// Build resource's results field.
1045    ///
1046    /// If any objects fail to be pushed, the build is marked FAILURE.
1047    #[prost(message, optional, tag = "2")]
1048    pub objects: ::core::option::Option<artifacts::ArtifactObjects>,
1049    /// A list of Maven artifacts to be uploaded to Artifact Registry upon
1050    /// successful completion of all build steps.
1051    ///
1052    /// Artifacts in the workspace matching specified paths globs will be uploaded
1053    /// to the specified Artifact Registry repository using the builder service
1054    /// account's credentials.
1055    ///
1056    /// If any artifacts fail to be pushed, the build is marked FAILURE.
1057    #[prost(message, repeated, tag = "3")]
1058    pub maven_artifacts: ::prost::alloc::vec::Vec<artifacts::MavenArtifact>,
1059    /// Optional. A list of Go modules to be uploaded to Artifact Registry upon
1060    /// successful completion of all build steps.
1061    ///
1062    /// If any objects fail to be pushed, the build is marked FAILURE.
1063    #[prost(message, repeated, tag = "4")]
1064    pub go_modules: ::prost::alloc::vec::Vec<artifacts::GoModule>,
1065    /// A list of Python packages to be uploaded to Artifact Registry upon
1066    /// successful completion of all build steps.
1067    ///
1068    /// The build service account credentials will be used to perform the upload.
1069    ///
1070    /// If any objects fail to be pushed, the build is marked FAILURE.
1071    #[prost(message, repeated, tag = "5")]
1072    pub python_packages: ::prost::alloc::vec::Vec<artifacts::PythonPackage>,
1073    /// A list of npm packages to be uploaded to Artifact Registry upon
1074    /// successful completion of all build steps.
1075    ///
1076    /// Npm packages in the specified paths will be uploaded
1077    /// to the specified Artifact Registry repository using the builder service
1078    /// account's credentials.
1079    ///
1080    /// If any packages fail to be pushed, the build is marked FAILURE.
1081    #[prost(message, repeated, tag = "6")]
1082    pub npm_packages: ::prost::alloc::vec::Vec<artifacts::NpmPackage>,
1083}
1084/// Nested message and enum types in `Artifacts`.
1085pub mod artifacts {
1086    /// Files in the workspace to upload to Cloud Storage upon successful
1087    /// completion of all build steps.
1088    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1089    pub struct ArtifactObjects {
1090        /// Cloud Storage bucket and optional object path, in the form
1091        /// "gs://bucket/path/to/somewhere/". (see [Bucket Name
1092        /// Requirements](<https://cloud.google.com/storage/docs/bucket-naming#requirements>)).
1093        ///
1094        /// Files in the workspace matching any path pattern will be uploaded to
1095        /// Cloud Storage with this location as a prefix.
1096        #[prost(string, tag = "1")]
1097        pub location: ::prost::alloc::string::String,
1098        /// Path globs used to match files in the build's workspace.
1099        #[prost(string, repeated, tag = "2")]
1100        pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1101        /// Output only. Stores timing information for pushing all artifact objects.
1102        #[prost(message, optional, tag = "3")]
1103        pub timing: ::core::option::Option<super::TimeSpan>,
1104    }
1105    /// A Maven artifact to upload to Artifact Registry upon successful completion
1106    /// of all build steps.
1107    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1108    pub struct MavenArtifact {
1109        /// Artifact Registry repository, in the form
1110        /// "<https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY">
1111        ///
1112        /// Artifact in the workspace specified by path will be uploaded to
1113        /// Artifact Registry with this location as a prefix.
1114        #[prost(string, tag = "1")]
1115        pub repository: ::prost::alloc::string::String,
1116        /// Optional. Path to an artifact in the build's workspace to be uploaded to
1117        /// Artifact Registry.
1118        /// This can be either an absolute path,
1119        /// e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar
1120        /// or a relative path from /workspace,
1121        /// e.g. my-app/target/my-app-1.0.SNAPSHOT.jar.
1122        #[prost(string, tag = "2")]
1123        pub path: ::prost::alloc::string::String,
1124        /// Maven `artifactId` value used when uploading the artifact to Artifact
1125        /// Registry.
1126        #[prost(string, tag = "3")]
1127        pub artifact_id: ::prost::alloc::string::String,
1128        /// Maven `groupId` value used when uploading the artifact to Artifact
1129        /// Registry.
1130        #[prost(string, tag = "4")]
1131        pub group_id: ::prost::alloc::string::String,
1132        /// Maven `version` value used when uploading the artifact to Artifact
1133        /// Registry.
1134        #[prost(string, tag = "5")]
1135        pub version: ::prost::alloc::string::String,
1136    }
1137    /// Go module to upload to Artifact Registry upon successful completion of all
1138    /// build steps. A module refers to all dependencies in a go.mod file.
1139    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1140    pub struct GoModule {
1141        /// Optional. Artifact Registry repository name.
1142        ///
1143        /// Specified Go modules will be zipped and uploaded to Artifact Registry
1144        /// with this location as a prefix.
1145        /// e.g. my-go-repo
1146        #[prost(string, tag = "1")]
1147        pub repository_name: ::prost::alloc::string::String,
1148        /// Optional. Location of the Artifact Registry repository. i.e. us-east1
1149        /// Defaults to the build’s location.
1150        #[prost(string, tag = "2")]
1151        pub repository_location: ::prost::alloc::string::String,
1152        /// Optional. Project ID of the Artifact Registry repository.
1153        /// Defaults to the build project.
1154        #[prost(string, tag = "3")]
1155        pub repository_project_id: ::prost::alloc::string::String,
1156        /// Optional. Source path of the go.mod file in the build's workspace. If not
1157        /// specified, this will default to the current directory.
1158        /// e.g. ~/code/go/mypackage
1159        #[prost(string, tag = "4")]
1160        pub source_path: ::prost::alloc::string::String,
1161        /// Optional. The Go module's "module path".
1162        /// e.g. example.com/foo/v2
1163        #[prost(string, tag = "5")]
1164        pub module_path: ::prost::alloc::string::String,
1165        /// Optional. The Go module's semantic version in the form vX.Y.Z. e.g.
1166        /// v0.1.1 Pre-release identifiers can also be added by appending a dash and
1167        /// dot separated ASCII alphanumeric characters and hyphens.
1168        /// e.g. v0.2.3-alpha.x.12m.5
1169        #[prost(string, tag = "6")]
1170        pub module_version: ::prost::alloc::string::String,
1171    }
1172    /// Python package to upload to Artifact Registry upon successful completion
1173    /// of all build steps. A package can encapsulate multiple objects to be
1174    /// uploaded to a single repository.
1175    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1176    pub struct PythonPackage {
1177        /// Artifact Registry repository, in the form
1178        /// "<https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY">
1179        ///
1180        /// Files in the workspace matching any path pattern will be uploaded to
1181        /// Artifact Registry with this location as a prefix.
1182        #[prost(string, tag = "1")]
1183        pub repository: ::prost::alloc::string::String,
1184        /// Path globs used to match files in the build's workspace. For Python/
1185        /// Twine, this is usually `dist/*`, and sometimes additionally an `.asc`
1186        /// file.
1187        #[prost(string, repeated, tag = "2")]
1188        pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1189    }
1190    /// Npm package to upload to Artifact Registry upon successful completion
1191    /// of all build steps.
1192    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1193    pub struct NpmPackage {
1194        /// Artifact Registry repository, in the form
1195        /// "<https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY">
1196        ///
1197        /// Npm package in the workspace specified by path will be zipped and
1198        /// uploaded to Artifact Registry with this location as a prefix.
1199        #[prost(string, tag = "1")]
1200        pub repository: ::prost::alloc::string::String,
1201        /// Optional. Path to the package.json.
1202        /// e.g. workspace/path/to/package
1203        ///
1204        /// Only one of `archive` or `package_path` can be specified.
1205        #[prost(string, tag = "2")]
1206        pub package_path: ::prost::alloc::string::String,
1207    }
1208}
1209/// Start and end times for a build execution phase.
1210#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1211pub struct TimeSpan {
1212    /// Start of time span.
1213    #[prost(message, optional, tag = "1")]
1214    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
1215    /// End of time span.
1216    #[prost(message, optional, tag = "2")]
1217    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
1218}
1219/// Metadata for build operations.
1220#[derive(Clone, PartialEq, ::prost::Message)]
1221pub struct BuildOperationMetadata {
1222    /// The build that the operation is tracking.
1223    #[prost(message, optional, tag = "1")]
1224    pub build: ::core::option::Option<Build>,
1225}
1226/// Provenance of the source. Ways to find the original source, or verify that
1227/// some source was used for this build.
1228#[derive(Clone, PartialEq, ::prost::Message)]
1229pub struct SourceProvenance {
1230    /// A copy of the build's `source.storage_source`, if exists, with any
1231    /// generations resolved.
1232    #[prost(message, optional, tag = "3")]
1233    pub resolved_storage_source: ::core::option::Option<StorageSource>,
1234    /// A copy of the build's `source.repo_source`, if exists, with any
1235    /// revisions resolved.
1236    #[prost(message, optional, tag = "6")]
1237    pub resolved_repo_source: ::core::option::Option<RepoSource>,
1238    /// A copy of the build's `source.storage_source_manifest`, if exists, with any
1239    /// revisions resolved.
1240    /// This feature is in Preview.
1241    #[prost(message, optional, tag = "9")]
1242    pub resolved_storage_source_manifest: ::core::option::Option<StorageSourceManifest>,
1243    /// Output only. A copy of the build's `source.connected_repository`, if
1244    /// exists, with any revisions resolved.
1245    #[prost(message, optional, tag = "10")]
1246    pub resolved_connected_repository: ::core::option::Option<ConnectedRepository>,
1247    /// Output only. A copy of the build's `source.git_source`, if exists, with any
1248    /// revisions resolved.
1249    #[prost(message, optional, tag = "11")]
1250    pub resolved_git_source: ::core::option::Option<GitSource>,
1251    /// Output only. Hash(es) of the build source, which can be used to verify that
1252    /// the original source integrity was maintained in the build. Note that
1253    /// `FileHashes` will only be populated if `BuildOptions` has requested a
1254    /// `SourceProvenanceHash`.
1255    ///
1256    /// The keys to this map are file paths used as build source and the values
1257    /// contain the hash values for those files.
1258    ///
1259    /// If the build source came in a single package such as a gzipped tarfile
1260    /// (`.tar.gz`), the `FileHash` will be for the single path to that file.
1261    #[prost(map = "string, message", tag = "4")]
1262    pub file_hashes: ::std::collections::HashMap<
1263        ::prost::alloc::string::String,
1264        FileHashes,
1265    >,
1266}
1267/// Container message for hashes of byte content of files, used in
1268/// SourceProvenance messages to verify integrity of source input to the build.
1269#[derive(Clone, PartialEq, ::prost::Message)]
1270pub struct FileHashes {
1271    /// Collection of file hashes.
1272    #[prost(message, repeated, tag = "1")]
1273    pub file_hash: ::prost::alloc::vec::Vec<Hash>,
1274}
1275/// Container message for hash values.
1276#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1277pub struct Hash {
1278    /// The type of hash that was performed.
1279    #[prost(enumeration = "hash::HashType", tag = "1")]
1280    pub r#type: i32,
1281    /// The hash value.
1282    #[prost(bytes = "vec", tag = "2")]
1283    pub value: ::prost::alloc::vec::Vec<u8>,
1284}
1285/// Nested message and enum types in `Hash`.
1286pub mod hash {
1287    /// Specifies the hash algorithm, if any.
1288    #[derive(
1289        Clone,
1290        Copy,
1291        Debug,
1292        PartialEq,
1293        Eq,
1294        Hash,
1295        PartialOrd,
1296        Ord,
1297        ::prost::Enumeration
1298    )]
1299    #[repr(i32)]
1300    pub enum HashType {
1301        /// No hash requested.
1302        None = 0,
1303        /// Use a sha256 hash.
1304        Sha256 = 1,
1305        /// Use a md5 hash.
1306        Md5 = 2,
1307        /// Dirhash of a Go module's source code which is then hex-encoded.
1308        GoModuleH1 = 3,
1309        /// Use a sha512 hash.
1310        Sha512 = 4,
1311    }
1312    impl HashType {
1313        /// String value of the enum field names used in the ProtoBuf definition.
1314        ///
1315        /// The values are not transformed in any way and thus are considered stable
1316        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1317        pub fn as_str_name(&self) -> &'static str {
1318            match self {
1319                Self::None => "NONE",
1320                Self::Sha256 => "SHA256",
1321                Self::Md5 => "MD5",
1322                Self::GoModuleH1 => "GO_MODULE_H1",
1323                Self::Sha512 => "SHA512",
1324            }
1325        }
1326        /// Creates an enum from field names used in the ProtoBuf definition.
1327        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1328            match value {
1329                "NONE" => Some(Self::None),
1330                "SHA256" => Some(Self::Sha256),
1331                "MD5" => Some(Self::Md5),
1332                "GO_MODULE_H1" => Some(Self::GoModuleH1),
1333                "SHA512" => Some(Self::Sha512),
1334                _ => None,
1335            }
1336        }
1337    }
1338}
1339/// Secrets and secret environment variables.
1340#[derive(Clone, PartialEq, ::prost::Message)]
1341pub struct Secrets {
1342    /// Secrets in Secret Manager and associated secret environment variable.
1343    #[prost(message, repeated, tag = "1")]
1344    pub secret_manager: ::prost::alloc::vec::Vec<SecretManagerSecret>,
1345    /// Secrets encrypted with KMS key and the associated secret environment
1346    /// variable.
1347    #[prost(message, repeated, tag = "2")]
1348    pub inline: ::prost::alloc::vec::Vec<InlineSecret>,
1349}
1350/// Pairs a set of secret environment variables mapped to encrypted
1351/// values with the Cloud KMS key to use to decrypt the value.
1352#[derive(Clone, PartialEq, ::prost::Message)]
1353pub struct InlineSecret {
1354    /// Resource name of Cloud KMS crypto key to decrypt the encrypted value.
1355    /// In format: projects/*/locations/*/keyRings/*/cryptoKeys/*
1356    #[prost(string, tag = "1")]
1357    pub kms_key_name: ::prost::alloc::string::String,
1358    /// Map of environment variable name to its encrypted value.
1359    ///
1360    /// Secret environment variables must be unique across all of a build's
1361    /// secrets, and must be used by at least one build step. Values can be at most
1362    /// 64 KB in size. There can be at most 100 secret values across all of a
1363    /// build's secrets.
1364    #[prost(map = "string, bytes", tag = "2")]
1365    pub env_map: ::std::collections::HashMap<
1366        ::prost::alloc::string::String,
1367        ::prost::alloc::vec::Vec<u8>,
1368    >,
1369}
1370/// Pairs a secret environment variable with a SecretVersion in Secret Manager.
1371#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1372pub struct SecretManagerSecret {
1373    /// Resource name of the SecretVersion. In format:
1374    /// projects/*/secrets/*/versions/\*
1375    #[prost(string, tag = "1")]
1376    pub version_name: ::prost::alloc::string::String,
1377    /// Environment variable name to associate with the secret.
1378    /// Secret environment variables must be unique across all of a build's
1379    /// secrets, and must be used by at least one build step.
1380    #[prost(string, tag = "2")]
1381    pub env: ::prost::alloc::string::String,
1382}
1383/// Pairs a set of secret environment variables containing encrypted
1384/// values with the Cloud KMS key to use to decrypt the value.
1385/// Note: Use `kmsKeyName` with  `available_secrets` instead of using
1386/// `kmsKeyName` with `secret`. For instructions see:
1387/// <https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.>
1388#[derive(Clone, PartialEq, ::prost::Message)]
1389pub struct Secret {
1390    /// Cloud KMS key name to use to decrypt these envs.
1391    #[prost(string, tag = "1")]
1392    pub kms_key_name: ::prost::alloc::string::String,
1393    /// Map of environment variable name to its encrypted value.
1394    ///
1395    /// Secret environment variables must be unique across all of a build's
1396    /// secrets, and must be used by at least one build step. Values can be at most
1397    /// 64 KB in size. There can be at most 100 secret values across all of a
1398    /// build's secrets.
1399    #[prost(map = "string, bytes", tag = "3")]
1400    pub secret_env: ::std::collections::HashMap<
1401        ::prost::alloc::string::String,
1402        ::prost::alloc::vec::Vec<u8>,
1403    >,
1404}
1405/// Request to create a new build.
1406#[derive(Clone, PartialEq, ::prost::Message)]
1407pub struct CreateBuildRequest {
1408    /// The parent resource where this build will be created.
1409    /// Format: `projects/{project}/locations/{location}`
1410    #[prost(string, tag = "4")]
1411    pub parent: ::prost::alloc::string::String,
1412    /// Required. ID of the project.
1413    #[prost(string, tag = "1")]
1414    pub project_id: ::prost::alloc::string::String,
1415    /// Required. Build resource to create.
1416    #[prost(message, optional, tag = "2")]
1417    pub build: ::core::option::Option<Build>,
1418}
1419/// Request to get a build.
1420#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1421pub struct GetBuildRequest {
1422    /// The name of the `Build` to retrieve.
1423    /// Format: `projects/{project}/locations/{location}/builds/{build}`
1424    #[prost(string, tag = "4")]
1425    pub name: ::prost::alloc::string::String,
1426    /// Required. ID of the project.
1427    #[prost(string, tag = "1")]
1428    pub project_id: ::prost::alloc::string::String,
1429    /// Required. ID of the build.
1430    #[prost(string, tag = "2")]
1431    pub id: ::prost::alloc::string::String,
1432}
1433/// Request to list builds.
1434#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1435pub struct ListBuildsRequest {
1436    /// The parent of the collection of `Builds`.
1437    /// Format: `projects/{project}/locations/{location}`
1438    #[prost(string, tag = "9")]
1439    pub parent: ::prost::alloc::string::String,
1440    /// Required. ID of the project.
1441    #[prost(string, tag = "1")]
1442    pub project_id: ::prost::alloc::string::String,
1443    /// Number of results to return in the list.
1444    #[prost(int32, tag = "2")]
1445    pub page_size: i32,
1446    /// The page token for the next page of Builds.
1447    ///
1448    /// If unspecified, the first page of results is returned.
1449    ///
1450    /// If the token is rejected for any reason, INVALID_ARGUMENT will be thrown.
1451    /// In this case, the token should be discarded, and pagination should be
1452    /// restarted from the first page of results.
1453    ///
1454    /// See <https://google.aip.dev/158> for more.
1455    #[prost(string, tag = "3")]
1456    pub page_token: ::prost::alloc::string::String,
1457    /// The raw filter text to constrain the results.
1458    #[prost(string, tag = "8")]
1459    pub filter: ::prost::alloc::string::String,
1460}
1461/// Response including listed builds.
1462#[derive(Clone, PartialEq, ::prost::Message)]
1463pub struct ListBuildsResponse {
1464    /// Builds will be sorted by `create_time`, descending.
1465    #[prost(message, repeated, tag = "1")]
1466    pub builds: ::prost::alloc::vec::Vec<Build>,
1467    /// Token to receive the next page of results.
1468    /// This will be absent if the end of the response list has been reached.
1469    #[prost(string, tag = "2")]
1470    pub next_page_token: ::prost::alloc::string::String,
1471}
1472/// Request to cancel an ongoing build.
1473#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1474pub struct CancelBuildRequest {
1475    /// The name of the `Build` to cancel.
1476    /// Format: `projects/{project}/locations/{location}/builds/{build}`
1477    #[prost(string, tag = "4")]
1478    pub name: ::prost::alloc::string::String,
1479    /// Required. ID of the project.
1480    #[prost(string, tag = "1")]
1481    pub project_id: ::prost::alloc::string::String,
1482    /// Required. ID of the build.
1483    #[prost(string, tag = "2")]
1484    pub id: ::prost::alloc::string::String,
1485}
1486/// Request to approve or reject a pending build.
1487#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1488pub struct ApproveBuildRequest {
1489    /// Required. Name of the target build.
1490    /// For example: "projects/{$project_id}/builds/{$build_id}"
1491    #[prost(string, tag = "1")]
1492    pub name: ::prost::alloc::string::String,
1493    /// Approval decision and metadata.
1494    #[prost(message, optional, tag = "2")]
1495    pub approval_result: ::core::option::Option<ApprovalResult>,
1496}
1497/// BuildApproval describes a build's approval configuration, state, and
1498/// result.
1499#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1500pub struct BuildApproval {
1501    /// Output only. The state of this build's approval.
1502    #[prost(enumeration = "build_approval::State", tag = "1")]
1503    pub state: i32,
1504    /// Output only. Configuration for manual approval of this build.
1505    #[prost(message, optional, tag = "2")]
1506    pub config: ::core::option::Option<ApprovalConfig>,
1507    /// Output only. Result of manual approval for this Build.
1508    #[prost(message, optional, tag = "3")]
1509    pub result: ::core::option::Option<ApprovalResult>,
1510}
1511/// Nested message and enum types in `BuildApproval`.
1512pub mod build_approval {
1513    /// Specifies the current state of a build's approval.
1514    #[derive(
1515        Clone,
1516        Copy,
1517        Debug,
1518        PartialEq,
1519        Eq,
1520        Hash,
1521        PartialOrd,
1522        Ord,
1523        ::prost::Enumeration
1524    )]
1525    #[repr(i32)]
1526    pub enum State {
1527        /// Default enum type. This should not be used.
1528        Unspecified = 0,
1529        /// Build approval is pending.
1530        Pending = 1,
1531        /// Build approval has been approved.
1532        Approved = 2,
1533        /// Build approval has been rejected.
1534        Rejected = 3,
1535        /// Build was cancelled while it was still pending approval.
1536        Cancelled = 5,
1537    }
1538    impl State {
1539        /// String value of the enum field names used in the ProtoBuf definition.
1540        ///
1541        /// The values are not transformed in any way and thus are considered stable
1542        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1543        pub fn as_str_name(&self) -> &'static str {
1544            match self {
1545                Self::Unspecified => "STATE_UNSPECIFIED",
1546                Self::Pending => "PENDING",
1547                Self::Approved => "APPROVED",
1548                Self::Rejected => "REJECTED",
1549                Self::Cancelled => "CANCELLED",
1550            }
1551        }
1552        /// Creates an enum from field names used in the ProtoBuf definition.
1553        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1554            match value {
1555                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
1556                "PENDING" => Some(Self::Pending),
1557                "APPROVED" => Some(Self::Approved),
1558                "REJECTED" => Some(Self::Rejected),
1559                "CANCELLED" => Some(Self::Cancelled),
1560                _ => None,
1561            }
1562        }
1563    }
1564}
1565/// ApprovalConfig describes configuration for manual approval of a build.
1566#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1567pub struct ApprovalConfig {
1568    /// Whether or not approval is needed. If this is set on a build, it will
1569    /// become pending when created, and will need to be explicitly approved
1570    /// to start.
1571    #[prost(bool, tag = "1")]
1572    pub approval_required: bool,
1573}
1574/// ApprovalResult describes the decision and associated metadata of a manual
1575/// approval of a build.
1576#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1577pub struct ApprovalResult {
1578    /// Output only. Email of the user that called the ApproveBuild API to
1579    /// approve or reject a build at the time that the API was called.
1580    #[prost(string, tag = "2")]
1581    pub approver_account: ::prost::alloc::string::String,
1582    /// Output only. The time when the approval decision was made.
1583    #[prost(message, optional, tag = "3")]
1584    pub approval_time: ::core::option::Option<::prost_types::Timestamp>,
1585    /// Required. The decision of this manual approval.
1586    #[prost(enumeration = "approval_result::Decision", tag = "4")]
1587    pub decision: i32,
1588    /// Optional. An optional comment for this manual approval result.
1589    #[prost(string, tag = "5")]
1590    pub comment: ::prost::alloc::string::String,
1591    /// Optional. An optional URL tied to this manual approval result. This field
1592    /// is essentially the same as comment, except that it will be rendered by the
1593    /// UI differently. An example use case is a link to an external job that
1594    /// approved this Build.
1595    #[prost(string, tag = "6")]
1596    pub url: ::prost::alloc::string::String,
1597}
1598/// Nested message and enum types in `ApprovalResult`.
1599pub mod approval_result {
1600    /// Specifies whether or not this manual approval result is to approve
1601    /// or reject a build.
1602    #[derive(
1603        Clone,
1604        Copy,
1605        Debug,
1606        PartialEq,
1607        Eq,
1608        Hash,
1609        PartialOrd,
1610        Ord,
1611        ::prost::Enumeration
1612    )]
1613    #[repr(i32)]
1614    pub enum Decision {
1615        /// Default enum type. This should not be used.
1616        Unspecified = 0,
1617        /// Build is approved.
1618        Approved = 1,
1619        /// Build is rejected.
1620        Rejected = 2,
1621    }
1622    impl Decision {
1623        /// String value of the enum field names used in the ProtoBuf definition.
1624        ///
1625        /// The values are not transformed in any way and thus are considered stable
1626        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1627        pub fn as_str_name(&self) -> &'static str {
1628            match self {
1629                Self::Unspecified => "DECISION_UNSPECIFIED",
1630                Self::Approved => "APPROVED",
1631                Self::Rejected => "REJECTED",
1632            }
1633        }
1634        /// Creates an enum from field names used in the ProtoBuf definition.
1635        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1636            match value {
1637                "DECISION_UNSPECIFIED" => Some(Self::Unspecified),
1638                "APPROVED" => Some(Self::Approved),
1639                "REJECTED" => Some(Self::Rejected),
1640                _ => None,
1641            }
1642        }
1643    }
1644}
1645/// GitRepoSource describes a repo and ref of a code repository.
1646#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1647pub struct GitRepoSource {
1648    /// The URI of the repo (e.g. <https://github.com/user/repo.git>).
1649    /// Either `uri` or `repository` can be specified and is required.
1650    #[prost(string, tag = "1")]
1651    pub uri: ::prost::alloc::string::String,
1652    /// The branch or tag to use. Must start with "refs/" (required).
1653    #[prost(string, tag = "2")]
1654    pub r#ref: ::prost::alloc::string::String,
1655    /// See RepoType below.
1656    #[prost(enumeration = "git_file_source::RepoType", tag = "3")]
1657    pub repo_type: i32,
1658    /// The source of the SCM repo.
1659    #[prost(oneof = "git_repo_source::Source", tags = "6")]
1660    pub source: ::core::option::Option<git_repo_source::Source>,
1661    /// The resource name of the enterprise config that should be applied
1662    /// to this source.
1663    #[prost(oneof = "git_repo_source::EnterpriseConfig", tags = "4")]
1664    pub enterprise_config: ::core::option::Option<git_repo_source::EnterpriseConfig>,
1665}
1666/// Nested message and enum types in `GitRepoSource`.
1667pub mod git_repo_source {
1668    /// The source of the SCM repo.
1669    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1670    pub enum Source {
1671        /// The connected repository resource name, in the format
1672        /// `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or
1673        /// `repository` can be specified and is required.
1674        #[prost(string, tag = "6")]
1675        Repository(::prost::alloc::string::String),
1676    }
1677    /// The resource name of the enterprise config that should be applied
1678    /// to this source.
1679    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1680    pub enum EnterpriseConfig {
1681        /// The full resource name of the github enterprise config.
1682        /// Format:
1683        /// `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
1684        /// `projects/{project}/githubEnterpriseConfigs/{id}`.
1685        #[prost(string, tag = "4")]
1686        GithubEnterpriseConfig(::prost::alloc::string::String),
1687    }
1688}
1689/// GitFileSource describes a file within a (possibly remote) code repository.
1690#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1691pub struct GitFileSource {
1692    /// The path of the file, with the repo root as the root of the path.
1693    #[prost(string, tag = "1")]
1694    pub path: ::prost::alloc::string::String,
1695    /// The URI of the repo.
1696    /// Either uri or repository can be specified.
1697    /// If unspecified, the repo from which the trigger invocation originated is
1698    /// assumed to be the repo from which to read the specified path.
1699    #[prost(string, tag = "2")]
1700    pub uri: ::prost::alloc::string::String,
1701    /// See RepoType above.
1702    #[prost(enumeration = "git_file_source::RepoType", tag = "3")]
1703    pub repo_type: i32,
1704    /// The branch, tag, arbitrary ref, or SHA version of the repo to use when
1705    /// resolving the filename (optional).
1706    /// This field respects the same syntax/resolution as described here:
1707    /// <https://git-scm.com/docs/gitrevisions>
1708    /// If unspecified, the revision from which the trigger invocation originated
1709    /// is assumed to be the revision from which to read the specified path.
1710    #[prost(string, tag = "4")]
1711    pub revision: ::prost::alloc::string::String,
1712    /// The source of the SCM repo.
1713    #[prost(oneof = "git_file_source::Source", tags = "7")]
1714    pub source: ::core::option::Option<git_file_source::Source>,
1715    /// The resource name of the enterprise config that should be applied
1716    /// to this source.
1717    #[prost(oneof = "git_file_source::EnterpriseConfig", tags = "5")]
1718    pub enterprise_config: ::core::option::Option<git_file_source::EnterpriseConfig>,
1719}
1720/// Nested message and enum types in `GitFileSource`.
1721pub mod git_file_source {
1722    /// The type of the repo, since it may not be explicit from the `repo` field
1723    /// (e.g from a URL).
1724    #[derive(
1725        Clone,
1726        Copy,
1727        Debug,
1728        PartialEq,
1729        Eq,
1730        Hash,
1731        PartialOrd,
1732        Ord,
1733        ::prost::Enumeration
1734    )]
1735    #[repr(i32)]
1736    pub enum RepoType {
1737        /// The default, unknown repo type. Don't use it, instead use one of
1738        /// the other repo types.
1739        Unknown = 0,
1740        /// A Google Cloud Source Repositories-hosted repo.
1741        CloudSourceRepositories = 1,
1742        /// A GitHub-hosted repo not necessarily on "github.com" (i.e. GitHub
1743        /// Enterprise).
1744        Github = 2,
1745        /// A Bitbucket Server-hosted repo.
1746        BitbucketServer = 3,
1747        /// A GitLab-hosted repo.
1748        Gitlab = 4,
1749    }
1750    impl RepoType {
1751        /// String value of the enum field names used in the ProtoBuf definition.
1752        ///
1753        /// The values are not transformed in any way and thus are considered stable
1754        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1755        pub fn as_str_name(&self) -> &'static str {
1756            match self {
1757                Self::Unknown => "UNKNOWN",
1758                Self::CloudSourceRepositories => "CLOUD_SOURCE_REPOSITORIES",
1759                Self::Github => "GITHUB",
1760                Self::BitbucketServer => "BITBUCKET_SERVER",
1761                Self::Gitlab => "GITLAB",
1762            }
1763        }
1764        /// Creates an enum from field names used in the ProtoBuf definition.
1765        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1766            match value {
1767                "UNKNOWN" => Some(Self::Unknown),
1768                "CLOUD_SOURCE_REPOSITORIES" => Some(Self::CloudSourceRepositories),
1769                "GITHUB" => Some(Self::Github),
1770                "BITBUCKET_SERVER" => Some(Self::BitbucketServer),
1771                "GITLAB" => Some(Self::Gitlab),
1772                _ => None,
1773            }
1774        }
1775    }
1776    /// The source of the SCM repo.
1777    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1778    pub enum Source {
1779        /// The fully qualified resource name of the Repos API repository.
1780        /// Either URI or repository can be specified.
1781        /// If unspecified, the repo from which the trigger invocation originated is
1782        /// assumed to be the repo from which to read the specified path.
1783        #[prost(string, tag = "7")]
1784        Repository(::prost::alloc::string::String),
1785    }
1786    /// The resource name of the enterprise config that should be applied
1787    /// to this source.
1788    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1789    pub enum EnterpriseConfig {
1790        /// The full resource name of the github enterprise config.
1791        /// Format:
1792        /// `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`.
1793        /// `projects/{project}/githubEnterpriseConfigs/{id}`.
1794        #[prost(string, tag = "5")]
1795        GithubEnterpriseConfig(::prost::alloc::string::String),
1796    }
1797}
1798/// Configuration for an automated build in response to source repository
1799/// changes.
1800#[derive(Clone, PartialEq, ::prost::Message)]
1801pub struct BuildTrigger {
1802    /// The `Trigger` name with format:
1803    /// `projects/{project}/locations/{location}/triggers/{trigger}`, where
1804    /// {trigger} is a unique identifier generated by the service.
1805    #[prost(string, tag = "34")]
1806    pub resource_name: ::prost::alloc::string::String,
1807    /// Output only. Unique identifier of the trigger.
1808    #[prost(string, tag = "1")]
1809    pub id: ::prost::alloc::string::String,
1810    /// Human-readable description of this trigger.
1811    #[prost(string, tag = "10")]
1812    pub description: ::prost::alloc::string::String,
1813    /// User-assigned name of the trigger. Must be unique within the project.
1814    /// Trigger names must meet the following requirements:
1815    ///
1816    /// * They must contain only alphanumeric characters and dashes.
1817    /// * They can be 1-64 characters long.
1818    /// * They must begin and end with an alphanumeric character.
1819    #[prost(string, tag = "21")]
1820    pub name: ::prost::alloc::string::String,
1821    /// Tags for annotation of a `BuildTrigger`
1822    #[prost(string, repeated, tag = "19")]
1823    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1824    /// Template describing the types of source changes to trigger a build.
1825    ///
1826    /// Branch and tag names in trigger templates are interpreted as regular
1827    /// expressions. Any branch or tag change that matches that regular expression
1828    /// will trigger a build.
1829    ///
1830    /// Mutually exclusive with `github`.
1831    #[prost(message, optional, tag = "7")]
1832    pub trigger_template: ::core::option::Option<RepoSource>,
1833    /// GitHubEventsConfig describes the configuration of a trigger that creates
1834    /// a build whenever a GitHub event is received.
1835    ///
1836    /// Mutually exclusive with `trigger_template`.
1837    #[prost(message, optional, tag = "13")]
1838    pub github: ::core::option::Option<GitHubEventsConfig>,
1839    /// PubsubConfig describes the configuration of a trigger that
1840    /// creates a build whenever a Pub/Sub message is published.
1841    #[prost(message, optional, tag = "29")]
1842    pub pubsub_config: ::core::option::Option<PubsubConfig>,
1843    /// WebhookConfig describes the configuration of a trigger that
1844    /// creates a build whenever a webhook is sent to a trigger's webhook URL.
1845    #[prost(message, optional, tag = "31")]
1846    pub webhook_config: ::core::option::Option<WebhookConfig>,
1847    /// Output only. Time when the trigger was created.
1848    #[prost(message, optional, tag = "5")]
1849    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
1850    /// If true, the trigger will never automatically execute a build.
1851    #[prost(bool, tag = "9")]
1852    pub disabled: bool,
1853    /// Substitutions for Build resource. The keys must match the following
1854    /// regular expression: `^_\[A-Z0-9_\]+$`.
1855    #[prost(map = "string, string", tag = "11")]
1856    pub substitutions: ::std::collections::HashMap<
1857        ::prost::alloc::string::String,
1858        ::prost::alloc::string::String,
1859    >,
1860    /// ignored_files and included_files are file glob matches using
1861    /// <https://golang.org/pkg/path/filepath/#Match> extended with support for "\*\*".
1862    ///
1863    /// If ignored_files and changed files are both empty, then they are
1864    /// not used to determine whether or not to trigger a build.
1865    ///
1866    /// If ignored_files is not empty, then we ignore any files that match
1867    /// any of the ignored_file globs. If the change has no files that are
1868    /// outside of the ignored_files globs, then we do not trigger a build.
1869    #[prost(string, repeated, tag = "15")]
1870    pub ignored_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1871    /// If any of the files altered in the commit pass the ignored_files
1872    /// filter and included_files is empty, then as far as this filter is
1873    /// concerned, we should trigger the build.
1874    ///
1875    /// If any of the files altered in the commit pass the ignored_files
1876    /// filter and included_files is not empty, then we make sure that at
1877    /// least one of those files matches a included_files glob. If not,
1878    /// then we do not trigger a build.
1879    #[prost(string, repeated, tag = "16")]
1880    pub included_files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1881    /// Optional. A Common Expression Language string.
1882    #[prost(string, tag = "30")]
1883    pub filter: ::prost::alloc::string::String,
1884    /// The repo and ref of the repository from which to build. This field
1885    /// is used only for those triggers that do not respond to SCM events.
1886    /// Triggers that respond to such events build source at whatever commit
1887    /// caused the event.
1888    /// This field is currently only used by Webhook, Pub/Sub, Manual, and Cron
1889    /// triggers.
1890    #[prost(message, optional, tag = "26")]
1891    pub source_to_build: ::core::option::Option<GitRepoSource>,
1892    /// The service account used for all user-controlled operations including
1893    /// UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild.
1894    /// If no service account is set and the legacy Cloud Build service account
1895    /// (`\[PROJECT_NUM\]@cloudbuild.gserviceaccount.com`) is the default for the
1896    /// project then it will be used instead.
1897    /// Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}`
1898    #[prost(string, tag = "33")]
1899    pub service_account: ::prost::alloc::string::String,
1900    /// The configuration of a trigger that creates a build whenever an event from
1901    /// Repo API is received.
1902    #[prost(message, optional, tag = "39")]
1903    pub repository_event_config: ::core::option::Option<RepositoryEventConfig>,
1904    /// Template describing the Build request to make when the trigger is matched.
1905    /// At least one of the template fields must be provided.
1906    #[prost(oneof = "build_trigger::BuildTemplate", tags = "18, 4, 8, 24")]
1907    pub build_template: ::core::option::Option<build_trigger::BuildTemplate>,
1908}
1909/// Nested message and enum types in `BuildTrigger`.
1910pub mod build_trigger {
1911    /// Template describing the Build request to make when the trigger is matched.
1912    /// At least one of the template fields must be provided.
1913    #[derive(Clone, PartialEq, ::prost::Oneof)]
1914    pub enum BuildTemplate {
1915        /// Autodetect build configuration.  The following precedence is used (case
1916        /// insensitive):
1917        ///
1918        /// 1. cloudbuild.yaml
1919        /// 1. cloudbuild.yml
1920        /// 1. cloudbuild.json
1921        /// 1. Dockerfile
1922        ///
1923        /// Currently only available for GitHub App Triggers.
1924        #[prost(bool, tag = "18")]
1925        Autodetect(bool),
1926        /// Contents of the build template.
1927        #[prost(message, tag = "4")]
1928        Build(super::Build),
1929        /// Path, from the source root, to the build configuration file
1930        /// (i.e. cloudbuild.yaml).
1931        #[prost(string, tag = "8")]
1932        Filename(::prost::alloc::string::String),
1933        /// The file source describing the local or remote Build template.
1934        #[prost(message, tag = "24")]
1935        GitFileSource(super::GitFileSource),
1936    }
1937}
1938/// The configuration of a trigger that creates a build whenever an event from
1939/// Repo API is received.
1940#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1941pub struct RepositoryEventConfig {
1942    /// The resource name of the Repo API resource.
1943    #[prost(string, tag = "1")]
1944    pub repository: ::prost::alloc::string::String,
1945    /// Output only. The type of the SCM vendor the repository points to.
1946    #[prost(enumeration = "repository_event_config::RepositoryType", tag = "2")]
1947    pub repository_type: i32,
1948    /// The types of filter to trigger a build.
1949    #[prost(oneof = "repository_event_config::Filter", tags = "3, 4")]
1950    pub filter: ::core::option::Option<repository_event_config::Filter>,
1951}
1952/// Nested message and enum types in `RepositoryEventConfig`.
1953pub mod repository_event_config {
1954    /// All possible SCM repo types from Repo API.
1955    #[derive(
1956        Clone,
1957        Copy,
1958        Debug,
1959        PartialEq,
1960        Eq,
1961        Hash,
1962        PartialOrd,
1963        Ord,
1964        ::prost::Enumeration
1965    )]
1966    #[repr(i32)]
1967    pub enum RepositoryType {
1968        /// If unspecified, RepositoryType defaults to GITHUB.
1969        Unspecified = 0,
1970        /// The SCM repo is GITHUB.
1971        Github = 1,
1972        /// The SCM repo is GITHUB Enterprise.
1973        GithubEnterprise = 2,
1974        /// The SCM repo is GITLAB Enterprise.
1975        GitlabEnterprise = 3,
1976    }
1977    impl RepositoryType {
1978        /// String value of the enum field names used in the ProtoBuf definition.
1979        ///
1980        /// The values are not transformed in any way and thus are considered stable
1981        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1982        pub fn as_str_name(&self) -> &'static str {
1983            match self {
1984                Self::Unspecified => "REPOSITORY_TYPE_UNSPECIFIED",
1985                Self::Github => "GITHUB",
1986                Self::GithubEnterprise => "GITHUB_ENTERPRISE",
1987                Self::GitlabEnterprise => "GITLAB_ENTERPRISE",
1988            }
1989        }
1990        /// Creates an enum from field names used in the ProtoBuf definition.
1991        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1992            match value {
1993                "REPOSITORY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1994                "GITHUB" => Some(Self::Github),
1995                "GITHUB_ENTERPRISE" => Some(Self::GithubEnterprise),
1996                "GITLAB_ENTERPRISE" => Some(Self::GitlabEnterprise),
1997                _ => None,
1998            }
1999        }
2000    }
2001    /// The types of filter to trigger a build.
2002    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
2003    pub enum Filter {
2004        /// Filter to match changes in pull requests.
2005        #[prost(message, tag = "3")]
2006        PullRequest(super::PullRequestFilter),
2007        /// Filter to match changes in refs like branches, tags.
2008        #[prost(message, tag = "4")]
2009        Push(super::PushFilter),
2010    }
2011}
2012/// GitHubEventsConfig describes the configuration of a trigger that creates a
2013/// build whenever a GitHub event is received.
2014#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2015pub struct GitHubEventsConfig {
2016    /// The installationID that emits the GitHub event.
2017    #[deprecated]
2018    #[prost(int64, tag = "1")]
2019    pub installation_id: i64,
2020    /// Owner of the repository. For example: The owner for
2021    /// <https://github.com/googlecloudplatform/cloud-builders> is
2022    /// "googlecloudplatform".
2023    #[prost(string, tag = "6")]
2024    pub owner: ::prost::alloc::string::String,
2025    /// Name of the repository. For example: The name for
2026    /// <https://github.com/googlecloudplatform/cloud-builders> is "cloud-builders".
2027    #[prost(string, tag = "7")]
2028    pub name: ::prost::alloc::string::String,
2029    /// Filter describing the types of events to trigger a build.
2030    /// Currently supported event types: push, pull_request.
2031    #[prost(oneof = "git_hub_events_config::Event", tags = "4, 5")]
2032    pub event: ::core::option::Option<git_hub_events_config::Event>,
2033}
2034/// Nested message and enum types in `GitHubEventsConfig`.
2035pub mod git_hub_events_config {
2036    /// Filter describing the types of events to trigger a build.
2037    /// Currently supported event types: push, pull_request.
2038    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
2039    pub enum Event {
2040        /// filter to match changes in pull requests.
2041        #[prost(message, tag = "4")]
2042        PullRequest(super::PullRequestFilter),
2043        /// filter to match changes in refs like branches, tags.
2044        #[prost(message, tag = "5")]
2045        Push(super::PushFilter),
2046    }
2047}
2048/// PubsubConfig describes the configuration of a trigger that
2049/// creates a build whenever a Pub/Sub message is published.
2050#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2051pub struct PubsubConfig {
2052    /// Output only. Name of the subscription. Format is
2053    /// `projects/{project}/subscriptions/{subscription}`.
2054    #[prost(string, tag = "1")]
2055    pub subscription: ::prost::alloc::string::String,
2056    /// Optional. The name of the topic from which this subscription is receiving
2057    /// messages. Format is `projects/{project}/topics/{topic}`.
2058    #[prost(string, tag = "2")]
2059    pub topic: ::prost::alloc::string::String,
2060    /// Service account that will make the push request.
2061    #[prost(string, tag = "3")]
2062    pub service_account_email: ::prost::alloc::string::String,
2063    /// Potential issues with the underlying Pub/Sub subscription configuration.
2064    /// Only populated on get requests.
2065    #[prost(enumeration = "pubsub_config::State", tag = "4")]
2066    pub state: i32,
2067}
2068/// Nested message and enum types in `PubsubConfig`.
2069pub mod pubsub_config {
2070    /// Enumerates potential issues with the underlying Pub/Sub subscription
2071    /// configuration.
2072    #[derive(
2073        Clone,
2074        Copy,
2075        Debug,
2076        PartialEq,
2077        Eq,
2078        Hash,
2079        PartialOrd,
2080        Ord,
2081        ::prost::Enumeration
2082    )]
2083    #[repr(i32)]
2084    pub enum State {
2085        /// The subscription configuration has not been checked.
2086        Unspecified = 0,
2087        /// The Pub/Sub subscription is properly configured.
2088        Ok = 1,
2089        /// The subscription has been deleted.
2090        SubscriptionDeleted = 2,
2091        /// The topic has been deleted.
2092        TopicDeleted = 3,
2093        /// Some of the subscription's field are misconfigured.
2094        SubscriptionMisconfigured = 4,
2095    }
2096    impl State {
2097        /// String value of the enum field names used in the ProtoBuf definition.
2098        ///
2099        /// The values are not transformed in any way and thus are considered stable
2100        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2101        pub fn as_str_name(&self) -> &'static str {
2102            match self {
2103                Self::Unspecified => "STATE_UNSPECIFIED",
2104                Self::Ok => "OK",
2105                Self::SubscriptionDeleted => "SUBSCRIPTION_DELETED",
2106                Self::TopicDeleted => "TOPIC_DELETED",
2107                Self::SubscriptionMisconfigured => "SUBSCRIPTION_MISCONFIGURED",
2108            }
2109        }
2110        /// Creates an enum from field names used in the ProtoBuf definition.
2111        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2112            match value {
2113                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
2114                "OK" => Some(Self::Ok),
2115                "SUBSCRIPTION_DELETED" => Some(Self::SubscriptionDeleted),
2116                "TOPIC_DELETED" => Some(Self::TopicDeleted),
2117                "SUBSCRIPTION_MISCONFIGURED" => Some(Self::SubscriptionMisconfigured),
2118                _ => None,
2119            }
2120        }
2121    }
2122}
2123/// WebhookConfig describes the configuration of a trigger that
2124/// creates a build whenever a webhook is sent to a trigger's webhook URL.
2125#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2126pub struct WebhookConfig {
2127    /// Potential issues with the underlying Pub/Sub subscription configuration.
2128    /// Only populated on get requests.
2129    #[prost(enumeration = "webhook_config::State", tag = "4")]
2130    pub state: i32,
2131    /// Auth method specifies how the webhook authenticates with GCP.
2132    #[prost(oneof = "webhook_config::AuthMethod", tags = "3")]
2133    pub auth_method: ::core::option::Option<webhook_config::AuthMethod>,
2134}
2135/// Nested message and enum types in `WebhookConfig`.
2136pub mod webhook_config {
2137    /// Enumerates potential issues with the Secret Manager secret provided by the
2138    /// user.
2139    #[derive(
2140        Clone,
2141        Copy,
2142        Debug,
2143        PartialEq,
2144        Eq,
2145        Hash,
2146        PartialOrd,
2147        Ord,
2148        ::prost::Enumeration
2149    )]
2150    #[repr(i32)]
2151    pub enum State {
2152        /// The webhook auth configuration not been checked.
2153        Unspecified = 0,
2154        /// The auth configuration is properly setup.
2155        Ok = 1,
2156        /// The secret provided in auth_method has been deleted.
2157        SecretDeleted = 2,
2158    }
2159    impl State {
2160        /// String value of the enum field names used in the ProtoBuf definition.
2161        ///
2162        /// The values are not transformed in any way and thus are considered stable
2163        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2164        pub fn as_str_name(&self) -> &'static str {
2165            match self {
2166                Self::Unspecified => "STATE_UNSPECIFIED",
2167                Self::Ok => "OK",
2168                Self::SecretDeleted => "SECRET_DELETED",
2169            }
2170        }
2171        /// Creates an enum from field names used in the ProtoBuf definition.
2172        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2173            match value {
2174                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
2175                "OK" => Some(Self::Ok),
2176                "SECRET_DELETED" => Some(Self::SecretDeleted),
2177                _ => None,
2178            }
2179        }
2180    }
2181    /// Auth method specifies how the webhook authenticates with GCP.
2182    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
2183    pub enum AuthMethod {
2184        /// Required. Resource name for the secret required as a URL parameter.
2185        #[prost(string, tag = "3")]
2186        Secret(::prost::alloc::string::String),
2187    }
2188}
2189/// PullRequestFilter contains filter properties for matching GitHub Pull
2190/// Requests.
2191#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2192pub struct PullRequestFilter {
2193    /// If CommentControl is enabled, depending on the setting, builds may not
2194    /// fire until a repository writer comments `/gcbrun` on a pull
2195    /// request or `/gcbrun` is in the pull request description.
2196    /// Only PR comments that contain `/gcbrun` will trigger builds.
2197    ///
2198    /// If CommentControl is set to disabled, comments with `/gcbrun` from a user
2199    /// with repository write permission or above will
2200    /// still trigger builds to run.
2201    #[prost(enumeration = "pull_request_filter::CommentControl", tag = "5")]
2202    pub comment_control: i32,
2203    /// If true, branches that do NOT match the git_ref will trigger a build.
2204    #[prost(bool, tag = "6")]
2205    pub invert_regex: bool,
2206    /// Target refs to match.
2207    /// A target ref is the git reference where the pull request will be applied.
2208    #[prost(oneof = "pull_request_filter::GitRef", tags = "2")]
2209    pub git_ref: ::core::option::Option<pull_request_filter::GitRef>,
2210}
2211/// Nested message and enum types in `PullRequestFilter`.
2212pub mod pull_request_filter {
2213    /// Controls whether or not a `/gcbrun` comment is required from a user with
2214    /// repository write permission or above in order to
2215    /// trigger Build runs for pull requests. Pull Request update events differ
2216    /// between repo types.
2217    /// Check repo specific guides
2218    /// ([GitHub](<https://cloud.google.com/build/docs/automating-builds/github/build-repos-from-github-enterprise#creating_a_github_enterprise_trigger>),
2219    /// [Bitbucket](<https://cloud.google.com/build/docs/automating-builds/bitbucket/build-repos-from-bitbucket-server#creating_a_bitbucket_server_trigger>),
2220    /// [GitLab](<https://cloud.google.com/build/docs/automating-builds/gitlab/build-repos-from-gitlab#creating_a_gitlab_trigger>)
2221    /// for details.
2222    #[derive(
2223        Clone,
2224        Copy,
2225        Debug,
2226        PartialEq,
2227        Eq,
2228        Hash,
2229        PartialOrd,
2230        Ord,
2231        ::prost::Enumeration
2232    )]
2233    #[repr(i32)]
2234    pub enum CommentControl {
2235        /// Do not require `/gcbrun` comments from a user with repository write
2236        /// permission or above on pull requests before builds are triggered.
2237        /// Comments that contain `/gcbrun` will still fire builds so this should
2238        /// be thought of as comments not required.
2239        CommentsDisabled = 0,
2240        /// Builds will only fire in response to pull requests if:
2241        ///
2242        /// 1. The pull request author has repository write permission or above and
2243        ///    `/gcbrun` is in the PR description.
2244        /// 1. A user with repository writer permissions or above comments `/gcbrun`
2245        ///    on a pull request authored by any user.
2246        CommentsEnabled = 1,
2247        /// Builds will only fire in response to pull requests if:
2248        ///
2249        /// 1. The pull request author is a repository writer or above.
2250        /// 1. If the author does not have write permissions, a user with write
2251        ///    permissions or above must comment `/gcbrun` in order to fire a build.
2252        CommentsEnabledForExternalContributorsOnly = 2,
2253    }
2254    impl CommentControl {
2255        /// String value of the enum field names used in the ProtoBuf definition.
2256        ///
2257        /// The values are not transformed in any way and thus are considered stable
2258        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2259        pub fn as_str_name(&self) -> &'static str {
2260            match self {
2261                Self::CommentsDisabled => "COMMENTS_DISABLED",
2262                Self::CommentsEnabled => "COMMENTS_ENABLED",
2263                Self::CommentsEnabledForExternalContributorsOnly => {
2264                    "COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY"
2265                }
2266            }
2267        }
2268        /// Creates an enum from field names used in the ProtoBuf definition.
2269        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2270            match value {
2271                "COMMENTS_DISABLED" => Some(Self::CommentsDisabled),
2272                "COMMENTS_ENABLED" => Some(Self::CommentsEnabled),
2273                "COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY" => {
2274                    Some(Self::CommentsEnabledForExternalContributorsOnly)
2275                }
2276                _ => None,
2277            }
2278        }
2279    }
2280    /// Target refs to match.
2281    /// A target ref is the git reference where the pull request will be applied.
2282    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
2283    pub enum GitRef {
2284        /// Regex of branches to match.
2285        ///
2286        /// The syntax of the regular expressions accepted is the syntax accepted by
2287        /// RE2 and described at <https://github.com/google/re2/wiki/Syntax>
2288        #[prost(string, tag = "2")]
2289        Branch(::prost::alloc::string::String),
2290    }
2291}
2292/// Push contains filter properties for matching GitHub git pushes.
2293#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2294pub struct PushFilter {
2295    /// When true, only trigger a build if the revision regex does NOT match the
2296    /// git_ref regex.
2297    #[prost(bool, tag = "4")]
2298    pub invert_regex: bool,
2299    /// Modified refs to match.
2300    /// A modified refs are the refs modified by a git push operation.
2301    #[prost(oneof = "push_filter::GitRef", tags = "2, 3")]
2302    pub git_ref: ::core::option::Option<push_filter::GitRef>,
2303}
2304/// Nested message and enum types in `PushFilter`.
2305pub mod push_filter {
2306    /// Modified refs to match.
2307    /// A modified refs are the refs modified by a git push operation.
2308    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
2309    pub enum GitRef {
2310        /// Regexes matching branches to build.
2311        ///
2312        /// The syntax of the regular expressions accepted is the syntax accepted by
2313        /// RE2 and described at <https://github.com/google/re2/wiki/Syntax>
2314        #[prost(string, tag = "2")]
2315        Branch(::prost::alloc::string::String),
2316        /// Regexes matching tags to build.
2317        ///
2318        /// The syntax of the regular expressions accepted is the syntax accepted by
2319        /// RE2 and described at <https://github.com/google/re2/wiki/Syntax>
2320        #[prost(string, tag = "3")]
2321        Tag(::prost::alloc::string::String),
2322    }
2323}
2324/// Request to create a new `BuildTrigger`.
2325#[derive(Clone, PartialEq, ::prost::Message)]
2326pub struct CreateBuildTriggerRequest {
2327    /// The parent resource where this trigger will be created.
2328    /// Format: `projects/{project}/locations/{location}`
2329    #[prost(string, tag = "3")]
2330    pub parent: ::prost::alloc::string::String,
2331    /// Required. ID of the project for which to configure automatic builds.
2332    #[prost(string, tag = "1")]
2333    pub project_id: ::prost::alloc::string::String,
2334    /// Required. `BuildTrigger` to create.
2335    #[prost(message, optional, tag = "2")]
2336    pub trigger: ::core::option::Option<BuildTrigger>,
2337}
2338/// Returns the `BuildTrigger` with the specified ID.
2339#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2340pub struct GetBuildTriggerRequest {
2341    /// The name of the `Trigger` to retrieve.
2342    /// Format: `projects/{project}/locations/{location}/triggers/{trigger}`
2343    #[prost(string, tag = "3")]
2344    pub name: ::prost::alloc::string::String,
2345    /// Required. ID of the project that owns the trigger.
2346    #[prost(string, tag = "1")]
2347    pub project_id: ::prost::alloc::string::String,
2348    /// Required. Identifier (`id` or `name`) of the `BuildTrigger` to get.
2349    #[prost(string, tag = "2")]
2350    pub trigger_id: ::prost::alloc::string::String,
2351}
2352/// Request to list existing `BuildTriggers`.
2353#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2354pub struct ListBuildTriggersRequest {
2355    /// The parent of the collection of `Triggers`.
2356    /// Format: `projects/{project}/locations/{location}`
2357    #[prost(string, tag = "4")]
2358    pub parent: ::prost::alloc::string::String,
2359    /// Required. ID of the project for which to list BuildTriggers.
2360    #[prost(string, tag = "1")]
2361    pub project_id: ::prost::alloc::string::String,
2362    /// Number of results to return in the list.
2363    #[prost(int32, tag = "2")]
2364    pub page_size: i32,
2365    /// Token to provide to skip to a particular spot in the list.
2366    #[prost(string, tag = "3")]
2367    pub page_token: ::prost::alloc::string::String,
2368}
2369/// Response containing existing `BuildTriggers`.
2370#[derive(Clone, PartialEq, ::prost::Message)]
2371pub struct ListBuildTriggersResponse {
2372    /// `BuildTriggers` for the project, sorted by `create_time` descending.
2373    #[prost(message, repeated, tag = "1")]
2374    pub triggers: ::prost::alloc::vec::Vec<BuildTrigger>,
2375    /// Token to receive the next page of results.
2376    #[prost(string, tag = "2")]
2377    pub next_page_token: ::prost::alloc::string::String,
2378}
2379/// Request to delete a `BuildTrigger`.
2380#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2381pub struct DeleteBuildTriggerRequest {
2382    /// The name of the `Trigger` to delete.
2383    /// Format: `projects/{project}/locations/{location}/triggers/{trigger}`
2384    #[prost(string, tag = "3")]
2385    pub name: ::prost::alloc::string::String,
2386    /// Required. ID of the project that owns the trigger.
2387    #[prost(string, tag = "1")]
2388    pub project_id: ::prost::alloc::string::String,
2389    /// Required. ID of the `BuildTrigger` to delete.
2390    #[prost(string, tag = "2")]
2391    pub trigger_id: ::prost::alloc::string::String,
2392}
2393/// Request to update an existing `BuildTrigger`.
2394#[derive(Clone, PartialEq, ::prost::Message)]
2395pub struct UpdateBuildTriggerRequest {
2396    /// Required. ID of the project that owns the trigger.
2397    #[prost(string, tag = "1")]
2398    pub project_id: ::prost::alloc::string::String,
2399    /// Required. ID of the `BuildTrigger` to update.
2400    #[prost(string, tag = "2")]
2401    pub trigger_id: ::prost::alloc::string::String,
2402    /// Required. `BuildTrigger` to update.
2403    #[prost(message, optional, tag = "3")]
2404    pub trigger: ::core::option::Option<BuildTrigger>,
2405    /// Update mask for the resource. If this is set,
2406    /// the server will only update the fields specified in the field mask.
2407    /// Otherwise, a full update of the mutable resource fields will be performed.
2408    #[prost(message, optional, tag = "5")]
2409    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
2410}
2411/// Optional arguments to enable specific features of builds.
2412#[derive(Clone, PartialEq, ::prost::Message)]
2413pub struct BuildOptions {
2414    /// Requested hash for SourceProvenance.
2415    #[prost(enumeration = "hash::HashType", repeated, tag = "1")]
2416    pub source_provenance_hash: ::prost::alloc::vec::Vec<i32>,
2417    /// Requested verifiability options.
2418    #[prost(enumeration = "build_options::VerifyOption", tag = "2")]
2419    pub requested_verify_option: i32,
2420    /// Compute Engine machine type on which to run the build.
2421    #[prost(enumeration = "build_options::MachineType", tag = "3")]
2422    pub machine_type: i32,
2423    /// Requested disk size for the VM that runs the build. Note that this is *NOT*
2424    /// "disk free"; some of the space will be used by the operating system and
2425    /// build utilities. Also note that this is the minimum disk size that will be
2426    /// allocated for the build -- the build may run with a larger disk than
2427    /// requested. At present, the maximum disk size is 4000GB; builds that request
2428    /// more than the maximum are rejected with an error.
2429    #[prost(int64, tag = "6")]
2430    pub disk_size_gb: i64,
2431    /// Option to specify behavior when there is an error in the substitution
2432    /// checks.
2433    ///
2434    /// NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot
2435    /// be overridden in the build configuration file.
2436    #[prost(enumeration = "build_options::SubstitutionOption", tag = "4")]
2437    pub substitution_option: i32,
2438    /// Option to specify whether or not to apply bash style string
2439    /// operations to the substitutions.
2440    ///
2441    /// NOTE: this is always enabled for triggered builds and cannot be
2442    /// overridden in the build configuration file.
2443    #[prost(bool, tag = "17")]
2444    pub dynamic_substitutions: bool,
2445    /// Option to include built-in and custom substitutions as env variables
2446    /// for all build steps.
2447    #[prost(bool, tag = "22")]
2448    pub automap_substitutions: bool,
2449    /// Option to define build log streaming behavior to Cloud
2450    /// Storage.
2451    #[prost(enumeration = "build_options::LogStreamingOption", tag = "5")]
2452    pub log_streaming_option: i32,
2453    /// This field deprecated; please use `pool.name` instead.
2454    #[deprecated]
2455    #[prost(string, tag = "7")]
2456    pub worker_pool: ::prost::alloc::string::String,
2457    /// Optional. Specification for execution on a `WorkerPool`.
2458    ///
2459    /// See [running builds in a private
2460    /// pool](<https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool>)
2461    /// for more information.
2462    #[prost(message, optional, tag = "19")]
2463    pub pool: ::core::option::Option<build_options::PoolOption>,
2464    /// Option to specify the logging mode, which determines if and where build
2465    /// logs are stored.
2466    #[prost(enumeration = "build_options::LoggingMode", tag = "11")]
2467    pub logging: i32,
2468    /// A list of global environment variable definitions that will exist for all
2469    /// build steps in this build. If a variable is defined in both globally and in
2470    /// a build step, the variable will use the build step value.
2471    ///
2472    /// The elements are of the form "KEY=VALUE" for the environment variable "KEY"
2473    /// being given the value "VALUE".
2474    #[prost(string, repeated, tag = "12")]
2475    pub env: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2476    /// A list of global environment variables, which are encrypted using a Cloud
2477    /// Key Management Service crypto key. These values must be specified in the
2478    /// build's `Secret`. These variables will be available to all build steps
2479    /// in this build.
2480    #[prost(string, repeated, tag = "13")]
2481    pub secret_env: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2482    /// Global list of volumes to mount for ALL build steps
2483    ///
2484    /// Each volume is created as an empty volume prior to starting the build
2485    /// process. Upon completion of the build, volumes and their contents are
2486    /// discarded. Global volume names and paths cannot conflict with the volumes
2487    /// defined a build step.
2488    ///
2489    /// Using a global volume in a build with only one step is not valid as
2490    /// it is indicative of a build request with an incorrect configuration.
2491    #[prost(message, repeated, tag = "14")]
2492    pub volumes: ::prost::alloc::vec::Vec<Volume>,
2493    /// Optional. Option to specify how default logs buckets are setup.
2494    #[prost(enumeration = "build_options::DefaultLogsBucketBehavior", tag = "21")]
2495    pub default_logs_bucket_behavior: i32,
2496    /// Optional. Option to specify whether structured logging is enabled.
2497    ///
2498    /// If true, JSON-formatted logs are parsed as structured logs.
2499    #[prost(bool, tag = "23")]
2500    pub enable_structured_logging: bool,
2501}
2502/// Nested message and enum types in `BuildOptions`.
2503pub mod build_options {
2504    /// Details about how a build should be executed on a `WorkerPool`.
2505    ///
2506    /// See [running builds in a private
2507    /// pool](<https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool>)
2508    /// for more information.
2509    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2510    pub struct PoolOption {
2511        /// The `WorkerPool` resource to execute the build on.
2512        /// You must have `cloudbuild.workerpools.use` on the project hosting the
2513        /// WorkerPool.
2514        ///
2515        /// Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
2516        #[prost(string, tag = "1")]
2517        pub name: ::prost::alloc::string::String,
2518    }
2519    /// Specifies the manner in which the build should be verified, if at all.
2520    ///
2521    /// If a verified build is requested, and any part of the process to generate
2522    /// and upload provenance fails, the build will also fail.
2523    ///
2524    /// If the build does not request verification then that process may occur, but
2525    /// is not guaranteed to. If it does occur and fails, the build will not fail.
2526    ///
2527    /// For more information, see [Viewing Build
2528    /// Provenance](<https://cloud.google.com/build/docs/securing-builds/view-build-provenance>).
2529    #[derive(
2530        Clone,
2531        Copy,
2532        Debug,
2533        PartialEq,
2534        Eq,
2535        Hash,
2536        PartialOrd,
2537        Ord,
2538        ::prost::Enumeration
2539    )]
2540    #[repr(i32)]
2541    pub enum VerifyOption {
2542        /// Not a verifiable build (the default).
2543        NotVerified = 0,
2544        /// Build must be verified.
2545        Verified = 1,
2546    }
2547    impl VerifyOption {
2548        /// String value of the enum field names used in the ProtoBuf definition.
2549        ///
2550        /// The values are not transformed in any way and thus are considered stable
2551        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2552        pub fn as_str_name(&self) -> &'static str {
2553            match self {
2554                Self::NotVerified => "NOT_VERIFIED",
2555                Self::Verified => "VERIFIED",
2556            }
2557        }
2558        /// Creates an enum from field names used in the ProtoBuf definition.
2559        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2560            match value {
2561                "NOT_VERIFIED" => Some(Self::NotVerified),
2562                "VERIFIED" => Some(Self::Verified),
2563                _ => None,
2564            }
2565        }
2566    }
2567    /// Supported Compute Engine machine types.
2568    /// For more information, see [Machine
2569    /// types](<https://cloud.google.com/compute/docs/machine-types>).
2570    #[derive(
2571        Clone,
2572        Copy,
2573        Debug,
2574        PartialEq,
2575        Eq,
2576        Hash,
2577        PartialOrd,
2578        Ord,
2579        ::prost::Enumeration
2580    )]
2581    #[repr(i32)]
2582    pub enum MachineType {
2583        /// Standard machine type.
2584        Unspecified = 0,
2585        /// Highcpu machine with 8 CPUs.
2586        N1Highcpu8 = 1,
2587        /// Highcpu machine with 32 CPUs.
2588        N1Highcpu32 = 2,
2589        /// Highcpu e2 machine with 8 CPUs.
2590        E2Highcpu8 = 5,
2591        /// Highcpu e2 machine with 32 CPUs.
2592        E2Highcpu32 = 6,
2593        /// E2 machine with 1 CPU.
2594        E2Medium = 7,
2595    }
2596    impl MachineType {
2597        /// String value of the enum field names used in the ProtoBuf definition.
2598        ///
2599        /// The values are not transformed in any way and thus are considered stable
2600        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2601        pub fn as_str_name(&self) -> &'static str {
2602            match self {
2603                Self::Unspecified => "UNSPECIFIED",
2604                Self::N1Highcpu8 => "N1_HIGHCPU_8",
2605                Self::N1Highcpu32 => "N1_HIGHCPU_32",
2606                Self::E2Highcpu8 => "E2_HIGHCPU_8",
2607                Self::E2Highcpu32 => "E2_HIGHCPU_32",
2608                Self::E2Medium => "E2_MEDIUM",
2609            }
2610        }
2611        /// Creates an enum from field names used in the ProtoBuf definition.
2612        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2613            match value {
2614                "UNSPECIFIED" => Some(Self::Unspecified),
2615                "N1_HIGHCPU_8" => Some(Self::N1Highcpu8),
2616                "N1_HIGHCPU_32" => Some(Self::N1Highcpu32),
2617                "E2_HIGHCPU_8" => Some(Self::E2Highcpu8),
2618                "E2_HIGHCPU_32" => Some(Self::E2Highcpu32),
2619                "E2_MEDIUM" => Some(Self::E2Medium),
2620                _ => None,
2621            }
2622        }
2623    }
2624    /// Specifies the behavior when there is an error in the substitution checks.
2625    #[derive(
2626        Clone,
2627        Copy,
2628        Debug,
2629        PartialEq,
2630        Eq,
2631        Hash,
2632        PartialOrd,
2633        Ord,
2634        ::prost::Enumeration
2635    )]
2636    #[repr(i32)]
2637    pub enum SubstitutionOption {
2638        /// Fails the build if error in substitutions checks, like missing
2639        /// a substitution in the template or in the map.
2640        MustMatch = 0,
2641        /// Do not fail the build if error in substitutions checks.
2642        AllowLoose = 1,
2643    }
2644    impl SubstitutionOption {
2645        /// String value of the enum field names used in the ProtoBuf definition.
2646        ///
2647        /// The values are not transformed in any way and thus are considered stable
2648        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2649        pub fn as_str_name(&self) -> &'static str {
2650            match self {
2651                Self::MustMatch => "MUST_MATCH",
2652                Self::AllowLoose => "ALLOW_LOOSE",
2653            }
2654        }
2655        /// Creates an enum from field names used in the ProtoBuf definition.
2656        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2657            match value {
2658                "MUST_MATCH" => Some(Self::MustMatch),
2659                "ALLOW_LOOSE" => Some(Self::AllowLoose),
2660                _ => None,
2661            }
2662        }
2663    }
2664    /// Specifies the behavior when writing build logs to Cloud Storage.
2665    #[derive(
2666        Clone,
2667        Copy,
2668        Debug,
2669        PartialEq,
2670        Eq,
2671        Hash,
2672        PartialOrd,
2673        Ord,
2674        ::prost::Enumeration
2675    )]
2676    #[repr(i32)]
2677    pub enum LogStreamingOption {
2678        /// Service may automatically determine build log streaming behavior.
2679        StreamDefault = 0,
2680        /// Build logs should be streamed to Cloud Storage.
2681        StreamOn = 1,
2682        /// Build logs should not be streamed to Cloud Storage; they will be
2683        /// written when the build is completed.
2684        StreamOff = 2,
2685    }
2686    impl LogStreamingOption {
2687        /// String value of the enum field names used in the ProtoBuf definition.
2688        ///
2689        /// The values are not transformed in any way and thus are considered stable
2690        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2691        pub fn as_str_name(&self) -> &'static str {
2692            match self {
2693                Self::StreamDefault => "STREAM_DEFAULT",
2694                Self::StreamOn => "STREAM_ON",
2695                Self::StreamOff => "STREAM_OFF",
2696            }
2697        }
2698        /// Creates an enum from field names used in the ProtoBuf definition.
2699        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2700            match value {
2701                "STREAM_DEFAULT" => Some(Self::StreamDefault),
2702                "STREAM_ON" => Some(Self::StreamOn),
2703                "STREAM_OFF" => Some(Self::StreamOff),
2704                _ => None,
2705            }
2706        }
2707    }
2708    /// Specifies the logging mode.
2709    #[derive(
2710        Clone,
2711        Copy,
2712        Debug,
2713        PartialEq,
2714        Eq,
2715        Hash,
2716        PartialOrd,
2717        Ord,
2718        ::prost::Enumeration
2719    )]
2720    #[repr(i32)]
2721    pub enum LoggingMode {
2722        /// The service determines the logging mode. The default is `LEGACY`. Do not
2723        /// rely on the default logging behavior as it may change in the future.
2724        LoggingUnspecified = 0,
2725        /// Build logs are stored in Cloud Logging and Cloud Storage.
2726        Legacy = 1,
2727        /// Build logs are stored in Cloud Storage.
2728        GcsOnly = 2,
2729        /// This option is the same as CLOUD_LOGGING_ONLY.
2730        #[deprecated]
2731        StackdriverOnly = 3,
2732        /// Build logs are stored in Cloud Logging. Selecting this option will not
2733        /// allow [logs
2734        /// streaming](<https://cloud.google.com/sdk/gcloud/reference/builds/log>).
2735        CloudLoggingOnly = 5,
2736        /// Turn off all logging. No build logs will be captured.
2737        None = 4,
2738    }
2739    impl LoggingMode {
2740        /// String value of the enum field names used in the ProtoBuf definition.
2741        ///
2742        /// The values are not transformed in any way and thus are considered stable
2743        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2744        pub fn as_str_name(&self) -> &'static str {
2745            match self {
2746                Self::LoggingUnspecified => "LOGGING_UNSPECIFIED",
2747                Self::Legacy => "LEGACY",
2748                Self::GcsOnly => "GCS_ONLY",
2749                #[allow(deprecated)]
2750                Self::StackdriverOnly => "STACKDRIVER_ONLY",
2751                Self::CloudLoggingOnly => "CLOUD_LOGGING_ONLY",
2752                Self::None => "NONE",
2753            }
2754        }
2755        /// Creates an enum from field names used in the ProtoBuf definition.
2756        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2757            match value {
2758                "LOGGING_UNSPECIFIED" => Some(Self::LoggingUnspecified),
2759                "LEGACY" => Some(Self::Legacy),
2760                "GCS_ONLY" => Some(Self::GcsOnly),
2761                "STACKDRIVER_ONLY" => Some(#[allow(deprecated)] Self::StackdriverOnly),
2762                "CLOUD_LOGGING_ONLY" => Some(Self::CloudLoggingOnly),
2763                "NONE" => Some(Self::None),
2764                _ => None,
2765            }
2766        }
2767    }
2768    /// Default Cloud Storage log bucket behavior options.
2769    #[derive(
2770        Clone,
2771        Copy,
2772        Debug,
2773        PartialEq,
2774        Eq,
2775        Hash,
2776        PartialOrd,
2777        Ord,
2778        ::prost::Enumeration
2779    )]
2780    #[repr(i32)]
2781    pub enum DefaultLogsBucketBehavior {
2782        /// Unspecified.
2783        Unspecified = 0,
2784        /// Bucket is located in user-owned project in the same region as the
2785        /// build. The builder service account must have access to create and write
2786        /// to Cloud Storage buckets in the build project.
2787        RegionalUserOwnedBucket = 1,
2788        /// Bucket is located in a Google-owned project and is not regionalized.
2789        LegacyBucket = 2,
2790    }
2791    impl DefaultLogsBucketBehavior {
2792        /// String value of the enum field names used in the ProtoBuf definition.
2793        ///
2794        /// The values are not transformed in any way and thus are considered stable
2795        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2796        pub fn as_str_name(&self) -> &'static str {
2797            match self {
2798                Self::Unspecified => "DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED",
2799                Self::RegionalUserOwnedBucket => "REGIONAL_USER_OWNED_BUCKET",
2800                Self::LegacyBucket => "LEGACY_BUCKET",
2801            }
2802        }
2803        /// Creates an enum from field names used in the ProtoBuf definition.
2804        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2805            match value {
2806                "DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
2807                "REGIONAL_USER_OWNED_BUCKET" => Some(Self::RegionalUserOwnedBucket),
2808                "LEGACY_BUCKET" => Some(Self::LegacyBucket),
2809                _ => None,
2810            }
2811        }
2812    }
2813}
2814/// ReceiveTriggerWebhookRequest \[Experimental\] is the request object accepted by
2815/// the ReceiveTriggerWebhook method.
2816#[derive(Clone, PartialEq, ::prost::Message)]
2817pub struct ReceiveTriggerWebhookRequest {
2818    /// The name of the `ReceiveTriggerWebhook` to retrieve.
2819    /// Format: `projects/{project}/locations/{location}/triggers/{trigger}`
2820    #[prost(string, tag = "5")]
2821    pub name: ::prost::alloc::string::String,
2822    /// HTTP request body.
2823    #[prost(message, optional, tag = "1")]
2824    pub body: ::core::option::Option<super::super::super::api::HttpBody>,
2825    /// Project in which the specified trigger lives
2826    #[prost(string, tag = "2")]
2827    pub project_id: ::prost::alloc::string::String,
2828    /// Name of the trigger to run the payload against
2829    #[prost(string, tag = "3")]
2830    pub trigger: ::prost::alloc::string::String,
2831    /// Secret token used for authorization if an OAuth token isn't provided.
2832    #[prost(string, tag = "4")]
2833    pub secret: ::prost::alloc::string::String,
2834}
2835/// ReceiveTriggerWebhookResponse \[Experimental\] is the response object for the
2836/// ReceiveTriggerWebhook method.
2837#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2838pub struct ReceiveTriggerWebhookResponse {}
2839/// GitHubEnterpriseConfig represents a configuration for a GitHub Enterprise
2840/// server.
2841#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2842pub struct GitHubEnterpriseConfig {
2843    /// The full resource name for the GitHubEnterpriseConfig
2844    /// For example:
2845    /// "projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
2846    #[prost(string, tag = "7")]
2847    pub name: ::prost::alloc::string::String,
2848    /// The URL of the github enterprise host the configuration is for.
2849    #[prost(string, tag = "3")]
2850    pub host_url: ::prost::alloc::string::String,
2851    /// Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise
2852    /// server.
2853    #[prost(int64, tag = "4")]
2854    pub app_id: i64,
2855    /// Output only. Time when the installation was associated with the project.
2856    #[prost(message, optional, tag = "6")]
2857    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
2858    /// The key that should be attached to webhook calls to the ReceiveWebhook
2859    /// endpoint.
2860    #[prost(string, tag = "8")]
2861    pub webhook_key: ::prost::alloc::string::String,
2862    /// Optional. The network to be used when reaching out to the GitHub
2863    /// Enterprise server. The VPC network must be enabled for private
2864    /// service connection. This should be set if the GitHub Enterprise server is
2865    /// hosted on-premises and not reachable by public internet.
2866    /// If this field is left empty, no network peering will occur and calls to
2867    /// the GitHub Enterprise server will be made over the public internet.
2868    /// Must be in the format
2869    /// `projects/{project}/global/networks/{network}`, where {project}
2870    /// is a project number or id and {network} is the name of a
2871    /// VPC network in the project.
2872    #[prost(string, tag = "9")]
2873    pub peered_network: ::prost::alloc::string::String,
2874    /// Optional. Names of secrets in Secret Manager.
2875    #[prost(message, optional, tag = "10")]
2876    pub secrets: ::core::option::Option<GitHubEnterpriseSecrets>,
2877    /// Optional. Name to display for this config.
2878    #[prost(string, tag = "11")]
2879    pub display_name: ::prost::alloc::string::String,
2880    /// Optional. SSL certificate to use for requests to GitHub Enterprise.
2881    #[prost(string, tag = "12")]
2882    pub ssl_ca: ::prost::alloc::string::String,
2883}
2884/// GitHubEnterpriseSecrets represents the names of all necessary secrets in
2885/// Secret Manager for a GitHub Enterprise server.
2886/// Format is: projects/<project number>/secrets/<secret name>.
2887#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2888pub struct GitHubEnterpriseSecrets {
2889    /// The resource name for the private key secret version.
2890    #[prost(string, tag = "5")]
2891    pub private_key_version_name: ::prost::alloc::string::String,
2892    /// The resource name for the webhook secret secret version in Secret Manager.
2893    #[prost(string, tag = "6")]
2894    pub webhook_secret_version_name: ::prost::alloc::string::String,
2895    /// The resource name for the OAuth secret secret version in Secret Manager.
2896    #[prost(string, tag = "7")]
2897    pub oauth_secret_version_name: ::prost::alloc::string::String,
2898    /// The resource name for the OAuth client ID secret version in Secret Manager.
2899    #[prost(string, tag = "8")]
2900    pub oauth_client_id_version_name: ::prost::alloc::string::String,
2901}
2902/// Configuration for a `WorkerPool`.
2903///
2904/// Cloud Build owns and maintains a pool of workers for general use and have no
2905/// access to a project's private network. By default, builds submitted to
2906/// Cloud Build will use a worker from this pool.
2907///
2908/// If your build needs access to resources on a private network,
2909/// create and use a `WorkerPool` to run your builds. Private `WorkerPool`s give
2910/// your builds access to any single VPC network that you
2911/// administer, including any on-prem resources connected to that VPC
2912/// network. For an overview of private pools, see
2913/// [Private pools
2914/// overview](<https://cloud.google.com/build/docs/private-pools/private-pools-overview>).
2915#[derive(Clone, PartialEq, ::prost::Message)]
2916pub struct WorkerPool {
2917    /// Output only. The resource name of the `WorkerPool`, with format
2918    /// `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
2919    /// The value of `{worker_pool}` is provided by `worker_pool_id` in
2920    /// `CreateWorkerPool` request and the value of `{location}` is determined by
2921    /// the endpoint accessed.
2922    #[prost(string, tag = "1")]
2923    pub name: ::prost::alloc::string::String,
2924    /// A user-specified, human-readable name for the `WorkerPool`. If provided,
2925    /// this value must be 1-63 characters.
2926    #[prost(string, tag = "2")]
2927    pub display_name: ::prost::alloc::string::String,
2928    /// Output only. A unique identifier for the `WorkerPool`.
2929    #[prost(string, tag = "3")]
2930    pub uid: ::prost::alloc::string::String,
2931    /// User specified annotations. See <https://google.aip.dev/128#annotations>
2932    /// for more details such as format and size limitations.
2933    #[prost(map = "string, string", tag = "4")]
2934    pub annotations: ::std::collections::HashMap<
2935        ::prost::alloc::string::String,
2936        ::prost::alloc::string::String,
2937    >,
2938    /// Output only. Time at which the request to create the `WorkerPool` was
2939    /// received.
2940    #[prost(message, optional, tag = "5")]
2941    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
2942    /// Output only. Time at which the request to update the `WorkerPool` was
2943    /// received.
2944    #[prost(message, optional, tag = "6")]
2945    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
2946    /// Output only. Time at which the request to delete the `WorkerPool` was
2947    /// received.
2948    #[prost(message, optional, tag = "7")]
2949    pub delete_time: ::core::option::Option<::prost_types::Timestamp>,
2950    /// Output only. `WorkerPool` state.
2951    #[prost(enumeration = "worker_pool::State", tag = "8")]
2952    pub state: i32,
2953    /// Output only. Checksum computed by the server. May be sent on update and
2954    /// delete requests to ensure that the client has an up-to-date value before
2955    /// proceeding.
2956    #[prost(string, tag = "11")]
2957    pub etag: ::prost::alloc::string::String,
2958    /// Configuration for the `WorkerPool`.
2959    #[prost(oneof = "worker_pool::Config", tags = "12")]
2960    pub config: ::core::option::Option<worker_pool::Config>,
2961}
2962/// Nested message and enum types in `WorkerPool`.
2963pub mod worker_pool {
2964    /// State of the `WorkerPool`.
2965    #[derive(
2966        Clone,
2967        Copy,
2968        Debug,
2969        PartialEq,
2970        Eq,
2971        Hash,
2972        PartialOrd,
2973        Ord,
2974        ::prost::Enumeration
2975    )]
2976    #[repr(i32)]
2977    pub enum State {
2978        /// State of the `WorkerPool` is unknown.
2979        Unspecified = 0,
2980        /// `WorkerPool` is being created.
2981        Creating = 1,
2982        /// `WorkerPool` is running.
2983        Running = 2,
2984        /// `WorkerPool` is being deleted: cancelling builds and draining workers.
2985        Deleting = 3,
2986        /// `WorkerPool` is deleted.
2987        Deleted = 4,
2988        /// `WorkerPool` is being updated; new builds cannot be run.
2989        Updating = 5,
2990    }
2991    impl State {
2992        /// String value of the enum field names used in the ProtoBuf definition.
2993        ///
2994        /// The values are not transformed in any way and thus are considered stable
2995        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2996        pub fn as_str_name(&self) -> &'static str {
2997            match self {
2998                Self::Unspecified => "STATE_UNSPECIFIED",
2999                Self::Creating => "CREATING",
3000                Self::Running => "RUNNING",
3001                Self::Deleting => "DELETING",
3002                Self::Deleted => "DELETED",
3003                Self::Updating => "UPDATING",
3004            }
3005        }
3006        /// Creates an enum from field names used in the ProtoBuf definition.
3007        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3008            match value {
3009                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
3010                "CREATING" => Some(Self::Creating),
3011                "RUNNING" => Some(Self::Running),
3012                "DELETING" => Some(Self::Deleting),
3013                "DELETED" => Some(Self::Deleted),
3014                "UPDATING" => Some(Self::Updating),
3015                _ => None,
3016            }
3017        }
3018    }
3019    /// Configuration for the `WorkerPool`.
3020    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
3021    pub enum Config {
3022        /// Private Pool configuration.
3023        #[prost(message, tag = "12")]
3024        PrivatePoolV1Config(super::PrivatePoolV1Config),
3025    }
3026}
3027/// Configuration for a V1 `PrivatePool`.
3028#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3029pub struct PrivatePoolV1Config {
3030    /// Machine configuration for the workers in the pool.
3031    #[prost(message, optional, tag = "1")]
3032    pub worker_config: ::core::option::Option<private_pool_v1_config::WorkerConfig>,
3033    /// Network configuration for the pool.
3034    #[prost(message, optional, tag = "2")]
3035    pub network_config: ::core::option::Option<private_pool_v1_config::NetworkConfig>,
3036    /// Immutable. Private Service Connect(PSC) Network configuration for the pool.
3037    #[prost(message, optional, tag = "5")]
3038    pub private_service_connect: ::core::option::Option<
3039        private_pool_v1_config::PrivateServiceConnect,
3040    >,
3041}
3042/// Nested message and enum types in `PrivatePoolV1Config`.
3043pub mod private_pool_v1_config {
3044    /// Defines the configuration to be used for creating workers in
3045    /// the pool.
3046    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3047    pub struct WorkerConfig {
3048        /// Optional. Machine type of a worker, such as `e2-medium`.
3049        /// See [Worker pool config
3050        /// file](<https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema>).
3051        /// If left blank, Cloud Build will use a sensible default.
3052        #[prost(string, tag = "1")]
3053        pub machine_type: ::prost::alloc::string::String,
3054        /// Size of the disk attached to the worker, in GB.
3055        /// See [Worker pool config
3056        /// file](<https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema>).
3057        /// Specify a value of up to 4000. If `0` is specified, Cloud Build will use
3058        /// a standard disk size.
3059        #[prost(int64, tag = "2")]
3060        pub disk_size_gb: i64,
3061        /// Optional. Enable nested virtualization on the worker, if supported by the
3062        /// machine type. By default, nested virtualization is disabled.
3063        #[prost(bool, optional, tag = "3")]
3064        pub enable_nested_virtualization: ::core::option::Option<bool>,
3065    }
3066    /// Defines the network configuration for the pool.
3067    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3068    pub struct NetworkConfig {
3069        /// Required. Immutable. The network definition that the workers are peered
3070        /// to. If this section is left empty, the workers will be peered to
3071        /// `WorkerPool.project_id` on the service producer network. Must be in the
3072        /// format `projects/{project}/global/networks/{network}`, where `{project}`
3073        /// is a project number, such as `12345`, and `{network}` is the name of a
3074        /// VPC network in the project. See
3075        /// [Understanding network configuration
3076        /// options](<https://cloud.google.com/build/docs/private-pools/set-up-private-pool-environment>)
3077        #[prost(string, tag = "1")]
3078        pub peered_network: ::prost::alloc::string::String,
3079        /// Option to configure network egress for the workers.
3080        #[prost(enumeration = "network_config::EgressOption", tag = "2")]
3081        pub egress_option: i32,
3082        /// Immutable. Subnet IP range within the peered network. This is specified
3083        /// in CIDR notation with a slash and the subnet prefix size. You can
3084        /// optionally specify an IP address before the subnet prefix value. e.g.
3085        /// `192.168.0.0/29` would specify an IP range starting at 192.168.0.0 with a
3086        /// prefix size of 29 bits.
3087        /// `/16` would specify a prefix size of 16 bits, with an automatically
3088        /// determined IP within the peered VPC.
3089        /// If unspecified, a value of `/24` will be used.
3090        #[prost(string, tag = "3")]
3091        pub peered_network_ip_range: ::prost::alloc::string::String,
3092    }
3093    /// Nested message and enum types in `NetworkConfig`.
3094    pub mod network_config {
3095        /// Defines the egress option for the pool.
3096        #[derive(
3097            Clone,
3098            Copy,
3099            Debug,
3100            PartialEq,
3101            Eq,
3102            Hash,
3103            PartialOrd,
3104            Ord,
3105            ::prost::Enumeration
3106        )]
3107        #[repr(i32)]
3108        pub enum EgressOption {
3109            /// If set, defaults to PUBLIC_EGRESS.
3110            Unspecified = 0,
3111            /// If set, workers are created without any public address, which prevents
3112            /// network egress to public IPs unless a network proxy is configured.
3113            NoPublicEgress = 1,
3114            /// If set, workers are created with a public address which allows for
3115            /// public internet egress.
3116            PublicEgress = 2,
3117        }
3118        impl EgressOption {
3119            /// String value of the enum field names used in the ProtoBuf definition.
3120            ///
3121            /// The values are not transformed in any way and thus are considered stable
3122            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3123            pub fn as_str_name(&self) -> &'static str {
3124                match self {
3125                    Self::Unspecified => "EGRESS_OPTION_UNSPECIFIED",
3126                    Self::NoPublicEgress => "NO_PUBLIC_EGRESS",
3127                    Self::PublicEgress => "PUBLIC_EGRESS",
3128                }
3129            }
3130            /// Creates an enum from field names used in the ProtoBuf definition.
3131            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3132                match value {
3133                    "EGRESS_OPTION_UNSPECIFIED" => Some(Self::Unspecified),
3134                    "NO_PUBLIC_EGRESS" => Some(Self::NoPublicEgress),
3135                    "PUBLIC_EGRESS" => Some(Self::PublicEgress),
3136                    _ => None,
3137                }
3138            }
3139        }
3140    }
3141    /// Defines the Private Service Connect network configuration for the pool.
3142    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3143    pub struct PrivateServiceConnect {
3144        /// Required. Immutable. The network attachment that the worker network
3145        /// interface is peered to. Must be in the format
3146        /// `projects/{project}/regions/{region}/networkAttachments/{networkAttachment}`.
3147        /// The region of network attachment must be the same as the worker pool.
3148        /// See [Network
3149        /// Attachments](<https://cloud.google.com/vpc/docs/about-network-attachments>)
3150        #[prost(string, tag = "1")]
3151        pub network_attachment: ::prost::alloc::string::String,
3152        /// Required. Immutable. Disable public IP on the primary network interface.
3153        ///
3154        /// If true, workers are created without any public address, which prevents
3155        /// network egress to public IPs unless a network proxy is configured.
3156        /// If false, workers are created with a public address which allows for
3157        /// public internet egress. The public address only applies to traffic
3158        /// through the primary network interface.
3159        /// If `route_all_traffic` is set to true, all traffic will go through the
3160        /// non-primary network interface, this boolean has no effect.
3161        #[prost(bool, tag = "2")]
3162        pub public_ip_address_disabled: bool,
3163        /// Immutable. Route all traffic through PSC interface. Enable this if you
3164        /// want full control of traffic in the private pool. Configure Cloud NAT for
3165        /// the subnet of network attachment if you need to access public Internet.
3166        ///
3167        /// If false, Only route RFC 1918 (10.0.0.0/8, 172.16.0.0/12, and
3168        /// 192.168.0.0/16) and RFC 6598 (100.64.0.0/10) through PSC interface.
3169        #[prost(bool, tag = "3")]
3170        pub route_all_traffic: bool,
3171    }
3172}
3173/// Request to create a new `WorkerPool`.
3174#[derive(Clone, PartialEq, ::prost::Message)]
3175pub struct CreateWorkerPoolRequest {
3176    /// Required. The parent resource where this worker pool will be created.
3177    /// Format: `projects/{project}/locations/{location}`.
3178    #[prost(string, tag = "1")]
3179    pub parent: ::prost::alloc::string::String,
3180    /// Required. `WorkerPool` resource to create.
3181    #[prost(message, optional, tag = "2")]
3182    pub worker_pool: ::core::option::Option<WorkerPool>,
3183    /// Required. Immutable. The ID to use for the `WorkerPool`, which will become
3184    /// the final component of the resource name.
3185    ///
3186    /// This value should be 1-63 characters, and valid characters
3187    /// are /\[a-z\]\[0-9\]-/.
3188    #[prost(string, tag = "3")]
3189    pub worker_pool_id: ::prost::alloc::string::String,
3190    /// If set, validate the request and preview the response, but do not actually
3191    /// post it.
3192    #[prost(bool, tag = "4")]
3193    pub validate_only: bool,
3194}
3195/// Request to get a `WorkerPool` with the specified name.
3196#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3197pub struct GetWorkerPoolRequest {
3198    /// Required. The name of the `WorkerPool` to retrieve.
3199    /// Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
3200    #[prost(string, tag = "1")]
3201    pub name: ::prost::alloc::string::String,
3202}
3203/// Request to delete a `WorkerPool`.
3204#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3205pub struct DeleteWorkerPoolRequest {
3206    /// Required. The name of the `WorkerPool` to delete.
3207    /// Format:
3208    /// `projects/{project}/locations/{location}/workerPools/{workerPool}`.
3209    #[prost(string, tag = "1")]
3210    pub name: ::prost::alloc::string::String,
3211    /// Optional. If provided, it must match the server's etag on the workerpool
3212    /// for the request to be processed.
3213    #[prost(string, tag = "2")]
3214    pub etag: ::prost::alloc::string::String,
3215    /// If set to true, and the `WorkerPool` is not found, the request will succeed
3216    /// but no action will be taken on the server.
3217    #[prost(bool, tag = "3")]
3218    pub allow_missing: bool,
3219    /// If set, validate the request and preview the response, but do not actually
3220    /// post it.
3221    #[prost(bool, tag = "4")]
3222    pub validate_only: bool,
3223}
3224/// Request to update a `WorkerPool`.
3225#[derive(Clone, PartialEq, ::prost::Message)]
3226pub struct UpdateWorkerPoolRequest {
3227    /// Required. The `WorkerPool` to update.
3228    ///
3229    /// The `name` field is used to identify the `WorkerPool` to update.
3230    /// Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
3231    #[prost(message, optional, tag = "1")]
3232    pub worker_pool: ::core::option::Option<WorkerPool>,
3233    /// Optional. A mask specifying which fields in `worker_pool` to update.
3234    #[prost(message, optional, tag = "2")]
3235    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
3236    /// If set, validate the request and preview the response, but do not actually
3237    /// post it.
3238    #[prost(bool, tag = "4")]
3239    pub validate_only: bool,
3240}
3241/// Request to list `WorkerPool`s.
3242#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3243pub struct ListWorkerPoolsRequest {
3244    /// Required. The parent of the collection of `WorkerPools`.
3245    /// Format: `projects/{project}/locations/{location}`.
3246    #[prost(string, tag = "1")]
3247    pub parent: ::prost::alloc::string::String,
3248    /// The maximum number of `WorkerPool`s to return. The service may return
3249    /// fewer than this value. If omitted, the server will use a sensible default.
3250    #[prost(int32, tag = "2")]
3251    pub page_size: i32,
3252    /// A page token, received from a previous `ListWorkerPools` call. Provide this
3253    /// to retrieve the subsequent page.
3254    #[prost(string, tag = "3")]
3255    pub page_token: ::prost::alloc::string::String,
3256}
3257/// Response containing existing `WorkerPools`.
3258#[derive(Clone, PartialEq, ::prost::Message)]
3259pub struct ListWorkerPoolsResponse {
3260    /// `WorkerPools` for the specified project.
3261    #[prost(message, repeated, tag = "1")]
3262    pub worker_pools: ::prost::alloc::vec::Vec<WorkerPool>,
3263    /// Continuation token used to page through large result sets. Provide this
3264    /// value in a subsequent ListWorkerPoolsRequest to return the next page of
3265    /// results.
3266    #[prost(string, tag = "2")]
3267    pub next_page_token: ::prost::alloc::string::String,
3268}
3269/// Metadata for the `CreateWorkerPool` operation.
3270#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3271pub struct CreateWorkerPoolOperationMetadata {
3272    /// The resource name of the `WorkerPool` to create.
3273    /// Format:
3274    /// `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
3275    #[prost(string, tag = "1")]
3276    pub worker_pool: ::prost::alloc::string::String,
3277    /// Time the operation was created.
3278    #[prost(message, optional, tag = "2")]
3279    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
3280    /// Time the operation was completed.
3281    #[prost(message, optional, tag = "3")]
3282    pub complete_time: ::core::option::Option<::prost_types::Timestamp>,
3283}
3284/// Metadata for the `UpdateWorkerPool` operation.
3285#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3286pub struct UpdateWorkerPoolOperationMetadata {
3287    /// The resource name of the `WorkerPool` being updated.
3288    /// Format:
3289    /// `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
3290    #[prost(string, tag = "1")]
3291    pub worker_pool: ::prost::alloc::string::String,
3292    /// Time the operation was created.
3293    #[prost(message, optional, tag = "2")]
3294    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
3295    /// Time the operation was completed.
3296    #[prost(message, optional, tag = "3")]
3297    pub complete_time: ::core::option::Option<::prost_types::Timestamp>,
3298}
3299/// Metadata for the `DeleteWorkerPool` operation.
3300#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3301pub struct DeleteWorkerPoolOperationMetadata {
3302    /// The resource name of the `WorkerPool` being deleted.
3303    /// Format:
3304    /// `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
3305    #[prost(string, tag = "1")]
3306    pub worker_pool: ::prost::alloc::string::String,
3307    /// Time the operation was created.
3308    #[prost(message, optional, tag = "2")]
3309    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
3310    /// Time the operation was completed.
3311    #[prost(message, optional, tag = "3")]
3312    pub complete_time: ::core::option::Option<::prost_types::Timestamp>,
3313}
3314/// Generated client implementations.
3315pub mod cloud_build_client {
3316    #![allow(
3317        unused_variables,
3318        dead_code,
3319        missing_docs,
3320        clippy::wildcard_imports,
3321        clippy::let_unit_value,
3322    )]
3323    use tonic::codegen::*;
3324    use tonic::codegen::http::Uri;
3325    /// Creates and manages builds on Google Cloud Platform.
3326    ///
3327    /// The main concept used by this API is a `Build`, which describes the location
3328    /// of the source to build, how to build the source, and where to store the
3329    /// built artifacts, if any.
3330    ///
3331    /// A user can list previously-requested builds or get builds by their ID to
3332    /// determine the status of the build.
3333    #[derive(Debug, Clone)]
3334    pub struct CloudBuildClient<T> {
3335        inner: tonic::client::Grpc<T>,
3336    }
3337    impl<T> CloudBuildClient<T>
3338    where
3339        T: tonic::client::GrpcService<tonic::body::Body>,
3340        T::Error: Into<StdError>,
3341        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3342        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3343    {
3344        pub fn new(inner: T) -> Self {
3345            let inner = tonic::client::Grpc::new(inner);
3346            Self { inner }
3347        }
3348        pub fn with_origin(inner: T, origin: Uri) -> Self {
3349            let inner = tonic::client::Grpc::with_origin(inner, origin);
3350            Self { inner }
3351        }
3352        pub fn with_interceptor<F>(
3353            inner: T,
3354            interceptor: F,
3355        ) -> CloudBuildClient<InterceptedService<T, F>>
3356        where
3357            F: tonic::service::Interceptor,
3358            T::ResponseBody: Default,
3359            T: tonic::codegen::Service<
3360                http::Request<tonic::body::Body>,
3361                Response = http::Response<
3362                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
3363                >,
3364            >,
3365            <T as tonic::codegen::Service<
3366                http::Request<tonic::body::Body>,
3367            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3368        {
3369            CloudBuildClient::new(InterceptedService::new(inner, interceptor))
3370        }
3371        /// Compress requests with the given encoding.
3372        ///
3373        /// This requires the server to support it otherwise it might respond with an
3374        /// error.
3375        #[must_use]
3376        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3377            self.inner = self.inner.send_compressed(encoding);
3378            self
3379        }
3380        /// Enable decompressing responses.
3381        #[must_use]
3382        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3383            self.inner = self.inner.accept_compressed(encoding);
3384            self
3385        }
3386        /// Limits the maximum size of a decoded message.
3387        ///
3388        /// Default: `4MB`
3389        #[must_use]
3390        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3391            self.inner = self.inner.max_decoding_message_size(limit);
3392            self
3393        }
3394        /// Limits the maximum size of an encoded message.
3395        ///
3396        /// Default: `usize::MAX`
3397        #[must_use]
3398        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3399            self.inner = self.inner.max_encoding_message_size(limit);
3400            self
3401        }
3402        /// Starts a build with the specified configuration.
3403        ///
3404        /// This method returns a long-running `Operation`, which includes the build
3405        /// ID. Pass the build ID to `GetBuild` to determine the build status (such as
3406        /// `SUCCESS` or `FAILURE`).
3407        pub async fn create_build(
3408            &mut self,
3409            request: impl tonic::IntoRequest<super::CreateBuildRequest>,
3410        ) -> std::result::Result<
3411            tonic::Response<super::super::super::super::longrunning::Operation>,
3412            tonic::Status,
3413        > {
3414            self.inner
3415                .ready()
3416                .await
3417                .map_err(|e| {
3418                    tonic::Status::unknown(
3419                        format!("Service was not ready: {}", e.into()),
3420                    )
3421                })?;
3422            let codec = tonic_prost::ProstCodec::default();
3423            let path = http::uri::PathAndQuery::from_static(
3424                "/google.devtools.cloudbuild.v1.CloudBuild/CreateBuild",
3425            );
3426            let mut req = request.into_request();
3427            req.extensions_mut()
3428                .insert(
3429                    GrpcMethod::new(
3430                        "google.devtools.cloudbuild.v1.CloudBuild",
3431                        "CreateBuild",
3432                    ),
3433                );
3434            self.inner.unary(req, path, codec).await
3435        }
3436        /// Returns information about a previously requested build.
3437        ///
3438        /// The `Build` that is returned includes its status (such as `SUCCESS`,
3439        /// `FAILURE`, or `WORKING`), and timing information.
3440        pub async fn get_build(
3441            &mut self,
3442            request: impl tonic::IntoRequest<super::GetBuildRequest>,
3443        ) -> std::result::Result<tonic::Response<super::Build>, tonic::Status> {
3444            self.inner
3445                .ready()
3446                .await
3447                .map_err(|e| {
3448                    tonic::Status::unknown(
3449                        format!("Service was not ready: {}", e.into()),
3450                    )
3451                })?;
3452            let codec = tonic_prost::ProstCodec::default();
3453            let path = http::uri::PathAndQuery::from_static(
3454                "/google.devtools.cloudbuild.v1.CloudBuild/GetBuild",
3455            );
3456            let mut req = request.into_request();
3457            req.extensions_mut()
3458                .insert(
3459                    GrpcMethod::new(
3460                        "google.devtools.cloudbuild.v1.CloudBuild",
3461                        "GetBuild",
3462                    ),
3463                );
3464            self.inner.unary(req, path, codec).await
3465        }
3466        /// Lists previously requested builds.
3467        ///
3468        /// Previously requested builds may still be in-progress, or may have finished
3469        /// successfully or unsuccessfully.
3470        pub async fn list_builds(
3471            &mut self,
3472            request: impl tonic::IntoRequest<super::ListBuildsRequest>,
3473        ) -> std::result::Result<
3474            tonic::Response<super::ListBuildsResponse>,
3475            tonic::Status,
3476        > {
3477            self.inner
3478                .ready()
3479                .await
3480                .map_err(|e| {
3481                    tonic::Status::unknown(
3482                        format!("Service was not ready: {}", e.into()),
3483                    )
3484                })?;
3485            let codec = tonic_prost::ProstCodec::default();
3486            let path = http::uri::PathAndQuery::from_static(
3487                "/google.devtools.cloudbuild.v1.CloudBuild/ListBuilds",
3488            );
3489            let mut req = request.into_request();
3490            req.extensions_mut()
3491                .insert(
3492                    GrpcMethod::new(
3493                        "google.devtools.cloudbuild.v1.CloudBuild",
3494                        "ListBuilds",
3495                    ),
3496                );
3497            self.inner.unary(req, path, codec).await
3498        }
3499        /// Cancels a build in progress.
3500        pub async fn cancel_build(
3501            &mut self,
3502            request: impl tonic::IntoRequest<super::CancelBuildRequest>,
3503        ) -> std::result::Result<tonic::Response<super::Build>, tonic::Status> {
3504            self.inner
3505                .ready()
3506                .await
3507                .map_err(|e| {
3508                    tonic::Status::unknown(
3509                        format!("Service was not ready: {}", e.into()),
3510                    )
3511                })?;
3512            let codec = tonic_prost::ProstCodec::default();
3513            let path = http::uri::PathAndQuery::from_static(
3514                "/google.devtools.cloudbuild.v1.CloudBuild/CancelBuild",
3515            );
3516            let mut req = request.into_request();
3517            req.extensions_mut()
3518                .insert(
3519                    GrpcMethod::new(
3520                        "google.devtools.cloudbuild.v1.CloudBuild",
3521                        "CancelBuild",
3522                    ),
3523                );
3524            self.inner.unary(req, path, codec).await
3525        }
3526        /// Creates a new build based on the specified build.
3527        ///
3528        /// This method creates a new build using the original build request, which may
3529        /// or may not result in an identical build.
3530        ///
3531        /// For triggered builds:
3532        ///
3533        /// * Triggered builds resolve to a precise revision; therefore a retry of a
3534        ///  triggered build will result in a build that uses the same revision.
3535        ///
3536        /// For non-triggered builds that specify `RepoSource`:
3537        ///
3538        /// * If the original build built from the tip of a branch, the retried build
3539        ///  will build from the tip of that branch, which may not be the same revision
3540        ///  as the original build.
3541        /// * If the original build specified a commit sha or revision ID, the retried
3542        ///  build will use the identical source.
3543        ///
3544        /// For builds that specify `StorageSource`:
3545        ///
3546        /// * If the original build pulled source from Cloud Storage without
3547        ///  specifying the generation of the object, the new build will use the current
3548        ///  object, which may be different from the original build source.
3549        /// * If the original build pulled source from Cloud Storage and specified the
3550        ///  generation of the object, the new build will attempt to use the same
3551        ///  object, which may or may not be available depending on the bucket's
3552        ///  lifecycle management settings.
3553        pub async fn retry_build(
3554            &mut self,
3555            request: impl tonic::IntoRequest<super::RetryBuildRequest>,
3556        ) -> std::result::Result<
3557            tonic::Response<super::super::super::super::longrunning::Operation>,
3558            tonic::Status,
3559        > {
3560            self.inner
3561                .ready()
3562                .await
3563                .map_err(|e| {
3564                    tonic::Status::unknown(
3565                        format!("Service was not ready: {}", e.into()),
3566                    )
3567                })?;
3568            let codec = tonic_prost::ProstCodec::default();
3569            let path = http::uri::PathAndQuery::from_static(
3570                "/google.devtools.cloudbuild.v1.CloudBuild/RetryBuild",
3571            );
3572            let mut req = request.into_request();
3573            req.extensions_mut()
3574                .insert(
3575                    GrpcMethod::new(
3576                        "google.devtools.cloudbuild.v1.CloudBuild",
3577                        "RetryBuild",
3578                    ),
3579                );
3580            self.inner.unary(req, path, codec).await
3581        }
3582        /// Approves or rejects a pending build.
3583        ///
3584        /// If approved, the returned long-running operation (LRO) will be analogous to
3585        /// the LRO returned from a CreateBuild call.
3586        ///
3587        /// If rejected, the returned LRO will be immediately done.
3588        pub async fn approve_build(
3589            &mut self,
3590            request: impl tonic::IntoRequest<super::ApproveBuildRequest>,
3591        ) -> std::result::Result<
3592            tonic::Response<super::super::super::super::longrunning::Operation>,
3593            tonic::Status,
3594        > {
3595            self.inner
3596                .ready()
3597                .await
3598                .map_err(|e| {
3599                    tonic::Status::unknown(
3600                        format!("Service was not ready: {}", e.into()),
3601                    )
3602                })?;
3603            let codec = tonic_prost::ProstCodec::default();
3604            let path = http::uri::PathAndQuery::from_static(
3605                "/google.devtools.cloudbuild.v1.CloudBuild/ApproveBuild",
3606            );
3607            let mut req = request.into_request();
3608            req.extensions_mut()
3609                .insert(
3610                    GrpcMethod::new(
3611                        "google.devtools.cloudbuild.v1.CloudBuild",
3612                        "ApproveBuild",
3613                    ),
3614                );
3615            self.inner.unary(req, path, codec).await
3616        }
3617        /// Creates a new `BuildTrigger`.
3618        pub async fn create_build_trigger(
3619            &mut self,
3620            request: impl tonic::IntoRequest<super::CreateBuildTriggerRequest>,
3621        ) -> std::result::Result<tonic::Response<super::BuildTrigger>, tonic::Status> {
3622            self.inner
3623                .ready()
3624                .await
3625                .map_err(|e| {
3626                    tonic::Status::unknown(
3627                        format!("Service was not ready: {}", e.into()),
3628                    )
3629                })?;
3630            let codec = tonic_prost::ProstCodec::default();
3631            let path = http::uri::PathAndQuery::from_static(
3632                "/google.devtools.cloudbuild.v1.CloudBuild/CreateBuildTrigger",
3633            );
3634            let mut req = request.into_request();
3635            req.extensions_mut()
3636                .insert(
3637                    GrpcMethod::new(
3638                        "google.devtools.cloudbuild.v1.CloudBuild",
3639                        "CreateBuildTrigger",
3640                    ),
3641                );
3642            self.inner.unary(req, path, codec).await
3643        }
3644        /// Returns information about a `BuildTrigger`.
3645        pub async fn get_build_trigger(
3646            &mut self,
3647            request: impl tonic::IntoRequest<super::GetBuildTriggerRequest>,
3648        ) -> std::result::Result<tonic::Response<super::BuildTrigger>, tonic::Status> {
3649            self.inner
3650                .ready()
3651                .await
3652                .map_err(|e| {
3653                    tonic::Status::unknown(
3654                        format!("Service was not ready: {}", e.into()),
3655                    )
3656                })?;
3657            let codec = tonic_prost::ProstCodec::default();
3658            let path = http::uri::PathAndQuery::from_static(
3659                "/google.devtools.cloudbuild.v1.CloudBuild/GetBuildTrigger",
3660            );
3661            let mut req = request.into_request();
3662            req.extensions_mut()
3663                .insert(
3664                    GrpcMethod::new(
3665                        "google.devtools.cloudbuild.v1.CloudBuild",
3666                        "GetBuildTrigger",
3667                    ),
3668                );
3669            self.inner.unary(req, path, codec).await
3670        }
3671        /// Lists existing `BuildTrigger`s.
3672        pub async fn list_build_triggers(
3673            &mut self,
3674            request: impl tonic::IntoRequest<super::ListBuildTriggersRequest>,
3675        ) -> std::result::Result<
3676            tonic::Response<super::ListBuildTriggersResponse>,
3677            tonic::Status,
3678        > {
3679            self.inner
3680                .ready()
3681                .await
3682                .map_err(|e| {
3683                    tonic::Status::unknown(
3684                        format!("Service was not ready: {}", e.into()),
3685                    )
3686                })?;
3687            let codec = tonic_prost::ProstCodec::default();
3688            let path = http::uri::PathAndQuery::from_static(
3689                "/google.devtools.cloudbuild.v1.CloudBuild/ListBuildTriggers",
3690            );
3691            let mut req = request.into_request();
3692            req.extensions_mut()
3693                .insert(
3694                    GrpcMethod::new(
3695                        "google.devtools.cloudbuild.v1.CloudBuild",
3696                        "ListBuildTriggers",
3697                    ),
3698                );
3699            self.inner.unary(req, path, codec).await
3700        }
3701        /// Deletes a `BuildTrigger` by its project ID and trigger ID.
3702        pub async fn delete_build_trigger(
3703            &mut self,
3704            request: impl tonic::IntoRequest<super::DeleteBuildTriggerRequest>,
3705        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
3706            self.inner
3707                .ready()
3708                .await
3709                .map_err(|e| {
3710                    tonic::Status::unknown(
3711                        format!("Service was not ready: {}", e.into()),
3712                    )
3713                })?;
3714            let codec = tonic_prost::ProstCodec::default();
3715            let path = http::uri::PathAndQuery::from_static(
3716                "/google.devtools.cloudbuild.v1.CloudBuild/DeleteBuildTrigger",
3717            );
3718            let mut req = request.into_request();
3719            req.extensions_mut()
3720                .insert(
3721                    GrpcMethod::new(
3722                        "google.devtools.cloudbuild.v1.CloudBuild",
3723                        "DeleteBuildTrigger",
3724                    ),
3725                );
3726            self.inner.unary(req, path, codec).await
3727        }
3728        /// Updates a `BuildTrigger` by its project ID and trigger ID.
3729        pub async fn update_build_trigger(
3730            &mut self,
3731            request: impl tonic::IntoRequest<super::UpdateBuildTriggerRequest>,
3732        ) -> std::result::Result<tonic::Response<super::BuildTrigger>, tonic::Status> {
3733            self.inner
3734                .ready()
3735                .await
3736                .map_err(|e| {
3737                    tonic::Status::unknown(
3738                        format!("Service was not ready: {}", e.into()),
3739                    )
3740                })?;
3741            let codec = tonic_prost::ProstCodec::default();
3742            let path = http::uri::PathAndQuery::from_static(
3743                "/google.devtools.cloudbuild.v1.CloudBuild/UpdateBuildTrigger",
3744            );
3745            let mut req = request.into_request();
3746            req.extensions_mut()
3747                .insert(
3748                    GrpcMethod::new(
3749                        "google.devtools.cloudbuild.v1.CloudBuild",
3750                        "UpdateBuildTrigger",
3751                    ),
3752                );
3753            self.inner.unary(req, path, codec).await
3754        }
3755        /// Runs a `BuildTrigger` at a particular source revision.
3756        ///
3757        /// To run a regional or global trigger, use the POST request
3758        /// that includes the location endpoint in the path (ex.
3759        /// v1/projects/{projectId}/locations/{region}/triggers/{triggerId}:run). The
3760        /// POST request that does not include the location endpoint in the path can
3761        /// only be used when running global triggers.
3762        pub async fn run_build_trigger(
3763            &mut self,
3764            request: impl tonic::IntoRequest<super::RunBuildTriggerRequest>,
3765        ) -> std::result::Result<
3766            tonic::Response<super::super::super::super::longrunning::Operation>,
3767            tonic::Status,
3768        > {
3769            self.inner
3770                .ready()
3771                .await
3772                .map_err(|e| {
3773                    tonic::Status::unknown(
3774                        format!("Service was not ready: {}", e.into()),
3775                    )
3776                })?;
3777            let codec = tonic_prost::ProstCodec::default();
3778            let path = http::uri::PathAndQuery::from_static(
3779                "/google.devtools.cloudbuild.v1.CloudBuild/RunBuildTrigger",
3780            );
3781            let mut req = request.into_request();
3782            req.extensions_mut()
3783                .insert(
3784                    GrpcMethod::new(
3785                        "google.devtools.cloudbuild.v1.CloudBuild",
3786                        "RunBuildTrigger",
3787                    ),
3788                );
3789            self.inner.unary(req, path, codec).await
3790        }
3791        /// ReceiveTriggerWebhook \[Experimental\] is called when the API receives a
3792        /// webhook request targeted at a specific trigger.
3793        pub async fn receive_trigger_webhook(
3794            &mut self,
3795            request: impl tonic::IntoRequest<super::ReceiveTriggerWebhookRequest>,
3796        ) -> std::result::Result<
3797            tonic::Response<super::ReceiveTriggerWebhookResponse>,
3798            tonic::Status,
3799        > {
3800            self.inner
3801                .ready()
3802                .await
3803                .map_err(|e| {
3804                    tonic::Status::unknown(
3805                        format!("Service was not ready: {}", e.into()),
3806                    )
3807                })?;
3808            let codec = tonic_prost::ProstCodec::default();
3809            let path = http::uri::PathAndQuery::from_static(
3810                "/google.devtools.cloudbuild.v1.CloudBuild/ReceiveTriggerWebhook",
3811            );
3812            let mut req = request.into_request();
3813            req.extensions_mut()
3814                .insert(
3815                    GrpcMethod::new(
3816                        "google.devtools.cloudbuild.v1.CloudBuild",
3817                        "ReceiveTriggerWebhook",
3818                    ),
3819                );
3820            self.inner.unary(req, path, codec).await
3821        }
3822        /// Creates a `WorkerPool`.
3823        pub async fn create_worker_pool(
3824            &mut self,
3825            request: impl tonic::IntoRequest<super::CreateWorkerPoolRequest>,
3826        ) -> std::result::Result<
3827            tonic::Response<super::super::super::super::longrunning::Operation>,
3828            tonic::Status,
3829        > {
3830            self.inner
3831                .ready()
3832                .await
3833                .map_err(|e| {
3834                    tonic::Status::unknown(
3835                        format!("Service was not ready: {}", e.into()),
3836                    )
3837                })?;
3838            let codec = tonic_prost::ProstCodec::default();
3839            let path = http::uri::PathAndQuery::from_static(
3840                "/google.devtools.cloudbuild.v1.CloudBuild/CreateWorkerPool",
3841            );
3842            let mut req = request.into_request();
3843            req.extensions_mut()
3844                .insert(
3845                    GrpcMethod::new(
3846                        "google.devtools.cloudbuild.v1.CloudBuild",
3847                        "CreateWorkerPool",
3848                    ),
3849                );
3850            self.inner.unary(req, path, codec).await
3851        }
3852        /// Returns details of a `WorkerPool`.
3853        pub async fn get_worker_pool(
3854            &mut self,
3855            request: impl tonic::IntoRequest<super::GetWorkerPoolRequest>,
3856        ) -> std::result::Result<tonic::Response<super::WorkerPool>, tonic::Status> {
3857            self.inner
3858                .ready()
3859                .await
3860                .map_err(|e| {
3861                    tonic::Status::unknown(
3862                        format!("Service was not ready: {}", e.into()),
3863                    )
3864                })?;
3865            let codec = tonic_prost::ProstCodec::default();
3866            let path = http::uri::PathAndQuery::from_static(
3867                "/google.devtools.cloudbuild.v1.CloudBuild/GetWorkerPool",
3868            );
3869            let mut req = request.into_request();
3870            req.extensions_mut()
3871                .insert(
3872                    GrpcMethod::new(
3873                        "google.devtools.cloudbuild.v1.CloudBuild",
3874                        "GetWorkerPool",
3875                    ),
3876                );
3877            self.inner.unary(req, path, codec).await
3878        }
3879        /// Deletes a `WorkerPool`.
3880        pub async fn delete_worker_pool(
3881            &mut self,
3882            request: impl tonic::IntoRequest<super::DeleteWorkerPoolRequest>,
3883        ) -> std::result::Result<
3884            tonic::Response<super::super::super::super::longrunning::Operation>,
3885            tonic::Status,
3886        > {
3887            self.inner
3888                .ready()
3889                .await
3890                .map_err(|e| {
3891                    tonic::Status::unknown(
3892                        format!("Service was not ready: {}", e.into()),
3893                    )
3894                })?;
3895            let codec = tonic_prost::ProstCodec::default();
3896            let path = http::uri::PathAndQuery::from_static(
3897                "/google.devtools.cloudbuild.v1.CloudBuild/DeleteWorkerPool",
3898            );
3899            let mut req = request.into_request();
3900            req.extensions_mut()
3901                .insert(
3902                    GrpcMethod::new(
3903                        "google.devtools.cloudbuild.v1.CloudBuild",
3904                        "DeleteWorkerPool",
3905                    ),
3906                );
3907            self.inner.unary(req, path, codec).await
3908        }
3909        /// Updates a `WorkerPool`.
3910        pub async fn update_worker_pool(
3911            &mut self,
3912            request: impl tonic::IntoRequest<super::UpdateWorkerPoolRequest>,
3913        ) -> std::result::Result<
3914            tonic::Response<super::super::super::super::longrunning::Operation>,
3915            tonic::Status,
3916        > {
3917            self.inner
3918                .ready()
3919                .await
3920                .map_err(|e| {
3921                    tonic::Status::unknown(
3922                        format!("Service was not ready: {}", e.into()),
3923                    )
3924                })?;
3925            let codec = tonic_prost::ProstCodec::default();
3926            let path = http::uri::PathAndQuery::from_static(
3927                "/google.devtools.cloudbuild.v1.CloudBuild/UpdateWorkerPool",
3928            );
3929            let mut req = request.into_request();
3930            req.extensions_mut()
3931                .insert(
3932                    GrpcMethod::new(
3933                        "google.devtools.cloudbuild.v1.CloudBuild",
3934                        "UpdateWorkerPool",
3935                    ),
3936                );
3937            self.inner.unary(req, path, codec).await
3938        }
3939        /// Lists `WorkerPool`s.
3940        pub async fn list_worker_pools(
3941            &mut self,
3942            request: impl tonic::IntoRequest<super::ListWorkerPoolsRequest>,
3943        ) -> std::result::Result<
3944            tonic::Response<super::ListWorkerPoolsResponse>,
3945            tonic::Status,
3946        > {
3947            self.inner
3948                .ready()
3949                .await
3950                .map_err(|e| {
3951                    tonic::Status::unknown(
3952                        format!("Service was not ready: {}", e.into()),
3953                    )
3954                })?;
3955            let codec = tonic_prost::ProstCodec::default();
3956            let path = http::uri::PathAndQuery::from_static(
3957                "/google.devtools.cloudbuild.v1.CloudBuild/ListWorkerPools",
3958            );
3959            let mut req = request.into_request();
3960            req.extensions_mut()
3961                .insert(
3962                    GrpcMethod::new(
3963                        "google.devtools.cloudbuild.v1.CloudBuild",
3964                        "ListWorkerPools",
3965                    ),
3966                );
3967            self.inner.unary(req, path, codec).await
3968        }
3969        /// Returns the `DefaultServiceAccount` used by the project.
3970        pub async fn get_default_service_account(
3971            &mut self,
3972            request: impl tonic::IntoRequest<super::GetDefaultServiceAccountRequest>,
3973        ) -> std::result::Result<
3974            tonic::Response<super::DefaultServiceAccount>,
3975            tonic::Status,
3976        > {
3977            self.inner
3978                .ready()
3979                .await
3980                .map_err(|e| {
3981                    tonic::Status::unknown(
3982                        format!("Service was not ready: {}", e.into()),
3983                    )
3984                })?;
3985            let codec = tonic_prost::ProstCodec::default();
3986            let path = http::uri::PathAndQuery::from_static(
3987                "/google.devtools.cloudbuild.v1.CloudBuild/GetDefaultServiceAccount",
3988            );
3989            let mut req = request.into_request();
3990            req.extensions_mut()
3991                .insert(
3992                    GrpcMethod::new(
3993                        "google.devtools.cloudbuild.v1.CloudBuild",
3994                        "GetDefaultServiceAccount",
3995                    ),
3996                );
3997            self.inner.unary(req, path, codec).await
3998        }
3999    }
4000}