# Google Cloud Container Builder API . projects . triggers

## Instance Methods

Creates a new BuildTrigger.

Deletes an BuildTrigger by its project ID and trigger ID.

Gets information about a BuildTrigger.

Lists existing BuildTrigger.

Updates an BuildTrigger by its project ID and trigger ID.

### Method Details

`create(projectId, body, x__xgafv=None)`

    Creates a new BuildTrigger.

    This API is experimental.

    Args:
      projectId: string, ID of the project for which to configure automatic builds. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # Configuration for an automated build in response to source repository
          # changes.
        "id": "A String", # Unique identifier of the trigger.
            #
            # @OutputOnly
        "build": { # A build resource in the Container Builder API. # Contents of the build template.
            #
            # 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 what tag to
            # apply to the built image when it is pushed to Google Container Registry.
          "status": "A String", # Status of the build.
              # @OutputOnly
          "finishTime": "A String", # Time at which execution of the build was finished.
              # @OutputOnly
          "timeout": "A String", # 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.
          "statusDetail": "A String", # Customer-readable message about the current status.
              # @OutputOnly
          "startTime": "A String", # Time at which execution of the build was started.
              # @OutputOnly
          "logsBucket": "A String", # 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`.
          "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
              # @OutputOnly
            "images": [ # Images that were built as a part of the build.
              { # BuiltImage describes an image built by the pipeline.
                "name": "A String", # Name used to push the container image to Google Container Registry, as
                    # presented to `docker push`.
                "digest": "A String", # Docker Registry 2.0 digest.
              },
            ],
            "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
              "A String",
            ],
          },
          "createTime": "A String", # Time at which the build was created.
              # @OutputOnly
          "id": "A String", # Unique identifier of the build.
              # @OutputOnly
          "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
              # service.
            "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud
                # Storage.
                # Google Cloud Storage.
              "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
                  # omitted, the latest generation will be used.
              "object": "A String", # Google Cloud Storage object containing source.
                  #
                  # This object must be a gzipped archive file (.tar.gz) containing source to
                  # build.
              "bucket": "A String", # Google Cloud Storage bucket containing source (see
                  # [Bucket Name
                  # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
            },
            "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
                # Repository.
              "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                  # the build is assumed.
              "branchName": "A String", # Name of the branch to build.
              "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
              "tagName": "A String", # Name of the tag to build.
              "commitSha": "A String", # Explicit commit SHA to build.
            },
          },
          "steps": [ # Describes the operations to be performed on the workspace.
            { # BuildStep describes a step to perform in the build pipeline.
              "waitFor": [ # 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.
                "A String",
              ],
              "name": "A String", # Name of the container image to use for creating this stage in the
                  # pipeline, as presented to `docker pull`.
              "args": [ # Command-line arguments to use when running this step's container.
                "A String",
              ],
              "env": [ # Additional environment variables to set for this step's container.
                "A String",
              ],
              "id": "A String", # Optional unique identifier for this build step, used in wait_for to
                  # reference this build step as a dependency.
              "dir": "A String", # Working directory (relative to project source root) to use when running
                  # this operation's container.
            },
          ],
          "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
              # @OutputOnly
              # some source was used for this build.
            "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any
                # revisions resolved.
                # Repository.
              "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                  # the build is assumed.
              "branchName": "A String", # Name of the branch to build.
              "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
              "tagName": "A String", # Name of the tag to build.
              "commitSha": "A String", # Explicit commit SHA to build.
            },
            "fileHashes": { # 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.
                # @OutputOnly
              "a_key": { # Container message for hashes of byte content of files, used in
                  # SourceProvenance messages to verify integrity of source input to the build.
                "fileHash": [ # Collection of file hashes.
                  { # Container message for hash values.
                    "type": "A String", # The type of hash that was performed.
                    "value": "A String", # The hash value.
                  },
                ],
              },
            },
            "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any
                # generations resolved.
                # Google Cloud Storage.
              "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
                  # omitted, the latest generation will be used.
              "object": "A String", # Google Cloud Storage object containing source.
                  #
                  # This object must be a gzipped archive file (.tar.gz) containing source to
                  # build.
              "bucket": "A String", # Google Cloud Storage bucket containing source (see
                  # [Bucket Name
                  # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
            },
          },
          "projectId": "A String", # ID of the project.
              # @OutputOnly.
          "images": [ # List of images expected to be built and pushed to Google Container
              # Registry. If an image is listed here and the image is not produced by
              # one of the build steps, the build will fail. Any images present when
              # the build steps are complete will be pushed to Container Registry.
            "A String",
          ],
          "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
            "requestedVerifyOption": "A String", # Options for a verifiable build with details uploaded to the Analysis API.
            "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
              "A String",
            ],
          },
          "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
              # @OutputOnly
        },
        "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # 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.
            # Repository.
          "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
              # the build is assumed.
          "branchName": "A String", # Name of the branch to build.
          "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
          "tagName": "A String", # Name of the tag to build.
          "commitSha": "A String", # Explicit commit SHA to build.
        },
        "createTime": "A String", # Time when the trigger was created.
            #
            # @OutputOnly
        "filename": "A String", # Path, from the source root, to a file whose contents is used for the
            # template.
      }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Configuration for an automated build in response to source repository
            # changes.
          "id": "A String", # Unique identifier of the trigger.
              #
              # @OutputOnly
          "build": { # A build resource in the Container Builder API. # Contents of the build template.
              #
              # 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 what tag to
              # apply to the built image when it is pushed to Google Container Registry.
            "status": "A String", # Status of the build.
                # @OutputOnly
            "finishTime": "A String", # Time at which execution of the build was finished.
                # @OutputOnly
            "timeout": "A String", # 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.
            "statusDetail": "A String", # Customer-readable message about the current status.
                # @OutputOnly
            "startTime": "A String", # Time at which execution of the build was started.
                # @OutputOnly
            "logsBucket": "A String", # 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`.
            "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
                # @OutputOnly
              "images": [ # Images that were built as a part of the build.
                { # BuiltImage describes an image built by the pipeline.
                  "name": "A String", # Name used to push the container image to Google Container Registry, as
                      # presented to `docker push`.
                  "digest": "A String", # Docker Registry 2.0 digest.
                },
              ],
              "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
                "A String",
              ],
            },
            "createTime": "A String", # Time at which the build was created.
                # @OutputOnly
            "id": "A String", # Unique identifier of the build.
                # @OutputOnly
            "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
                # service.
              "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud
                  # Storage.
                  # Google Cloud Storage.
                "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
                    # omitted, the latest generation will be used.
                "object": "A String", # Google Cloud Storage object containing source.
                    #
                    # This object must be a gzipped archive file (.tar.gz) containing source to
                    # build.
                "bucket": "A String", # Google Cloud Storage bucket containing source (see
                    # [Bucket Name
                    # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
              },
              "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
                  # Repository.
                "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                    # the build is assumed.
                "branchName": "A String", # Name of the branch to build.
                "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
                "tagName": "A String", # Name of the tag to build.
                "commitSha": "A String", # Explicit commit SHA to build.
              },
            },
            "steps": [ # Describes the operations to be performed on the workspace.
              { # BuildStep describes a step to perform in the build pipeline.
                "waitFor": [ # 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.
                  "A String",
                ],
                "name": "A String", # Name of the container image to use for creating this stage in the
                    # pipeline, as presented to `docker pull`.
                "args": [ # Command-line arguments to use when running this step's container.
                  "A String",
                ],
                "env": [ # Additional environment variables to set for this step's container.
                  "A String",
                ],
                "id": "A String", # Optional unique identifier for this build step, used in wait_for to
                    # reference this build step as a dependency.
                "dir": "A String", # Working directory (relative to project source root) to use when running
                    # this operation's container.
              },
            ],
            "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
                # @OutputOnly
                # some source was used for this build.
              "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any
                  # revisions resolved.
                  # Repository.
                "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                    # the build is assumed.
                "branchName": "A String", # Name of the branch to build.
                "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
                "tagName": "A String", # Name of the tag to build.
                "commitSha": "A String", # Explicit commit SHA to build.
              },
              "fileHashes": { # 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.
                  # @OutputOnly
                "a_key": { # Container message for hashes of byte content of files, used in
                    # SourceProvenance messages to verify integrity of source input to the build.
                  "fileHash": [ # Collection of file hashes.
                    { # Container message for hash values.
                      "type": "A String", # The type of hash that was performed.
                      "value": "A String", # The hash value.
                    },
                  ],
                },
              },
              "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any
                  # generations resolved.
                  # Google Cloud Storage.
                "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
                    # omitted, the latest generation will be used.
                "object": "A String", # Google Cloud Storage object containing source.
                    #
                    # This object must be a gzipped archive file (.tar.gz) containing source to
                    # build.
                "bucket": "A String", # Google Cloud Storage bucket containing source (see
                    # [Bucket Name
                    # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
              },
            },
            "projectId": "A String", # ID of the project.
                # @OutputOnly.
            "images": [ # List of images expected to be built and pushed to Google Container
                # Registry. If an image is listed here and the image is not produced by
                # one of the build steps, the build will fail. Any images present when
                # the build steps are complete will be pushed to Container Registry.
              "A String",
            ],
            "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
              "requestedVerifyOption": "A String", # Options for a verifiable build with details uploaded to the Analysis API.
              "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
                "A String",
              ],
            },
            "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
                # @OutputOnly
          },
          "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # 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.
              # Repository.
            "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                # the build is assumed.
            "branchName": "A String", # Name of the branch to build.
            "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
            "tagName": "A String", # Name of the tag to build.
            "commitSha": "A String", # Explicit commit SHA to build.
          },
          "createTime": "A String", # Time when the trigger was created.
              #
              # @OutputOnly
          "filename": "A String", # Path, from the source root, to a file whose contents is used for the
              # template.
        }

