diff --git a/.kokoro/continuous/cloudbuild.cfg b/.kokoro/continuous/cloudbuild.cfg new file mode 100644 index 000000000000..695ad3787290 --- /dev/null +++ b/.kokoro/continuous/cloudbuild.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "PACKAGE" + value: "cloudbuild" +} diff --git a/.kokoro/docs/cloudbuild.cfg b/.kokoro/docs/cloudbuild.cfg new file mode 100644 index 000000000000..695ad3787290 --- /dev/null +++ b/.kokoro/docs/cloudbuild.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "PACKAGE" + value: "cloudbuild" +} diff --git a/.kokoro/presubmit/cloudbuild.cfg b/.kokoro/presubmit/cloudbuild.cfg new file mode 100644 index 000000000000..695ad3787290 --- /dev/null +++ b/.kokoro/presubmit/cloudbuild.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "PACKAGE" + value: "cloudbuild" +} diff --git a/.kokoro/release/cloudbuild.cfg b/.kokoro/release/cloudbuild.cfg new file mode 100644 index 000000000000..695ad3787290 --- /dev/null +++ b/.kokoro/release/cloudbuild.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "PACKAGE" + value: "cloudbuild" +} diff --git a/cloudbuild/.coveragerc b/cloudbuild/.coveragerc new file mode 100644 index 000000000000..b178b094aa1d --- /dev/null +++ b/cloudbuild/.coveragerc @@ -0,0 +1,19 @@ +# Generated by synthtool. DO NOT EDIT! +[run] +branch = True + +[report] +fail_under = 100 +show_missing = True +exclude_lines = + # Re-enable the standard pragma + pragma: NO COVER + # Ignore debug-only repr + def __repr__ + # Ignore abstract methods + raise NotImplementedError +omit = + */gapic/*.py + */proto/*.py + */core/*.py + */site-packages/*.py \ No newline at end of file diff --git a/cloudbuild/.flake8 b/cloudbuild/.flake8 new file mode 100644 index 000000000000..0268ecc9c55c --- /dev/null +++ b/cloudbuild/.flake8 @@ -0,0 +1,14 @@ +# Generated by synthtool. DO NOT EDIT! +[flake8] +ignore = E203, E266, E501, W503 +exclude = + # Exclude generated code. + **/proto/** + **/gapic/** + *_pb2.py + + # Standard linting exemptions. + __pycache__, + .git, + *.pyc, + conf.py diff --git a/cloudbuild/.repo-metadata.json b/cloudbuild/.repo-metadata.json new file mode 100644 index 000000000000..2fa277bbebf2 --- /dev/null +++ b/cloudbuild/.repo-metadata.json @@ -0,0 +1,13 @@ +{ + "name": "cloudbuild", + "name_pretty": "Cloud Build", + "product_documentation": "https://cloud.google.com/cloud-build/docs/", + "client_documentation": "https://googleapis.dev/python/cloudbuild/latest", + "issue_tracker": "https://issuetracker.google.com/savedsearches/5226584", + "release_level": "alpha", + "language": "python", + "repo": "googleapis/google-cloud-python", + "distribution_name": "google-cloud-build", + "api_id": "cloudbuild.googleapis.com", + "requires_billing": false +} \ No newline at end of file diff --git a/cloudbuild/CHANGELOG.md b/cloudbuild/CHANGELOG.md new file mode 100644 index 000000000000..579d876e9d14 --- /dev/null +++ b/cloudbuild/CHANGELOG.md @@ -0,0 +1,6 @@ +# Changelog + +[PyPI History][1] + +[1]: https://pypi.org/project/google-cloud-build/#history + diff --git a/cloudbuild/LICENSE b/cloudbuild/LICENSE new file mode 100644 index 000000000000..a8ee855de2aa --- /dev/null +++ b/cloudbuild/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cloudbuild/MANIFEST.in b/cloudbuild/MANIFEST.in new file mode 100644 index 000000000000..9cbf175afe6b --- /dev/null +++ b/cloudbuild/MANIFEST.in @@ -0,0 +1,5 @@ +include README.rst LICENSE +recursive-include google *.json *.proto +recursive-include tests * +global-exclude *.py[co] +global-exclude __pycache__ diff --git a/cloudbuild/README.rst b/cloudbuild/README.rst new file mode 100644 index 000000000000..da8f93730a63 --- /dev/null +++ b/cloudbuild/README.rst @@ -0,0 +1,75 @@ +Python Client for Cloud Build API (`Alpha`_) +============================================ + +`Cloud Build API`_: Creates and manages builds on Google Cloud Platform. + +- `Client Library Documentation`_ +- `Product Documentation`_ + +.. _Alpha: https://github.com/googleapis/google-cloud-python/blob/master/README.rst +.. _Cloud Build API: https://cloud.google.com/cloud-build +.. _Client Library Documentation: https://googleapis.github.io/google-cloud-python/latest/cloudbuild/usage.html +.. _Product Documentation: https://cloud.google.com/cloud-build + +Quick Start +----------- + +In order to use this library, you first need to go through the following steps: + +1. `Select or create a Cloud Platform project.`_ +2. `Enable billing for your project.`_ +3. `Enable the Cloud Build API.`_ +4. `Setup Authentication.`_ + +.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project +.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project +.. _Enable the Cloud Build API.: https://cloud.google.com/cloud-build +.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html + +Installation +~~~~~~~~~~~~ + +Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to +create isolated Python environments. The basic problem it addresses is one of +dependencies and versions, and indirectly permissions. + +With `virtualenv`_, it's possible to install this library without needing system +install permissions, and without clashing with the installed system +dependencies. + +.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/ + + +Mac/Linux +^^^^^^^^^ + +.. code-block:: console + + pip install virtualenv + virtualenv + source /bin/activate + /bin/pip install google-cloud-build + + +Windows +^^^^^^^ + +.. code-block:: console + + pip install virtualenv + virtualenv + \Scripts\activate + \Scripts\pip.exe install google-cloud-build + +Next Steps +~~~~~~~~~~ + +- Read the `Client Library Documentation`_ for Cloud Build API + API to see other available methods on the client. +- Read the `Cloud Build API Product documentation`_ to learn + more about the product and see How-to Guides. +- View this `repository’s main README`_ to see the full list of Cloud + APIs that we cover. + +.. _Cloud Build API Product documentation: https://cloud.google.com/cloud-build +.. _repository’s main README: https://github.com/googleapis/google-cloud-python/blob/master/README.rst \ No newline at end of file diff --git a/cloudbuild/docs/README.rst b/cloudbuild/docs/README.rst new file mode 120000 index 000000000000..89a0106941ff --- /dev/null +++ b/cloudbuild/docs/README.rst @@ -0,0 +1 @@ +../README.rst \ No newline at end of file diff --git a/cloudbuild/docs/changelog.md b/cloudbuild/docs/changelog.md new file mode 120000 index 000000000000..04c99a55caae --- /dev/null +++ b/cloudbuild/docs/changelog.md @@ -0,0 +1 @@ +../CHANGELOG.md \ No newline at end of file diff --git a/cloudbuild/docs/conf.py b/cloudbuild/docs/conf.py new file mode 100644 index 000000000000..6afa33d99f41 --- /dev/null +++ b/cloudbuild/docs/conf.py @@ -0,0 +1,357 @@ +# -*- coding: utf-8 -*- +# +# google-cloud-build documentation build configuration file +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import os +import shlex + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath("..")) + +__version__ = "0.1.0" + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +needs_sphinx = "1.6.3" + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.autosummary", + "sphinx.ext.intersphinx", + "sphinx.ext.coverage", + "sphinx.ext.napoleon", + "sphinx.ext.todo", + "sphinx.ext.viewcode", +] + +# autodoc/autosummary flags +autoclass_content = "both" +autodoc_default_flags = ["members"] +autosummary_generate = True + + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# Allow markdown includes (so releases.md can include CHANGLEOG.md) +# http://www.sphinx-doc.org/en/master/markdown.html +source_parsers = {".md": "recommonmark.parser.CommonMarkParser"} + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# source_suffix = ['.rst', '.md'] +source_suffix = [".rst", ".md"] + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = "index" + +# General information about the project. +project = u"google-cloud-build" +copyright = u"2017, Google" +author = u"Google APIs" + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The full version, including alpha/beta/rc tags. +release = __version__ +# The short X.Y version. +version = ".".join(release.split(".")[0:2]) + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# today = '' +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ["_build"] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = "sphinx" + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +# keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = True + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = "alabaster" + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +html_theme_options = { + "description": "Google Cloud Client Libraries for Python", + "github_user": "googleapis", + "github_repo": "google-cloud-python", + "github_banner": True, + "font_family": "'Roboto', Georgia, sans", + "head_font_family": "'Roboto', Georgia, serif", + "code_font_family": "'Roboto Mono', 'Consolas', monospace", +} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +# html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +# html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +# html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +# html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +# html_static_path = [] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +# html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +# html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# html_additional_pages = {} + +# If false, no module index is generated. +# html_domain_indices = True + +# If false, no index is generated. +# html_use_index = True + +# If true, the index is split into individual pages for each letter. +# html_split_index = False + +# If true, links to the reST sources are added to the pages. +# html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +# html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' +# html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# Now only 'ja' uses this config value +# html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +# html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = "google-cloud-build-doc" + +# -- Options for warnings ------------------------------------------------------ + + +suppress_warnings = [ + # Temporarily suppress this to avoid "more than one target found for + # cross-reference" warning, which are intractable for us to avoid while in + # a mono-repo. + # See https://github.com/sphinx-doc/sphinx/blob + # /2a65ffeef5c107c19084fabdd706cdff3f52d93c/sphinx/domains/python.py#L843 + "ref.python" +] + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + #'papersize': 'letterpaper', + # The font size ('10pt', '11pt' or '12pt'). + #'pointsize': '10pt', + # Additional stuff for the LaTeX preamble. + #'preamble': '', + # Latex figure (float) alignment + #'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ( + master_doc, + "google-cloud-build.tex", + u"google-cloud-build Documentation", + author, + "manual", + ) +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# latex_use_parts = False + +# If true, show page references after internal links. +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, "google-cloud-build", u"google-cloud-build Documentation", [author], 1) +] + +# If true, show URL addresses after external links. +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ( + master_doc, + "google-cloud-build", + u"google-cloud-build Documentation", + author, + "google-cloud-build", + "GAPIC library for the {metadata.shortName} v1 service", + "APIs", + ) +] + +# Documents to append as an appendix to all manuals. +# texinfo_appendices = [] + +# If false, no module index is generated. +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +# texinfo_no_detailmenu = False + + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = { + "python": ("http://python.readthedocs.org/en/latest/", None), + "gax": ("https://gax-python.readthedocs.org/en/latest/", None), + "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), + "google-gax": ("https://gax-python.readthedocs.io/en/latest/", None), + "google.api_core": ("https://googleapis.dev/python/google-api-core/latest", None), + "grpc": ("https://grpc.io/grpc/python/", None), + "requests": ("https://requests.kennethreitz.org/en/master/", None), + "fastavro": ("https://fastavro.readthedocs.io/en/stable/", None), + "pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None), +} + + +# Napoleon settings +napoleon_google_docstring = True +napoleon_numpy_docstring = True +napoleon_include_private_with_doc = False +napoleon_include_special_with_doc = True +napoleon_use_admonition_for_examples = False +napoleon_use_admonition_for_notes = False +napoleon_use_admonition_for_references = False +napoleon_use_ivar = False +napoleon_use_param = True +napoleon_use_rtype = True diff --git a/cloudbuild/docs/gapic/v1/api.rst b/cloudbuild/docs/gapic/v1/api.rst new file mode 100644 index 000000000000..b73769d5c2a1 --- /dev/null +++ b/cloudbuild/docs/gapic/v1/api.rst @@ -0,0 +1,6 @@ +Client for Cloud Build API +========================== + +.. automodule:: google.cloud.devtools.cloudbuild_v1 + :members: + :inherited-members: \ No newline at end of file diff --git a/cloudbuild/docs/gapic/v1/types.rst b/cloudbuild/docs/gapic/v1/types.rst new file mode 100644 index 000000000000..db501043e959 --- /dev/null +++ b/cloudbuild/docs/gapic/v1/types.rst @@ -0,0 +1,5 @@ +Types for Cloud Build API Client +================================ + +.. automodule:: google.cloud.devtools.cloudbuild_v1.types + :members: \ No newline at end of file diff --git a/cloudbuild/docs/index.rst b/cloudbuild/docs/index.rst new file mode 100644 index 000000000000..382348916108 --- /dev/null +++ b/cloudbuild/docs/index.rst @@ -0,0 +1,22 @@ +.. include:: README.rst + + +API Reference +------------- + +.. toctree:: + :maxdepth: 2 + + gapic/v1/api + gapic/v1/types + + +Changelog +--------- + +For a list of all ``google-cloud-build`` releases: + +.. toctree:: + :maxdepth: 2 + + changelog diff --git a/cloudbuild/google/__init__.py b/cloudbuild/google/__init__.py new file mode 100644 index 000000000000..8fcc60e2b9c6 --- /dev/null +++ b/cloudbuild/google/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +try: + import pkg_resources + + pkg_resources.declare_namespace(__name__) +except ImportError: + import pkgutil + + __path__ = pkgutil.extend_path(__path__, __name__) diff --git a/cloudbuild/google/cloud/__init__.py b/cloudbuild/google/cloud/__init__.py new file mode 100644 index 000000000000..8fcc60e2b9c6 --- /dev/null +++ b/cloudbuild/google/cloud/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +try: + import pkg_resources + + pkg_resources.declare_namespace(__name__) +except ImportError: + import pkgutil + + __path__ = pkgutil.extend_path(__path__, __name__) diff --git a/cloudbuild/google/cloud/devtools/__init__.py b/cloudbuild/google/cloud/devtools/__init__.py new file mode 100644 index 000000000000..8fcc60e2b9c6 --- /dev/null +++ b/cloudbuild/google/cloud/devtools/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +try: + import pkg_resources + + pkg_resources.declare_namespace(__name__) +except ImportError: + import pkgutil + + __path__ = pkgutil.extend_path(__path__, __name__) diff --git a/cloudbuild/google/cloud/devtools/cloudbuild.py b/cloudbuild/google/cloud/devtools/cloudbuild.py new file mode 100644 index 000000000000..b2cca3a5e07f --- /dev/null +++ b/cloudbuild/google/cloud/devtools/cloudbuild.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import absolute_import + +from google.cloud.devtools.cloudbuild_v1 import CloudBuildClient +from google.cloud.devtools.cloudbuild_v1 import enums +from google.cloud.devtools.cloudbuild_v1 import types + + +__all__ = ("enums", "types", "CloudBuildClient") diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/__init__.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/__init__.py new file mode 100644 index 000000000000..4e82e772fa0d --- /dev/null +++ b/cloudbuild/google/cloud/devtools/cloudbuild_v1/__init__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import absolute_import + +from google.cloud.devtools.cloudbuild_v1 import types +from google.cloud.devtools.cloudbuild_v1.gapic import cloud_build_client +from google.cloud.devtools.cloudbuild_v1.gapic import enums + + +class CloudBuildClient(cloud_build_client.CloudBuildClient): + __doc__ = cloud_build_client.CloudBuildClient.__doc__ + enums = enums + + +__all__ = ("enums", "types", "CloudBuildClient") diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/__init__.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/cloud_build_client.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/cloud_build_client.py new file mode 100644 index 000000000000..675f033b2666 --- /dev/null +++ b/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/cloud_build_client.py @@ -0,0 +1,1334 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Accesses the google.devtools.cloudbuild.v1 CloudBuild API.""" + +import functools +import pkg_resources +import warnings + +from google.oauth2 import service_account +import google.api_core.client_options +import google.api_core.gapic_v1.client_info +import google.api_core.gapic_v1.config +import google.api_core.gapic_v1.method +import google.api_core.gapic_v1.routing_header +import google.api_core.grpc_helpers +import google.api_core.page_iterator +import grpc + +from google.cloud.devtools.cloudbuild_v1.gapic import cloud_build_client_config +from google.cloud.devtools.cloudbuild_v1.gapic import enums +from google.cloud.devtools.cloudbuild_v1.gapic.transports import ( + cloud_build_grpc_transport, +) +from google.cloud.devtools.cloudbuild_v1.proto import cloudbuild_pb2 +from google.cloud.devtools.cloudbuild_v1.proto import cloudbuild_pb2_grpc +from google.longrunning import operations_pb2 +from google.protobuf import empty_pb2 + + +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-build").version + + +class CloudBuildClient(object): + """ + Creates and manages builds on Google Cloud Platform. + + The main concept used by this API is a ``Build``, which describes the + location of the source to build, how to build the source, and where to + store the built artifacts, if any. + + A user can list previously-requested builds or get builds by their ID to + determine the status of the build. + """ + + SERVICE_ADDRESS = "cloudbuild.googleapis.com:443" + """The default address of the service.""" + + # The name of the interface for this client. This is the key used to + # find the method configuration in the client_config dictionary. + _INTERFACE_NAME = "google.devtools.cloudbuild.v1.CloudBuild" + + @classmethod + def from_service_account_file(cls, filename, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + CloudBuildClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + def __init__( + self, + transport=None, + channel=None, + credentials=None, + client_config=None, + client_info=None, + client_options=None, + ): + """Constructor. + + Args: + transport (Union[~.CloudBuildGrpcTransport, + Callable[[~.Credentials, type], ~.CloudBuildGrpcTransport]): A transport + instance, responsible for actually making the API calls. + The default transport uses the gRPC protocol. + This argument may also be a callable which returns a + transport instance. Callables will be sent the credentials + as the first argument and the default transport class as + the second argument. + channel (grpc.Channel): DEPRECATED. A ``Channel`` instance + through which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. + credentials (google.auth.credentials.Credentials): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If none + are specified, the client will attempt to ascertain the + credentials from the environment. + This argument is mutually exclusive with providing a + transport instance to ``transport``; doing so will raise + an exception. + client_config (dict): DEPRECATED. A dictionary of call options for + each method. If not specified, the default configuration is used. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + client_options (Union[dict, google.api_core.client_options.ClientOptions]): + Client options used to set user options on the client. API Endpoint + should be set through client_options. + """ + # Raise deprecation warnings for things we want to go away. + if client_config is not None: + warnings.warn( + "The `client_config` argument is deprecated.", + PendingDeprecationWarning, + stacklevel=2, + ) + else: + client_config = cloud_build_client_config.config + + if channel: + warnings.warn( + "The `channel` argument is deprecated; use " "`transport` instead.", + PendingDeprecationWarning, + stacklevel=2, + ) + + api_endpoint = self.SERVICE_ADDRESS + if client_options: + if type(client_options) == dict: + client_options = google.api_core.client_options.from_dict( + client_options + ) + if client_options.api_endpoint: + api_endpoint = client_options.api_endpoint + + # Instantiate the transport. + # The transport is responsible for handling serialization and + # deserialization and actually sending data to the service. + if transport: + if callable(transport): + self.transport = transport( + credentials=credentials, + default_class=cloud_build_grpc_transport.CloudBuildGrpcTransport, + address=api_endpoint, + ) + else: + if credentials: + raise ValueError( + "Received both a transport instance and " + "credentials; these are mutually exclusive." + ) + self.transport = transport + else: + self.transport = cloud_build_grpc_transport.CloudBuildGrpcTransport( + address=api_endpoint, channel=channel, credentials=credentials + ) + + if client_info is None: + client_info = google.api_core.gapic_v1.client_info.ClientInfo( + gapic_version=_GAPIC_LIBRARY_VERSION + ) + else: + client_info.gapic_version = _GAPIC_LIBRARY_VERSION + self._client_info = client_info + + # Parse out the default settings for retry and timeout for each RPC + # from the client configuration. + # (Ordinarily, these are the defaults specified in the `*_config.py` + # file next to this one.) + self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( + client_config["interfaces"][self._INTERFACE_NAME] + ) + + # Save a dictionary of cached API call functions. + # These are the actual callables which invoke the proper + # transport methods, wrapped with `wrap_method` to add retry, + # timeout, and the like. + self._inner_api_calls = {} + + # Service calls + def create_build( + self, + project_id, + build, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Starts a build with the specified configuration. + + This method returns a long-running ``Operation``, which includes the + build ID. Pass the build ID to ``GetBuild`` to determine the build + status (such as ``SUCCESS`` or ``FAILURE``). + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> # TODO: Initialize `project_id`: + >>> project_id = '' + >>> + >>> # TODO: Initialize `build`: + >>> build = {} + >>> + >>> response = client.create_build(project_id, build) + + Args: + project_id (str): Required. ID of the project. + build (Union[dict, ~google.cloud.devtools.cloudbuild_v1.types.Build]): Required. Build resource to create. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.devtools.cloudbuild_v1.types.Build` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.Operation` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "create_build" not in self._inner_api_calls: + self._inner_api_calls[ + "create_build" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.create_build, + default_retry=self._method_configs["CreateBuild"].retry, + default_timeout=self._method_configs["CreateBuild"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.CreateBuildRequest(project_id=project_id, build=build) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("project_id", project_id)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + return self._inner_api_calls["create_build"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def get_build( + self, + project_id, + id_, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Returns information about a previously requested build. + + The ``Build`` that is returned includes its status (such as ``SUCCESS``, + ``FAILURE``, or ``WORKING``), and timing information. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> # TODO: Initialize `project_id`: + >>> project_id = '' + >>> + >>> # TODO: Initialize `id_`: + >>> id_ = '' + >>> + >>> response = client.get_build(project_id, id_) + + Args: + project_id (str): Required. ID of the project. + id_ (str): Required. ID of the build. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.Build` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "get_build" not in self._inner_api_calls: + self._inner_api_calls[ + "get_build" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.get_build, + default_retry=self._method_configs["GetBuild"].retry, + default_timeout=self._method_configs["GetBuild"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.GetBuildRequest(project_id=project_id, id=id_) + return self._inner_api_calls["get_build"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def list_builds( + self, + project_id, + page_size=None, + filter_=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Lists previously requested builds. + + Previously requested builds may still be in-progress, or may have finished + successfully or unsuccessfully. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> # TODO: Initialize `project_id`: + >>> project_id = '' + >>> + >>> # Iterate over all results + >>> for element in client.list_builds(project_id): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_builds(project_id).pages: + ... for element in page: + ... # process element + ... pass + + Args: + project_id (str): Required. ID of the project. + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + filter_ (str): The raw filter text to constrain the results. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.api_core.page_iterator.PageIterator` instance. + An iterable of :class:`~google.cloud.devtools.cloudbuild_v1.types.Build` instances. + You can also iterate over the pages of the response + using its `pages` property. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "list_builds" not in self._inner_api_calls: + self._inner_api_calls[ + "list_builds" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_builds, + default_retry=self._method_configs["ListBuilds"].retry, + default_timeout=self._method_configs["ListBuilds"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.ListBuildsRequest( + project_id=project_id, page_size=page_size, filter=filter_ + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("project_id", project_id)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_builds"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="builds", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator + + def cancel_build( + self, + project_id, + id_, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Cancels a build in progress. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> # TODO: Initialize `project_id`: + >>> project_id = '' + >>> + >>> # TODO: Initialize `id_`: + >>> id_ = '' + >>> + >>> response = client.cancel_build(project_id, id_) + + Args: + project_id (str): Required. ID of the project. + id_ (str): Required. ID of the build. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.Build` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "cancel_build" not in self._inner_api_calls: + self._inner_api_calls[ + "cancel_build" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.cancel_build, + default_retry=self._method_configs["CancelBuild"].retry, + default_timeout=self._method_configs["CancelBuild"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.CancelBuildRequest(project_id=project_id, id=id_) + return self._inner_api_calls["cancel_build"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def create_build_trigger( + self, + project_id, + trigger, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Creates a new ``BuildTrigger``. + + This API is experimental. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> # TODO: Initialize `project_id`: + >>> project_id = '' + >>> + >>> # TODO: Initialize `trigger`: + >>> trigger = {} + >>> + >>> response = client.create_build_trigger(project_id, trigger) + + Args: + project_id (str): Required. ID of the project for which to configure automatic builds. + trigger (Union[dict, ~google.cloud.devtools.cloudbuild_v1.types.BuildTrigger]): Required. ``BuildTrigger`` to create. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.devtools.cloudbuild_v1.types.BuildTrigger` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.BuildTrigger` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "create_build_trigger" not in self._inner_api_calls: + self._inner_api_calls[ + "create_build_trigger" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.create_build_trigger, + default_retry=self._method_configs["CreateBuildTrigger"].retry, + default_timeout=self._method_configs["CreateBuildTrigger"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.CreateBuildTriggerRequest( + project_id=project_id, trigger=trigger + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("project_id", project_id)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + return self._inner_api_calls["create_build_trigger"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def get_build_trigger( + self, + project_id, + trigger_id, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Returns information about a ``BuildTrigger``. + + This API is experimental. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> # TODO: Initialize `project_id`: + >>> project_id = '' + >>> + >>> # TODO: Initialize `trigger_id`: + >>> trigger_id = '' + >>> + >>> response = client.get_build_trigger(project_id, trigger_id) + + Args: + project_id (str): Required. ID of the project that owns the trigger. + trigger_id (str): Required. ID of the ``BuildTrigger`` to get. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.BuildTrigger` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "get_build_trigger" not in self._inner_api_calls: + self._inner_api_calls[ + "get_build_trigger" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.get_build_trigger, + default_retry=self._method_configs["GetBuildTrigger"].retry, + default_timeout=self._method_configs["GetBuildTrigger"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.GetBuildTriggerRequest( + project_id=project_id, trigger_id=trigger_id + ) + return self._inner_api_calls["get_build_trigger"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def list_build_triggers( + self, + project_id, + page_size=None, + page_token=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Lists existing ``BuildTrigger``\ s. + + This API is experimental. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> # TODO: Initialize `project_id`: + >>> project_id = '' + >>> + >>> response = client.list_build_triggers(project_id) + + Args: + project_id (str): Required. ID of the project for which to list BuildTriggers. + page_size (int): Number of results to return in the list. + page_token (str): Token to provide to skip to a particular spot in the list. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.ListBuildTriggersResponse` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "list_build_triggers" not in self._inner_api_calls: + self._inner_api_calls[ + "list_build_triggers" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_build_triggers, + default_retry=self._method_configs["ListBuildTriggers"].retry, + default_timeout=self._method_configs["ListBuildTriggers"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.ListBuildTriggersRequest( + project_id=project_id, page_size=page_size, page_token=page_token + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("project_id", project_id)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + return self._inner_api_calls["list_build_triggers"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def delete_build_trigger( + self, + project_id, + trigger_id, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes a ``BuildTrigger`` by its project ID and trigger ID. + + This API is experimental. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> # TODO: Initialize `project_id`: + >>> project_id = '' + >>> + >>> # TODO: Initialize `trigger_id`: + >>> trigger_id = '' + >>> + >>> client.delete_build_trigger(project_id, trigger_id) + + Args: + project_id (str): Required. ID of the project that owns the trigger. + trigger_id (str): Required. ID of the ``BuildTrigger`` to delete. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_build_trigger" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_build_trigger" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_build_trigger, + default_retry=self._method_configs["DeleteBuildTrigger"].retry, + default_timeout=self._method_configs["DeleteBuildTrigger"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.DeleteBuildTriggerRequest( + project_id=project_id, trigger_id=trigger_id + ) + self._inner_api_calls["delete_build_trigger"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def update_build_trigger( + self, + project_id, + trigger_id, + trigger, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Updates a ``BuildTrigger`` by its project ID and trigger ID. + + This API is experimental. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> # TODO: Initialize `project_id`: + >>> project_id = '' + >>> + >>> # TODO: Initialize `trigger_id`: + >>> trigger_id = '' + >>> + >>> # TODO: Initialize `trigger`: + >>> trigger = {} + >>> + >>> response = client.update_build_trigger(project_id, trigger_id, trigger) + + Args: + project_id (str): Required. ID of the project that owns the trigger. + trigger_id (str): Required. ID of the ``BuildTrigger`` to update. + trigger (Union[dict, ~google.cloud.devtools.cloudbuild_v1.types.BuildTrigger]): Required. ``BuildTrigger`` to update. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.devtools.cloudbuild_v1.types.BuildTrigger` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.BuildTrigger` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "update_build_trigger" not in self._inner_api_calls: + self._inner_api_calls[ + "update_build_trigger" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.update_build_trigger, + default_retry=self._method_configs["UpdateBuildTrigger"].retry, + default_timeout=self._method_configs["UpdateBuildTrigger"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.UpdateBuildTriggerRequest( + project_id=project_id, trigger_id=trigger_id, trigger=trigger + ) + return self._inner_api_calls["update_build_trigger"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def run_build_trigger( + self, + project_id, + trigger_id, + source, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Runs a ``BuildTrigger`` at a particular source revision. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> # TODO: Initialize `project_id`: + >>> project_id = '' + >>> + >>> # TODO: Initialize `trigger_id`: + >>> trigger_id = '' + >>> + >>> # TODO: Initialize `source`: + >>> source = {} + >>> + >>> response = client.run_build_trigger(project_id, trigger_id, source) + + Args: + project_id (str): Required. ID of the project. + trigger_id (str): Required. ID of the trigger. + source (Union[dict, ~google.cloud.devtools.cloudbuild_v1.types.RepoSource]): Required. Source to build against this trigger. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.devtools.cloudbuild_v1.types.RepoSource` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.Operation` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "run_build_trigger" not in self._inner_api_calls: + self._inner_api_calls[ + "run_build_trigger" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.run_build_trigger, + default_retry=self._method_configs["RunBuildTrigger"].retry, + default_timeout=self._method_configs["RunBuildTrigger"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.RunBuildTriggerRequest( + project_id=project_id, trigger_id=trigger_id, source=source + ) + return self._inner_api_calls["run_build_trigger"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def retry_build( + self, + project_id, + id_, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Creates a new build based on the specified build. + + This method creates a new build using the original build request, which + may or may not result in an identical build. + + For triggered builds: + + - Triggered builds resolve to a precise revision; therefore a retry of + a triggered build will result in a build that uses the same revision. + + For non-triggered builds that specify ``RepoSource``: + + - If the original build built from the tip of a branch, the retried + build will build from the tip of that branch, which may not be the + same revision as the original build. + - If the original build specified a commit sha or revision ID, the + retried build will use the identical source. + + For builds that specify ``StorageSource``: + + - If the original build pulled source from Google Cloud Storage without + specifying the generation of the object, the new build will use the + current object, which may be different from the original build + source. + - If the original build pulled source from Cloud Storage and specified + the generation of the object, the new build will attempt to use the + same object, which may or may not be available depending on the + bucket's lifecycle management settings. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> # TODO: Initialize `project_id`: + >>> project_id = '' + >>> + >>> # TODO: Initialize `id_`: + >>> id_ = '' + >>> + >>> response = client.retry_build(project_id, id_) + + Args: + project_id (str): Required. ID of the project. + id_ (str): Required. Build ID of the original build. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.Operation` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "retry_build" not in self._inner_api_calls: + self._inner_api_calls[ + "retry_build" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.retry_build, + default_retry=self._method_configs["RetryBuild"].retry, + default_timeout=self._method_configs["RetryBuild"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.RetryBuildRequest(project_id=project_id, id=id_) + return self._inner_api_calls["retry_build"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def create_worker_pool( + self, + parent=None, + worker_pool=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Creates a ``WorkerPool`` to run the builds, and returns the new worker + pool. + + This API is experimental. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> response = client.create_worker_pool() + + Args: + parent (str): ID of the parent project. + worker_pool (Union[dict, ~google.cloud.devtools.cloudbuild_v1.types.WorkerPool]): ``WorkerPool`` resource to create. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.devtools.cloudbuild_v1.types.WorkerPool` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.WorkerPool` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "create_worker_pool" not in self._inner_api_calls: + self._inner_api_calls[ + "create_worker_pool" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.create_worker_pool, + default_retry=self._method_configs["CreateWorkerPool"].retry, + default_timeout=self._method_configs["CreateWorkerPool"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.CreateWorkerPoolRequest( + parent=parent, worker_pool=worker_pool + ) + return self._inner_api_calls["create_worker_pool"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def get_worker_pool( + self, + name=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Returns information about a ``WorkerPool``. + + This API is experimental. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> response = client.get_worker_pool() + + Args: + name (str): The field will contain name of the resource requested, for example: + "projects/project-1/workerPools/workerpool-name" + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.WorkerPool` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "get_worker_pool" not in self._inner_api_calls: + self._inner_api_calls[ + "get_worker_pool" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.get_worker_pool, + default_retry=self._method_configs["GetWorkerPool"].retry, + default_timeout=self._method_configs["GetWorkerPool"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.GetWorkerPoolRequest(name=name) + return self._inner_api_calls["get_worker_pool"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def delete_worker_pool( + self, + name=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes a ``WorkerPool`` by its project ID and WorkerPool name. + + This API is experimental. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> client.delete_worker_pool() + + Args: + name (str): The field will contain name of the resource requested, for example: + "projects/project-1/workerPools/workerpool-name" + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_worker_pool" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_worker_pool" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_worker_pool, + default_retry=self._method_configs["DeleteWorkerPool"].retry, + default_timeout=self._method_configs["DeleteWorkerPool"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.DeleteWorkerPoolRequest(name=name) + self._inner_api_calls["delete_worker_pool"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def update_worker_pool( + self, + name=None, + worker_pool=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Update a ``WorkerPool``. + + This API is experimental. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> response = client.update_worker_pool() + + Args: + name (str): The field will contain name of the resource requested, for example: + "projects/project-1/workerPools/workerpool-name" + worker_pool (Union[dict, ~google.cloud.devtools.cloudbuild_v1.types.WorkerPool]): ``WorkerPool`` resource to update. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.devtools.cloudbuild_v1.types.WorkerPool` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.WorkerPool` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "update_worker_pool" not in self._inner_api_calls: + self._inner_api_calls[ + "update_worker_pool" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.update_worker_pool, + default_retry=self._method_configs["UpdateWorkerPool"].retry, + default_timeout=self._method_configs["UpdateWorkerPool"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.UpdateWorkerPoolRequest( + name=name, worker_pool=worker_pool + ) + return self._inner_api_calls["update_worker_pool"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def list_worker_pools( + self, + parent=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + List project's ``WorkerPool``\ s. + + This API is experimental. + + Example: + >>> from google.cloud.devtools import cloudbuild_v1 + >>> + >>> client = cloudbuild_v1.CloudBuildClient() + >>> + >>> response = client.list_worker_pools() + + Args: + parent (str): ID of the parent project. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.devtools.cloudbuild_v1.types.ListWorkerPoolsResponse` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "list_worker_pools" not in self._inner_api_calls: + self._inner_api_calls[ + "list_worker_pools" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_worker_pools, + default_retry=self._method_configs["ListWorkerPools"].retry, + default_timeout=self._method_configs["ListWorkerPools"].timeout, + client_info=self._client_info, + ) + + request = cloudbuild_pb2.ListWorkerPoolsRequest(parent=parent) + return self._inner_api_calls["list_worker_pools"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/cloud_build_client_config.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/cloud_build_client_config.py new file mode 100644 index 000000000000..6f67ef28527e --- /dev/null +++ b/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/cloud_build_client_config.py @@ -0,0 +1,103 @@ +config = { + "interfaces": { + "google.devtools.cloudbuild.v1.CloudBuild": { + "retry_codes": { + "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "non_idempotent": [], + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000, + } + }, + "methods": { + "CreateBuild": { + "timeout_millis": 20000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "GetBuild": { + "timeout_millis": 5000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "ListBuilds": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "CancelBuild": { + "timeout_millis": 5000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "CreateBuildTrigger": { + "timeout_millis": 5000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "GetBuildTrigger": { + "timeout_millis": 5000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "ListBuildTriggers": { + "timeout_millis": 5000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "DeleteBuildTrigger": { + "timeout_millis": 5000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "UpdateBuildTrigger": { + "timeout_millis": 5000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "RunBuildTrigger": { + "timeout_millis": 20000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "RetryBuild": { + "timeout_millis": 20000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "CreateWorkerPool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "GetWorkerPool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "DeleteWorkerPool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "UpdateWorkerPool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "ListWorkerPools": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + }, + } + } +} diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/enums.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/enums.py new file mode 100644 index 000000000000..91f5ea5af7d4 --- /dev/null +++ b/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/enums.py @@ -0,0 +1,186 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Wrappers for protocol buffer enum types.""" + +import enum + + +class Build(object): + class Status(enum.IntEnum): + """ + Possible status of a build or build step. + + Attributes: + STATUS_UNKNOWN (int): Status of the build is unknown. + QUEUED (int): Build or step is queued; work has not yet begun. + WORKING (int): Build or step is being executed. + SUCCESS (int): Build or step finished successfully. + FAILURE (int): Build or step failed to complete successfully. + INTERNAL_ERROR (int): Build or step failed due to an internal cause. + TIMEOUT (int): Build or step took longer than was allowed. + CANCELLED (int): Build or step was canceled by a user. + """ + + STATUS_UNKNOWN = 0 + QUEUED = 1 + WORKING = 2 + SUCCESS = 3 + FAILURE = 4 + INTERNAL_ERROR = 5 + TIMEOUT = 6 + CANCELLED = 7 + + +class BuildOptions(object): + class LogStreamingOption(enum.IntEnum): + """ + Specifies the behavior when writing build logs to Google Cloud Storage. + + Attributes: + STREAM_DEFAULT (int): Service may automatically determine build log streaming behavior. + STREAM_ON (int): Build logs should be streamed to Google Cloud Storage. + STREAM_OFF (int): Build logs should not be streamed to Google Cloud Storage; they will be + written when the build is completed. + """ + + STREAM_DEFAULT = 0 + STREAM_ON = 1 + STREAM_OFF = 2 + + class LoggingMode(enum.IntEnum): + """ + Specifies the logging mode. + + Attributes: + LOGGING_UNSPECIFIED (int): The service determines the logging mode. The default is ``LEGACY``. Do + not rely on the default logging behavior as it may change in the future. + LEGACY (int): Stackdriver logging and Cloud Storage logging are enabled. + GCS_ONLY (int): Only Cloud Storage logging is enabled. + """ + + LOGGING_UNSPECIFIED = 0 + LEGACY = 1 + GCS_ONLY = 2 + + class MachineType(enum.IntEnum): + """ + Supported VM sizes. + + Attributes: + UNSPECIFIED (int): Standard machine type. + N1_HIGHCPU_8 (int): Highcpu machine with 8 CPUs. + N1_HIGHCPU_32 (int): Highcpu machine with 32 CPUs. + """ + + UNSPECIFIED = 0 + N1_HIGHCPU_8 = 1 + N1_HIGHCPU_32 = 2 + + class SubstitutionOption(enum.IntEnum): + """ + Specifies the behavior when there is an error in the substitution checks. + + Attributes: + MUST_MATCH (int): Fails the build if error in substitutions checks, like missing + a substitution in the template or in the map. + ALLOW_LOOSE (int): Do not fail the build if error in substitutions checks. + """ + + MUST_MATCH = 0 + ALLOW_LOOSE = 1 + + class VerifyOption(enum.IntEnum): + """ + Specifies the manner in which the build should be verified, if at all. + + Attributes: + NOT_VERIFIED (int): Not a verifiable build. (default) + VERIFIED (int): Verified build. + """ + + NOT_VERIFIED = 0 + VERIFIED = 1 + + +class Hash(object): + class HashType(enum.IntEnum): + """ + Specifies the hash algorithm, if any. + + Attributes: + NONE (int): No hash requested. + SHA256 (int): Use a sha256 hash. + MD5 (int): Use a md5 hash. + """ + + NONE = 0 + SHA256 = 1 + MD5 = 2 + + +class PullRequestFilter(object): + class CommentControl(enum.IntEnum): + """ + Controls behavior of Pull Request comments. + + Attributes: + COMMENTS_DISABLED (int): Do not require comments on Pull Requests before builds are triggered. + COMMENTS_ENABLED (int): Enforce that repository owners or collaborators must comment on Pull + Requests before builds are triggered. + """ + + COMMENTS_DISABLED = 0 + COMMENTS_ENABLED = 1 + + +class WorkerPool(object): + class Region(enum.IntEnum): + """ + Supported GCP regions to create the ``WorkerPool``. + + Attributes: + REGION_UNSPECIFIED (int): no region + US_CENTRAL1 (int): us-central1 region + US_WEST1 (int): us-west1 region + US_EAST1 (int): us-east1 region + US_EAST4 (int): us-east4 region + """ + + REGION_UNSPECIFIED = 0 + US_CENTRAL1 = 1 + US_WEST1 = 2 + US_EAST1 = 3 + US_EAST4 = 4 + + class Status(enum.IntEnum): + """ + ``WorkerPool`` status + + Attributes: + STATUS_UNSPECIFIED (int): Status of the ``WorkerPool`` is unknown. + CREATING (int): ``WorkerPool`` is being created. + RUNNING (int): ``WorkerPool`` is running. + DELETING (int): ``WorkerPool`` is being deleting: cancelling builds and draining + workers. + DELETED (int): ``WorkerPool`` is deleted. + """ + + STATUS_UNSPECIFIED = 0 + CREATING = 1 + RUNNING = 2 + DELETING = 3 + DELETED = 4 diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/transports/__init__.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/transports/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/transports/cloud_build_grpc_transport.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/transports/cloud_build_grpc_transport.py new file mode 100644 index 000000000000..7703cc3c4fb2 --- /dev/null +++ b/cloudbuild/google/cloud/devtools/cloudbuild_v1/gapic/transports/cloud_build_grpc_transport.py @@ -0,0 +1,372 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import google.api_core.grpc_helpers + +from google.cloud.devtools.cloudbuild_v1.proto import cloudbuild_pb2_grpc + + +class CloudBuildGrpcTransport(object): + """gRPC transport class providing stubs for + google.devtools.cloudbuild.v1 CloudBuild API. + + The transport provides access to the raw gRPC stubs, + which can be used to take advantage of advanced + features of gRPC. + """ + + # The scopes needed to make gRPC calls to all of the methods defined + # in this service. + _OAUTH_SCOPES = ("https://www.googleapis.com/auth/cloud-platform",) + + def __init__( + self, channel=None, credentials=None, address="cloudbuild.googleapis.com:443" + ): + """Instantiate the transport class. + + Args: + channel (grpc.Channel): A ``Channel`` instance through + which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. + credentials (google.auth.credentials.Credentials): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If none + are specified, the client will attempt to ascertain the + credentials from the environment. + address (str): The address where the service is hosted. + """ + # If both `channel` and `credentials` are specified, raise an + # exception (channels come with credentials baked in already). + if channel is not None and credentials is not None: + raise ValueError( + "The `channel` and `credentials` arguments are mutually " "exclusive." + ) + + # Create the channel. + if channel is None: + channel = self.create_channel( + address=address, + credentials=credentials, + options={ + "grpc.max_send_message_length": -1, + "grpc.max_receive_message_length": -1, + }.items(), + ) + + self._channel = channel + + # gRPC uses objects called "stubs" that are bound to the + # channel and provide a basic method for each RPC. + self._stubs = {"cloud_build_stub": cloudbuild_pb2_grpc.CloudBuildStub(channel)} + + @classmethod + def create_channel( + cls, address="cloudbuild.googleapis.com:443", credentials=None, **kwargs + ): + """Create and return a gRPC channel object. + + Args: + address (str): The host for the channel to use. + credentials (~.Credentials): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If + none are specified, the client will attempt to ascertain + the credentials from the environment. + kwargs (dict): Keyword arguments, which are passed to the + channel creation. + + Returns: + grpc.Channel: A gRPC channel object. + """ + return google.api_core.grpc_helpers.create_channel( + address, credentials=credentials, scopes=cls._OAUTH_SCOPES, **kwargs + ) + + @property + def channel(self): + """The gRPC channel used by the transport. + + Returns: + grpc.Channel: A gRPC channel object. + """ + return self._channel + + @property + def create_build(self): + """Return the gRPC stub for :meth:`CloudBuildClient.create_build`. + + Starts a build with the specified configuration. + + This method returns a long-running ``Operation``, which includes the + build ID. Pass the build ID to ``GetBuild`` to determine the build + status (such as ``SUCCESS`` or ``FAILURE``). + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].CreateBuild + + @property + def get_build(self): + """Return the gRPC stub for :meth:`CloudBuildClient.get_build`. + + Returns information about a previously requested build. + + The ``Build`` that is returned includes its status (such as ``SUCCESS``, + ``FAILURE``, or ``WORKING``), and timing information. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].GetBuild + + @property + def list_builds(self): + """Return the gRPC stub for :meth:`CloudBuildClient.list_builds`. + + Lists previously requested builds. + + Previously requested builds may still be in-progress, or may have finished + successfully or unsuccessfully. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].ListBuilds + + @property + def cancel_build(self): + """Return the gRPC stub for :meth:`CloudBuildClient.cancel_build`. + + Cancels a build in progress. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].CancelBuild + + @property + def create_build_trigger(self): + """Return the gRPC stub for :meth:`CloudBuildClient.create_build_trigger`. + + Creates a new ``BuildTrigger``. + + This API is experimental. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].CreateBuildTrigger + + @property + def get_build_trigger(self): + """Return the gRPC stub for :meth:`CloudBuildClient.get_build_trigger`. + + Returns information about a ``BuildTrigger``. + + This API is experimental. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].GetBuildTrigger + + @property + def list_build_triggers(self): + """Return the gRPC stub for :meth:`CloudBuildClient.list_build_triggers`. + + Lists existing ``BuildTrigger``\ s. + + This API is experimental. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].ListBuildTriggers + + @property + def delete_build_trigger(self): + """Return the gRPC stub for :meth:`CloudBuildClient.delete_build_trigger`. + + Deletes a ``BuildTrigger`` by its project ID and trigger ID. + + This API is experimental. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].DeleteBuildTrigger + + @property + def update_build_trigger(self): + """Return the gRPC stub for :meth:`CloudBuildClient.update_build_trigger`. + + Updates a ``BuildTrigger`` by its project ID and trigger ID. + + This API is experimental. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].UpdateBuildTrigger + + @property + def run_build_trigger(self): + """Return the gRPC stub for :meth:`CloudBuildClient.run_build_trigger`. + + Runs a ``BuildTrigger`` at a particular source revision. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].RunBuildTrigger + + @property + def retry_build(self): + """Return the gRPC stub for :meth:`CloudBuildClient.retry_build`. + + Creates a new build based on the specified build. + + This method creates a new build using the original build request, which + may or may not result in an identical build. + + For triggered builds: + + - Triggered builds resolve to a precise revision; therefore a retry of + a triggered build will result in a build that uses the same revision. + + For non-triggered builds that specify ``RepoSource``: + + - If the original build built from the tip of a branch, the retried + build will build from the tip of that branch, which may not be the + same revision as the original build. + - If the original build specified a commit sha or revision ID, the + retried build will use the identical source. + + For builds that specify ``StorageSource``: + + - If the original build pulled source from Google Cloud Storage without + specifying the generation of the object, the new build will use the + current object, which may be different from the original build + source. + - If the original build pulled source from Cloud Storage and specified + the generation of the object, the new build will attempt to use the + same object, which may or may not be available depending on the + bucket's lifecycle management settings. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].RetryBuild + + @property + def create_worker_pool(self): + """Return the gRPC stub for :meth:`CloudBuildClient.create_worker_pool`. + + Creates a ``WorkerPool`` to run the builds, and returns the new worker + pool. + + This API is experimental. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].CreateWorkerPool + + @property + def get_worker_pool(self): + """Return the gRPC stub for :meth:`CloudBuildClient.get_worker_pool`. + + Returns information about a ``WorkerPool``. + + This API is experimental. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].GetWorkerPool + + @property + def delete_worker_pool(self): + """Return the gRPC stub for :meth:`CloudBuildClient.delete_worker_pool`. + + Deletes a ``WorkerPool`` by its project ID and WorkerPool name. + + This API is experimental. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].DeleteWorkerPool + + @property + def update_worker_pool(self): + """Return the gRPC stub for :meth:`CloudBuildClient.update_worker_pool`. + + Update a ``WorkerPool``. + + This API is experimental. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].UpdateWorkerPool + + @property + def list_worker_pools(self): + """Return the gRPC stub for :meth:`CloudBuildClient.list_worker_pools`. + + List project's ``WorkerPool``\ s. + + This API is experimental. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["cloud_build_stub"].ListWorkerPools diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/__init__.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild.proto b/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild.proto new file mode 100644 index 000000000000..a50ec126796b --- /dev/null +++ b/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild.proto @@ -0,0 +1,1304 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.devtools.cloudbuild.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1;cloudbuild"; +option java_multiple_files = true; +option java_package = "com.google.cloudbuild.v1"; +option objc_class_prefix = "GCB"; + +// Creates and manages builds on Google Cloud Platform. +// +// The main concept used by this API is a `Build`, which describes the location +// of the source to build, how to build the source, and where to store the +// built artifacts, if any. +// +// A user can list previously-requested builds or get builds by their ID to +// determine the status of the build. +service CloudBuild { + option (google.api.default_host) = "cloudbuild.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Starts a build with the specified configuration. + // + // This method returns a long-running `Operation`, which includes the build + // ID. Pass the build ID to `GetBuild` to determine the build status (such as + // `SUCCESS` or `FAILURE`). + rpc CreateBuild(CreateBuildRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/projects/{project_id}/builds" + body: "build" + }; + option (google.api.method_signature) = "project_id,build"; + option (google.longrunning.operation_info) = { + response_type: "Build" + metadata_type: "BuildOperationMetadata" + }; + } + + // Returns information about a previously requested build. + // + // The `Build` that is returned includes its status (such as `SUCCESS`, + // `FAILURE`, or `WORKING`), and timing information. + rpc GetBuild(GetBuildRequest) returns (Build) { + option (google.api.http) = { + get: "/v1/projects/{project_id}/builds/{id}" + }; + option (google.api.method_signature) = "project_id,id"; + } + + // Lists previously requested builds. + // + // Previously requested builds may still be in-progress, or may have finished + // successfully or unsuccessfully. + rpc ListBuilds(ListBuildsRequest) returns (ListBuildsResponse) { + option (google.api.http) = { + get: "/v1/projects/{project_id}/builds" + }; + option (google.api.method_signature) = "project_id,filter"; + } + + // Cancels a build in progress. + rpc CancelBuild(CancelBuildRequest) returns (Build) { + option (google.api.http) = { + post: "/v1/projects/{project_id}/builds/{id}:cancel" + body: "*" + }; + option (google.api.method_signature) = "project_id,id"; + } + + // Creates a new build based on the specified build. + // + // This method creates a new build using the original build request, which may + // or may not result in an identical build. + // + // For triggered builds: + // + // * Triggered builds resolve to a precise revision; therefore a retry of a + // triggered build will result in a build that uses the same revision. + // + // For non-triggered builds that specify `RepoSource`: + // + // * If the original build built from the tip of a branch, the retried build + // will build from the tip of that branch, which may not be the same revision + // as the original build. + // * If the original build specified a commit sha or revision ID, the retried + // build will use the identical source. + // + // For builds that specify `StorageSource`: + // + // * If the original build pulled source from Google Cloud Storage without + // specifying the generation of the object, the new build will use the current + // object, which may be different from the original build source. + // * If the original build pulled source from Cloud Storage and specified the + // generation of the object, the new build will attempt to use the same + // object, which may or may not be available depending on the bucket's + // lifecycle management settings. + rpc RetryBuild(RetryBuildRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/projects/{project_id}/builds/{id}:retry" + body: "*" + }; + option (google.api.method_signature) = "project_id,id"; + option (google.longrunning.operation_info) = { + response_type: "Build" + metadata_type: "BuildOperationMetadata" + }; + } + + // Creates a new `BuildTrigger`. + // + // This API is experimental. + rpc CreateBuildTrigger(CreateBuildTriggerRequest) returns (BuildTrigger) { + option (google.api.http) = { + post: "/v1/projects/{project_id}/triggers" + body: "trigger" + }; + option (google.api.method_signature) = "project_id,trigger"; + } + + // Returns information about a `BuildTrigger`. + // + // This API is experimental. + rpc GetBuildTrigger(GetBuildTriggerRequest) returns (BuildTrigger) { + option (google.api.http) = { + get: "/v1/projects/{project_id}/triggers/{trigger_id}" + }; + option (google.api.method_signature) = "project_id,trigger_id"; + } + + // Lists existing `BuildTrigger`s. + // + // This API is experimental. + rpc ListBuildTriggers(ListBuildTriggersRequest) + returns (ListBuildTriggersResponse) { + option (google.api.http) = { + get: "/v1/projects/{project_id}/triggers" + }; + option (google.api.method_signature) = "project_id"; + } + + // Deletes a `BuildTrigger` by its project ID and trigger ID. + // + // This API is experimental. + rpc DeleteBuildTrigger(DeleteBuildTriggerRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/projects/{project_id}/triggers/{trigger_id}" + }; + option (google.api.method_signature) = "project_id,trigger_id"; + } + + // Updates a `BuildTrigger` by its project ID and trigger ID. + // + // This API is experimental. + rpc UpdateBuildTrigger(UpdateBuildTriggerRequest) returns (BuildTrigger) { + option (google.api.http) = { + patch: "/v1/projects/{project_id}/triggers/{trigger_id}" + body: "trigger" + }; + option (google.api.method_signature) = "project_id,trigger_id,trigger"; + } + + // Runs a `BuildTrigger` at a particular source revision. + rpc RunBuildTrigger(RunBuildTriggerRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/projects/{project_id}/triggers/{trigger_id}:run" + body: "source" + }; + option (google.api.method_signature) = "project_id,trigger_id,source"; + option (google.longrunning.operation_info) = { + response_type: "Build" + metadata_type: "BuildOperationMetadata" + }; + } + + // Creates a `WorkerPool` to run the builds, and returns the new worker pool. + // + // This API is experimental. + rpc CreateWorkerPool(CreateWorkerPoolRequest) returns (WorkerPool) {} + + // Returns information about a `WorkerPool`. + // + // This API is experimental. + rpc GetWorkerPool(GetWorkerPoolRequest) returns (WorkerPool) {} + + // Deletes a `WorkerPool` by its project ID and WorkerPool name. + // + // This API is experimental. + rpc DeleteWorkerPool(DeleteWorkerPoolRequest) + returns (google.protobuf.Empty) {} + + // Update a `WorkerPool`. + // + // This API is experimental. + rpc UpdateWorkerPool(UpdateWorkerPoolRequest) returns (WorkerPool) {} + + // List project's `WorkerPool`s. + // + // This API is experimental. + rpc ListWorkerPools(ListWorkerPoolsRequest) + returns (ListWorkerPoolsResponse) {} +} + +// Specifies a build to retry. +message RetryBuildRequest { + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Build ID of the original build. + string id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Specifies a build trigger to run and the source to use. +message RunBuildTriggerRequest { + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the trigger. + string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Source to build against this trigger. + RepoSource source = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Location of the source in an archive file in Google Cloud Storage. +message StorageSource { + // Google Cloud Storage bucket containing the source (see + // [Bucket Name + // Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + string bucket = 1; + + // Google Cloud Storage object containing the source. + // + // This object must be a gzipped archive file (`.tar.gz`) containing source to + // build. + string object = 2; + + // Google Cloud Storage generation for the object. If the generation is + // omitted, the latest generation will be used. + int64 generation = 3; +} + +// Location of the source in a Google Cloud Source Repository. +message RepoSource { + // ID of the project that owns the Cloud Source Repository. If omitted, the + // project ID requesting the build is assumed. + string project_id = 1; + + // Name of the Cloud Source Repository. If omitted, the name "default" is + // assumed. + string repo_name = 2; + + // A revision within the Cloud Source Repository must be specified in + // one of these ways. + oneof revision { + // Regex matching branches to build. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string branch_name = 3; + + // Regex matching tags to build. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string tag_name = 4; + + // Explicit commit SHA to build. + string commit_sha = 5; + } + + // Directory, relative to the source root, in which to run the build. + // + // This must be a relative path. If a step's `dir` is specified and is an + // absolute path, this value is ignored for that step's execution. + string dir = 7; +} + +// Location of the source in a supported storage service. +message Source { + // Location of source. + oneof source { + // If provided, get the source from this location in Google Cloud Storage. + StorageSource storage_source = 2; + + // If provided, get the source from this location in a Cloud Source + // Repository. + RepoSource repo_source = 3; + } +} + +// An image built by the pipeline. +message BuiltImage { + // Name used to push the container image to Google Container Registry, as + // presented to `docker push`. + string name = 1; + + // Docker Registry 2.0 digest. + string digest = 3; + + // Output only. Stores timing information for pushing the specified image. + TimeSpan push_timing = 4; +} + +// A step in the build pipeline. +message BuildStep { + // Required. The name of the container image that will run this particular + // build step. + // + // If the image is available in the host's Docker daemon's cache, it + // will be run directly. If not, the host will attempt to pull the image + // first, using the builder service account's credentials if necessary. + // + // The Docker daemon's cache will already have the latest versions of all of + // the officially supported build steps + // ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). + // The Docker daemon will also have cached many of the layers for some popular + // images, like "ubuntu", "debian", but they will be refreshed at the time you + // attempt to use them. + // + // If you built an image in a previous build step, it will be stored in the + // host's Docker daemon's cache and is available to use as the name for a + // later build step. + string name = 1; + + // A list of environment variable definitions to be used when running a step. + // + // The elements are of the form "KEY=VALUE" for the environment variable "KEY" + // being given the value "VALUE". + repeated string env = 2; + + // A list of arguments that will be presented to the step when it is started. + // + // If the image used to run the step's container has an entrypoint, the `args` + // are used as arguments to that entrypoint. If the image does not define + // an entrypoint, the first element in args is used as the entrypoint, + // and the remainder will be used as arguments. + repeated string args = 3; + + // Working directory to use when running this step's container. + // + // If this value is a relative path, it is relative to the build's working + // directory. If this value is absolute, it may be outside the build's working + // directory, in which case the contents of the path may not be persisted + // across build step executions, unless a `volume` for that path is specified. + // + // If the build specifies a `RepoSource` with `dir` and a step with a `dir`, + // which specifies an absolute path, the `RepoSource` `dir` is ignored for + // the step's execution. + string dir = 4; + + // Unique identifier for this build step, used in `wait_for` to + // reference this build step as a dependency. + string id = 5; + + // The ID(s) of the step(s) that this build step depends on. + // This build step will not start until all the build steps in `wait_for` + // have completed successfully. If `wait_for` is empty, this build step will + // start when all previous build steps in the `Build.Steps` list have + // completed successfully. + repeated string wait_for = 6; + + // Entrypoint to be used instead of the build step image's default entrypoint. + // If unset, the image's default entrypoint is used. + string entrypoint = 7; + + // A list of environment variables which are encrypted using a Cloud Key + // Management Service crypto key. These values must be specified in the + // build's `Secret`. + repeated string secret_env = 8; + + // List of volumes to mount into the build step. + // + // Each volume is created as an empty volume prior to execution of the + // build step. Upon completion of the build, volumes and their contents are + // discarded. + // + // Using a named volume in only one step is not valid as it is indicative + // of a build request with an incorrect configuration. + repeated Volume volumes = 9; + + // Output only. Stores timing information for executing this build step. + TimeSpan timing = 10; + + // Output only. Stores timing information for pulling this build step's + // builder image only. + TimeSpan pull_timing = 13; + + // Time limit for executing this build step. If not defined, the step has no + // time limit and will be allowed to continue to run until either it completes + // or the build itself times out. + google.protobuf.Duration timeout = 11; + + // Output only. Status of the build step. At this time, build step status is + // only updated on build completion; step status is not updated in real-time + // as the build progresses. + Build.Status status = 12; +} + +// Volume describes a Docker container volume which is mounted into build steps +// in order to persist files across build step execution. +message Volume { + // Name of the volume to mount. + // + // Volume names must be unique per build step and must be valid names for + // Docker volumes. Each named volume must be used by at least two build steps. + string name = 1; + + // Path at which to mount the volume. + // + // Paths must be absolute and cannot conflict with other volume paths on the + // same build step or with certain reserved volume paths. + string path = 2; +} + +// Artifacts created by the build pipeline. +message Results { + // Container images that were built as a part of the build. + repeated BuiltImage images = 2; + + // List of build step digests, in the order corresponding to build step + // indices. + repeated string build_step_images = 3; + + // Path to the artifact manifest. Only populated when artifacts are uploaded. + string artifact_manifest = 4; + + // Number of artifacts uploaded. Only populated when artifacts are uploaded. + int64 num_artifacts = 5; + + // List of build step outputs, produced by builder images, in the order + // corresponding to build step indices. + // + // [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) + // can produce this output by writing to `$BUILDER_OUTPUT/output`. + // Only the first 4KB of data is stored. + repeated bytes build_step_outputs = 6; + + // Time to push all non-container artifacts. + TimeSpan artifact_timing = 7; +} + +// An artifact that was uploaded during a build. This +// is a single record in the artifact manifest JSON file. +message ArtifactResult { + // The path of an artifact in a Google Cloud Storage bucket, with the + // generation number. For example, + // `gs://mybucket/path/to/output.jar#generation`. + string location = 1; + + // The file hash of the artifact. + repeated FileHashes file_hash = 2; +} + +// A build resource in the Cloud Build API. +// +// At a high level, a `Build` describes where to find source code, how to build +// it (for example, the builder image to run on the source), and where to store +// the built artifacts. +// +// Fields can include the following variables, which will be expanded when the +// build is created: +// +// - $PROJECT_ID: the project ID of the build. +// - $BUILD_ID: the autogenerated ID of the build. +// - $REPO_NAME: the source repository name specified by RepoSource. +// - $BRANCH_NAME: the branch name specified by RepoSource. +// - $TAG_NAME: the tag name specified by RepoSource. +// - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or +// resolved from the specified branch or tag. +// - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. +message Build { + // Possible status of a build or build step. + enum Status { + // Status of the build is unknown. + STATUS_UNKNOWN = 0; + + // Build or step is queued; work has not yet begun. + QUEUED = 1; + + // Build or step is being executed. + WORKING = 2; + + // Build or step finished successfully. + SUCCESS = 3; + + // Build or step failed to complete successfully. + FAILURE = 4; + + // Build or step failed due to an internal cause. + INTERNAL_ERROR = 5; + + // Build or step took longer than was allowed. + TIMEOUT = 6; + + // Build or step was canceled by a user. + CANCELLED = 7; + } + + // Output only. Unique identifier of the build. + string id = 1; + + // Output only. ID of the project. + string project_id = 16; + + // Output only. Status of the build. + Status status = 2; + + // Output only. Customer-readable message about the current status. + string status_detail = 24; + + // The location of the source files to build. + Source source = 3; + + // Required. The operations to be performed on the workspace. + repeated BuildStep steps = 11; + + // Output only. Results of the build. + Results results = 10; + + // Output only. Time at which the request to create the build was received. + google.protobuf.Timestamp create_time = 6; + + // Output only. Time at which execution of the build was started. + google.protobuf.Timestamp start_time = 7; + + // Output only. Time at which execution of the build was finished. + // + // The difference between finish_time and start_time is the duration of the + // build's execution. + google.protobuf.Timestamp finish_time = 8; + + // Amount of time that this build should be allowed to run, to second + // granularity. If this amount of time elapses, work on the build will cease + // and the build status will be `TIMEOUT`. + // + // Default time is ten minutes. + google.protobuf.Duration timeout = 12; + + // A list of images to be pushed upon the successful completion of all build + // steps. + // + // The images are pushed using the builder service account's credentials. + // + // The digests of the pushed images will be stored in the `Build` resource's + // results field. + // + // If any of the images fail to be pushed, the build status is marked + // `FAILURE`. + repeated string images = 13; + + // Artifacts produced by the build that should be uploaded upon + // successful completion of all build steps. + Artifacts artifacts = 37; + + // Google Cloud Storage bucket where logs should be written (see + // [Bucket Name + // Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + // Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + string logs_bucket = 19; + + // Output only. A permanent fixed identifier for source. + SourceProvenance source_provenance = 21; + + // Output only. The ID of the `BuildTrigger` that triggered this build, if it + // was triggered automatically. + string build_trigger_id = 22; + + // Special options for this build. + BuildOptions options = 23; + + // Output only. URL to logs for this build in Google Cloud Console. + string log_url = 25; + + // Substitutions data for `Build` resource. + map substitutions = 29; + + // Tags for annotation of a `Build`. These are not docker tags. + repeated string tags = 31; + + // Secrets to decrypt using Cloud Key Management Service. + repeated Secret secrets = 32; + + // Output only. Stores timing information for phases of the build. Valid keys + // are: + // + // * BUILD: time to execute all build steps + // * PUSH: time to push all specified images. + // * FETCHSOURCE: time to fetch source. + // + // If the build does not specify source or images, + // these keys will not be included. + map timing = 33; +} + +// Artifacts produced by a build that should be uploaded upon +// successful completion of all build steps. +message Artifacts { + // Files in the workspace to upload to Cloud Storage upon successful + // completion of all build steps. + message ArtifactObjects { + // Cloud Storage bucket and optional object path, in the form + // "gs://bucket/path/to/somewhere/". (see [Bucket Name + // Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + // + // Files in the workspace matching any path pattern will be uploaded to + // Cloud Storage with this location as a prefix. + string location = 1; + + // Path globs used to match files in the build's workspace. + repeated string paths = 2; + + // Output only. Stores timing information for pushing all artifact objects. + TimeSpan timing = 3; + } + + // A list of images to be pushed upon the successful completion of all build + // steps. + // + // The images will be pushed using the builder service account's credentials. + // + // The digests of the pushed images will be stored in the Build resource's + // results field. + // + // If any of the images fail to be pushed, the build is marked FAILURE. + repeated string images = 1; + + // A list of objects to be uploaded to Cloud Storage upon successful + // completion of all build steps. + // + // Files in the workspace matching specified paths globs will be uploaded to + // the specified Cloud Storage location using the builder service account's + // credentials. + // + // The location and generation of the uploaded objects will be stored in the + // Build resource's results field. + // + // If any objects fail to be pushed, the build is marked FAILURE. + ArtifactObjects objects = 2; +} + +// Start and end times for a build execution phase. +message TimeSpan { + // Start of time span. + google.protobuf.Timestamp start_time = 1; + + // End of time span. + google.protobuf.Timestamp end_time = 2; +} + +// Metadata for build operations. +message BuildOperationMetadata { + // The build that the operation is tracking. + Build build = 1; +} + +// Provenance of the source. Ways to find the original source, or verify that +// some source was used for this build. +message SourceProvenance { + // A copy of the build's `source.storage_source`, if exists, with any + // generations resolved. + StorageSource resolved_storage_source = 3; + + // A copy of the build's `source.repo_source`, if exists, with any + // revisions resolved. + RepoSource resolved_repo_source = 6; + + // Output only. Hash(es) of the build source, which can be used to verify that + // the original source integrity was maintained in the build. Note that + // `FileHashes` will only be populated if `BuildOptions` has requested a + // `SourceProvenanceHash`. + // + // The keys to this map are file paths used as build source and the values + // contain the hash values for those files. + // + // If the build source came in a single package such as a gzipped tarfile + // (`.tar.gz`), the `FileHash` will be for the single path to that file. + map file_hashes = 4; +} + +// Container message for hashes of byte content of files, used in +// SourceProvenance messages to verify integrity of source input to the build. +message FileHashes { + // Collection of file hashes. + repeated Hash file_hash = 1; +} + +// Container message for hash values. +message Hash { + // Specifies the hash algorithm, if any. + enum HashType { + // No hash requested. + NONE = 0; + + // Use a sha256 hash. + SHA256 = 1; + + // Use a md5 hash. + MD5 = 2; + } + + // The type of hash that was performed. + HashType type = 1; + + // The hash value. + bytes value = 2; +} + +// Pairs a set of secret environment variables containing encrypted +// values with the Cloud KMS key to use to decrypt the value. +message Secret { + // Cloud KMS key name to use to decrypt these envs. + string kms_key_name = 1; + + // Map of environment variable name to its encrypted value. + // + // Secret environment variables must be unique across all of a build's + // secrets, and must be used by at least one build step. Values can be at most + // 64 KB in size. There can be at most 100 secret values across all of a + // build's secrets. + map secret_env = 3; +} + +// Request to create a new build. +message CreateBuildRequest { + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Build resource to create. + Build build = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to get a build. +message GetBuildRequest { + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the build. + string id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to list builds. +message ListBuildsRequest { + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Number of results to return in the list. + int32 page_size = 2; + + // Token to provide to skip to a particular spot in the list. + string page_token = 3; + + // The raw filter text to constrain the results. + string filter = 8; +} + +// Response including listed builds. +message ListBuildsResponse { + // Builds will be sorted by `create_time`, descending. + repeated Build builds = 1; + + // Token to receive the next page of results. + string next_page_token = 2; +} + +// Request to cancel an ongoing build. +message CancelBuildRequest { + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the build. + string id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration for an automated build in response to source repository +// changes. +message BuildTrigger { + // Output only. Unique identifier of the trigger. + string id = 1; + + // Human-readable description of this trigger. + string description = 10; + + // User assigned name of the trigger. Must be unique within the project. + string name = 21; + + // Tags for annotation of a `BuildTrigger` + repeated string tags = 19; + + // Template describing the types of source changes to trigger a build. + // + // Branch and tag names in trigger templates are interpreted as regular + // expressions. Any branch or tag change that matches that regular expression + // will trigger a build. + // + // Mutually exclusive with `github`. + RepoSource trigger_template = 7; + + // GitHubEventsConfig describes the configuration of a trigger that creates + // a build whenever a GitHub event is received. + // + // Mutually exclusive with `trigger_template`. + GitHubEventsConfig github = 13; + + // Template describing the Build request to make when the trigger is matched. + oneof build_template { + // Contents of the build template. + Build build = 4; + + // Path, from the source root, to a file whose contents is used for the + // template. + string filename = 8; + } + + // Output only. Time when the trigger was created. + google.protobuf.Timestamp create_time = 5; + + // If true, the trigger will never result in a build. + bool disabled = 9; + + // Substitutions data for Build resource. + map substitutions = 11; + + // ignored_files and included_files are file glob matches using + // http://godoc/pkg/path/filepath#Match extended with support for "**". + // + // If ignored_files and changed files are both empty, then they are + // not used to determine whether or not to trigger a build. + // + // If ignored_files is not empty, then we ignore any files that match + // any of the ignored_file globs. If the change has no files that are + // outside of the ignored_files globs, then we do not trigger a build. + repeated string ignored_files = 15; + + // If any of the files altered in the commit pass the ignored_files + // filter and included_files is empty, then as far as this filter is + // concerned, we should trigger the build. + // + // If any of the files altered in the commit pass the ignored_files + // filter and included_files is not empty, then we make sure that at + // least one of those files matches a included_files glob. If not, + // then we do not trigger a build. + repeated string included_files = 16; +} + +// GitHubEventsConfig describes the configuration of a trigger that creates a +// build whenever a GitHub event is received. +// +// This message is experimental. +message GitHubEventsConfig { + // The installationID that emits the GitHub event. + int64 installation_id = 1 [deprecated = true]; + + // Owner of the repository. For example: The owner for + // https://github.com/googlecloudplatform/cloud-builders is + // "googlecloudplatform". + string owner = 6; + + // Name of the repository. For example: The name for + // https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". + string name = 7; + + // Filter describing the types of events to trigger a build. + // Currently supported event types: push, pull_request. + oneof event { + // filter to match changes in pull requests. + PullRequestFilter pull_request = 4; + + // filter to match changes in refs like branches, tags. + PushFilter push = 5; + } +} + +// PullRequestFilter contains filter properties for matching GitHub Pull +// Requests. +message PullRequestFilter { + // Controls behavior of Pull Request comments. + enum CommentControl { + // Do not require comments on Pull Requests before builds are triggered. + COMMENTS_DISABLED = 0; + + // Enforce that repository owners or collaborators must comment on Pull + // Requests before builds are triggered. + COMMENTS_ENABLED = 1; + } + + // Target refs to match. + // A target ref is the git reference where the pull request will be applied. + oneof git_ref { + // Regex of branches to match. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string branch = 2; + } + + // Whether to block builds on a "/gcbrun" comment from a repository owner or + // collaborator. + CommentControl comment_control = 5; +} + +// Push contains filter properties for matching GitHub git pushes. +message PushFilter { + // Modified refs to match. + // A modified refs are the refs modified by a git push operation. + oneof git_ref { + // Regexes matching branches to build. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string branch = 2; + + // Regexes matching tags to build. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string tag = 3; + } +} + +// Request to create a new `BuildTrigger`. +message CreateBuildTriggerRequest { + // Required. ID of the project for which to configure automatic builds. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. `BuildTrigger` to create. + BuildTrigger trigger = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Returns the `BuildTrigger` with the specified ID. +message GetBuildTriggerRequest { + // Required. ID of the project that owns the trigger. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the `BuildTrigger` to get. + string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to list existing `BuildTriggers`. +message ListBuildTriggersRequest { + // Required. ID of the project for which to list BuildTriggers. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Number of results to return in the list. + int32 page_size = 2; + + // Token to provide to skip to a particular spot in the list. + string page_token = 3; +} + +// Response containing existing `BuildTriggers`. +message ListBuildTriggersResponse { + // `BuildTriggers` for the project, sorted by `create_time` descending. + repeated BuildTrigger triggers = 1; + + // Token to receive the next page of results. + string next_page_token = 2; +} + +// Request to delete a `BuildTrigger`. +message DeleteBuildTriggerRequest { + // Required. ID of the project that owns the trigger. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the `BuildTrigger` to delete. + string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update an existing `BuildTrigger`. +message UpdateBuildTriggerRequest { + // Required. ID of the project that owns the trigger. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the `BuildTrigger` to update. + string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. `BuildTrigger` to update. + BuildTrigger trigger = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Optional arguments to enable specific features of builds. +message BuildOptions { + // Specifies the manner in which the build should be verified, if at all. + enum VerifyOption { + // Not a verifiable build. (default) + NOT_VERIFIED = 0; + + // Verified build. + VERIFIED = 1; + } + + // Supported VM sizes. + enum MachineType { + // Standard machine type. + UNSPECIFIED = 0; + + // Highcpu machine with 8 CPUs. + N1_HIGHCPU_8 = 1; + + // Highcpu machine with 32 CPUs. + N1_HIGHCPU_32 = 2; + } + + // Specifies the behavior when there is an error in the substitution checks. + enum SubstitutionOption { + // Fails the build if error in substitutions checks, like missing + // a substitution in the template or in the map. + MUST_MATCH = 0; + + // Do not fail the build if error in substitutions checks. + ALLOW_LOOSE = 1; + } + + // Specifies the behavior when writing build logs to Google Cloud Storage. + enum LogStreamingOption { + // Service may automatically determine build log streaming behavior. + STREAM_DEFAULT = 0; + + // Build logs should be streamed to Google Cloud Storage. + STREAM_ON = 1; + + // Build logs should not be streamed to Google Cloud Storage; they will be + // written when the build is completed. + STREAM_OFF = 2; + } + + // Specifies the logging mode. + enum LoggingMode { + // The service determines the logging mode. The default is `LEGACY`. Do not + // rely on the default logging behavior as it may change in the future. + LOGGING_UNSPECIFIED = 0; + + // Stackdriver logging and Cloud Storage logging are enabled. + LEGACY = 1; + + // Only Cloud Storage logging is enabled. + GCS_ONLY = 2; + } + + // Requested hash for SourceProvenance. + repeated Hash.HashType source_provenance_hash = 1; + + // Requested verifiability options. + VerifyOption requested_verify_option = 2; + + // Compute Engine machine type on which to run the build. + MachineType machine_type = 3; + + // Requested disk size for the VM that runs the build. Note that this is *NOT* + // "disk free"; some of the space will be used by the operating system and + // build utilities. Also note that this is the minimum disk size that will be + // allocated for the build -- the build may run with a larger disk than + // requested. At present, the maximum disk size is 1000GB; builds that request + // more than the maximum are rejected with an error. + int64 disk_size_gb = 6; + + // Option to specify behavior when there is an error in the substitution + // checks. + SubstitutionOption substitution_option = 4; + + // Option to define build log streaming behavior to Google Cloud + // Storage. + LogStreamingOption log_streaming_option = 5; + + // Option to specify a `WorkerPool` for the build. User specifies the pool + // with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]". + // This is an experimental field. + string worker_pool = 7; + + // Option to specify the logging mode, which determines where the logs are + // stored. + LoggingMode logging = 11; + + // A list of global environment variable definitions that will exist for all + // build steps in this build. If a variable is defined in both globally and in + // a build step, the variable will use the build step value. + // + // The elements are of the form "KEY=VALUE" for the environment variable "KEY" + // being given the value "VALUE". + repeated string env = 12; + + // A list of global environment variables, which are encrypted using a Cloud + // Key Management Service crypto key. These values must be specified in the + // build's `Secret`. These variables will be available to all build steps + // in this build. + repeated string secret_env = 13; + + // Global list of volumes to mount for ALL build steps + // + // Each volume is created as an empty volume prior to starting the build + // process. Upon completion of the build, volumes and their contents are + // discarded. Global volume names and paths cannot conflict with the volumes + // defined a build step. + // + // Using a global volume in a build with only one step is not valid as + // it is indicative of a build request with an incorrect configuration. + repeated Volume volumes = 14; +} + +// Configuration for a WorkerPool to run the builds. +// +// Workers are machines that Cloud Build uses to run your builds. By default, +// all workers run in a project owned by Cloud Build. To have full control over +// the workers that execute your builds -- such as enabling them to access +// private resources on your private network -- you can request Cloud Build to +// run the workers in your own project by creating a custom workers pool. +message WorkerPool { + // Supported GCP regions to create the `WorkerPool`. + enum Region { + // no region + REGION_UNSPECIFIED = 0; + + // us-central1 region + US_CENTRAL1 = 1; + + // us-west1 region + US_WEST1 = 2; + + // us-east1 region + US_EAST1 = 3; + + // us-east4 region + US_EAST4 = 4; + } + + // `WorkerPool` status + enum Status { + // Status of the `WorkerPool` is unknown. + STATUS_UNSPECIFIED = 0; + + // `WorkerPool` is being created. + CREATING = 1; + + // `WorkerPool` is running. + RUNNING = 2; + + // `WorkerPool` is being deleting: cancelling builds and draining workers. + DELETING = 3; + + // `WorkerPool` is deleted. + DELETED = 4; + } + + // User-defined name of the `WorkerPool`. + string name = 14; + + // The project ID of the GCP project for which the `WorkerPool` is created. + string project_id = 2; + + // Output only. The service account used to manage the `WorkerPool`. The + // service account must have the Compute Instance Admin (Beta) permission at + // the project level. + string service_account_email = 3; + + // Total number of workers to be created across all requested regions. + int64 worker_count = 4; + + // Configuration to be used for a creating workers in the `WorkerPool`. + WorkerConfig worker_config = 16; + + // List of regions to create the `WorkerPool`. Regions can't be empty. + // If Cloud Build adds a new GCP region in the future, the existing + // `WorkerPool` will not be enabled in the new region automatically; + // you must add the new region to the `regions` field to enable the + // `WorkerPool` in that region. + repeated Region regions = 9; + + // Output only. Time at which the request to create the `WorkerPool` was + // received. + google.protobuf.Timestamp create_time = 11; + + // Output only. Time at which the request to update the `WorkerPool` was + // received. + google.protobuf.Timestamp update_time = 17; + + // Output only. Time at which the request to delete the `WorkerPool` was + // received. + google.protobuf.Timestamp delete_time = 12; + + // Output only. WorkerPool Status. + Status status = 13; +} + +// WorkerConfig defines the configuration to be used for a creating workers in +// the pool. +message WorkerConfig { + // Machine Type of the worker, such as n1-standard-1. + // See https://cloud.google.com/compute/docs/machine-types. + // If left blank, Cloud Build will use a standard unspecified machine to + // create the worker pool. + // `machine_type` is overridden if you specify a different machine type in + // `build_options`. In this case, the VM specified in the `build_options` + // will be created on demand at build time. For more information see + // https://cloud.google.com/cloud-build/docs/speeding-up-builds#using_custom_virtual_machine_sizes + string machine_type = 1; + + // Size of the disk attached to the worker, in GB. + // See https://cloud.google.com/compute/docs/disks/ + // If `0` is specified, Cloud Build will use a standard disk size. + // `disk_size` is overridden if you specify a different disk size in + // `build_options`. In this case, a VM with a disk size specified in the + // `build_options` will be created on demand at build time. For more + // information see + // https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions + int64 disk_size_gb = 2; + + // The network definition used to create the worker. + // If this section is left empty, the workers will be created in + // WorkerPool.project_id on the default network. + Network network = 3; + + // The tag applied to the worker, and the same tag used by the firewall rule. + // It is used to identify the Cloud Build workers among other VMs. + // The default value for tag is `worker`. + string tag = 4; +} + +// Network describes the GCP network used to create workers in. +message Network { + // Project id containing the defined network and subnetwork. For a peered VPC, + // this will be the same as the project_id in which the workers are created. + // For a shared VPC, this will be the project sharing the network with the + // project_id project in which workers will be created. For custom workers + // with no VPC, this will be the same as project_id. + string project_id = 1; + + // Network on which the workers are created. + // "default" network is used if empty. + string network = 2; + + // Subnetwork on which the workers are created. + // "default" subnetwork is used if empty. + string subnetwork = 3; +} + +// Request to create a new `WorkerPool`. +message CreateWorkerPoolRequest { + // ID of the parent project. + string parent = 1; + + // `WorkerPool` resource to create. + WorkerPool worker_pool = 2; +} + +// Request to get a `WorkerPool` with the specified name. +message GetWorkerPoolRequest { + // The field will contain name of the resource requested, for example: + // "projects/project-1/workerPools/workerpool-name" + string name = 1; +} + +// Request to delete a `WorkerPool`. +message DeleteWorkerPoolRequest { + // The field will contain name of the resource requested, for example: + // "projects/project-1/workerPools/workerpool-name" + string name = 1; +} + +// Request to update a `WorkerPool`. +message UpdateWorkerPoolRequest { + // The field will contain name of the resource requested, for example: + // "projects/project-1/workerPools/workerpool-name" + string name = 2; + + // `WorkerPool` resource to update. + WorkerPool worker_pool = 3; +} + +// Request to list `WorkerPool`s. +message ListWorkerPoolsRequest { + // ID of the parent project. + string parent = 1; +} + +// Response containing existing `WorkerPools`. +message ListWorkerPoolsResponse { + // `WorkerPools` for the project. + repeated WorkerPool worker_pools = 1; +} diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild_pb2.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild_pb2.py new file mode 100644 index 000000000000..a7af7be78d7d --- /dev/null +++ b/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild_pb2.py @@ -0,0 +1,6356 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/cloudbuild_v1/proto/cloudbuild.proto + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.longrunning import ( + operations_pb2 as google_dot_longrunning_dot_operations__pb2, +) +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name="google/devtools/cloudbuild_v1/proto/cloudbuild.proto", + package="google.devtools.cloudbuild.v1", + syntax="proto3", + serialized_options=_b( + "\n\030com.google.cloudbuild.v1P\001ZGgoogle.golang.org/genproto/googleapis/devtools/cloudbuild/v1;cloudbuild\242\002\003GCB" + ), + serialized_pb=_b( + '\n4google/devtools/cloudbuild_v1/proto/cloudbuild.proto\x12\x1dgoogle.devtools.cloudbuild.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto"=\n\x11RetryBuildRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02"\x8a\x01\n\x16RunBuildTriggerRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12>\n\x06source\x18\x03 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSourceB\x03\xe0\x41\x02"C\n\rStorageSource\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\x12\x0e\n\x06object\x18\x02 \x01(\t\x12\x12\n\ngeneration\x18\x03 \x01(\x03"\x8d\x01\n\nRepoSource\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x11\n\trepo_name\x18\x02 \x01(\t\x12\x15\n\x0b\x62ranch_name\x18\x03 \x01(\tH\x00\x12\x12\n\x08tag_name\x18\x04 \x01(\tH\x00\x12\x14\n\ncommit_sha\x18\x05 \x01(\tH\x00\x12\x0b\n\x03\x64ir\x18\x07 \x01(\tB\n\n\x08revision"\x9c\x01\n\x06Source\x12\x46\n\x0estorage_source\x18\x02 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.StorageSourceH\x00\x12@\n\x0brepo_source\x18\x03 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSourceH\x00\x42\x08\n\x06source"h\n\nBuiltImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x64igest\x18\x03 \x01(\t\x12<\n\x0bpush_timing\x18\x04 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan"\x9f\x03\n\tBuildStep\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03\x65nv\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x0b\n\x03\x64ir\x18\x04 \x01(\t\x12\n\n\x02id\x18\x05 \x01(\t\x12\x10\n\x08wait_for\x18\x06 \x03(\t\x12\x12\n\nentrypoint\x18\x07 \x01(\t\x12\x12\n\nsecret_env\x18\x08 \x03(\t\x12\x36\n\x07volumes\x18\t \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Volume\x12\x37\n\x06timing\x18\n \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan\x12<\n\x0bpull_timing\x18\r \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan\x12*\n\x07timeout\x18\x0b \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\x06status\x18\x0c \x01(\x0e\x32+.google.devtools.cloudbuild.v1.Build.Status"$\n\x06Volume\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t"\xef\x01\n\x07Results\x12\x39\n\x06images\x18\x02 \x03(\x0b\x32).google.devtools.cloudbuild.v1.BuiltImage\x12\x19\n\x11\x62uild_step_images\x18\x03 \x03(\t\x12\x19\n\x11\x61rtifact_manifest\x18\x04 \x01(\t\x12\x15\n\rnum_artifacts\x18\x05 \x01(\x03\x12\x1a\n\x12\x62uild_step_outputs\x18\x06 \x03(\x0c\x12@\n\x0f\x61rtifact_timing\x18\x07 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan"`\n\x0e\x41rtifactResult\x12\x10\n\x08location\x18\x01 \x01(\t\x12<\n\tfile_hash\x18\x02 \x03(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes"\xe0\t\n\x05\x42uild\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x10 \x01(\t\x12;\n\x06status\x18\x02 \x01(\x0e\x32+.google.devtools.cloudbuild.v1.Build.Status\x12\x15\n\rstatus_detail\x18\x18 \x01(\t\x12\x35\n\x06source\x18\x03 \x01(\x0b\x32%.google.devtools.cloudbuild.v1.Source\x12\x37\n\x05steps\x18\x0b \x03(\x0b\x32(.google.devtools.cloudbuild.v1.BuildStep\x12\x37\n\x07results\x18\n \x01(\x0b\x32&.google.devtools.cloudbuild.v1.Results\x12/\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inish_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\x07timeout\x18\x0c \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06images\x18\r \x03(\t\x12;\n\tartifacts\x18% \x01(\x0b\x32(.google.devtools.cloudbuild.v1.Artifacts\x12\x13\n\x0blogs_bucket\x18\x13 \x01(\t\x12J\n\x11source_provenance\x18\x15 \x01(\x0b\x32/.google.devtools.cloudbuild.v1.SourceProvenance\x12\x18\n\x10\x62uild_trigger_id\x18\x16 \x01(\t\x12<\n\x07options\x18\x17 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildOptions\x12\x0f\n\x07log_url\x18\x19 \x01(\t\x12N\n\rsubstitutions\x18\x1d \x03(\x0b\x32\x37.google.devtools.cloudbuild.v1.Build.SubstitutionsEntry\x12\x0c\n\x04tags\x18\x1f \x03(\t\x12\x36\n\x07secrets\x18 \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Secret\x12@\n\x06timing\x18! \x03(\x0b\x32\x30.google.devtools.cloudbuild.v1.Build.TimingEntry\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aV\n\x0bTimingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan:\x02\x38\x01"\x7f\n\x06Status\x12\x12\n\x0eSTATUS_UNKNOWN\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07WORKING\x10\x02\x12\x0b\n\x07SUCCESS\x10\x03\x12\x0b\n\x07\x46\x41ILURE\x10\x04\x12\x12\n\x0eINTERNAL_ERROR\x10\x05\x12\x0b\n\x07TIMEOUT\x10\x06\x12\r\n\tCANCELLED\x10\x07"\xd3\x01\n\tArtifacts\x12\x0e\n\x06images\x18\x01 \x03(\t\x12I\n\x07objects\x18\x02 \x01(\x0b\x32\x38.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects\x1ak\n\x0f\x41rtifactObjects\x12\x10\n\x08location\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x12\x37\n\x06timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan"h\n\x08TimeSpan\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"M\n\x16\x42uildOperationMetadata\x12\x33\n\x05\x62uild\x18\x01 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.Build"\xde\x02\n\x10SourceProvenance\x12M\n\x17resolved_storage_source\x18\x03 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.StorageSource\x12G\n\x14resolved_repo_source\x18\x06 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\x12T\n\x0b\x66ile_hashes\x18\x04 \x03(\x0b\x32?.google.devtools.cloudbuild.v1.SourceProvenance.FileHashesEntry\x1a\\\n\x0f\x46ileHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes:\x02\x38\x01"D\n\nFileHashes\x12\x36\n\tfile_hash\x18\x01 \x03(\x0b\x32#.google.devtools.cloudbuild.v1.Hash"|\n\x04Hash\x12:\n\x04type\x18\x01 \x01(\x0e\x32,.google.devtools.cloudbuild.v1.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c")\n\x08HashType\x12\x08\n\x04NONE\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02"\x9a\x01\n\x06Secret\x12\x14\n\x0ckms_key_name\x18\x01 \x01(\t\x12H\n\nsecret_env\x18\x03 \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.Secret.SecretEnvEntry\x1a\x30\n\x0eSecretEnvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01"g\n\x12\x43reateBuildRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x05\x62uild\x18\x02 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.BuildB\x03\xe0\x41\x02";\n\x0fGetBuildRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02"c\n\x11ListBuildsRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\t"c\n\x12ListBuildsResponse\x12\x34\n\x06\x62uilds\x18\x01 \x03(\x0b\x32$.google.devtools.cloudbuild.v1.Build\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t">\n\x12\x43\x61ncelBuildRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02"\xaf\x04\n\x0c\x42uildTrigger\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\n \x01(\t\x12\x0c\n\x04name\x18\x15 \x01(\t\x12\x0c\n\x04tags\x18\x13 \x03(\t\x12\x43\n\x10trigger_template\x18\x07 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\x12\x41\n\x06github\x18\r \x01(\x0b\x32\x31.google.devtools.cloudbuild.v1.GitHubEventsConfig\x12\x35\n\x05\x62uild\x18\x04 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.BuildH\x00\x12\x12\n\x08\x66ilename\x18\x08 \x01(\tH\x00\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x64isabled\x18\t \x01(\x08\x12U\n\rsubstitutions\x18\x0b \x03(\x0b\x32>.google.devtools.cloudbuild.v1.BuildTrigger.SubstitutionsEntry\x12\x15\n\rignored_files\x18\x0f \x03(\t\x12\x16\n\x0eincluded_files\x18\x10 \x03(\t\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x10\n\x0e\x62uild_template"\xdc\x01\n\x12GitHubEventsConfig\x12\x1b\n\x0finstallation_id\x18\x01 \x01(\x03\x42\x02\x18\x01\x12\r\n\x05owner\x18\x06 \x01(\t\x12\x0c\n\x04name\x18\x07 \x01(\t\x12H\n\x0cpull_request\x18\x04 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.PullRequestFilterH\x00\x12\x39\n\x04push\x18\x05 \x01(\x0b\x32).google.devtools.cloudbuild.v1.PushFilterH\x00\x42\x07\n\x05\x65vent"\xc9\x01\n\x11PullRequestFilter\x12\x10\n\x06\x62ranch\x18\x02 \x01(\tH\x00\x12X\n\x0f\x63omment_control\x18\x05 \x01(\x0e\x32?.google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl"=\n\x0e\x43ommentControl\x12\x15\n\x11\x43OMMENTS_DISABLED\x10\x00\x12\x14\n\x10\x43OMMENTS_ENABLED\x10\x01\x42\t\n\x07git_ref"8\n\nPushFilter\x12\x10\n\x06\x62ranch\x18\x02 \x01(\tH\x00\x12\r\n\x03tag\x18\x03 \x01(\tH\x00\x42\t\n\x07git_ref"w\n\x19\x43reateBuildTriggerRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x07trigger\x18\x02 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTriggerB\x03\xe0\x41\x02"J\n\x16GetBuildTriggerRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02"Z\n\x18ListBuildTriggersRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"s\n\x19ListBuildTriggersResponse\x12=\n\x08triggers\x18\x01 \x03(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"M\n\x19\x44\x65leteBuildTriggerRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02"\x90\x01\n\x19UpdateBuildTriggerRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x07trigger\x18\x03 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTriggerB\x03\xe0\x41\x02"\xc6\x07\n\x0c\x42uildOptions\x12L\n\x16source_provenance_hash\x18\x01 \x03(\x0e\x32,.google.devtools.cloudbuild.v1.Hash.HashType\x12Y\n\x17requested_verify_option\x18\x02 \x01(\x0e\x32\x38.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption\x12M\n\x0cmachine_type\x18\x03 \x01(\x0e\x32\x37.google.devtools.cloudbuild.v1.BuildOptions.MachineType\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x03\x12[\n\x13substitution_option\x18\x04 \x01(\x0e\x32>.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption\x12\\\n\x14log_streaming_option\x18\x05 \x01(\x0e\x32>.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption\x12\x13\n\x0bworker_pool\x18\x07 \x01(\t\x12H\n\x07logging\x18\x0b \x01(\x0e\x32\x37.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode\x12\x0b\n\x03\x65nv\x18\x0c \x03(\t\x12\x12\n\nsecret_env\x18\r \x03(\t\x12\x36\n\x07volumes\x18\x0e \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Volume".\n\x0cVerifyOption\x12\x10\n\x0cNOT_VERIFIED\x10\x00\x12\x0c\n\x08VERIFIED\x10\x01"C\n\x0bMachineType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x10\n\x0cN1_HIGHCPU_8\x10\x01\x12\x11\n\rN1_HIGHCPU_32\x10\x02"5\n\x12SubstitutionOption\x12\x0e\n\nMUST_MATCH\x10\x00\x12\x0f\n\x0b\x41LLOW_LOOSE\x10\x01"G\n\x12LogStreamingOption\x12\x12\n\x0eSTREAM_DEFAULT\x10\x00\x12\r\n\tSTREAM_ON\x10\x01\x12\x0e\n\nSTREAM_OFF\x10\x02"@\n\x0bLoggingMode\x12\x17\n\x13LOGGING_UNSPECIFIED\x10\x00\x12\n\n\x06LEGACY\x10\x01\x12\x0c\n\x08GCS_ONLY\x10\x02"\xf4\x04\n\nWorkerPool\x12\x0c\n\x04name\x18\x0e \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x1d\n\x15service_account_email\x18\x03 \x01(\t\x12\x14\n\x0cworker_count\x18\x04 \x01(\x03\x12\x42\n\rworker_config\x18\x10 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.WorkerConfig\x12\x41\n\x07regions\x18\t \x03(\x0e\x32\x30.google.devtools.cloudbuild.v1.WorkerPool.Region\x12/\n\x0b\x63reate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x64\x65lete_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x06status\x18\r \x01(\x0e\x32\x30.google.devtools.cloudbuild.v1.WorkerPool.Status"[\n\x06Region\x12\x16\n\x12REGION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bUS_CENTRAL1\x10\x01\x12\x0c\n\x08US_WEST1\x10\x02\x12\x0c\n\x08US_EAST1\x10\x03\x12\x0c\n\x08US_EAST4\x10\x04"V\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0b\n\x07\x44\x45LETED\x10\x04"\x80\x01\n\x0cWorkerConfig\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x14\n\x0c\x64isk_size_gb\x18\x02 \x01(\x03\x12\x37\n\x07network\x18\x03 \x01(\x0b\x32&.google.devtools.cloudbuild.v1.Network\x12\x0b\n\x03tag\x18\x04 \x01(\t"B\n\x07Network\x12\x12\n\nproject_id\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x12\n\nsubnetwork\x18\x03 \x01(\t"i\n\x17\x43reateWorkerPoolRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12>\n\x0bworker_pool\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPool"$\n\x14GetWorkerPoolRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\'\n\x17\x44\x65leteWorkerPoolRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"g\n\x17UpdateWorkerPoolRequest\x12\x0c\n\x04name\x18\x02 \x01(\t\x12>\n\x0bworker_pool\x18\x03 \x01(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPool"(\n\x16ListWorkerPoolsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t"Z\n\x17ListWorkerPoolsResponse\x12?\n\x0cworker_pools\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPool2\xa1\x16\n\nCloudBuild\x12\xc5\x01\n\x0b\x43reateBuild\x12\x31.google.devtools.cloudbuild.v1.CreateBuildRequest\x1a\x1d.google.longrunning.Operation"d\x82\xd3\xe4\x93\x02)" /v1/projects/{project_id}/builds:\x05\x62uild\xda\x41\x10project_id,build\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\x12\x9f\x01\n\x08GetBuild\x12..google.devtools.cloudbuild.v1.GetBuildRequest\x1a$.google.devtools.cloudbuild.v1.Build"=\x82\xd3\xe4\x93\x02\'\x12%/v1/projects/{project_id}/builds/{id}\xda\x41\rproject_id,id\x12\xaf\x01\n\nListBuilds\x12\x30.google.devtools.cloudbuild.v1.ListBuildsRequest\x1a\x31.google.devtools.cloudbuild.v1.ListBuildsResponse"<\x82\xd3\xe4\x93\x02"\x12 /v1/projects/{project_id}/builds\xda\x41\x11project_id,filter\x12\xaf\x01\n\x0b\x43\x61ncelBuild\x12\x31.google.devtools.cloudbuild.v1.CancelBuildRequest\x1a$.google.devtools.cloudbuild.v1.Build"G\x82\xd3\xe4\x93\x02\x31",/v1/projects/{project_id}/builds/{id}:cancel:\x01*\xda\x41\rproject_id,id\x12\xc7\x01\n\nRetryBuild\x12\x30.google.devtools.cloudbuild.v1.RetryBuildRequest\x1a\x1d.google.longrunning.Operation"h\x82\xd3\xe4\x93\x02\x30"+/v1/projects/{project_id}/builds/{id}:retry:\x01*\xda\x41\rproject_id,id\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\x12\xc5\x01\n\x12\x43reateBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger"H\x82\xd3\xe4\x93\x02-""/v1/projects/{project_id}/triggers:\x07trigger\xda\x41\x12project_id,trigger\x12\xc6\x01\n\x0fGetBuildTrigger\x12\x35.google.devtools.cloudbuild.v1.GetBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger"O\x82\xd3\xe4\x93\x02\x31\x12//v1/projects/{project_id}/triggers/{trigger_id}\xda\x41\x15project_id,trigger_id\x12\xbf\x01\n\x11ListBuildTriggers\x12\x37.google.devtools.cloudbuild.v1.ListBuildTriggersRequest\x1a\x38.google.devtools.cloudbuild.v1.ListBuildTriggersResponse"7\x82\xd3\xe4\x93\x02$\x12"/v1/projects/{project_id}/triggers\xda\x41\nproject_id\x12\xb7\x01\n\x12\x44\x65leteBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest\x1a\x16.google.protobuf.Empty"O\x82\xd3\xe4\x93\x02\x31*//v1/projects/{project_id}/triggers/{trigger_id}\xda\x41\x15project_id,trigger_id\x12\xdd\x01\n\x12UpdateBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger"`\x82\xd3\xe4\x93\x02:2//v1/projects/{project_id}/triggers/{trigger_id}:\x07trigger\xda\x41\x1dproject_id,trigger_id,trigger\x12\xee\x01\n\x0fRunBuildTrigger\x12\x35.google.devtools.cloudbuild.v1.RunBuildTriggerRequest\x1a\x1d.google.longrunning.Operation"\x84\x01\x82\xd3\xe4\x93\x02="3/v1/projects/{project_id}/triggers/{trigger_id}:run:\x06source\xda\x41\x1cproject_id,trigger_id,source\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\x12w\n\x10\x43reateWorkerPool\x12\x36.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest\x1a).google.devtools.cloudbuild.v1.WorkerPool"\x00\x12q\n\rGetWorkerPool\x12\x33.google.devtools.cloudbuild.v1.GetWorkerPoolRequest\x1a).google.devtools.cloudbuild.v1.WorkerPool"\x00\x12\x64\n\x10\x44\x65leteWorkerPool\x12\x36.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest\x1a\x16.google.protobuf.Empty"\x00\x12w\n\x10UpdateWorkerPool\x12\x36.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest\x1a).google.devtools.cloudbuild.v1.WorkerPool"\x00\x12\x82\x01\n\x0fListWorkerPools\x12\x35.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest\x1a\x36.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse"\x00\x1aM\xca\x41\x19\x63loudbuild.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBk\n\x18\x63om.google.cloudbuild.v1P\x01ZGgoogle.golang.org/genproto/googleapis/devtools/cloudbuild/v1;cloudbuild\xa2\x02\x03GCBb\x06proto3' + ), + dependencies=[ + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_longrunning_dot_operations__pb2.DESCRIPTOR, + google_dot_protobuf_dot_duration__pb2.DESCRIPTOR, + google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, + google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, + ], +) + + +_BUILD_STATUS = _descriptor.EnumDescriptor( + name="Status", + full_name="google.devtools.cloudbuild.v1.Build.Status", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="STATUS_UNKNOWN", index=0, number=0, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="QUEUED", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="WORKING", index=2, number=2, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="SUCCESS", index=3, number=3, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="FAILURE", index=4, number=4, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="INTERNAL_ERROR", index=5, number=5, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="TIMEOUT", index=6, number=6, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="CANCELLED", index=7, number=7, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=2906, + serialized_end=3033, +) +_sym_db.RegisterEnumDescriptor(_BUILD_STATUS) + +_HASH_HASHTYPE = _descriptor.EnumDescriptor( + name="HashType", + full_name="google.devtools.cloudbuild.v1.Hash.HashType", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="NONE", index=0, number=0, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="SHA256", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="MD5", index=2, number=2, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=3940, + serialized_end=3981, +) +_sym_db.RegisterEnumDescriptor(_HASH_HASHTYPE) + +_PULLREQUESTFILTER_COMMENTCONTROL = _descriptor.EnumDescriptor( + name="CommentControl", + full_name="google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="COMMENTS_DISABLED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="COMMENTS_ENABLED", + index=1, + number=1, + serialized_options=None, + type=None, + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=5487, + serialized_end=5548, +) +_sym_db.RegisterEnumDescriptor(_PULLREQUESTFILTER_COMMENTCONTROL) + +_BUILDOPTIONS_VERIFYOPTION = _descriptor.EnumDescriptor( + name="VerifyOption", + full_name="google.devtools.cloudbuild.v1.BuildOptions.VerifyOption", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="NOT_VERIFIED", index=0, number=0, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="VERIFIED", index=1, number=1, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=6909, + serialized_end=6955, +) +_sym_db.RegisterEnumDescriptor(_BUILDOPTIONS_VERIFYOPTION) + +_BUILDOPTIONS_MACHINETYPE = _descriptor.EnumDescriptor( + name="MachineType", + full_name="google.devtools.cloudbuild.v1.BuildOptions.MachineType", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="UNSPECIFIED", index=0, number=0, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="N1_HIGHCPU_8", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="N1_HIGHCPU_32", index=2, number=2, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=6957, + serialized_end=7024, +) +_sym_db.RegisterEnumDescriptor(_BUILDOPTIONS_MACHINETYPE) + +_BUILDOPTIONS_SUBSTITUTIONOPTION = _descriptor.EnumDescriptor( + name="SubstitutionOption", + full_name="google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="MUST_MATCH", index=0, number=0, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="ALLOW_LOOSE", index=1, number=1, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=7026, + serialized_end=7079, +) +_sym_db.RegisterEnumDescriptor(_BUILDOPTIONS_SUBSTITUTIONOPTION) + +_BUILDOPTIONS_LOGSTREAMINGOPTION = _descriptor.EnumDescriptor( + name="LogStreamingOption", + full_name="google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="STREAM_DEFAULT", index=0, number=0, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="STREAM_ON", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="STREAM_OFF", index=2, number=2, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=7081, + serialized_end=7152, +) +_sym_db.RegisterEnumDescriptor(_BUILDOPTIONS_LOGSTREAMINGOPTION) + +_BUILDOPTIONS_LOGGINGMODE = _descriptor.EnumDescriptor( + name="LoggingMode", + full_name="google.devtools.cloudbuild.v1.BuildOptions.LoggingMode", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="LOGGING_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="LEGACY", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="GCS_ONLY", index=2, number=2, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=7154, + serialized_end=7218, +) +_sym_db.RegisterEnumDescriptor(_BUILDOPTIONS_LOGGINGMODE) + +_WORKERPOOL_REGION = _descriptor.EnumDescriptor( + name="Region", + full_name="google.devtools.cloudbuild.v1.WorkerPool.Region", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="REGION_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="US_CENTRAL1", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="US_WEST1", index=2, number=2, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="US_EAST1", index=3, number=3, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="US_EAST4", index=4, number=4, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=7670, + serialized_end=7761, +) +_sym_db.RegisterEnumDescriptor(_WORKERPOOL_REGION) + +_WORKERPOOL_STATUS = _descriptor.EnumDescriptor( + name="Status", + full_name="google.devtools.cloudbuild.v1.WorkerPool.Status", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="STATUS_UNSPECIFIED", + index=0, + number=0, + serialized_options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="CREATING", index=1, number=1, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="RUNNING", index=2, number=2, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DELETING", index=3, number=3, serialized_options=None, type=None + ), + _descriptor.EnumValueDescriptor( + name="DELETED", index=4, number=4, serialized_options=None, type=None + ), + ], + containing_type=None, + serialized_options=None, + serialized_start=7763, + serialized_end=7849, +) +_sym_db.RegisterEnumDescriptor(_WORKERPOOL_STATUS) + + +_RETRYBUILDREQUEST = _descriptor.Descriptor( + name="RetryBuildRequest", + full_name="google.devtools.cloudbuild.v1.RetryBuildRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.RetryBuildRequest.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="id", + full_name="google.devtools.cloudbuild.v1.RetryBuildRequest.id", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=306, + serialized_end=367, +) + + +_RUNBUILDTRIGGERREQUEST = _descriptor.Descriptor( + name="RunBuildTriggerRequest", + full_name="google.devtools.cloudbuild.v1.RunBuildTriggerRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.RunBuildTriggerRequest.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="trigger_id", + full_name="google.devtools.cloudbuild.v1.RunBuildTriggerRequest.trigger_id", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="source", + full_name="google.devtools.cloudbuild.v1.RunBuildTriggerRequest.source", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=370, + serialized_end=508, +) + + +_STORAGESOURCE = _descriptor.Descriptor( + name="StorageSource", + full_name="google.devtools.cloudbuild.v1.StorageSource", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="bucket", + full_name="google.devtools.cloudbuild.v1.StorageSource.bucket", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="object", + full_name="google.devtools.cloudbuild.v1.StorageSource.object", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="generation", + full_name="google.devtools.cloudbuild.v1.StorageSource.generation", + index=2, + number=3, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=510, + serialized_end=577, +) + + +_REPOSOURCE = _descriptor.Descriptor( + name="RepoSource", + full_name="google.devtools.cloudbuild.v1.RepoSource", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.RepoSource.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="repo_name", + full_name="google.devtools.cloudbuild.v1.RepoSource.repo_name", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="branch_name", + full_name="google.devtools.cloudbuild.v1.RepoSource.branch_name", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tag_name", + full_name="google.devtools.cloudbuild.v1.RepoSource.tag_name", + index=3, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="commit_sha", + full_name="google.devtools.cloudbuild.v1.RepoSource.commit_sha", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="dir", + full_name="google.devtools.cloudbuild.v1.RepoSource.dir", + index=5, + number=7, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="revision", + full_name="google.devtools.cloudbuild.v1.RepoSource.revision", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=580, + serialized_end=721, +) + + +_SOURCE = _descriptor.Descriptor( + name="Source", + full_name="google.devtools.cloudbuild.v1.Source", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="storage_source", + full_name="google.devtools.cloudbuild.v1.Source.storage_source", + index=0, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="repo_source", + full_name="google.devtools.cloudbuild.v1.Source.repo_source", + index=1, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="source", + full_name="google.devtools.cloudbuild.v1.Source.source", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=724, + serialized_end=880, +) + + +_BUILTIMAGE = _descriptor.Descriptor( + name="BuiltImage", + full_name="google.devtools.cloudbuild.v1.BuiltImage", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.devtools.cloudbuild.v1.BuiltImage.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="digest", + full_name="google.devtools.cloudbuild.v1.BuiltImage.digest", + index=1, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="push_timing", + full_name="google.devtools.cloudbuild.v1.BuiltImage.push_timing", + index=2, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=882, + serialized_end=986, +) + + +_BUILDSTEP = _descriptor.Descriptor( + name="BuildStep", + full_name="google.devtools.cloudbuild.v1.BuildStep", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.devtools.cloudbuild.v1.BuildStep.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="env", + full_name="google.devtools.cloudbuild.v1.BuildStep.env", + index=1, + number=2, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="args", + full_name="google.devtools.cloudbuild.v1.BuildStep.args", + index=2, + number=3, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="dir", + full_name="google.devtools.cloudbuild.v1.BuildStep.dir", + index=3, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="id", + full_name="google.devtools.cloudbuild.v1.BuildStep.id", + index=4, + number=5, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="wait_for", + full_name="google.devtools.cloudbuild.v1.BuildStep.wait_for", + index=5, + number=6, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="entrypoint", + full_name="google.devtools.cloudbuild.v1.BuildStep.entrypoint", + index=6, + number=7, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="secret_env", + full_name="google.devtools.cloudbuild.v1.BuildStep.secret_env", + index=7, + number=8, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="volumes", + full_name="google.devtools.cloudbuild.v1.BuildStep.volumes", + index=8, + number=9, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="timing", + full_name="google.devtools.cloudbuild.v1.BuildStep.timing", + index=9, + number=10, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="pull_timing", + full_name="google.devtools.cloudbuild.v1.BuildStep.pull_timing", + index=10, + number=13, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="timeout", + full_name="google.devtools.cloudbuild.v1.BuildStep.timeout", + index=11, + number=11, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="status", + full_name="google.devtools.cloudbuild.v1.BuildStep.status", + index=12, + number=12, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=989, + serialized_end=1404, +) + + +_VOLUME = _descriptor.Descriptor( + name="Volume", + full_name="google.devtools.cloudbuild.v1.Volume", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.devtools.cloudbuild.v1.Volume.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="path", + full_name="google.devtools.cloudbuild.v1.Volume.path", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1406, + serialized_end=1442, +) + + +_RESULTS = _descriptor.Descriptor( + name="Results", + full_name="google.devtools.cloudbuild.v1.Results", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="images", + full_name="google.devtools.cloudbuild.v1.Results.images", + index=0, + number=2, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="build_step_images", + full_name="google.devtools.cloudbuild.v1.Results.build_step_images", + index=1, + number=3, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="artifact_manifest", + full_name="google.devtools.cloudbuild.v1.Results.artifact_manifest", + index=2, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="num_artifacts", + full_name="google.devtools.cloudbuild.v1.Results.num_artifacts", + index=3, + number=5, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="build_step_outputs", + full_name="google.devtools.cloudbuild.v1.Results.build_step_outputs", + index=4, + number=6, + type=12, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="artifact_timing", + full_name="google.devtools.cloudbuild.v1.Results.artifact_timing", + index=5, + number=7, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1445, + serialized_end=1684, +) + + +_ARTIFACTRESULT = _descriptor.Descriptor( + name="ArtifactResult", + full_name="google.devtools.cloudbuild.v1.ArtifactResult", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="location", + full_name="google.devtools.cloudbuild.v1.ArtifactResult.location", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="file_hash", + full_name="google.devtools.cloudbuild.v1.ArtifactResult.file_hash", + index=1, + number=2, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1686, + serialized_end=1782, +) + + +_BUILD_SUBSTITUTIONSENTRY = _descriptor.Descriptor( + name="SubstitutionsEntry", + full_name="google.devtools.cloudbuild.v1.Build.SubstitutionsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.devtools.cloudbuild.v1.Build.SubstitutionsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.devtools.cloudbuild.v1.Build.SubstitutionsEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=_b("8\001"), + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2764, + serialized_end=2816, +) + +_BUILD_TIMINGENTRY = _descriptor.Descriptor( + name="TimingEntry", + full_name="google.devtools.cloudbuild.v1.Build.TimingEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.devtools.cloudbuild.v1.Build.TimingEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.devtools.cloudbuild.v1.Build.TimingEntry.value", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=_b("8\001"), + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2818, + serialized_end=2904, +) + +_BUILD = _descriptor.Descriptor( + name="Build", + full_name="google.devtools.cloudbuild.v1.Build", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="id", + full_name="google.devtools.cloudbuild.v1.Build.id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.Build.project_id", + index=1, + number=16, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="status", + full_name="google.devtools.cloudbuild.v1.Build.status", + index=2, + number=2, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="status_detail", + full_name="google.devtools.cloudbuild.v1.Build.status_detail", + index=3, + number=24, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="source", + full_name="google.devtools.cloudbuild.v1.Build.source", + index=4, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="steps", + full_name="google.devtools.cloudbuild.v1.Build.steps", + index=5, + number=11, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="results", + full_name="google.devtools.cloudbuild.v1.Build.results", + index=6, + number=10, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.devtools.cloudbuild.v1.Build.create_time", + index=7, + number=6, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="start_time", + full_name="google.devtools.cloudbuild.v1.Build.start_time", + index=8, + number=7, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="finish_time", + full_name="google.devtools.cloudbuild.v1.Build.finish_time", + index=9, + number=8, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="timeout", + full_name="google.devtools.cloudbuild.v1.Build.timeout", + index=10, + number=12, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="images", + full_name="google.devtools.cloudbuild.v1.Build.images", + index=11, + number=13, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="artifacts", + full_name="google.devtools.cloudbuild.v1.Build.artifacts", + index=12, + number=37, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="logs_bucket", + full_name="google.devtools.cloudbuild.v1.Build.logs_bucket", + index=13, + number=19, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="source_provenance", + full_name="google.devtools.cloudbuild.v1.Build.source_provenance", + index=14, + number=21, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="build_trigger_id", + full_name="google.devtools.cloudbuild.v1.Build.build_trigger_id", + index=15, + number=22, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="options", + full_name="google.devtools.cloudbuild.v1.Build.options", + index=16, + number=23, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="log_url", + full_name="google.devtools.cloudbuild.v1.Build.log_url", + index=17, + number=25, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="substitutions", + full_name="google.devtools.cloudbuild.v1.Build.substitutions", + index=18, + number=29, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tags", + full_name="google.devtools.cloudbuild.v1.Build.tags", + index=19, + number=31, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="secrets", + full_name="google.devtools.cloudbuild.v1.Build.secrets", + index=20, + number=32, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="timing", + full_name="google.devtools.cloudbuild.v1.Build.timing", + index=21, + number=33, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_BUILD_SUBSTITUTIONSENTRY, _BUILD_TIMINGENTRY], + enum_types=[_BUILD_STATUS], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1785, + serialized_end=3033, +) + + +_ARTIFACTS_ARTIFACTOBJECTS = _descriptor.Descriptor( + name="ArtifactObjects", + full_name="google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="location", + full_name="google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.location", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="paths", + full_name="google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.paths", + index=1, + number=2, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="timing", + full_name="google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.timing", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3140, + serialized_end=3247, +) + +_ARTIFACTS = _descriptor.Descriptor( + name="Artifacts", + full_name="google.devtools.cloudbuild.v1.Artifacts", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="images", + full_name="google.devtools.cloudbuild.v1.Artifacts.images", + index=0, + number=1, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="objects", + full_name="google.devtools.cloudbuild.v1.Artifacts.objects", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_ARTIFACTS_ARTIFACTOBJECTS], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3036, + serialized_end=3247, +) + + +_TIMESPAN = _descriptor.Descriptor( + name="TimeSpan", + full_name="google.devtools.cloudbuild.v1.TimeSpan", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="start_time", + full_name="google.devtools.cloudbuild.v1.TimeSpan.start_time", + index=0, + number=1, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="end_time", + full_name="google.devtools.cloudbuild.v1.TimeSpan.end_time", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3249, + serialized_end=3353, +) + + +_BUILDOPERATIONMETADATA = _descriptor.Descriptor( + name="BuildOperationMetadata", + full_name="google.devtools.cloudbuild.v1.BuildOperationMetadata", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="build", + full_name="google.devtools.cloudbuild.v1.BuildOperationMetadata.build", + index=0, + number=1, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3355, + serialized_end=3432, +) + + +_SOURCEPROVENANCE_FILEHASHESENTRY = _descriptor.Descriptor( + name="FileHashesEntry", + full_name="google.devtools.cloudbuild.v1.SourceProvenance.FileHashesEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.devtools.cloudbuild.v1.SourceProvenance.FileHashesEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.devtools.cloudbuild.v1.SourceProvenance.FileHashesEntry.value", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=_b("8\001"), + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3693, + serialized_end=3785, +) + +_SOURCEPROVENANCE = _descriptor.Descriptor( + name="SourceProvenance", + full_name="google.devtools.cloudbuild.v1.SourceProvenance", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="resolved_storage_source", + full_name="google.devtools.cloudbuild.v1.SourceProvenance.resolved_storage_source", + index=0, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="resolved_repo_source", + full_name="google.devtools.cloudbuild.v1.SourceProvenance.resolved_repo_source", + index=1, + number=6, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="file_hashes", + full_name="google.devtools.cloudbuild.v1.SourceProvenance.file_hashes", + index=2, + number=4, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_SOURCEPROVENANCE_FILEHASHESENTRY], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3435, + serialized_end=3785, +) + + +_FILEHASHES = _descriptor.Descriptor( + name="FileHashes", + full_name="google.devtools.cloudbuild.v1.FileHashes", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="file_hash", + full_name="google.devtools.cloudbuild.v1.FileHashes.file_hash", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3787, + serialized_end=3855, +) + + +_HASH = _descriptor.Descriptor( + name="Hash", + full_name="google.devtools.cloudbuild.v1.Hash", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="type", + full_name="google.devtools.cloudbuild.v1.Hash.type", + index=0, + number=1, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.devtools.cloudbuild.v1.Hash.value", + index=1, + number=2, + type=12, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b(""), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[_HASH_HASHTYPE], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3857, + serialized_end=3981, +) + + +_SECRET_SECRETENVENTRY = _descriptor.Descriptor( + name="SecretEnvEntry", + full_name="google.devtools.cloudbuild.v1.Secret.SecretEnvEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.devtools.cloudbuild.v1.Secret.SecretEnvEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.devtools.cloudbuild.v1.Secret.SecretEnvEntry.value", + index=1, + number=2, + type=12, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b(""), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=_b("8\001"), + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=4090, + serialized_end=4138, +) + +_SECRET = _descriptor.Descriptor( + name="Secret", + full_name="google.devtools.cloudbuild.v1.Secret", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="kms_key_name", + full_name="google.devtools.cloudbuild.v1.Secret.kms_key_name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="secret_env", + full_name="google.devtools.cloudbuild.v1.Secret.secret_env", + index=1, + number=3, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_SECRET_SECRETENVENTRY], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=3984, + serialized_end=4138, +) + + +_CREATEBUILDREQUEST = _descriptor.Descriptor( + name="CreateBuildRequest", + full_name="google.devtools.cloudbuild.v1.CreateBuildRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.CreateBuildRequest.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="build", + full_name="google.devtools.cloudbuild.v1.CreateBuildRequest.build", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=4140, + serialized_end=4243, +) + + +_GETBUILDREQUEST = _descriptor.Descriptor( + name="GetBuildRequest", + full_name="google.devtools.cloudbuild.v1.GetBuildRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.GetBuildRequest.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="id", + full_name="google.devtools.cloudbuild.v1.GetBuildRequest.id", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=4245, + serialized_end=4304, +) + + +_LISTBUILDSREQUEST = _descriptor.Descriptor( + name="ListBuildsRequest", + full_name="google.devtools.cloudbuild.v1.ListBuildsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.ListBuildsRequest.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.devtools.cloudbuild.v1.ListBuildsRequest.page_size", + index=1, + number=2, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.devtools.cloudbuild.v1.ListBuildsRequest.page_token", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="filter", + full_name="google.devtools.cloudbuild.v1.ListBuildsRequest.filter", + index=3, + number=8, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=4306, + serialized_end=4405, +) + + +_LISTBUILDSRESPONSE = _descriptor.Descriptor( + name="ListBuildsResponse", + full_name="google.devtools.cloudbuild.v1.ListBuildsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="builds", + full_name="google.devtools.cloudbuild.v1.ListBuildsResponse.builds", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.devtools.cloudbuild.v1.ListBuildsResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=4407, + serialized_end=4506, +) + + +_CANCELBUILDREQUEST = _descriptor.Descriptor( + name="CancelBuildRequest", + full_name="google.devtools.cloudbuild.v1.CancelBuildRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.CancelBuildRequest.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="id", + full_name="google.devtools.cloudbuild.v1.CancelBuildRequest.id", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=4508, + serialized_end=4570, +) + + +_BUILDTRIGGER_SUBSTITUTIONSENTRY = _descriptor.Descriptor( + name="SubstitutionsEntry", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.SubstitutionsEntry", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="key", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.SubstitutionsEntry.key", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="value", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.SubstitutionsEntry.value", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=_b("8\001"), + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2764, + serialized_end=2816, +) + +_BUILDTRIGGER = _descriptor.Descriptor( + name="BuildTrigger", + full_name="google.devtools.cloudbuild.v1.BuildTrigger", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="id", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.description", + index=1, + number=10, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="name", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.name", + index=2, + number=21, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tags", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.tags", + index=3, + number=19, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="trigger_template", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.trigger_template", + index=4, + number=7, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="github", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.github", + index=5, + number=13, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="build", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.build", + index=6, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="filename", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.filename", + index=7, + number=8, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.create_time", + index=8, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="disabled", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.disabled", + index=9, + number=9, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="substitutions", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.substitutions", + index=10, + number=11, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="ignored_files", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.ignored_files", + index=11, + number=15, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="included_files", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.included_files", + index=12, + number=16, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[_BUILDTRIGGER_SUBSTITUTIONSENTRY], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="build_template", + full_name="google.devtools.cloudbuild.v1.BuildTrigger.build_template", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=4573, + serialized_end=5132, +) + + +_GITHUBEVENTSCONFIG = _descriptor.Descriptor( + name="GitHubEventsConfig", + full_name="google.devtools.cloudbuild.v1.GitHubEventsConfig", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="installation_id", + full_name="google.devtools.cloudbuild.v1.GitHubEventsConfig.installation_id", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\030\001"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="owner", + full_name="google.devtools.cloudbuild.v1.GitHubEventsConfig.owner", + index=1, + number=6, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="name", + full_name="google.devtools.cloudbuild.v1.GitHubEventsConfig.name", + index=2, + number=7, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="pull_request", + full_name="google.devtools.cloudbuild.v1.GitHubEventsConfig.pull_request", + index=3, + number=4, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="push", + full_name="google.devtools.cloudbuild.v1.GitHubEventsConfig.push", + index=4, + number=5, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="event", + full_name="google.devtools.cloudbuild.v1.GitHubEventsConfig.event", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=5135, + serialized_end=5355, +) + + +_PULLREQUESTFILTER = _descriptor.Descriptor( + name="PullRequestFilter", + full_name="google.devtools.cloudbuild.v1.PullRequestFilter", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="branch", + full_name="google.devtools.cloudbuild.v1.PullRequestFilter.branch", + index=0, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="comment_control", + full_name="google.devtools.cloudbuild.v1.PullRequestFilter.comment_control", + index=1, + number=5, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[_PULLREQUESTFILTER_COMMENTCONTROL], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="git_ref", + full_name="google.devtools.cloudbuild.v1.PullRequestFilter.git_ref", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=5358, + serialized_end=5559, +) + + +_PUSHFILTER = _descriptor.Descriptor( + name="PushFilter", + full_name="google.devtools.cloudbuild.v1.PushFilter", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="branch", + full_name="google.devtools.cloudbuild.v1.PushFilter.branch", + index=0, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tag", + full_name="google.devtools.cloudbuild.v1.PushFilter.tag", + index=1, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="git_ref", + full_name="google.devtools.cloudbuild.v1.PushFilter.git_ref", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=5561, + serialized_end=5617, +) + + +_CREATEBUILDTRIGGERREQUEST = _descriptor.Descriptor( + name="CreateBuildTriggerRequest", + full_name="google.devtools.cloudbuild.v1.CreateBuildTriggerRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="trigger", + full_name="google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.trigger", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=5619, + serialized_end=5738, +) + + +_GETBUILDTRIGGERREQUEST = _descriptor.Descriptor( + name="GetBuildTriggerRequest", + full_name="google.devtools.cloudbuild.v1.GetBuildTriggerRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.GetBuildTriggerRequest.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="trigger_id", + full_name="google.devtools.cloudbuild.v1.GetBuildTriggerRequest.trigger_id", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=5740, + serialized_end=5814, +) + + +_LISTBUILDTRIGGERSREQUEST = _descriptor.Descriptor( + name="ListBuildTriggersRequest", + full_name="google.devtools.cloudbuild.v1.ListBuildTriggersRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.ListBuildTriggersRequest.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_size", + full_name="google.devtools.cloudbuild.v1.ListBuildTriggersRequest.page_size", + index=1, + number=2, + type=5, + cpp_type=1, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="page_token", + full_name="google.devtools.cloudbuild.v1.ListBuildTriggersRequest.page_token", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=5816, + serialized_end=5906, +) + + +_LISTBUILDTRIGGERSRESPONSE = _descriptor.Descriptor( + name="ListBuildTriggersResponse", + full_name="google.devtools.cloudbuild.v1.ListBuildTriggersResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="triggers", + full_name="google.devtools.cloudbuild.v1.ListBuildTriggersResponse.triggers", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="next_page_token", + full_name="google.devtools.cloudbuild.v1.ListBuildTriggersResponse.next_page_token", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=5908, + serialized_end=6023, +) + + +_DELETEBUILDTRIGGERREQUEST = _descriptor.Descriptor( + name="DeleteBuildTriggerRequest", + full_name="google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="trigger_id", + full_name="google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest.trigger_id", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=6025, + serialized_end=6102, +) + + +_UPDATEBUILDTRIGGERREQUEST = _descriptor.Descriptor( + name="UpdateBuildTriggerRequest", + full_name="google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="trigger_id", + full_name="google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.trigger_id", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="trigger", + full_name="google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.trigger", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b("\340A\002"), + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=6105, + serialized_end=6249, +) + + +_BUILDOPTIONS = _descriptor.Descriptor( + name="BuildOptions", + full_name="google.devtools.cloudbuild.v1.BuildOptions", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="source_provenance_hash", + full_name="google.devtools.cloudbuild.v1.BuildOptions.source_provenance_hash", + index=0, + number=1, + type=14, + cpp_type=8, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="requested_verify_option", + full_name="google.devtools.cloudbuild.v1.BuildOptions.requested_verify_option", + index=1, + number=2, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="machine_type", + full_name="google.devtools.cloudbuild.v1.BuildOptions.machine_type", + index=2, + number=3, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="disk_size_gb", + full_name="google.devtools.cloudbuild.v1.BuildOptions.disk_size_gb", + index=3, + number=6, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="substitution_option", + full_name="google.devtools.cloudbuild.v1.BuildOptions.substitution_option", + index=4, + number=4, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="log_streaming_option", + full_name="google.devtools.cloudbuild.v1.BuildOptions.log_streaming_option", + index=5, + number=5, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="worker_pool", + full_name="google.devtools.cloudbuild.v1.BuildOptions.worker_pool", + index=6, + number=7, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="logging", + full_name="google.devtools.cloudbuild.v1.BuildOptions.logging", + index=7, + number=11, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="env", + full_name="google.devtools.cloudbuild.v1.BuildOptions.env", + index=8, + number=12, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="secret_env", + full_name="google.devtools.cloudbuild.v1.BuildOptions.secret_env", + index=9, + number=13, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="volumes", + full_name="google.devtools.cloudbuild.v1.BuildOptions.volumes", + index=10, + number=14, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[ + _BUILDOPTIONS_VERIFYOPTION, + _BUILDOPTIONS_MACHINETYPE, + _BUILDOPTIONS_SUBSTITUTIONOPTION, + _BUILDOPTIONS_LOGSTREAMINGOPTION, + _BUILDOPTIONS_LOGGINGMODE, + ], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=6252, + serialized_end=7218, +) + + +_WORKERPOOL = _descriptor.Descriptor( + name="WorkerPool", + full_name="google.devtools.cloudbuild.v1.WorkerPool", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.devtools.cloudbuild.v1.WorkerPool.name", + index=0, + number=14, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.WorkerPool.project_id", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="service_account_email", + full_name="google.devtools.cloudbuild.v1.WorkerPool.service_account_email", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="worker_count", + full_name="google.devtools.cloudbuild.v1.WorkerPool.worker_count", + index=3, + number=4, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="worker_config", + full_name="google.devtools.cloudbuild.v1.WorkerPool.worker_config", + index=4, + number=16, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="regions", + full_name="google.devtools.cloudbuild.v1.WorkerPool.regions", + index=5, + number=9, + type=14, + cpp_type=8, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="create_time", + full_name="google.devtools.cloudbuild.v1.WorkerPool.create_time", + index=6, + number=11, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="update_time", + full_name="google.devtools.cloudbuild.v1.WorkerPool.update_time", + index=7, + number=17, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="delete_time", + full_name="google.devtools.cloudbuild.v1.WorkerPool.delete_time", + index=8, + number=12, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="status", + full_name="google.devtools.cloudbuild.v1.WorkerPool.status", + index=9, + number=13, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[_WORKERPOOL_REGION, _WORKERPOOL_STATUS], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=7221, + serialized_end=7849, +) + + +_WORKERCONFIG = _descriptor.Descriptor( + name="WorkerConfig", + full_name="google.devtools.cloudbuild.v1.WorkerConfig", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="machine_type", + full_name="google.devtools.cloudbuild.v1.WorkerConfig.machine_type", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="disk_size_gb", + full_name="google.devtools.cloudbuild.v1.WorkerConfig.disk_size_gb", + index=1, + number=2, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="network", + full_name="google.devtools.cloudbuild.v1.WorkerConfig.network", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="tag", + full_name="google.devtools.cloudbuild.v1.WorkerConfig.tag", + index=3, + number=4, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=7852, + serialized_end=7980, +) + + +_NETWORK = _descriptor.Descriptor( + name="Network", + full_name="google.devtools.cloudbuild.v1.Network", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="project_id", + full_name="google.devtools.cloudbuild.v1.Network.project_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="network", + full_name="google.devtools.cloudbuild.v1.Network.network", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="subnetwork", + full_name="google.devtools.cloudbuild.v1.Network.subnetwork", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=7982, + serialized_end=8048, +) + + +_CREATEWORKERPOOLREQUEST = _descriptor.Descriptor( + name="CreateWorkerPoolRequest", + full_name="google.devtools.cloudbuild.v1.CreateWorkerPoolRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="worker_pool", + full_name="google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.worker_pool", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=8050, + serialized_end=8155, +) + + +_GETWORKERPOOLREQUEST = _descriptor.Descriptor( + name="GetWorkerPoolRequest", + full_name="google.devtools.cloudbuild.v1.GetWorkerPoolRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.devtools.cloudbuild.v1.GetWorkerPoolRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=8157, + serialized_end=8193, +) + + +_DELETEWORKERPOOLREQUEST = _descriptor.Descriptor( + name="DeleteWorkerPoolRequest", + full_name="google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=8195, + serialized_end=8234, +) + + +_UPDATEWORKERPOOLREQUEST = _descriptor.Descriptor( + name="UpdateWorkerPoolRequest", + full_name="google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.name", + index=0, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="worker_pool", + full_name="google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.worker_pool", + index=1, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=8236, + serialized_end=8339, +) + + +_LISTWORKERPOOLSREQUEST = _descriptor.Descriptor( + name="ListWorkerPoolsRequest", + full_name="google.devtools.cloudbuild.v1.ListWorkerPoolsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="parent", + full_name="google.devtools.cloudbuild.v1.ListWorkerPoolsRequest.parent", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=8341, + serialized_end=8381, +) + + +_LISTWORKERPOOLSRESPONSE = _descriptor.Descriptor( + name="ListWorkerPoolsResponse", + full_name="google.devtools.cloudbuild.v1.ListWorkerPoolsResponse", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="worker_pools", + full_name="google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.worker_pools", + index=0, + number=1, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=8383, + serialized_end=8473, +) + +_RUNBUILDTRIGGERREQUEST.fields_by_name["source"].message_type = _REPOSOURCE +_REPOSOURCE.oneofs_by_name["revision"].fields.append( + _REPOSOURCE.fields_by_name["branch_name"] +) +_REPOSOURCE.fields_by_name["branch_name"].containing_oneof = _REPOSOURCE.oneofs_by_name[ + "revision" +] +_REPOSOURCE.oneofs_by_name["revision"].fields.append( + _REPOSOURCE.fields_by_name["tag_name"] +) +_REPOSOURCE.fields_by_name["tag_name"].containing_oneof = _REPOSOURCE.oneofs_by_name[ + "revision" +] +_REPOSOURCE.oneofs_by_name["revision"].fields.append( + _REPOSOURCE.fields_by_name["commit_sha"] +) +_REPOSOURCE.fields_by_name["commit_sha"].containing_oneof = _REPOSOURCE.oneofs_by_name[ + "revision" +] +_SOURCE.fields_by_name["storage_source"].message_type = _STORAGESOURCE +_SOURCE.fields_by_name["repo_source"].message_type = _REPOSOURCE +_SOURCE.oneofs_by_name["source"].fields.append(_SOURCE.fields_by_name["storage_source"]) +_SOURCE.fields_by_name["storage_source"].containing_oneof = _SOURCE.oneofs_by_name[ + "source" +] +_SOURCE.oneofs_by_name["source"].fields.append(_SOURCE.fields_by_name["repo_source"]) +_SOURCE.fields_by_name["repo_source"].containing_oneof = _SOURCE.oneofs_by_name[ + "source" +] +_BUILTIMAGE.fields_by_name["push_timing"].message_type = _TIMESPAN +_BUILDSTEP.fields_by_name["volumes"].message_type = _VOLUME +_BUILDSTEP.fields_by_name["timing"].message_type = _TIMESPAN +_BUILDSTEP.fields_by_name["pull_timing"].message_type = _TIMESPAN +_BUILDSTEP.fields_by_name[ + "timeout" +].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_BUILDSTEP.fields_by_name["status"].enum_type = _BUILD_STATUS +_RESULTS.fields_by_name["images"].message_type = _BUILTIMAGE +_RESULTS.fields_by_name["artifact_timing"].message_type = _TIMESPAN +_ARTIFACTRESULT.fields_by_name["file_hash"].message_type = _FILEHASHES +_BUILD_SUBSTITUTIONSENTRY.containing_type = _BUILD +_BUILD_TIMINGENTRY.fields_by_name["value"].message_type = _TIMESPAN +_BUILD_TIMINGENTRY.containing_type = _BUILD +_BUILD.fields_by_name["status"].enum_type = _BUILD_STATUS +_BUILD.fields_by_name["source"].message_type = _SOURCE +_BUILD.fields_by_name["steps"].message_type = _BUILDSTEP +_BUILD.fields_by_name["results"].message_type = _RESULTS +_BUILD.fields_by_name[ + "create_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_BUILD.fields_by_name[ + "start_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_BUILD.fields_by_name[ + "finish_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_BUILD.fields_by_name[ + "timeout" +].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_BUILD.fields_by_name["artifacts"].message_type = _ARTIFACTS +_BUILD.fields_by_name["source_provenance"].message_type = _SOURCEPROVENANCE +_BUILD.fields_by_name["options"].message_type = _BUILDOPTIONS +_BUILD.fields_by_name["substitutions"].message_type = _BUILD_SUBSTITUTIONSENTRY +_BUILD.fields_by_name["secrets"].message_type = _SECRET +_BUILD.fields_by_name["timing"].message_type = _BUILD_TIMINGENTRY +_BUILD_STATUS.containing_type = _BUILD +_ARTIFACTS_ARTIFACTOBJECTS.fields_by_name["timing"].message_type = _TIMESPAN +_ARTIFACTS_ARTIFACTOBJECTS.containing_type = _ARTIFACTS +_ARTIFACTS.fields_by_name["objects"].message_type = _ARTIFACTS_ARTIFACTOBJECTS +_TIMESPAN.fields_by_name[ + "start_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_TIMESPAN.fields_by_name[ + "end_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_BUILDOPERATIONMETADATA.fields_by_name["build"].message_type = _BUILD +_SOURCEPROVENANCE_FILEHASHESENTRY.fields_by_name["value"].message_type = _FILEHASHES +_SOURCEPROVENANCE_FILEHASHESENTRY.containing_type = _SOURCEPROVENANCE +_SOURCEPROVENANCE.fields_by_name[ + "resolved_storage_source" +].message_type = _STORAGESOURCE +_SOURCEPROVENANCE.fields_by_name["resolved_repo_source"].message_type = _REPOSOURCE +_SOURCEPROVENANCE.fields_by_name[ + "file_hashes" +].message_type = _SOURCEPROVENANCE_FILEHASHESENTRY +_FILEHASHES.fields_by_name["file_hash"].message_type = _HASH +_HASH.fields_by_name["type"].enum_type = _HASH_HASHTYPE +_HASH_HASHTYPE.containing_type = _HASH +_SECRET_SECRETENVENTRY.containing_type = _SECRET +_SECRET.fields_by_name["secret_env"].message_type = _SECRET_SECRETENVENTRY +_CREATEBUILDREQUEST.fields_by_name["build"].message_type = _BUILD +_LISTBUILDSRESPONSE.fields_by_name["builds"].message_type = _BUILD +_BUILDTRIGGER_SUBSTITUTIONSENTRY.containing_type = _BUILDTRIGGER +_BUILDTRIGGER.fields_by_name["trigger_template"].message_type = _REPOSOURCE +_BUILDTRIGGER.fields_by_name["github"].message_type = _GITHUBEVENTSCONFIG +_BUILDTRIGGER.fields_by_name["build"].message_type = _BUILD +_BUILDTRIGGER.fields_by_name[ + "create_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_BUILDTRIGGER.fields_by_name[ + "substitutions" +].message_type = _BUILDTRIGGER_SUBSTITUTIONSENTRY +_BUILDTRIGGER.oneofs_by_name["build_template"].fields.append( + _BUILDTRIGGER.fields_by_name["build"] +) +_BUILDTRIGGER.fields_by_name["build"].containing_oneof = _BUILDTRIGGER.oneofs_by_name[ + "build_template" +] +_BUILDTRIGGER.oneofs_by_name["build_template"].fields.append( + _BUILDTRIGGER.fields_by_name["filename"] +) +_BUILDTRIGGER.fields_by_name[ + "filename" +].containing_oneof = _BUILDTRIGGER.oneofs_by_name["build_template"] +_GITHUBEVENTSCONFIG.fields_by_name["pull_request"].message_type = _PULLREQUESTFILTER +_GITHUBEVENTSCONFIG.fields_by_name["push"].message_type = _PUSHFILTER +_GITHUBEVENTSCONFIG.oneofs_by_name["event"].fields.append( + _GITHUBEVENTSCONFIG.fields_by_name["pull_request"] +) +_GITHUBEVENTSCONFIG.fields_by_name[ + "pull_request" +].containing_oneof = _GITHUBEVENTSCONFIG.oneofs_by_name["event"] +_GITHUBEVENTSCONFIG.oneofs_by_name["event"].fields.append( + _GITHUBEVENTSCONFIG.fields_by_name["push"] +) +_GITHUBEVENTSCONFIG.fields_by_name[ + "push" +].containing_oneof = _GITHUBEVENTSCONFIG.oneofs_by_name["event"] +_PULLREQUESTFILTER.fields_by_name[ + "comment_control" +].enum_type = _PULLREQUESTFILTER_COMMENTCONTROL +_PULLREQUESTFILTER_COMMENTCONTROL.containing_type = _PULLREQUESTFILTER +_PULLREQUESTFILTER.oneofs_by_name["git_ref"].fields.append( + _PULLREQUESTFILTER.fields_by_name["branch"] +) +_PULLREQUESTFILTER.fields_by_name[ + "branch" +].containing_oneof = _PULLREQUESTFILTER.oneofs_by_name["git_ref"] +_PUSHFILTER.oneofs_by_name["git_ref"].fields.append( + _PUSHFILTER.fields_by_name["branch"] +) +_PUSHFILTER.fields_by_name["branch"].containing_oneof = _PUSHFILTER.oneofs_by_name[ + "git_ref" +] +_PUSHFILTER.oneofs_by_name["git_ref"].fields.append(_PUSHFILTER.fields_by_name["tag"]) +_PUSHFILTER.fields_by_name["tag"].containing_oneof = _PUSHFILTER.oneofs_by_name[ + "git_ref" +] +_CREATEBUILDTRIGGERREQUEST.fields_by_name["trigger"].message_type = _BUILDTRIGGER +_LISTBUILDTRIGGERSRESPONSE.fields_by_name["triggers"].message_type = _BUILDTRIGGER +_UPDATEBUILDTRIGGERREQUEST.fields_by_name["trigger"].message_type = _BUILDTRIGGER +_BUILDOPTIONS.fields_by_name["source_provenance_hash"].enum_type = _HASH_HASHTYPE +_BUILDOPTIONS.fields_by_name[ + "requested_verify_option" +].enum_type = _BUILDOPTIONS_VERIFYOPTION +_BUILDOPTIONS.fields_by_name["machine_type"].enum_type = _BUILDOPTIONS_MACHINETYPE +_BUILDOPTIONS.fields_by_name[ + "substitution_option" +].enum_type = _BUILDOPTIONS_SUBSTITUTIONOPTION +_BUILDOPTIONS.fields_by_name[ + "log_streaming_option" +].enum_type = _BUILDOPTIONS_LOGSTREAMINGOPTION +_BUILDOPTIONS.fields_by_name["logging"].enum_type = _BUILDOPTIONS_LOGGINGMODE +_BUILDOPTIONS.fields_by_name["volumes"].message_type = _VOLUME +_BUILDOPTIONS_VERIFYOPTION.containing_type = _BUILDOPTIONS +_BUILDOPTIONS_MACHINETYPE.containing_type = _BUILDOPTIONS +_BUILDOPTIONS_SUBSTITUTIONOPTION.containing_type = _BUILDOPTIONS +_BUILDOPTIONS_LOGSTREAMINGOPTION.containing_type = _BUILDOPTIONS +_BUILDOPTIONS_LOGGINGMODE.containing_type = _BUILDOPTIONS +_WORKERPOOL.fields_by_name["worker_config"].message_type = _WORKERCONFIG +_WORKERPOOL.fields_by_name["regions"].enum_type = _WORKERPOOL_REGION +_WORKERPOOL.fields_by_name[ + "create_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_WORKERPOOL.fields_by_name[ + "update_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_WORKERPOOL.fields_by_name[ + "delete_time" +].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP +_WORKERPOOL.fields_by_name["status"].enum_type = _WORKERPOOL_STATUS +_WORKERPOOL_REGION.containing_type = _WORKERPOOL +_WORKERPOOL_STATUS.containing_type = _WORKERPOOL +_WORKERCONFIG.fields_by_name["network"].message_type = _NETWORK +_CREATEWORKERPOOLREQUEST.fields_by_name["worker_pool"].message_type = _WORKERPOOL +_UPDATEWORKERPOOLREQUEST.fields_by_name["worker_pool"].message_type = _WORKERPOOL +_LISTWORKERPOOLSRESPONSE.fields_by_name["worker_pools"].message_type = _WORKERPOOL +DESCRIPTOR.message_types_by_name["RetryBuildRequest"] = _RETRYBUILDREQUEST +DESCRIPTOR.message_types_by_name["RunBuildTriggerRequest"] = _RUNBUILDTRIGGERREQUEST +DESCRIPTOR.message_types_by_name["StorageSource"] = _STORAGESOURCE +DESCRIPTOR.message_types_by_name["RepoSource"] = _REPOSOURCE +DESCRIPTOR.message_types_by_name["Source"] = _SOURCE +DESCRIPTOR.message_types_by_name["BuiltImage"] = _BUILTIMAGE +DESCRIPTOR.message_types_by_name["BuildStep"] = _BUILDSTEP +DESCRIPTOR.message_types_by_name["Volume"] = _VOLUME +DESCRIPTOR.message_types_by_name["Results"] = _RESULTS +DESCRIPTOR.message_types_by_name["ArtifactResult"] = _ARTIFACTRESULT +DESCRIPTOR.message_types_by_name["Build"] = _BUILD +DESCRIPTOR.message_types_by_name["Artifacts"] = _ARTIFACTS +DESCRIPTOR.message_types_by_name["TimeSpan"] = _TIMESPAN +DESCRIPTOR.message_types_by_name["BuildOperationMetadata"] = _BUILDOPERATIONMETADATA +DESCRIPTOR.message_types_by_name["SourceProvenance"] = _SOURCEPROVENANCE +DESCRIPTOR.message_types_by_name["FileHashes"] = _FILEHASHES +DESCRIPTOR.message_types_by_name["Hash"] = _HASH +DESCRIPTOR.message_types_by_name["Secret"] = _SECRET +DESCRIPTOR.message_types_by_name["CreateBuildRequest"] = _CREATEBUILDREQUEST +DESCRIPTOR.message_types_by_name["GetBuildRequest"] = _GETBUILDREQUEST +DESCRIPTOR.message_types_by_name["ListBuildsRequest"] = _LISTBUILDSREQUEST +DESCRIPTOR.message_types_by_name["ListBuildsResponse"] = _LISTBUILDSRESPONSE +DESCRIPTOR.message_types_by_name["CancelBuildRequest"] = _CANCELBUILDREQUEST +DESCRIPTOR.message_types_by_name["BuildTrigger"] = _BUILDTRIGGER +DESCRIPTOR.message_types_by_name["GitHubEventsConfig"] = _GITHUBEVENTSCONFIG +DESCRIPTOR.message_types_by_name["PullRequestFilter"] = _PULLREQUESTFILTER +DESCRIPTOR.message_types_by_name["PushFilter"] = _PUSHFILTER +DESCRIPTOR.message_types_by_name[ + "CreateBuildTriggerRequest" +] = _CREATEBUILDTRIGGERREQUEST +DESCRIPTOR.message_types_by_name["GetBuildTriggerRequest"] = _GETBUILDTRIGGERREQUEST +DESCRIPTOR.message_types_by_name["ListBuildTriggersRequest"] = _LISTBUILDTRIGGERSREQUEST +DESCRIPTOR.message_types_by_name[ + "ListBuildTriggersResponse" +] = _LISTBUILDTRIGGERSRESPONSE +DESCRIPTOR.message_types_by_name[ + "DeleteBuildTriggerRequest" +] = _DELETEBUILDTRIGGERREQUEST +DESCRIPTOR.message_types_by_name[ + "UpdateBuildTriggerRequest" +] = _UPDATEBUILDTRIGGERREQUEST +DESCRIPTOR.message_types_by_name["BuildOptions"] = _BUILDOPTIONS +DESCRIPTOR.message_types_by_name["WorkerPool"] = _WORKERPOOL +DESCRIPTOR.message_types_by_name["WorkerConfig"] = _WORKERCONFIG +DESCRIPTOR.message_types_by_name["Network"] = _NETWORK +DESCRIPTOR.message_types_by_name["CreateWorkerPoolRequest"] = _CREATEWORKERPOOLREQUEST +DESCRIPTOR.message_types_by_name["GetWorkerPoolRequest"] = _GETWORKERPOOLREQUEST +DESCRIPTOR.message_types_by_name["DeleteWorkerPoolRequest"] = _DELETEWORKERPOOLREQUEST +DESCRIPTOR.message_types_by_name["UpdateWorkerPoolRequest"] = _UPDATEWORKERPOOLREQUEST +DESCRIPTOR.message_types_by_name["ListWorkerPoolsRequest"] = _LISTWORKERPOOLSREQUEST +DESCRIPTOR.message_types_by_name["ListWorkerPoolsResponse"] = _LISTWORKERPOOLSRESPONSE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +RetryBuildRequest = _reflection.GeneratedProtocolMessageType( + "RetryBuildRequest", + (_message.Message,), + dict( + DESCRIPTOR=_RETRYBUILDREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Specifies a build to retry. + + + Attributes: + project_id: + Required. ID of the project. + id: + Required. Build ID of the original build. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.RetryBuildRequest) + ), +) +_sym_db.RegisterMessage(RetryBuildRequest) + +RunBuildTriggerRequest = _reflection.GeneratedProtocolMessageType( + "RunBuildTriggerRequest", + (_message.Message,), + dict( + DESCRIPTOR=_RUNBUILDTRIGGERREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Specifies a build trigger to run and the source to use. + + + Attributes: + project_id: + Required. ID of the project. + trigger_id: + Required. ID of the trigger. + source: + Required. Source to build against this trigger. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.RunBuildTriggerRequest) + ), +) +_sym_db.RegisterMessage(RunBuildTriggerRequest) + +StorageSource = _reflection.GeneratedProtocolMessageType( + "StorageSource", + (_message.Message,), + dict( + DESCRIPTOR=_STORAGESOURCE, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Location of the source in an archive file in Google Cloud Storage. + + + Attributes: + bucket: + Google Cloud Storage bucket containing the source (see `Bucket + Name Requirements + `__). + object: + Google Cloud Storage object containing the source. This + object must be a gzipped archive file (``.tar.gz``) containing + source to build. + generation: + Google Cloud Storage generation for the object. If the + generation is omitted, the latest generation will be used. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.StorageSource) + ), +) +_sym_db.RegisterMessage(StorageSource) + +RepoSource = _reflection.GeneratedProtocolMessageType( + "RepoSource", + (_message.Message,), + dict( + DESCRIPTOR=_REPOSOURCE, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Location of the source in a Google Cloud Source Repository. + + + Attributes: + project_id: + ID of the project that owns the Cloud Source Repository. If + omitted, the project ID requesting the build is assumed. + repo_name: + Name of the Cloud Source Repository. If omitted, the name + "default" is assumed. + revision: + A revision within the Cloud Source Repository must be + specified in one of these ways. + branch_name: + Regex matching branches to build. The syntax of the regular + expressions accepted is the syntax accepted by RE2 and + described at https://github.com/google/re2/wiki/Syntax + tag_name: + Regex matching tags to build. The syntax of the regular + expressions accepted is the syntax accepted by RE2 and + described at https://github.com/google/re2/wiki/Syntax + commit_sha: + Explicit commit SHA to build. + dir: + Directory, relative to the source root, in which to run the + build. This must be a relative path. If a step's ``dir`` is + specified and is an absolute path, this value is ignored for + that step's execution. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.RepoSource) + ), +) +_sym_db.RegisterMessage(RepoSource) + +Source = _reflection.GeneratedProtocolMessageType( + "Source", + (_message.Message,), + dict( + DESCRIPTOR=_SOURCE, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Location of the source in a supported storage service. + + + Attributes: + source: + Location of source. + storage_source: + If provided, get the source from this location in Google Cloud + Storage. + repo_source: + If provided, get the source from this location in a Cloud + Source Repository. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.Source) + ), +) +_sym_db.RegisterMessage(Source) + +BuiltImage = _reflection.GeneratedProtocolMessageType( + "BuiltImage", + (_message.Message,), + dict( + DESCRIPTOR=_BUILTIMAGE, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""An image built by the pipeline. + + + Attributes: + name: + Name used to push the container image to Google Container + Registry, as presented to ``docker push``. + digest: + Docker Registry 2.0 digest. + push_timing: + Output only. Stores timing information for pushing the + specified image. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.BuiltImage) + ), +) +_sym_db.RegisterMessage(BuiltImage) + +BuildStep = _reflection.GeneratedProtocolMessageType( + "BuildStep", + (_message.Message,), + dict( + DESCRIPTOR=_BUILDSTEP, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""A step in the build pipeline. + + + Attributes: + name: + Required. The name of the container image that will run this + particular build step. If the image is available in the + host's Docker daemon's cache, it will be run directly. If not, + the host will attempt to pull the image first, using the + builder service account's credentials if necessary. The + Docker daemon's cache will already have the latest versions of + all of the officially supported build steps + (https://github.com/GoogleCloudPlatform/cloud-builders). The + Docker daemon will also have cached many of the layers for + some popular images, like "ubuntu", "debian", but they will be + refreshed at the time you attempt to use them. If you built + an image in a previous build step, it will be stored in the + host's Docker daemon's cache and is available to use as the + name for a later build step. + env: + A list of environment variable definitions to be used when + running a step. The elements are of the form "KEY=VALUE" for + the environment variable "KEY" being given the value "VALUE". + args: + A list of arguments that will be presented to the step when it + is started. If the image used to run the step's container has + an entrypoint, the ``args`` are used as arguments to that + entrypoint. If the image does not define an entrypoint, the + first element in args is used as the entrypoint, and the + remainder will be used as arguments. + dir: + Working directory to use when running this step's container. + If this value is a relative path, it is relative to the + build's working directory. If this value is absolute, it may + be outside the build's working directory, in which case the + contents of the path may not be persisted across build step + executions, unless a ``volume`` for that path is specified. + If the build specifies a ``RepoSource`` with ``dir`` and a + step with a ``dir``, which specifies an absolute path, the + ``RepoSource`` ``dir`` is ignored for the step's execution. + id: + Unique identifier for this build step, used in ``wait_for`` to + reference this build step as a dependency. + wait_for: + The ID(s) of the step(s) that this build step depends on. This + build step will not start until all the build steps in + ``wait_for`` have completed successfully. If ``wait_for`` is + empty, this build step will start when all previous build + steps in the ``Build.Steps`` list have completed successfully. + entrypoint: + Entrypoint to be used instead of the build step image's + default entrypoint. If unset, the image's default entrypoint + is used. + secret_env: + A list of environment variables which are encrypted using a + Cloud Key Management Service crypto key. These values must be + specified in the build's ``Secret``. + volumes: + List of volumes to mount into the build step. Each volume is + created as an empty volume prior to execution of the build + step. Upon completion of the build, volumes and their contents + are discarded. Using a named volume in only one step is not + valid as it is indicative of a build request with an incorrect + configuration. + timing: + Output only. Stores timing information for executing this + build step. + pull_timing: + Output only. Stores timing information for pulling this build + step's builder image only. + timeout: + Time limit for executing this build step. If not defined, the + step has no time limit and will be allowed to continue to run + until either it completes or the build itself times out. + status: + Output only. Status of the build step. At this time, build + step status is only updated on build completion; step status + is not updated in real-time as the build progresses. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.BuildStep) + ), +) +_sym_db.RegisterMessage(BuildStep) + +Volume = _reflection.GeneratedProtocolMessageType( + "Volume", + (_message.Message,), + dict( + DESCRIPTOR=_VOLUME, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Volume describes a Docker container volume which is mounted into build + steps in order to persist files across build step execution. + + + Attributes: + name: + Name of the volume to mount. Volume names must be unique per + build step and must be valid names for Docker volumes. Each + named volume must be used by at least two build steps. + path: + Path at which to mount the volume. Paths must be absolute and + cannot conflict with other volume paths on the same build step + or with certain reserved volume paths. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.Volume) + ), +) +_sym_db.RegisterMessage(Volume) + +Results = _reflection.GeneratedProtocolMessageType( + "Results", + (_message.Message,), + dict( + DESCRIPTOR=_RESULTS, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Artifacts created by the build pipeline. + + + Attributes: + images: + Container images that were built as a part of the build. + build_step_images: + List of build step digests, in the order corresponding to + build step indices. + artifact_manifest: + Path to the artifact manifest. Only populated when artifacts + are uploaded. + num_artifacts: + Number of artifacts uploaded. Only populated when artifacts + are uploaded. + build_step_outputs: + List of build step outputs, produced by builder images, in the + order corresponding to build step indices. `Cloud Builders + `__ + can produce this output by writing to + ``$BUILDER_OUTPUT/output``. Only the first 4KB of data is + stored. + artifact_timing: + Time to push all non-container artifacts. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.Results) + ), +) +_sym_db.RegisterMessage(Results) + +ArtifactResult = _reflection.GeneratedProtocolMessageType( + "ArtifactResult", + (_message.Message,), + dict( + DESCRIPTOR=_ARTIFACTRESULT, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""An artifact that was uploaded during a build. This is a single record in + the artifact manifest JSON file. + + + Attributes: + location: + The path of an artifact in a Google Cloud Storage bucket, with + the generation number. For example, + ``gs://mybucket/path/to/output.jar#generation``. + file_hash: + The file hash of the artifact. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.ArtifactResult) + ), +) +_sym_db.RegisterMessage(ArtifactResult) + +Build = _reflection.GeneratedProtocolMessageType( + "Build", + (_message.Message,), + dict( + SubstitutionsEntry=_reflection.GeneratedProtocolMessageType( + "SubstitutionsEntry", + (_message.Message,), + dict( + DESCRIPTOR=_BUILD_SUBSTITUTIONSENTRY, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2" + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.Build.SubstitutionsEntry) + ), + ), + TimingEntry=_reflection.GeneratedProtocolMessageType( + "TimingEntry", + (_message.Message,), + dict( + DESCRIPTOR=_BUILD_TIMINGENTRY, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2" + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.Build.TimingEntry) + ), + ), + DESCRIPTOR=_BUILD, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""A build resource in the Cloud Build API. + + At a high level, a ``Build`` describes where to find source code, how to + build it (for example, the builder image to run on the source), and + where to store the built artifacts. + + Fields can include the following variables, which will be expanded when + the build is created: + + - $PROJECT\_ID: the project ID of the build. + - $BUILD\_ID: the autogenerated ID of the build. + - $REPO\_NAME: the source repository name specified by RepoSource. + - $BRANCH\_NAME: the branch name specified by RepoSource. + - $TAG\_NAME: the tag name specified by RepoSource. + - $REVISION\_ID or $COMMIT\_SHA: the commit SHA specified by RepoSource + or resolved from the specified branch or tag. + - $SHORT\_SHA: first 7 characters of $REVISION\_ID or $COMMIT\_SHA. + + + Attributes: + id: + Output only. Unique identifier of the build. + project_id: + Output only. ID of the project. + status: + Output only. Status of the build. + status_detail: + Output only. Customer-readable message about the current + status. + source: + The location of the source files to build. + steps: + Required. The operations to be performed on the workspace. + results: + Output only. Results of the build. + create_time: + Output only. Time at which the request to create the build was + received. + start_time: + Output only. Time at which execution of the build was started. + finish_time: + Output only. Time at which execution of the build was + finished. The difference between finish\_time and start\_time + is the duration of the build's execution. + timeout: + Amount of time that this build should be allowed to run, to + second granularity. If this amount of time elapses, work on + the build will cease and the build status will be ``TIMEOUT``. + Default time is ten minutes. + images: + A list of images to be pushed upon the successful completion + of all build steps. The images are pushed using the builder + service account's credentials. The digests of the pushed + images will be stored in the ``Build`` resource's results + field. If any of the images fail to be pushed, the build + status is marked ``FAILURE``. + artifacts: + Artifacts produced by the build that should be uploaded upon + successful completion of all build steps. + logs_bucket: + Google Cloud Storage bucket where logs should be written (see + `Bucket Name Requirements + `__). Logs file names will be of the + format ``${logs_bucket}/log-${build_id}.txt``. + source_provenance: + Output only. A permanent fixed identifier for source. + build_trigger_id: + Output only. The ID of the ``BuildTrigger`` that triggered + this build, if it was triggered automatically. + options: + Special options for this build. + log_url: + Output only. URL to logs for this build in Google Cloud + Console. + substitutions: + Substitutions data for ``Build`` resource. + tags: + Tags for annotation of a ``Build``. These are not docker tags. + secrets: + Secrets to decrypt using Cloud Key Management Service. + timing: + Output only. Stores timing information for phases of the + build. Valid keys are: - BUILD: time to execute all build + steps - PUSH: time to push all specified images. - + FETCHSOURCE: time to fetch source. If the build does not + specify source or images, these keys will not be included. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.Build) + ), +) +_sym_db.RegisterMessage(Build) +_sym_db.RegisterMessage(Build.SubstitutionsEntry) +_sym_db.RegisterMessage(Build.TimingEntry) + +Artifacts = _reflection.GeneratedProtocolMessageType( + "Artifacts", + (_message.Message,), + dict( + ArtifactObjects=_reflection.GeneratedProtocolMessageType( + "ArtifactObjects", + (_message.Message,), + dict( + DESCRIPTOR=_ARTIFACTS_ARTIFACTOBJECTS, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Files in the workspace to upload to Cloud Storage upon successful + completion of all build steps. + + + Attributes: + location: + Cloud Storage bucket and optional object path, in the form + "gs://bucket/path/to/somewhere/". (see `Bucket Name + Requirements `__). Files in the workspace matching any + path pattern will be uploaded to Cloud Storage with this + location as a prefix. + paths: + Path globs used to match files in the build's workspace. + timing: + Output only. Stores timing information for pushing all + artifact objects. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects) + ), + ), + DESCRIPTOR=_ARTIFACTS, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Artifacts produced by a build that should be uploaded upon successful + completion of all build steps. + + + Attributes: + images: + A list of images to be pushed upon the successful completion + of all build steps. The images will be pushed using the + builder service account's credentials. The digests of the + pushed images will be stored in the Build resource's results + field. If any of the images fail to be pushed, the build is + marked FAILURE. + objects: + A list of objects to be uploaded to Cloud Storage upon + successful completion of all build steps. Files in the + workspace matching specified paths globs will be uploaded to + the specified Cloud Storage location using the builder service + account's credentials. The location and generation of the + uploaded objects will be stored in the Build resource's + results field. If any objects fail to be pushed, the build is + marked FAILURE. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.Artifacts) + ), +) +_sym_db.RegisterMessage(Artifacts) +_sym_db.RegisterMessage(Artifacts.ArtifactObjects) + +TimeSpan = _reflection.GeneratedProtocolMessageType( + "TimeSpan", + (_message.Message,), + dict( + DESCRIPTOR=_TIMESPAN, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Start and end times for a build execution phase. + + + Attributes: + start_time: + Start of time span. + end_time: + End of time span. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.TimeSpan) + ), +) +_sym_db.RegisterMessage(TimeSpan) + +BuildOperationMetadata = _reflection.GeneratedProtocolMessageType( + "BuildOperationMetadata", + (_message.Message,), + dict( + DESCRIPTOR=_BUILDOPERATIONMETADATA, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Metadata for build operations. + + + Attributes: + build: + The build that the operation is tracking. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.BuildOperationMetadata) + ), +) +_sym_db.RegisterMessage(BuildOperationMetadata) + +SourceProvenance = _reflection.GeneratedProtocolMessageType( + "SourceProvenance", + (_message.Message,), + dict( + FileHashesEntry=_reflection.GeneratedProtocolMessageType( + "FileHashesEntry", + (_message.Message,), + dict( + DESCRIPTOR=_SOURCEPROVENANCE_FILEHASHESENTRY, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2" + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.SourceProvenance.FileHashesEntry) + ), + ), + DESCRIPTOR=_SOURCEPROVENANCE, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Provenance of the source. Ways to find the original source, or verify + that some source was used for this build. + + + Attributes: + resolved_storage_source: + A copy of the build's ``source.storage_source``, if exists, + with any generations resolved. + resolved_repo_source: + A copy of the build's ``source.repo_source``, if exists, with + any revisions resolved. + file_hashes: + Output only. Hash(es) of the build source, which can be used + to verify that the original source integrity was maintained in + the build. Note that ``FileHashes`` will only be populated if + ``BuildOptions`` has requested a ``SourceProvenanceHash``. + The keys to this map are file paths used as build source and + the values contain the hash values for those files. If the + build source came in a single package such as a gzipped + tarfile (``.tar.gz``), the ``FileHash`` will be for the single + path to that file. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.SourceProvenance) + ), +) +_sym_db.RegisterMessage(SourceProvenance) +_sym_db.RegisterMessage(SourceProvenance.FileHashesEntry) + +FileHashes = _reflection.GeneratedProtocolMessageType( + "FileHashes", + (_message.Message,), + dict( + DESCRIPTOR=_FILEHASHES, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Container message for hashes of byte content of files, used in + SourceProvenance messages to verify integrity of source input to the + build. + + + Attributes: + file_hash: + Collection of file hashes. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.FileHashes) + ), +) +_sym_db.RegisterMessage(FileHashes) + +Hash = _reflection.GeneratedProtocolMessageType( + "Hash", + (_message.Message,), + dict( + DESCRIPTOR=_HASH, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Container message for hash values. + + + Attributes: + type: + The type of hash that was performed. + value: + The hash value. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.Hash) + ), +) +_sym_db.RegisterMessage(Hash) + +Secret = _reflection.GeneratedProtocolMessageType( + "Secret", + (_message.Message,), + dict( + SecretEnvEntry=_reflection.GeneratedProtocolMessageType( + "SecretEnvEntry", + (_message.Message,), + dict( + DESCRIPTOR=_SECRET_SECRETENVENTRY, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2" + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.Secret.SecretEnvEntry) + ), + ), + DESCRIPTOR=_SECRET, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Pairs a set of secret environment variables containing encrypted values + with the Cloud KMS key to use to decrypt the value. + + + Attributes: + kms_key_name: + Cloud KMS key name to use to decrypt these envs. + secret_env: + Map of environment variable name to its encrypted value. + Secret environment variables must be unique across all of a + build's secrets, and must be used by at least one build step. + Values can be at most 64 KB in size. There can be at most 100 + secret values across all of a build's secrets. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.Secret) + ), +) +_sym_db.RegisterMessage(Secret) +_sym_db.RegisterMessage(Secret.SecretEnvEntry) + +CreateBuildRequest = _reflection.GeneratedProtocolMessageType( + "CreateBuildRequest", + (_message.Message,), + dict( + DESCRIPTOR=_CREATEBUILDREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to create a new build. + + + Attributes: + project_id: + Required. ID of the project. + build: + Required. Build resource to create. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.CreateBuildRequest) + ), +) +_sym_db.RegisterMessage(CreateBuildRequest) + +GetBuildRequest = _reflection.GeneratedProtocolMessageType( + "GetBuildRequest", + (_message.Message,), + dict( + DESCRIPTOR=_GETBUILDREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to get a build. + + + Attributes: + project_id: + Required. ID of the project. + id: + Required. ID of the build. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.GetBuildRequest) + ), +) +_sym_db.RegisterMessage(GetBuildRequest) + +ListBuildsRequest = _reflection.GeneratedProtocolMessageType( + "ListBuildsRequest", + (_message.Message,), + dict( + DESCRIPTOR=_LISTBUILDSREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to list builds. + + + Attributes: + project_id: + Required. ID of the project. + page_size: + Number of results to return in the list. + page_token: + Token to provide to skip to a particular spot in the list. + filter: + The raw filter text to constrain the results. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.ListBuildsRequest) + ), +) +_sym_db.RegisterMessage(ListBuildsRequest) + +ListBuildsResponse = _reflection.GeneratedProtocolMessageType( + "ListBuildsResponse", + (_message.Message,), + dict( + DESCRIPTOR=_LISTBUILDSRESPONSE, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Response including listed builds. + + + Attributes: + builds: + Builds will be sorted by ``create_time``, descending. + next_page_token: + Token to receive the next page of results. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.ListBuildsResponse) + ), +) +_sym_db.RegisterMessage(ListBuildsResponse) + +CancelBuildRequest = _reflection.GeneratedProtocolMessageType( + "CancelBuildRequest", + (_message.Message,), + dict( + DESCRIPTOR=_CANCELBUILDREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to cancel an ongoing build. + + + Attributes: + project_id: + Required. ID of the project. + id: + Required. ID of the build. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.CancelBuildRequest) + ), +) +_sym_db.RegisterMessage(CancelBuildRequest) + +BuildTrigger = _reflection.GeneratedProtocolMessageType( + "BuildTrigger", + (_message.Message,), + dict( + SubstitutionsEntry=_reflection.GeneratedProtocolMessageType( + "SubstitutionsEntry", + (_message.Message,), + dict( + DESCRIPTOR=_BUILDTRIGGER_SUBSTITUTIONSENTRY, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2" + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.BuildTrigger.SubstitutionsEntry) + ), + ), + DESCRIPTOR=_BUILDTRIGGER, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Configuration for an automated build in response to source repository + changes. + + + Attributes: + id: + Output only. Unique identifier of the trigger. + description: + Human-readable description of this trigger. + name: + User assigned name of the trigger. Must be unique within the + project. + tags: + Tags for annotation of a ``BuildTrigger`` + trigger_template: + Template describing the types of source changes to trigger a + build. Branch and tag names in trigger templates are + interpreted as regular expressions. Any branch or tag change + that matches that regular expression will trigger a build. + Mutually exclusive with ``github``. + github: + GitHubEventsConfig describes the configuration of a trigger + that creates a build whenever a GitHub event is received. + Mutually exclusive with ``trigger_template``. + build_template: + Template describing the Build request to make when the trigger + is matched. + build: + Contents of the build template. + filename: + Path, from the source root, to a file whose contents is used + for the template. + create_time: + Output only. Time when the trigger was created. + disabled: + If true, the trigger will never result in a build. + substitutions: + Substitutions data for Build resource. + ignored_files: + ignored\_files and included\_files are file glob matches using + http://godoc/pkg/path/filepath#Match extended with support for + "\*\*". If ignored\_files and changed files are both empty, + then they are not used to determine whether or not to trigger + a build. If ignored\_files is not empty, then we ignore any + files that match any of the ignored\_file globs. If the change + has no files that are outside of the ignored\_files globs, + then we do not trigger a build. + included_files: + If any of the files altered in the commit pass the + ignored\_files filter and included\_files is empty, then as + far as this filter is concerned, we should trigger the build. + If any of the files altered in the commit pass the + ignored\_files filter and included\_files is not empty, then + we make sure that at least one of those files matches a + included\_files glob. If not, then we do not trigger a build. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.BuildTrigger) + ), +) +_sym_db.RegisterMessage(BuildTrigger) +_sym_db.RegisterMessage(BuildTrigger.SubstitutionsEntry) + +GitHubEventsConfig = _reflection.GeneratedProtocolMessageType( + "GitHubEventsConfig", + (_message.Message,), + dict( + DESCRIPTOR=_GITHUBEVENTSCONFIG, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""GitHubEventsConfig describes the configuration of a trigger that creates + a build whenever a GitHub event is received. + + This message is experimental. + + + Attributes: + installation_id: + The installationID that emits the GitHub event. + owner: + Owner of the repository. For example: The owner for + https://github.com/googlecloudplatform/cloud-builders is + "googlecloudplatform". + name: + Name of the repository. For example: The name for + https://github.com/googlecloudplatform/cloud-builders is + "cloud-builders". + event: + Filter describing the types of events to trigger a build. + Currently supported event types: push, pull\_request. + pull_request: + filter to match changes in pull requests. + push: + filter to match changes in refs like branches, tags. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.GitHubEventsConfig) + ), +) +_sym_db.RegisterMessage(GitHubEventsConfig) + +PullRequestFilter = _reflection.GeneratedProtocolMessageType( + "PullRequestFilter", + (_message.Message,), + dict( + DESCRIPTOR=_PULLREQUESTFILTER, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""PullRequestFilter contains filter properties for matching GitHub Pull + Requests. + + + Attributes: + git_ref: + Target refs to match. A target ref is the git reference where + the pull request will be applied. + branch: + Regex of branches to match. The syntax of the regular + expressions accepted is the syntax accepted by RE2 and + described at https://github.com/google/re2/wiki/Syntax + comment_control: + Whether to block builds on a "/gcbrun" comment from a + repository owner or collaborator. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.PullRequestFilter) + ), +) +_sym_db.RegisterMessage(PullRequestFilter) + +PushFilter = _reflection.GeneratedProtocolMessageType( + "PushFilter", + (_message.Message,), + dict( + DESCRIPTOR=_PUSHFILTER, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Push contains filter properties for matching GitHub git pushes. + + + Attributes: + git_ref: + Modified refs to match. A modified refs are the refs modified + by a git push operation. + branch: + Regexes matching branches to build. The syntax of the regular + expressions accepted is the syntax accepted by RE2 and + described at https://github.com/google/re2/wiki/Syntax + tag: + Regexes matching tags to build. The syntax of the regular + expressions accepted is the syntax accepted by RE2 and + described at https://github.com/google/re2/wiki/Syntax + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.PushFilter) + ), +) +_sym_db.RegisterMessage(PushFilter) + +CreateBuildTriggerRequest = _reflection.GeneratedProtocolMessageType( + "CreateBuildTriggerRequest", + (_message.Message,), + dict( + DESCRIPTOR=_CREATEBUILDTRIGGERREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to create a new ``BuildTrigger``. + + + Attributes: + project_id: + Required. ID of the project for which to configure automatic + builds. + trigger: + Required. ``BuildTrigger`` to create. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.CreateBuildTriggerRequest) + ), +) +_sym_db.RegisterMessage(CreateBuildTriggerRequest) + +GetBuildTriggerRequest = _reflection.GeneratedProtocolMessageType( + "GetBuildTriggerRequest", + (_message.Message,), + dict( + DESCRIPTOR=_GETBUILDTRIGGERREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Returns the ``BuildTrigger`` with the specified ID. + + + Attributes: + project_id: + Required. ID of the project that owns the trigger. + trigger_id: + Required. ID of the ``BuildTrigger`` to get. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.GetBuildTriggerRequest) + ), +) +_sym_db.RegisterMessage(GetBuildTriggerRequest) + +ListBuildTriggersRequest = _reflection.GeneratedProtocolMessageType( + "ListBuildTriggersRequest", + (_message.Message,), + dict( + DESCRIPTOR=_LISTBUILDTRIGGERSREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to list existing ``BuildTriggers``. + + + Attributes: + project_id: + Required. ID of the project for which to list BuildTriggers. + page_size: + Number of results to return in the list. + page_token: + Token to provide to skip to a particular spot in the list. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.ListBuildTriggersRequest) + ), +) +_sym_db.RegisterMessage(ListBuildTriggersRequest) + +ListBuildTriggersResponse = _reflection.GeneratedProtocolMessageType( + "ListBuildTriggersResponse", + (_message.Message,), + dict( + DESCRIPTOR=_LISTBUILDTRIGGERSRESPONSE, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Response containing existing ``BuildTriggers``. + + + Attributes: + triggers: + ``BuildTriggers`` for the project, sorted by ``create_time`` + descending. + next_page_token: + Token to receive the next page of results. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.ListBuildTriggersResponse) + ), +) +_sym_db.RegisterMessage(ListBuildTriggersResponse) + +DeleteBuildTriggerRequest = _reflection.GeneratedProtocolMessageType( + "DeleteBuildTriggerRequest", + (_message.Message,), + dict( + DESCRIPTOR=_DELETEBUILDTRIGGERREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to delete a ``BuildTrigger``. + + + Attributes: + project_id: + Required. ID of the project that owns the trigger. + trigger_id: + Required. ID of the ``BuildTrigger`` to delete. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest) + ), +) +_sym_db.RegisterMessage(DeleteBuildTriggerRequest) + +UpdateBuildTriggerRequest = _reflection.GeneratedProtocolMessageType( + "UpdateBuildTriggerRequest", + (_message.Message,), + dict( + DESCRIPTOR=_UPDATEBUILDTRIGGERREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to update an existing ``BuildTrigger``. + + + Attributes: + project_id: + Required. ID of the project that owns the trigger. + trigger_id: + Required. ID of the ``BuildTrigger`` to update. + trigger: + Required. ``BuildTrigger`` to update. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest) + ), +) +_sym_db.RegisterMessage(UpdateBuildTriggerRequest) + +BuildOptions = _reflection.GeneratedProtocolMessageType( + "BuildOptions", + (_message.Message,), + dict( + DESCRIPTOR=_BUILDOPTIONS, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Optional arguments to enable specific features of builds. + + + Attributes: + source_provenance_hash: + Requested hash for SourceProvenance. + requested_verify_option: + Requested verifiability options. + machine_type: + Compute Engine machine type on which to run the build. + disk_size_gb: + Requested disk size for the VM that runs the build. Note that + this is *NOT* "disk free"; some of the space will be used by + the operating system and build utilities. Also note that this + is the minimum disk size that will be allocated for the build + -- the build may run with a larger disk than requested. At + present, the maximum disk size is 1000GB; builds that request + more than the maximum are rejected with an error. + substitution_option: + Option to specify behavior when there is an error in the + substitution checks. + log_streaming_option: + Option to define build log streaming behavior to Google Cloud + Storage. + worker_pool: + Option to specify a ``WorkerPool`` for the build. User + specifies the pool with the format + "[WORKERPOOL\_PROJECT\_ID]/[WORKERPOOL\_NAME]". This is an + experimental field. + logging: + Option to specify the logging mode, which determines where the + logs are stored. + env: + A list of global environment variable definitions that will + exist for all build steps in this build. If a variable is + defined in both globally and in a build step, the variable + will use the build step value. The elements are of the form + "KEY=VALUE" for the environment variable "KEY" being given the + value "VALUE". + secret_env: + A list of global environment variables, which are encrypted + using a Cloud Key Management Service crypto key. These values + must be specified in the build's ``Secret``. These variables + will be available to all build steps in this build. + volumes: + Global list of volumes to mount for ALL build steps Each + volume is created as an empty volume prior to starting the + build process. Upon completion of the build, volumes and their + contents are discarded. Global volume names and paths cannot + conflict with the volumes defined a build step. Using a + global volume in a build with only one step is not valid as it + is indicative of a build request with an incorrect + configuration. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.BuildOptions) + ), +) +_sym_db.RegisterMessage(BuildOptions) + +WorkerPool = _reflection.GeneratedProtocolMessageType( + "WorkerPool", + (_message.Message,), + dict( + DESCRIPTOR=_WORKERPOOL, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Configuration for a WorkerPool to run the builds. + + Workers are machines that Cloud Build uses to run your builds. By + default, all workers run in a project owned by Cloud Build. To have full + control over the workers that execute your builds -- such as enabling + them to access private resources on your private network -- you can + request Cloud Build to run the workers in your own project by creating a + custom workers pool. + + + Attributes: + name: + User-defined name of the ``WorkerPool``. + project_id: + The project ID of the GCP project for which the ``WorkerPool`` + is created. + service_account_email: + Output only. The service account used to manage the + ``WorkerPool``. The service account must have the Compute + Instance Admin (Beta) permission at the project level. + worker_count: + Total number of workers to be created across all requested + regions. + worker_config: + Configuration to be used for a creating workers in the + ``WorkerPool``. + regions: + List of regions to create the ``WorkerPool``. Regions can't be + empty. If Cloud Build adds a new GCP region in the future, the + existing ``WorkerPool`` will not be enabled in the new region + automatically; you must add the new region to the ``regions`` + field to enable the ``WorkerPool`` in that region. + create_time: + Output only. Time at which the request to create the + ``WorkerPool`` was received. + update_time: + Output only. Time at which the request to update the + ``WorkerPool`` was received. + delete_time: + Output only. Time at which the request to delete the + ``WorkerPool`` was received. + status: + Output only. WorkerPool Status. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.WorkerPool) + ), +) +_sym_db.RegisterMessage(WorkerPool) + +WorkerConfig = _reflection.GeneratedProtocolMessageType( + "WorkerConfig", + (_message.Message,), + dict( + DESCRIPTOR=_WORKERCONFIG, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""WorkerConfig defines the configuration to be used for a creating workers + in the pool. + + + Attributes: + machine_type: + Machine Type of the worker, such as n1-standard-1. See + https://cloud.google.com/compute/docs/machine-types. If left + blank, Cloud Build will use a standard unspecified machine to + create the worker pool. ``machine_type`` is overridden if you + specify a different machine type in ``build_options``. In this + case, the VM specified in the ``build_options`` will be + created on demand at build time. For more information see + https://cloud.google.com/cloud-build/docs/speeding-up- + builds#using\_custom\_virtual\_machine\_sizes + disk_size_gb: + Size of the disk attached to the worker, in GB. See + https://cloud.google.com/compute/docs/disks/ If ``0`` is + specified, Cloud Build will use a standard disk size. + ``disk_size`` is overridden if you specify a different disk + size in ``build_options``. In this case, a VM with a disk size + specified in the ``build_options`` will be created on demand + at build time. For more information see + https://cloud.google.com/cloud- + build/docs/api/reference/rest/v1/projects.builds#buildoptions + network: + The network definition used to create the worker. If this + section is left empty, the workers will be created in + WorkerPool.project\_id on the default network. + tag: + The tag applied to the worker, and the same tag used by the + firewall rule. It is used to identify the Cloud Build workers + among other VMs. The default value for tag is ``worker``. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.WorkerConfig) + ), +) +_sym_db.RegisterMessage(WorkerConfig) + +Network = _reflection.GeneratedProtocolMessageType( + "Network", + (_message.Message,), + dict( + DESCRIPTOR=_NETWORK, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Network describes the GCP network used to create workers in. + + + Attributes: + project_id: + Project id containing the defined network and subnetwork. For + a peered VPC, this will be the same as the project\_id in + which the workers are created. For a shared VPC, this will be + the project sharing the network with the project\_id project + in which workers will be created. For custom workers with no + VPC, this will be the same as project\_id. + network: + Network on which the workers are created. "default" network is + used if empty. + subnetwork: + Subnetwork on which the workers are created. "default" + subnetwork is used if empty. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.Network) + ), +) +_sym_db.RegisterMessage(Network) + +CreateWorkerPoolRequest = _reflection.GeneratedProtocolMessageType( + "CreateWorkerPoolRequest", + (_message.Message,), + dict( + DESCRIPTOR=_CREATEWORKERPOOLREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to create a new ``WorkerPool``. + + + Attributes: + parent: + ID of the parent project. + worker_pool: + ``WorkerPool`` resource to create. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.CreateWorkerPoolRequest) + ), +) +_sym_db.RegisterMessage(CreateWorkerPoolRequest) + +GetWorkerPoolRequest = _reflection.GeneratedProtocolMessageType( + "GetWorkerPoolRequest", + (_message.Message,), + dict( + DESCRIPTOR=_GETWORKERPOOLREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to get a ``WorkerPool`` with the specified name. + + + Attributes: + name: + The field will contain name of the resource requested, for + example: "projects/project-1/workerPools/workerpool-name" + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.GetWorkerPoolRequest) + ), +) +_sym_db.RegisterMessage(GetWorkerPoolRequest) + +DeleteWorkerPoolRequest = _reflection.GeneratedProtocolMessageType( + "DeleteWorkerPoolRequest", + (_message.Message,), + dict( + DESCRIPTOR=_DELETEWORKERPOOLREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to delete a ``WorkerPool``. + + + Attributes: + name: + The field will contain name of the resource requested, for + example: "projects/project-1/workerPools/workerpool-name" + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest) + ), +) +_sym_db.RegisterMessage(DeleteWorkerPoolRequest) + +UpdateWorkerPoolRequest = _reflection.GeneratedProtocolMessageType( + "UpdateWorkerPoolRequest", + (_message.Message,), + dict( + DESCRIPTOR=_UPDATEWORKERPOOLREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to update a ``WorkerPool``. + + + Attributes: + name: + The field will contain name of the resource requested, for + example: "projects/project-1/workerPools/workerpool-name" + worker_pool: + ``WorkerPool`` resource to update. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest) + ), +) +_sym_db.RegisterMessage(UpdateWorkerPoolRequest) + +ListWorkerPoolsRequest = _reflection.GeneratedProtocolMessageType( + "ListWorkerPoolsRequest", + (_message.Message,), + dict( + DESCRIPTOR=_LISTWORKERPOOLSREQUEST, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Request to list ``WorkerPool``\ s. + + + Attributes: + parent: + ID of the parent project. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.ListWorkerPoolsRequest) + ), +) +_sym_db.RegisterMessage(ListWorkerPoolsRequest) + +ListWorkerPoolsResponse = _reflection.GeneratedProtocolMessageType( + "ListWorkerPoolsResponse", + (_message.Message,), + dict( + DESCRIPTOR=_LISTWORKERPOOLSRESPONSE, + __module__="google.devtools.cloudbuild_v1.proto.cloudbuild_pb2", + __doc__="""Response containing existing ``WorkerPools``. + + + Attributes: + worker_pools: + ``WorkerPools`` for the project. + """, + # @@protoc_insertion_point(class_scope:google.devtools.cloudbuild.v1.ListWorkerPoolsResponse) + ), +) +_sym_db.RegisterMessage(ListWorkerPoolsResponse) + + +DESCRIPTOR._options = None +_RETRYBUILDREQUEST.fields_by_name["project_id"]._options = None +_RETRYBUILDREQUEST.fields_by_name["id"]._options = None +_RUNBUILDTRIGGERREQUEST.fields_by_name["project_id"]._options = None +_RUNBUILDTRIGGERREQUEST.fields_by_name["trigger_id"]._options = None +_RUNBUILDTRIGGERREQUEST.fields_by_name["source"]._options = None +_BUILD_SUBSTITUTIONSENTRY._options = None +_BUILD_TIMINGENTRY._options = None +_SOURCEPROVENANCE_FILEHASHESENTRY._options = None +_SECRET_SECRETENVENTRY._options = None +_CREATEBUILDREQUEST.fields_by_name["project_id"]._options = None +_CREATEBUILDREQUEST.fields_by_name["build"]._options = None +_GETBUILDREQUEST.fields_by_name["project_id"]._options = None +_GETBUILDREQUEST.fields_by_name["id"]._options = None +_LISTBUILDSREQUEST.fields_by_name["project_id"]._options = None +_CANCELBUILDREQUEST.fields_by_name["project_id"]._options = None +_CANCELBUILDREQUEST.fields_by_name["id"]._options = None +_BUILDTRIGGER_SUBSTITUTIONSENTRY._options = None +_GITHUBEVENTSCONFIG.fields_by_name["installation_id"]._options = None +_CREATEBUILDTRIGGERREQUEST.fields_by_name["project_id"]._options = None +_CREATEBUILDTRIGGERREQUEST.fields_by_name["trigger"]._options = None +_GETBUILDTRIGGERREQUEST.fields_by_name["project_id"]._options = None +_GETBUILDTRIGGERREQUEST.fields_by_name["trigger_id"]._options = None +_LISTBUILDTRIGGERSREQUEST.fields_by_name["project_id"]._options = None +_DELETEBUILDTRIGGERREQUEST.fields_by_name["project_id"]._options = None +_DELETEBUILDTRIGGERREQUEST.fields_by_name["trigger_id"]._options = None +_UPDATEBUILDTRIGGERREQUEST.fields_by_name["project_id"]._options = None +_UPDATEBUILDTRIGGERREQUEST.fields_by_name["trigger_id"]._options = None +_UPDATEBUILDTRIGGERREQUEST.fields_by_name["trigger"]._options = None + +_CLOUDBUILD = _descriptor.ServiceDescriptor( + name="CloudBuild", + full_name="google.devtools.cloudbuild.v1.CloudBuild", + file=DESCRIPTOR, + index=0, + serialized_options=_b( + "\312A\031cloudbuild.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platform" + ), + serialized_start=8476, + serialized_end=11325, + methods=[ + _descriptor.MethodDescriptor( + name="CreateBuild", + full_name="google.devtools.cloudbuild.v1.CloudBuild.CreateBuild", + index=0, + containing_service=None, + input_type=_CREATEBUILDREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + serialized_options=_b( + '\202\323\344\223\002)" /v1/projects/{project_id}/builds:\005build\332A\020project_id,build\312A\037\n\005Build\022\026BuildOperationMetadata' + ), + ), + _descriptor.MethodDescriptor( + name="GetBuild", + full_name="google.devtools.cloudbuild.v1.CloudBuild.GetBuild", + index=1, + containing_service=None, + input_type=_GETBUILDREQUEST, + output_type=_BUILD, + serialized_options=_b( + "\202\323\344\223\002'\022%/v1/projects/{project_id}/builds/{id}\332A\rproject_id,id" + ), + ), + _descriptor.MethodDescriptor( + name="ListBuilds", + full_name="google.devtools.cloudbuild.v1.CloudBuild.ListBuilds", + index=2, + containing_service=None, + input_type=_LISTBUILDSREQUEST, + output_type=_LISTBUILDSRESPONSE, + serialized_options=_b( + '\202\323\344\223\002"\022 /v1/projects/{project_id}/builds\332A\021project_id,filter' + ), + ), + _descriptor.MethodDescriptor( + name="CancelBuild", + full_name="google.devtools.cloudbuild.v1.CloudBuild.CancelBuild", + index=3, + containing_service=None, + input_type=_CANCELBUILDREQUEST, + output_type=_BUILD, + serialized_options=_b( + '\202\323\344\223\0021",/v1/projects/{project_id}/builds/{id}:cancel:\001*\332A\rproject_id,id' + ), + ), + _descriptor.MethodDescriptor( + name="RetryBuild", + full_name="google.devtools.cloudbuild.v1.CloudBuild.RetryBuild", + index=4, + containing_service=None, + input_type=_RETRYBUILDREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + serialized_options=_b( + '\202\323\344\223\0020"+/v1/projects/{project_id}/builds/{id}:retry:\001*\332A\rproject_id,id\312A\037\n\005Build\022\026BuildOperationMetadata' + ), + ), + _descriptor.MethodDescriptor( + name="CreateBuildTrigger", + full_name="google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTrigger", + index=5, + containing_service=None, + input_type=_CREATEBUILDTRIGGERREQUEST, + output_type=_BUILDTRIGGER, + serialized_options=_b( + '\202\323\344\223\002-""/v1/projects/{project_id}/triggers:\007trigger\332A\022project_id,trigger' + ), + ), + _descriptor.MethodDescriptor( + name="GetBuildTrigger", + full_name="google.devtools.cloudbuild.v1.CloudBuild.GetBuildTrigger", + index=6, + containing_service=None, + input_type=_GETBUILDTRIGGERREQUEST, + output_type=_BUILDTRIGGER, + serialized_options=_b( + "\202\323\344\223\0021\022//v1/projects/{project_id}/triggers/{trigger_id}\332A\025project_id,trigger_id" + ), + ), + _descriptor.MethodDescriptor( + name="ListBuildTriggers", + full_name="google.devtools.cloudbuild.v1.CloudBuild.ListBuildTriggers", + index=7, + containing_service=None, + input_type=_LISTBUILDTRIGGERSREQUEST, + output_type=_LISTBUILDTRIGGERSRESPONSE, + serialized_options=_b( + '\202\323\344\223\002$\022"/v1/projects/{project_id}/triggers\332A\nproject_id' + ), + ), + _descriptor.MethodDescriptor( + name="DeleteBuildTrigger", + full_name="google.devtools.cloudbuild.v1.CloudBuild.DeleteBuildTrigger", + index=8, + containing_service=None, + input_type=_DELETEBUILDTRIGGERREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=_b( + "\202\323\344\223\0021*//v1/projects/{project_id}/triggers/{trigger_id}\332A\025project_id,trigger_id" + ), + ), + _descriptor.MethodDescriptor( + name="UpdateBuildTrigger", + full_name="google.devtools.cloudbuild.v1.CloudBuild.UpdateBuildTrigger", + index=9, + containing_service=None, + input_type=_UPDATEBUILDTRIGGERREQUEST, + output_type=_BUILDTRIGGER, + serialized_options=_b( + "\202\323\344\223\002:2//v1/projects/{project_id}/triggers/{trigger_id}:\007trigger\332A\035project_id,trigger_id,trigger" + ), + ), + _descriptor.MethodDescriptor( + name="RunBuildTrigger", + full_name="google.devtools.cloudbuild.v1.CloudBuild.RunBuildTrigger", + index=10, + containing_service=None, + input_type=_RUNBUILDTRIGGERREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + serialized_options=_b( + '\202\323\344\223\002="3/v1/projects/{project_id}/triggers/{trigger_id}:run:\006source\332A\034project_id,trigger_id,source\312A\037\n\005Build\022\026BuildOperationMetadata' + ), + ), + _descriptor.MethodDescriptor( + name="CreateWorkerPool", + full_name="google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPool", + index=11, + containing_service=None, + input_type=_CREATEWORKERPOOLREQUEST, + output_type=_WORKERPOOL, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name="GetWorkerPool", + full_name="google.devtools.cloudbuild.v1.CloudBuild.GetWorkerPool", + index=12, + containing_service=None, + input_type=_GETWORKERPOOLREQUEST, + output_type=_WORKERPOOL, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name="DeleteWorkerPool", + full_name="google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPool", + index=13, + containing_service=None, + input_type=_DELETEWORKERPOOLREQUEST, + output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name="UpdateWorkerPool", + full_name="google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPool", + index=14, + containing_service=None, + input_type=_UPDATEWORKERPOOLREQUEST, + output_type=_WORKERPOOL, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name="ListWorkerPools", + full_name="google.devtools.cloudbuild.v1.CloudBuild.ListWorkerPools", + index=15, + containing_service=None, + input_type=_LISTWORKERPOOLSREQUEST, + output_type=_LISTWORKERPOOLSRESPONSE, + serialized_options=None, + ), + ], +) +_sym_db.RegisterServiceDescriptor(_CLOUDBUILD) + +DESCRIPTOR.services_by_name["CloudBuild"] = _CLOUDBUILD + +# @@protoc_insertion_point(module_scope) diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild_pb2_grpc.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild_pb2_grpc.py new file mode 100644 index 000000000000..c8abcba7c2ab --- /dev/null +++ b/cloudbuild/google/cloud/devtools/cloudbuild_v1/proto/cloudbuild_pb2_grpc.py @@ -0,0 +1,378 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc + +from google.cloud.devtools.cloudbuild_v1.proto import ( + cloudbuild_pb2 as google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2, +) +from google.longrunning import ( + operations_pb2 as google_dot_longrunning_dot_operations__pb2, +) +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + + +class CloudBuildStub(object): + """Creates and manages builds on Google Cloud Platform. + + The main concept used by this API is a `Build`, which describes the location + of the source to build, how to build the source, and where to store the + built artifacts, if any. + + A user can list previously-requested builds or get builds by their ID to + determine the status of the build. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateBuild = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/CreateBuild", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.CreateBuildRequest.SerializeToString, + response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, + ) + self.GetBuild = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/GetBuild", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.GetBuildRequest.SerializeToString, + response_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.Build.FromString, + ) + self.ListBuilds = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/ListBuilds", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.ListBuildsRequest.SerializeToString, + response_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.ListBuildsResponse.FromString, + ) + self.CancelBuild = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/CancelBuild", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.CancelBuildRequest.SerializeToString, + response_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.Build.FromString, + ) + self.RetryBuild = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/RetryBuild", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.RetryBuildRequest.SerializeToString, + response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, + ) + self.CreateBuildTrigger = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/CreateBuildTrigger", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.CreateBuildTriggerRequest.SerializeToString, + response_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.BuildTrigger.FromString, + ) + self.GetBuildTrigger = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/GetBuildTrigger", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.GetBuildTriggerRequest.SerializeToString, + response_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.BuildTrigger.FromString, + ) + self.ListBuildTriggers = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/ListBuildTriggers", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.ListBuildTriggersRequest.SerializeToString, + response_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.ListBuildTriggersResponse.FromString, + ) + self.DeleteBuildTrigger = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/DeleteBuildTrigger", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.DeleteBuildTriggerRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.UpdateBuildTrigger = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/UpdateBuildTrigger", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.UpdateBuildTriggerRequest.SerializeToString, + response_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.BuildTrigger.FromString, + ) + self.RunBuildTrigger = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/RunBuildTrigger", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.RunBuildTriggerRequest.SerializeToString, + response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, + ) + self.CreateWorkerPool = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/CreateWorkerPool", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.CreateWorkerPoolRequest.SerializeToString, + response_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.WorkerPool.FromString, + ) + self.GetWorkerPool = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/GetWorkerPool", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.GetWorkerPoolRequest.SerializeToString, + response_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.WorkerPool.FromString, + ) + self.DeleteWorkerPool = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/DeleteWorkerPool", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.DeleteWorkerPoolRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.UpdateWorkerPool = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/UpdateWorkerPool", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.UpdateWorkerPoolRequest.SerializeToString, + response_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.WorkerPool.FromString, + ) + self.ListWorkerPools = channel.unary_unary( + "/google.devtools.cloudbuild.v1.CloudBuild/ListWorkerPools", + request_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.ListWorkerPoolsRequest.SerializeToString, + response_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.ListWorkerPoolsResponse.FromString, + ) + + +class CloudBuildServicer(object): + """Creates and manages builds on Google Cloud Platform. + + The main concept used by this API is a `Build`, which describes the location + of the source to build, how to build the source, and where to store the + built artifacts, if any. + + A user can list previously-requested builds or get builds by their ID to + determine the status of the build. + """ + + def CreateBuild(self, request, context): + """Starts a build with the specified configuration. + + This method returns a long-running `Operation`, which includes the build + ID. Pass the build ID to `GetBuild` to determine the build status (such as + `SUCCESS` or `FAILURE`). + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def GetBuild(self, request, context): + """Returns information about a previously requested build. + + The `Build` that is returned includes its status (such as `SUCCESS`, + `FAILURE`, or `WORKING`), and timing information. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def ListBuilds(self, request, context): + """Lists previously requested builds. + + Previously requested builds may still be in-progress, or may have finished + successfully or unsuccessfully. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def CancelBuild(self, request, context): + """Cancels a build in progress. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def RetryBuild(self, request, context): + """Creates a new build based on the specified build. + + This method creates a new build using the original build request, which may + or may not result in an identical build. + + For triggered builds: + + * Triggered builds resolve to a precise revision; therefore a retry of a + triggered build will result in a build that uses the same revision. + + For non-triggered builds that specify `RepoSource`: + + * If the original build built from the tip of a branch, the retried build + will build from the tip of that branch, which may not be the same revision + as the original build. + * If the original build specified a commit sha or revision ID, the retried + build will use the identical source. + + For builds that specify `StorageSource`: + + * If the original build pulled source from Google Cloud Storage without + specifying the generation of the object, the new build will use the current + object, which may be different from the original build source. + * If the original build pulled source from Cloud Storage and specified the + generation of the object, the new build will attempt to use the same + object, which may or may not be available depending on the bucket's + lifecycle management settings. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def CreateBuildTrigger(self, request, context): + """Creates a new `BuildTrigger`. + + This API is experimental. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def GetBuildTrigger(self, request, context): + """Returns information about a `BuildTrigger`. + + This API is experimental. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def ListBuildTriggers(self, request, context): + """Lists existing `BuildTrigger`s. + + This API is experimental. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def DeleteBuildTrigger(self, request, context): + """Deletes a `BuildTrigger` by its project ID and trigger ID. + + This API is experimental. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def UpdateBuildTrigger(self, request, context): + """Updates a `BuildTrigger` by its project ID and trigger ID. + + This API is experimental. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def RunBuildTrigger(self, request, context): + """Runs a `BuildTrigger` at a particular source revision. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def CreateWorkerPool(self, request, context): + """Creates a `WorkerPool` to run the builds, and returns the new worker pool. + + This API is experimental. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def GetWorkerPool(self, request, context): + """Returns information about a `WorkerPool`. + + This API is experimental. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def DeleteWorkerPool(self, request, context): + """Deletes a `WorkerPool` by its project ID and WorkerPool name. + + This API is experimental. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def UpdateWorkerPool(self, request, context): + """Update a `WorkerPool`. + + This API is experimental. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def ListWorkerPools(self, request, context): + """List project's `WorkerPool`s. + + This API is experimental. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + +def add_CloudBuildServicer_to_server(servicer, server): + rpc_method_handlers = { + "CreateBuild": grpc.unary_unary_rpc_method_handler( + servicer.CreateBuild, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.CreateBuildRequest.FromString, + response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, + ), + "GetBuild": grpc.unary_unary_rpc_method_handler( + servicer.GetBuild, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.GetBuildRequest.FromString, + response_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.Build.SerializeToString, + ), + "ListBuilds": grpc.unary_unary_rpc_method_handler( + servicer.ListBuilds, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.ListBuildsRequest.FromString, + response_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.ListBuildsResponse.SerializeToString, + ), + "CancelBuild": grpc.unary_unary_rpc_method_handler( + servicer.CancelBuild, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.CancelBuildRequest.FromString, + response_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.Build.SerializeToString, + ), + "RetryBuild": grpc.unary_unary_rpc_method_handler( + servicer.RetryBuild, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.RetryBuildRequest.FromString, + response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, + ), + "CreateBuildTrigger": grpc.unary_unary_rpc_method_handler( + servicer.CreateBuildTrigger, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.CreateBuildTriggerRequest.FromString, + response_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.BuildTrigger.SerializeToString, + ), + "GetBuildTrigger": grpc.unary_unary_rpc_method_handler( + servicer.GetBuildTrigger, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.GetBuildTriggerRequest.FromString, + response_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.BuildTrigger.SerializeToString, + ), + "ListBuildTriggers": grpc.unary_unary_rpc_method_handler( + servicer.ListBuildTriggers, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.ListBuildTriggersRequest.FromString, + response_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.ListBuildTriggersResponse.SerializeToString, + ), + "DeleteBuildTrigger": grpc.unary_unary_rpc_method_handler( + servicer.DeleteBuildTrigger, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.DeleteBuildTriggerRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + "UpdateBuildTrigger": grpc.unary_unary_rpc_method_handler( + servicer.UpdateBuildTrigger, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.UpdateBuildTriggerRequest.FromString, + response_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.BuildTrigger.SerializeToString, + ), + "RunBuildTrigger": grpc.unary_unary_rpc_method_handler( + servicer.RunBuildTrigger, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.RunBuildTriggerRequest.FromString, + response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, + ), + "CreateWorkerPool": grpc.unary_unary_rpc_method_handler( + servicer.CreateWorkerPool, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.CreateWorkerPoolRequest.FromString, + response_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.WorkerPool.SerializeToString, + ), + "GetWorkerPool": grpc.unary_unary_rpc_method_handler( + servicer.GetWorkerPool, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.GetWorkerPoolRequest.FromString, + response_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.WorkerPool.SerializeToString, + ), + "DeleteWorkerPool": grpc.unary_unary_rpc_method_handler( + servicer.DeleteWorkerPool, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.DeleteWorkerPoolRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + "UpdateWorkerPool": grpc.unary_unary_rpc_method_handler( + servicer.UpdateWorkerPool, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.UpdateWorkerPoolRequest.FromString, + response_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.WorkerPool.SerializeToString, + ), + "ListWorkerPools": grpc.unary_unary_rpc_method_handler( + servicer.ListWorkerPools, + request_deserializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.ListWorkerPoolsRequest.FromString, + response_serializer=google_dot_devtools_dot_cloudbuild__v1_dot_proto_dot_cloudbuild__pb2.ListWorkerPoolsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + "google.devtools.cloudbuild.v1.CloudBuild", rpc_method_handlers + ) + server.add_generic_rpc_handlers((generic_handler,)) diff --git a/cloudbuild/google/cloud/devtools/cloudbuild_v1/types.py b/cloudbuild/google/cloud/devtools/cloudbuild_v1/types.py new file mode 100644 index 000000000000..7e81597fa21e --- /dev/null +++ b/cloudbuild/google/cloud/devtools/cloudbuild_v1/types.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from __future__ import absolute_import +import sys + +from google.api_core.protobuf_helpers import get_messages + +from google.cloud.devtools.cloudbuild_v1.proto import cloudbuild_pb2 +from google.longrunning import operations_pb2 +from google.protobuf import any_pb2 +from google.protobuf import duration_pb2 +from google.protobuf import empty_pb2 +from google.protobuf import timestamp_pb2 +from google.rpc import status_pb2 + + +_shared_modules = [ + operations_pb2, + any_pb2, + duration_pb2, + empty_pb2, + timestamp_pb2, + status_pb2, +] + +_local_modules = [cloudbuild_pb2] + +names = [] + +for module in _shared_modules: # pragma: NO COVER + for name, message in get_messages(module).items(): + setattr(sys.modules[__name__], name, message) + names.append(name) +for module in _local_modules: + for name, message in get_messages(module).items(): + message.__module__ = "google.cloud.devtools.cloudbuild_v1.types" + setattr(sys.modules[__name__], name, message) + names.append(name) + + +__all__ = tuple(sorted(names)) diff --git a/cloudbuild/noxfile.py b/cloudbuild/noxfile.py new file mode 100644 index 000000000000..7c40b781775f --- /dev/null +++ b/cloudbuild/noxfile.py @@ -0,0 +1,160 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2018 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Generated by synthtool. DO NOT EDIT! + +from __future__ import absolute_import +import os +import shutil + +import nox + + +LOCAL_DEPS = (os.path.join("..", "api_core"), os.path.join("..", "core")) +BLACK_VERSION = "black==19.3b0" +BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] + +if os.path.exists("samples"): + BLACK_PATHS.append("samples") + + +@nox.session(python="3.7") +def lint(session): + """Run linters. + + Returns a failure if the linters find linting errors or sufficiently + serious code quality issues. + """ + session.install("flake8", BLACK_VERSION, *LOCAL_DEPS) + session.run("black", "--check", *BLACK_PATHS) + session.run("flake8", "google", "tests") + + +@nox.session(python="3.7") +def blacken(session): + """Run black. + + Format code to uniform standard. + + This currently uses Python 3.6 due to the automated Kokoro run of synthtool. + That run uses an image that doesn't have 3.6 installed. Before updating this + check the state of the `gcp_ubuntu_config` we use for that Kokoro run. + """ + session.install(BLACK_VERSION) + session.run("black", *BLACK_PATHS) + + +@nox.session(python="3.7") +def lint_setup_py(session): + """Verify that setup.py is valid (including RST check).""" + session.install("docutils", "pygments") + session.run("python", "setup.py", "check", "--restructuredtext", "--strict") + + +def default(session): + # Install all test dependencies, then install this package in-place. + session.install("mock", "pytest", "pytest-cov") + for local_dep in LOCAL_DEPS: + session.install("-e", local_dep) + session.install("-e", ".") + + # Run py.test against the unit tests. + session.run( + "py.test", + "--quiet", + "--cov=google.cloud", + "--cov=tests.unit", + "--cov-append", + "--cov-config=.coveragerc", + "--cov-report=", + "--cov-fail-under=0", + os.path.join("tests", "unit"), + *session.posargs, + ) + + +@nox.session(python=["2.7", "3.5", "3.6", "3.7"]) +def unit(session): + """Run the unit test suite.""" + default(session) + + +@nox.session(python=["2.7", "3.7"]) +def system(session): + """Run the system test suite.""" + system_test_path = os.path.join("tests", "system.py") + system_test_folder_path = os.path.join("tests", "system") + # Sanity check: Only run tests if the environment variable is set. + if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""): + session.skip("Credentials must be set via environment variable") + + system_test_exists = os.path.exists(system_test_path) + system_test_folder_exists = os.path.exists(system_test_folder_path) + # Sanity check: only run tests if found. + if not system_test_exists and not system_test_folder_exists: + session.skip("System tests were not found") + + # Use pre-release gRPC for system tests. + session.install("--pre", "grpcio") + + # Install all test dependencies, then install this package into the + # virtualenv's dist-packages. + session.install("mock", "pytest") + for local_dep in LOCAL_DEPS: + session.install("-e", local_dep) + session.install("-e", "../test_utils/") + session.install("-e", ".") + + # Run py.test against the system tests. + if system_test_exists: + session.run("py.test", "--quiet", system_test_path, *session.posargs) + if system_test_folder_exists: + session.run("py.test", "--quiet", system_test_folder_path, *session.posargs) + + +@nox.session(python="3.7") +def cover(session): + """Run the final coverage report. + + This outputs the coverage report aggregating coverage from the unit + test runs (not system test runs), and then erases coverage data. + """ + session.install("coverage", "pytest-cov") + session.run("coverage", "report", "--show-missing", "--fail-under=65") + + session.run("coverage", "erase") + + +@nox.session(python="3.7") +def docs(session): + """Build the docs for this library.""" + + session.install("-e", ".") + session.install("sphinx", "alabaster", "recommonmark") + + shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) + session.run( + "sphinx-build", + "-W", # warnings as errors + "-T", # show full traceback on exception + "-N", # no colors + "-b", + "html", + "-d", + os.path.join("docs", "_build", "doctrees", ""), + os.path.join("docs", ""), + os.path.join("docs", "_build", "html", ""), + ) diff --git a/cloudbuild/setup.cfg b/cloudbuild/setup.cfg new file mode 100644 index 000000000000..3bd555500e37 --- /dev/null +++ b/cloudbuild/setup.cfg @@ -0,0 +1,3 @@ +# Generated by synthtool. DO NOT EDIT! +[bdist_wheel] +universal = 1 diff --git a/cloudbuild/setup.py b/cloudbuild/setup.py new file mode 100644 index 000000000000..c53b7b014b0b --- /dev/null +++ b/cloudbuild/setup.py @@ -0,0 +1,81 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import io +import os + +import setuptools + +name = "google-cloud-build" +description = "Google Cloud Build API client library" +version = "0.1.0" +# Should be one of: +# 'Development Status :: 3 - Alpha' +# 'Development Status :: 4 - Beta' +# 'Development Status :: 5 - Production/Stable' +release_status = "Development Status :: 3 - Alpha" +dependencies = [ + "google-api-core[grpc] >= 1.14.0, < 2.0.0dev", + 'enum34; python_version < "3.4"', +] + +package_root = os.path.abspath(os.path.dirname(__file__)) + +readme_filename = os.path.join(package_root, "README.rst") +with io.open(readme_filename, encoding="utf-8") as readme_file: + readme = readme_file.read() + +packages = [ + package for package in setuptools.find_packages() if package.startswith("google") +] + +namespaces = ["google"] +if "google.cloud" in packages: + namespaces.append("google.cloud") + +if "google.cloud.devtools" in packages: + namespaces.append("google.cloud.devtools") + +setuptools.setup( + name=name, + version=version, + description=description, + long_description=readme, + author="Google LLC", + author_email="googleapis-packages@google.com", + license="Apache 2.0", + url="https://github.com/googleapis/google-cloud-python", + classifiers=[ + release_status, + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Operating System :: OS Independent", + "Topic :: Internet", + ], + platforms="Posix; MacOS X; Windows", + packages=packages, + namespace_packages=namespaces, + install_requires=dependencies, + include_package_data=True, + zip_safe=False, +) diff --git a/cloudbuild/synth.metadata b/cloudbuild/synth.metadata new file mode 100644 index 000000000000..e00caa5343ef --- /dev/null +++ b/cloudbuild/synth.metadata @@ -0,0 +1,39 @@ +{ + "updateTime": "2019-10-22T20:39:41.016824Z", + "sources": [ + { + "generator": { + "name": "artman", + "version": "0.40.2", + "dockerImage": "googleapis/artman@sha256:3b8f7d9b4c206843ce08053474f5c64ae4d388ff7d995e68b59fb65edf73eeb9" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "a9589347c884dd62c45b5852c1b86ff346bf98dc", + "internalRef": "276110444" + } + }, + { + "template": { + "name": "python_library", + "origin": "synthtool.gcp", + "version": "0.0.0+dev" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "cloudbuild", + "apiVersion": "v1", + "language": "python", + "generator": "gapic", + "config": "google/devtools/cloudbuild/artman_cloudbuild.yaml" + } + } + ] +} \ No newline at end of file diff --git a/cloudbuild/synth.py b/cloudbuild/synth.py new file mode 100644 index 000000000000..d1760a0c46a3 --- /dev/null +++ b/cloudbuild/synth.py @@ -0,0 +1,87 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +from synthtool import gcp + +gapic = gcp.GAPICGenerator() +common = gcp.CommonTemplates() +version = 'v1' + +# ---------------------------------------------------------------------------- +# Generate cloudbuild GAPIC layer +# ---------------------------------------------------------------------------- +library = gapic.py_library( + 'cloudbuild', + version, + config_path='/google/devtools/cloudbuild/artman_cloudbuild.yaml', + generator_args=["--dev_samples"], + include_protos=True +) + +s.move( + library, + excludes=[ + 'docs/index.rst', + 'nox*.py', + 'setup.py', + 'setup.cfg', + '**/*.proto' + 'google/cloud/devtools/__init__.py' # declare this as a namespace package + ], +) + +# Move protos to the right directory +s.move(library / "google/cloud/cloudbuild_v1/proto/*.proto", "google/cloud/devtools/cloudbuild_v1/proto") + +# Fix up imports +s.replace( + ["google/**/*.py", "tests/unit/**/*.py"], + r"from google.devtools.cloudbuild_v1.proto import ", + r"from google.cloud.devtools.cloudbuild_v1.proto import ", +) + + +# Rename package to `google-cloud-build` +s.replace( + ["**/*.rst", "**/*.py", "**/*.md"], + "google-cloud-build", + "google-cloud-build" +) + +# Fix reference to product documentation +s.replace( + 'README.rst', + 'https://cloud\.google\.com/cloudbuild', + 'https://cloud.google.com/cloud-build' +) + +# Fix link to auth +s.replace( + 'README.rst', + 'https://googleapis\.github\.io/google-cloud-python/latest/core/auth\.html', + 'https://googleapis.dev/python/google-api-core/latest/auth.html' +) + +# ---------------------------------------------------------------------------- +# Add templated files +# ---------------------------------------------------------------------------- + +# coverage level is low because of missing coverage for __init__.py files +templated_files = common.py_library(unit_cov_level=65, cov_level=65) +s.move(templated_files) + +s.shell.run(["nox", "-s", "blacken"], hide_output=False) diff --git a/cloudbuild/tests/unit/gapic/v1/test_cloud_build_client_v1.py b/cloudbuild/tests/unit/gapic/v1/test_cloud_build_client_v1.py new file mode 100644 index 000000000000..d9757069cc90 --- /dev/null +++ b/cloudbuild/tests/unit/gapic/v1/test_cloud_build_client_v1.py @@ -0,0 +1,754 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Unit tests.""" + +import mock +import pytest + +from google.cloud.devtools import cloudbuild_v1 +from google.cloud.devtools.cloudbuild_v1.proto import cloudbuild_pb2 +from google.longrunning import operations_pb2 +from google.protobuf import empty_pb2 + + +class MultiCallableStub(object): + """Stub for the grpc.UnaryUnaryMultiCallable interface.""" + + def __init__(self, method, channel_stub): + self.method = method + self.channel_stub = channel_stub + + def __call__(self, request, timeout=None, metadata=None, credentials=None): + self.channel_stub.requests.append((self.method, request)) + + response = None + if self.channel_stub.responses: + response = self.channel_stub.responses.pop() + + if isinstance(response, Exception): + raise response + + if response: + return response + + +class ChannelStub(object): + """Stub for the grpc.Channel interface.""" + + def __init__(self, responses=[]): + self.responses = responses + self.requests = [] + + def unary_unary(self, method, request_serializer=None, response_deserializer=None): + return MultiCallableStub(method, self) + + +class CustomException(Exception): + pass + + +class TestCloudBuildClient(object): + def test_create_build(self): + # Setup Expected Response + name = "name3373707" + done = True + expected_response = {"name": name, "done": done} + expected_response = operations_pb2.Operation(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup Request + project_id = "projectId-1969970175" + build = {} + + response = client.create_build(project_id, build) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.CreateBuildRequest( + project_id=project_id, build=build + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_create_build_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup request + project_id = "projectId-1969970175" + build = {} + + with pytest.raises(CustomException): + client.create_build(project_id, build) + + def test_get_build(self): + # Setup Expected Response + id_2 = "id23227150" + project_id_2 = "projectId2939242356" + status_detail = "statusDetail2089931070" + logs_bucket = "logsBucket1565363834" + build_trigger_id = "buildTriggerId1105559411" + log_url = "logUrl342054388" + expected_response = { + "id": id_2, + "project_id": project_id_2, + "status_detail": status_detail, + "logs_bucket": logs_bucket, + "build_trigger_id": build_trigger_id, + "log_url": log_url, + } + expected_response = cloudbuild_pb2.Build(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup Request + project_id = "projectId-1969970175" + id_ = "id3355" + + response = client.get_build(project_id, id_) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.GetBuildRequest(project_id=project_id, id=id_) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_get_build_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup request + project_id = "projectId-1969970175" + id_ = "id3355" + + with pytest.raises(CustomException): + client.get_build(project_id, id_) + + def test_list_builds(self): + # Setup Expected Response + next_page_token = "" + builds_element = {} + builds = [builds_element] + expected_response = {"next_page_token": next_page_token, "builds": builds} + expected_response = cloudbuild_pb2.ListBuildsResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup Request + project_id = "projectId-1969970175" + + paged_list_response = client.list_builds(project_id) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.builds[0] == resources[0] + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.ListBuildsRequest(project_id=project_id) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_list_builds_exception(self): + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup request + project_id = "projectId-1969970175" + + paged_list_response = client.list_builds(project_id) + with pytest.raises(CustomException): + list(paged_list_response) + + def test_cancel_build(self): + # Setup Expected Response + id_2 = "id23227150" + project_id_2 = "projectId2939242356" + status_detail = "statusDetail2089931070" + logs_bucket = "logsBucket1565363834" + build_trigger_id = "buildTriggerId1105559411" + log_url = "logUrl342054388" + expected_response = { + "id": id_2, + "project_id": project_id_2, + "status_detail": status_detail, + "logs_bucket": logs_bucket, + "build_trigger_id": build_trigger_id, + "log_url": log_url, + } + expected_response = cloudbuild_pb2.Build(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup Request + project_id = "projectId-1969970175" + id_ = "id3355" + + response = client.cancel_build(project_id, id_) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.CancelBuildRequest( + project_id=project_id, id=id_ + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_cancel_build_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup request + project_id = "projectId-1969970175" + id_ = "id3355" + + with pytest.raises(CustomException): + client.cancel_build(project_id, id_) + + def test_create_build_trigger(self): + # Setup Expected Response + id_ = "id3355" + description = "description-1724546052" + name = "name3373707" + filename = "filename-734768633" + disabled = True + expected_response = { + "id": id_, + "description": description, + "name": name, + "filename": filename, + "disabled": disabled, + } + expected_response = cloudbuild_pb2.BuildTrigger(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup Request + project_id = "projectId-1969970175" + trigger = {} + + response = client.create_build_trigger(project_id, trigger) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.CreateBuildTriggerRequest( + project_id=project_id, trigger=trigger + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_create_build_trigger_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup request + project_id = "projectId-1969970175" + trigger = {} + + with pytest.raises(CustomException): + client.create_build_trigger(project_id, trigger) + + def test_get_build_trigger(self): + # Setup Expected Response + id_ = "id3355" + description = "description-1724546052" + name = "name3373707" + filename = "filename-734768633" + disabled = True + expected_response = { + "id": id_, + "description": description, + "name": name, + "filename": filename, + "disabled": disabled, + } + expected_response = cloudbuild_pb2.BuildTrigger(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup Request + project_id = "projectId-1969970175" + trigger_id = "triggerId1363517698" + + response = client.get_build_trigger(project_id, trigger_id) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.GetBuildTriggerRequest( + project_id=project_id, trigger_id=trigger_id + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_get_build_trigger_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup request + project_id = "projectId-1969970175" + trigger_id = "triggerId1363517698" + + with pytest.raises(CustomException): + client.get_build_trigger(project_id, trigger_id) + + def test_list_build_triggers(self): + # Setup Expected Response + next_page_token = "nextPageToken-1530815211" + expected_response = {"next_page_token": next_page_token} + expected_response = cloudbuild_pb2.ListBuildTriggersResponse( + **expected_response + ) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup Request + project_id = "projectId-1969970175" + + response = client.list_build_triggers(project_id) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.ListBuildTriggersRequest( + project_id=project_id + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_list_build_triggers_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup request + project_id = "projectId-1969970175" + + with pytest.raises(CustomException): + client.list_build_triggers(project_id) + + def test_delete_build_trigger(self): + channel = ChannelStub() + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup Request + project_id = "projectId-1969970175" + trigger_id = "triggerId1363517698" + + client.delete_build_trigger(project_id, trigger_id) + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.DeleteBuildTriggerRequest( + project_id=project_id, trigger_id=trigger_id + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_build_trigger_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup request + project_id = "projectId-1969970175" + trigger_id = "triggerId1363517698" + + with pytest.raises(CustomException): + client.delete_build_trigger(project_id, trigger_id) + + def test_update_build_trigger(self): + # Setup Expected Response + id_ = "id3355" + description = "description-1724546052" + name = "name3373707" + filename = "filename-734768633" + disabled = True + expected_response = { + "id": id_, + "description": description, + "name": name, + "filename": filename, + "disabled": disabled, + } + expected_response = cloudbuild_pb2.BuildTrigger(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup Request + project_id = "projectId-1969970175" + trigger_id = "triggerId1363517698" + trigger = {} + + response = client.update_build_trigger(project_id, trigger_id, trigger) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.UpdateBuildTriggerRequest( + project_id=project_id, trigger_id=trigger_id, trigger=trigger + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_update_build_trigger_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup request + project_id = "projectId-1969970175" + trigger_id = "triggerId1363517698" + trigger = {} + + with pytest.raises(CustomException): + client.update_build_trigger(project_id, trigger_id, trigger) + + def test_run_build_trigger(self): + # Setup Expected Response + name = "name3373707" + done = True + expected_response = {"name": name, "done": done} + expected_response = operations_pb2.Operation(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup Request + project_id = "projectId-1969970175" + trigger_id = "triggerId1363517698" + source = {} + + response = client.run_build_trigger(project_id, trigger_id, source) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.RunBuildTriggerRequest( + project_id=project_id, trigger_id=trigger_id, source=source + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_run_build_trigger_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup request + project_id = "projectId-1969970175" + trigger_id = "triggerId1363517698" + source = {} + + with pytest.raises(CustomException): + client.run_build_trigger(project_id, trigger_id, source) + + def test_retry_build(self): + # Setup Expected Response + name = "name3373707" + done = True + expected_response = {"name": name, "done": done} + expected_response = operations_pb2.Operation(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup Request + project_id = "projectId-1969970175" + id_ = "id3355" + + response = client.retry_build(project_id, id_) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.RetryBuildRequest( + project_id=project_id, id=id_ + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_retry_build_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + # Setup request + project_id = "projectId-1969970175" + id_ = "id3355" + + with pytest.raises(CustomException): + client.retry_build(project_id, id_) + + def test_create_worker_pool(self): + # Setup Expected Response + name = "name3373707" + project_id = "projectId-1969970175" + service_account_email = "serviceAccountEmail-1300473088" + worker_count = 372044046 + expected_response = { + "name": name, + "project_id": project_id, + "service_account_email": service_account_email, + "worker_count": worker_count, + } + expected_response = cloudbuild_pb2.WorkerPool(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + response = client.create_worker_pool() + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.CreateWorkerPoolRequest() + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_create_worker_pool_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + with pytest.raises(CustomException): + client.create_worker_pool() + + def test_get_worker_pool(self): + # Setup Expected Response + name = "name3373707" + project_id = "projectId-1969970175" + service_account_email = "serviceAccountEmail-1300473088" + worker_count = 372044046 + expected_response = { + "name": name, + "project_id": project_id, + "service_account_email": service_account_email, + "worker_count": worker_count, + } + expected_response = cloudbuild_pb2.WorkerPool(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + response = client.get_worker_pool() + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.GetWorkerPoolRequest() + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_get_worker_pool_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + with pytest.raises(CustomException): + client.get_worker_pool() + + def test_delete_worker_pool(self): + channel = ChannelStub() + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + client.delete_worker_pool() + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.DeleteWorkerPoolRequest() + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_delete_worker_pool_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + with pytest.raises(CustomException): + client.delete_worker_pool() + + def test_update_worker_pool(self): + # Setup Expected Response + name = "name3373707" + project_id = "projectId-1969970175" + service_account_email = "serviceAccountEmail-1300473088" + worker_count = 372044046 + expected_response = { + "name": name, + "project_id": project_id, + "service_account_email": service_account_email, + "worker_count": worker_count, + } + expected_response = cloudbuild_pb2.WorkerPool(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + response = client.update_worker_pool() + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.UpdateWorkerPoolRequest() + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_update_worker_pool_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + with pytest.raises(CustomException): + client.update_worker_pool() + + def test_list_worker_pools(self): + # Setup Expected Response + expected_response = {} + expected_response = cloudbuild_pb2.ListWorkerPoolsResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + response = client.list_worker_pools() + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = cloudbuild_pb2.ListWorkerPoolsRequest() + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_list_worker_pools_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = cloudbuild_v1.CloudBuildClient() + + with pytest.raises(CustomException): + client.list_worker_pools()