`delete(projectId, triggerId, x__xgafv=None)`

    Deletes an BuildTrigger by its project ID and trigger ID.

    This API is experimental.

    Args:
      projectId: string, ID of the project that owns the trigger. (required)
      triggerId: string, ID of the BuildTrigger to delete. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A generic empty message that you can re-use to avoid defining duplicated
          # empty messages in your APIs. A typical example is to use it as the request
          # or the response type of an API method. For instance:
          #
          #     service Foo {
          #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
          #     }
          #
          # The JSON representation for `Empty` is empty JSON object `{}`.
      }

`get(projectId, triggerId, x__xgafv=None)`

    Gets information about a BuildTrigger.

    This API is experimental.

    Args:
      projectId: string, ID of the project that owns the trigger. (required)
      triggerId: string, ID of the BuildTrigger to get. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Configuration for an automated build in response to source repository
            # changes.
          "id": "A String", # Unique identifier of the trigger.
              #
              # @OutputOnly
          "build": { # A build resource in the Container Builder API. # Contents of the build template.
              #
              # 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 what tag to
              # apply to the built image when it is pushed to Google Container Registry.
            "status": "A String", # Status of the build.
                # @OutputOnly
            "finishTime": "A String", # Time at which execution of the build was finished.
                # @OutputOnly
            "timeout": "A String", # 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.
            "statusDetail": "A String", # Customer-readable message about the current status.
                # @OutputOnly
            "startTime": "A String", # Time at which execution of the build was started.
                # @OutputOnly
            "logsBucket": "A String", # 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`.
            "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
                # @OutputOnly
              "images": [ # Images that were built as a part of the build.
                { # BuiltImage describes an image built by the pipeline.
                  "name": "A String", # Name used to push the container image to Google Container Registry, as
                      # presented to `docker push`.
                  "digest": "A String", # Docker Registry 2.0 digest.
                },
              ],
              "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
                "A String",
              ],
            },
            "createTime": "A String", # Time at which the build was created.
                # @OutputOnly
            "id": "A String", # Unique identifier of the build.
                # @OutputOnly
            "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
                # service.
              "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud
                  # Storage.
                  # Google Cloud Storage.
                "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
                    # omitted, the latest generation will be used.
                "object": "A String", # Google Cloud Storage object containing source.
                    #
                    # This object must be a gzipped archive file (.tar.gz) containing source to
                    # build.
                "bucket": "A String", # Google Cloud Storage bucket containing source (see
                    # [Bucket Name
                    # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
              },
              "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
                  # Repository.
                "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                    # the build is assumed.
                "branchName": "A String", # Name of the branch to build.
                "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
                "tagName": "A String", # Name of the tag to build.
                "commitSha": "A String", # Explicit commit SHA to build.
              },
            },
            "steps": [ # Describes the operations to be performed on the workspace.
              { # BuildStep describes a step to perform in the build pipeline.
                "waitFor": [ # 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.
                  "A String",
                ],
                "name": "A String", # Name of the container image to use for creating this stage in the
                    # pipeline, as presented to `docker pull`.
                "args": [ # Command-line arguments to use when running this step's container.
                  "A String",
                ],
                "env": [ # Additional environment variables to set for this step's container.
                  "A String",
                ],
                "id": "A String", # Optional unique identifier for this build step, used in wait_for to
                    # reference this build step as a dependency.
                "dir": "A String", # Working directory (relative to project source root) to use when running
                    # this operation's container.
              },
            ],
            "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
                # @OutputOnly
                # some source was used for this build.
              "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any
                  # revisions resolved.
                  # Repository.
                "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                    # the build is assumed.
                "branchName": "A String", # Name of the branch to build.
                "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
                "tagName": "A String", # Name of the tag to build.
                "commitSha": "A String", # Explicit commit SHA to build.
              },
              "fileHashes": { # 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.
                  # @OutputOnly
                "a_key": { # Container message for hashes of byte content of files, used in
                    # SourceProvenance messages to verify integrity of source input to the build.
                  "fileHash": [ # Collection of file hashes.
                    { # Container message for hash values.
                      "type": "A String", # The type of hash that was performed.
                      "value": "A String", # The hash value.
                    },
                  ],
                },
              },
              "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any
                  # generations resolved.
                  # Google Cloud Storage.
                "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
                    # omitted, the latest generation will be used.
                "object": "A String", # Google Cloud Storage object containing source.
                    #
                    # This object must be a gzipped archive file (.tar.gz) containing source to
                    # build.
                "bucket": "A String", # Google Cloud Storage bucket containing source (see
                    # [Bucket Name
                    # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
              },
            },
            "projectId": "A String", # ID of the project.
                # @OutputOnly.
            "images": [ # List of images expected to be built and pushed to Google Container
                # Registry. If an image is listed here and the image is not produced by
                # one of the build steps, the build will fail. Any images present when
                # the build steps are complete will be pushed to Container Registry.
              "A String",
            ],
            "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
              "requestedVerifyOption": "A String", # Options for a verifiable build with details uploaded to the Analysis API.
              "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
                "A String",
              ],
            },
            "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
                # @OutputOnly
          },
          "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # 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.
              # Repository.
            "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                # the build is assumed.
            "branchName": "A String", # Name of the branch to build.
            "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
            "tagName": "A String", # Name of the tag to build.
            "commitSha": "A String", # Explicit commit SHA to build.
          },
          "createTime": "A String", # Time when the trigger was created.
              #
              # @OutputOnly
          "filename": "A String", # Path, from the source root, to a file whose contents is used for the
              # template.
        }

`list(projectId, x__xgafv=None)`

    Lists existing BuildTrigger.

    This API is experimental.

    Args:
      projectId: string, ID of the project for which to list BuildTriggers. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Response containing existing BuildTriggers.
        "triggers": [ # BuildTriggers for the project, sorted by create_time descending.
          { # Configuration for an automated build in response to source repository
                # changes.
              "id": "A String", # Unique identifier of the trigger.
                  #
                  # @OutputOnly
              "build": { # A build resource in the Container Builder API. # Contents of the build template.
                  #
                  # 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 what tag to
                  # apply to the built image when it is pushed to Google Container Registry.
                "status": "A String", # Status of the build.
                    # @OutputOnly
                "finishTime": "A String", # Time at which execution of the build was finished.
                    # @OutputOnly
                "timeout": "A String", # 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.
                "statusDetail": "A String", # Customer-readable message about the current status.
                    # @OutputOnly
                "startTime": "A String", # Time at which execution of the build was started.
                    # @OutputOnly
                "logsBucket": "A String", # 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`.
                "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
                    # @OutputOnly
                  "images": [ # Images that were built as a part of the build.
                    { # BuiltImage describes an image built by the pipeline.
                      "name": "A String", # Name used to push the container image to Google Container Registry, as
                          # presented to `docker push`.
                      "digest": "A String", # Docker Registry 2.0 digest.
                    },
                  ],
                  "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
                    "A String",
                  ],
                },
                "createTime": "A String", # Time at which the build was created.
                    # @OutputOnly
                "id": "A String", # Unique identifier of the build.
                    # @OutputOnly
                "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
                    # service.
                  "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud
                      # Storage.
                      # Google Cloud Storage.
                    "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
                        # omitted, the latest generation will be used.
                    "object": "A String", # Google Cloud Storage object containing source.
                        #
                        # This object must be a gzipped archive file (.tar.gz) containing source to
                        # build.
                    "bucket": "A String", # Google Cloud Storage bucket containing source (see
                        # [Bucket Name
                        # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
                  },
                  "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
                      # Repository.
                    "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                        # the build is assumed.
                    "branchName": "A String", # Name of the branch to build.
                    "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
                    "tagName": "A String", # Name of the tag to build.
                    "commitSha": "A String", # Explicit commit SHA to build.
                  },
                },
                "steps": [ # Describes the operations to be performed on the workspace.
                  { # BuildStep describes a step to perform in the build pipeline.
                    "waitFor": [ # 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.
                      "A String",
                    ],
                    "name": "A String", # Name of the container image to use for creating this stage in the
                        # pipeline, as presented to `docker pull`.
                    "args": [ # Command-line arguments to use when running this step's container.
                      "A String",
                    ],
                    "env": [ # Additional environment variables to set for this step's container.
                      "A String",
                    ],
                    "id": "A String", # Optional unique identifier for this build step, used in wait_for to
                        # reference this build step as a dependency.
                    "dir": "A String", # Working directory (relative to project source root) to use when running
                        # this operation's container.
                  },
                ],
                "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
                    # @OutputOnly
                    # some source was used for this build.
                  "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any
                      # revisions resolved.
                      # Repository.
                    "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                        # the build is assumed.
                    "branchName": "A String", # Name of the branch to build.
                    "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
                    "tagName": "A String", # Name of the tag to build.
                    "commitSha": "A String", # Explicit commit SHA to build.
                  },
                  "fileHashes": { # 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.
                      # @OutputOnly
                    "a_key": { # Container message for hashes of byte content of files, used in
                        # SourceProvenance messages to verify integrity of source input to the build.
                      "fileHash": [ # Collection of file hashes.
                        { # Container message for hash values.
                          "type": "A String", # The type of hash that was performed.
                          "value": "A String", # The hash value.
                        },
                      ],
                    },
                  },
                  "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any
                      # generations resolved.
                      # Google Cloud Storage.
                    "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
                        # omitted, the latest generation will be used.
                    "object": "A String", # Google Cloud Storage object containing source.
                        #
                        # This object must be a gzipped archive file (.tar.gz) containing source to
                        # build.
                    "bucket": "A String", # Google Cloud Storage bucket containing source (see
                        # [Bucket Name
                        # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
                  },
                },
                "projectId": "A String", # ID of the project.
                    # @OutputOnly.
                "images": [ # List of images expected to be built and pushed to Google Container
                    # Registry. If an image is listed here and the image is not produced by
                    # one of the build steps, the build will fail. Any images present when
                    # the build steps are complete will be pushed to Container Registry.
                  "A String",
                ],
                "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
                  "requestedVerifyOption": "A String", # Options for a verifiable build with details uploaded to the Analysis API.
                  "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
                    "A String",
                  ],
                },
                "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
                    # @OutputOnly
              },
              "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # 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.
                  # Repository.
                "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                    # the build is assumed.
                "branchName": "A String", # Name of the branch to build.
                "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
                "tagName": "A String", # Name of the tag to build.
                "commitSha": "A String", # Explicit commit SHA to build.
              },
              "createTime": "A String", # Time when the trigger was created.
                  #
                  # @OutputOnly
              "filename": "A String", # Path, from the source root, to a file whose contents is used for the
                  # template.
            },
        ],
      }

`patch(projectId, triggerId, body, x__xgafv=None)`

    Updates an BuildTrigger by its project ID and trigger ID.

    This API is experimental.

    Args:
      projectId: string, ID of the project that owns the trigger. (required)
      triggerId: string, ID of the BuildTrigger to update. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # Configuration for an automated build in response to source repository
          # changes.
        "id": "A String", # Unique identifier of the trigger.
            #
            # @OutputOnly
        "build": { # A build resource in the Container Builder API. # Contents of the build template.
            #
            # 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 what tag to
            # apply to the built image when it is pushed to Google Container Registry.
          "status": "A String", # Status of the build.
              # @OutputOnly
          "finishTime": "A String", # Time at which execution of the build was finished.
              # @OutputOnly
          "timeout": "A String", # 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.
          "statusDetail": "A String", # Customer-readable message about the current status.
              # @OutputOnly
          "startTime": "A String", # Time at which execution of the build was started.
              # @OutputOnly
          "logsBucket": "A String", # 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`.
          "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
              # @OutputOnly
            "images": [ # Images that were built as a part of the build.
              { # BuiltImage describes an image built by the pipeline.
                "name": "A String", # Name used to push the container image to Google Container Registry, as
                    # presented to `docker push`.
                "digest": "A String", # Docker Registry 2.0 digest.
              },
            ],
            "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
              "A String",
            ],
          },
          "createTime": "A String", # Time at which the build was created.
              # @OutputOnly
          "id": "A String", # Unique identifier of the build.
              # @OutputOnly
          "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
              # service.
            "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud
                # Storage.
                # Google Cloud Storage.
              "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
                  # omitted, the latest generation will be used.
              "object": "A String", # Google Cloud Storage object containing source.
                  #
                  # This object must be a gzipped archive file (.tar.gz) containing source to
                  # build.
              "bucket": "A String", # Google Cloud Storage bucket containing source (see
                  # [Bucket Name
                  # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
            },
            "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
                # Repository.
              "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                  # the build is assumed.
              "branchName": "A String", # Name of the branch to build.
              "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
              "tagName": "A String", # Name of the tag to build.
              "commitSha": "A String", # Explicit commit SHA to build.
            },
          },
          "steps": [ # Describes the operations to be performed on the workspace.
            { # BuildStep describes a step to perform in the build pipeline.
              "waitFor": [ # 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.
                "A String",
              ],
              "name": "A String", # Name of the container image to use for creating this stage in the
                  # pipeline, as presented to `docker pull`.
              "args": [ # Command-line arguments to use when running this step's container.
                "A String",
              ],
              "env": [ # Additional environment variables to set for this step's container.
                "A String",
              ],
              "id": "A String", # Optional unique identifier for this build step, used in wait_for to
                  # reference this build step as a dependency.
              "dir": "A String", # Working directory (relative to project source root) to use when running
                  # this operation's container.
            },
          ],
          "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
              # @OutputOnly
              # some source was used for this build.
            "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any
                # revisions resolved.
                # Repository.
              "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                  # the build is assumed.
              "branchName": "A String", # Name of the branch to build.
              "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
              "tagName": "A String", # Name of the tag to build.
              "commitSha": "A String", # Explicit commit SHA to build.
            },
            "fileHashes": { # 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.
                # @OutputOnly
              "a_key": { # Container message for hashes of byte content of files, used in
                  # SourceProvenance messages to verify integrity of source input to the build.
                "fileHash": [ # Collection of file hashes.
                  { # Container message for hash values.
                    "type": "A String", # The type of hash that was performed.
                    "value": "A String", # The hash value.
                  },
                ],
              },
            },
            "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any
                # generations resolved.
                # Google Cloud Storage.
              "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
                  # omitted, the latest generation will be used.
              "object": "A String", # Google Cloud Storage object containing source.
                  #
                  # This object must be a gzipped archive file (.tar.gz) containing source to
                  # build.
              "bucket": "A String", # Google Cloud Storage bucket containing source (see
                  # [Bucket Name
                  # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
            },
          },
          "projectId": "A String", # ID of the project.
              # @OutputOnly.
          "images": [ # List of images expected to be built and pushed to Google Container
              # Registry. If an image is listed here and the image is not produced by
              # one of the build steps, the build will fail. Any images present when
              # the build steps are complete will be pushed to Container Registry.
            "A String",
          ],
          "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
            "requestedVerifyOption": "A String", # Options for a verifiable build with details uploaded to the Analysis API.
            "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
              "A String",
            ],
          },
          "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
              # @OutputOnly
        },
        "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # 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.
            # Repository.
          "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
              # the build is assumed.
          "branchName": "A String", # Name of the branch to build.
          "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
          "tagName": "A String", # Name of the tag to build.
          "commitSha": "A String", # Explicit commit SHA to build.
        },
        "createTime": "A String", # Time when the trigger was created.
            #
            # @OutputOnly
        "filename": "A String", # Path, from the source root, to a file whose contents is used for the
            # template.
      }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Configuration for an automated build in response to source repository
            # changes.
          "id": "A String", # Unique identifier of the trigger.
              #
              # @OutputOnly
          "build": { # A build resource in the Container Builder API. # Contents of the build template.
              #
              # 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 what tag to
              # apply to the built image when it is pushed to Google Container Registry.
            "status": "A String", # Status of the build.
                # @OutputOnly
            "finishTime": "A String", # Time at which execution of the build was finished.
                # @OutputOnly
            "timeout": "A String", # 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.
            "statusDetail": "A String", # Customer-readable message about the current status.
                # @OutputOnly
            "startTime": "A String", # Time at which execution of the build was started.
                # @OutputOnly
            "logsBucket": "A String", # 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`.
            "results": { # Results describes the artifacts created by the build pipeline. # Results of the build.
                # @OutputOnly
              "images": [ # Images that were built as a part of the build.
                { # BuiltImage describes an image built by the pipeline.
                  "name": "A String", # Name used to push the container image to Google Container Registry, as
                      # presented to `docker push`.
                  "digest": "A String", # Docker Registry 2.0 digest.
                },
              ],
              "buildStepImages": [ # List of build step digests, in order corresponding to build step indices.
                "A String",
              ],
            },
            "createTime": "A String", # Time at which the build was created.
                # @OutputOnly
            "id": "A String", # Unique identifier of the build.
                # @OutputOnly
            "source": { # Source describes the location of the source in a supported storage # Describes where to find the source files to build.
                # service.
              "storageSource": { # StorageSource describes the location of the source in an archive file in # If provided, get the source from this location in in Google Cloud
                  # Storage.
                  # Google Cloud Storage.
                "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
                    # omitted, the latest generation will be used.
                "object": "A String", # Google Cloud Storage object containing source.
                    #
                    # This object must be a gzipped archive file (.tar.gz) containing source to
                    # build.
                "bucket": "A String", # Google Cloud Storage bucket containing source (see
                    # [Bucket Name
                    # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
              },
              "repoSource": { # RepoSource describes the location of the source in a Google Cloud Source # If provided, get source from this location in a Cloud Repo.
                  # Repository.
                "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                    # the build is assumed.
                "branchName": "A String", # Name of the branch to build.
                "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
                "tagName": "A String", # Name of the tag to build.
                "commitSha": "A String", # Explicit commit SHA to build.
              },
            },
            "steps": [ # Describes the operations to be performed on the workspace.
              { # BuildStep describes a step to perform in the build pipeline.
                "waitFor": [ # 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.
                  "A String",
                ],
                "name": "A String", # Name of the container image to use for creating this stage in the
                    # pipeline, as presented to `docker pull`.
                "args": [ # Command-line arguments to use when running this step's container.
                  "A String",
                ],
                "env": [ # Additional environment variables to set for this step's container.
                  "A String",
                ],
                "id": "A String", # Optional unique identifier for this build step, used in wait_for to
                    # reference this build step as a dependency.
                "dir": "A String", # Working directory (relative to project source root) to use when running
                    # this operation's container.
              },
            ],
            "sourceProvenance": { # Provenance of the source. Ways to find the original source, or verify that # A permanent fixed identifier for source.
                # @OutputOnly
                # some source was used for this build.
              "resolvedRepoSource": { # RepoSource describes the location of the source in a Google Cloud Source # A copy of the build's source.repo_source, if exists, with any
                  # revisions resolved.
                  # Repository.
                "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                    # the build is assumed.
                "branchName": "A String", # Name of the branch to build.
                "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
                "tagName": "A String", # Name of the tag to build.
                "commitSha": "A String", # Explicit commit SHA to build.
              },
              "fileHashes": { # 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.
                  # @OutputOnly
                "a_key": { # Container message for hashes of byte content of files, used in
                    # SourceProvenance messages to verify integrity of source input to the build.
                  "fileHash": [ # Collection of file hashes.
                    { # Container message for hash values.
                      "type": "A String", # The type of hash that was performed.
                      "value": "A String", # The hash value.
                    },
                  ],
                },
              },
              "resolvedStorageSource": { # StorageSource describes the location of the source in an archive file in # A copy of the build's source.storage_source, if exists, with any
                  # generations resolved.
                  # Google Cloud Storage.
                "generation": "A String", # Google Cloud Storage generation for the object. If the generation is
                    # omitted, the latest generation will be used.
                "object": "A String", # Google Cloud Storage object containing source.
                    #
                    # This object must be a gzipped archive file (.tar.gz) containing source to
                    # build.
                "bucket": "A String", # Google Cloud Storage bucket containing source (see
                    # [Bucket Name
                    # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
              },
            },
            "projectId": "A String", # ID of the project.
                # @OutputOnly.
            "images": [ # List of images expected to be built and pushed to Google Container
                # Registry. If an image is listed here and the image is not produced by
                # one of the build steps, the build will fail. Any images present when
                # the build steps are complete will be pushed to Container Registry.
              "A String",
            ],
            "options": { # Optional arguments to enable specific features of builds. # Special options for this build.
              "requestedVerifyOption": "A String", # Options for a verifiable build with details uploaded to the Analysis API.
              "sourceProvenanceHash": [ # Requested hash for SourceProvenance.
                "A String",
              ],
            },
            "logUrl": "A String", # URL to logs for this build in Google Cloud Logging.
                # @OutputOnly
          },
          "triggerTemplate": { # RepoSource describes the location of the source in a Google Cloud Source # 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.
              # Repository.
            "projectId": "A String", # ID of the project that owns the repo. If omitted, the project ID requesting
                # the build is assumed.
            "branchName": "A String", # Name of the branch to build.
            "repoName": "A String", # Name of the repo. If omitted, the name "default" is assumed.
            "tagName": "A String", # Name of the tag to build.
            "commitSha": "A String", # Explicit commit SHA to build.
          },
          "createTime": "A String", # Time when the trigger was created.
              #
              # @OutputOnly
          "filename": "A String", # Path, from the source root, to a file whose contents is used for the
              # template.
        }