{
  "kind": "discovery#restDescription",
  "discoveryVersion": "v1",
  "id": "cloudbuild:v1",
  "name": "cloudbuild",
  "canonicalName": "Cloud Build",
  "version": "v1",
  "revision": "0",
  "title": "Google Cloud Container Builder API",
  "description": "Builds container images in the cloud.",
  "ownerDomain": "google.com",
  "ownerName": "Google",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
   },
  "documentationLink": "https://cloud.google.com/container-builder/docs/",
  "protocol": "rest",
  "rootUrl": "https://cloudbuild.googleapis.com/",
  "servicePath": "",
  "baseUrl": "https://cloudbuild.googleapis.com/",
  "batchPath": "batch",
  "version_module": "True",
  "parameters": {
    "access_token": {
      "type": "string",
      "description": "OAuth access token.",
      "location": "query"
    },
    "alt": {
      "type": "string",
      "description": "Data format for response.",
      "default": "json",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "location": "query"
    },
    "bearer_token": {
      "type": "string",
      "description": "OAuth bearer token.",
      "location": "query"
    },
    "callback": {
      "type": "string",
      "description": "JSONP",
      "location": "query"
    },
    "fields": {
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query"
    },
    "key": {
      "type": "string",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query"
    },
    "oauth_token": {
      "type": "string",
      "description": "OAuth 2.0 token for the current user.",
      "location": "query"
    },
    "pp": {
      "type": "boolean",
      "description": "Pretty-print response.",
      "default": "true",
      "location": "query"
    },
    "prettyPrint": {
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "default": "true",
      "location": "query"
    },
    "quotaUser": {
      "type": "string",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "location": "query"
    },
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    },
    "$.xgafv": {
      "type": "string",
      "description": "V1 error format.",
      "enum": [
        "1",
        "2"
      ],
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "location": "query"
    }
  },
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/cloud-platform": {
          "description": "View and manage your data across Google Cloud Platform services"
        }
      }
    }
  },
  "schemas": {
    "Build": {
      "id": "Build",
      "description": "A build resource in the Container Builder API.\n\nAt a high level, a Build describes where to find source code, how to build\nit (for example, the builder image to run on the source), and what tag to\napply to the built image when it is pushed to Google Container Registry.",
      "type": "object",
      "properties": {
        "id": {
          "description": "Unique identifier of the build.",
          "type": "string"
        },
        "projectId": {
          "description": "ID of the project.\n.",
          "type": "string"
        },
        "status": {
          "description": "Status of the build.",
          "enumDescriptions": [
            "Status of the build is unknown.",
            "Build is queued, work has not yet begun.",
            "Build is being executed.",
            "Build finished successfully.",
            "Build failed to complete successfully.",
            "Build failed due to an internal cause.",
            "Build took longer than was allowed.",
            "Build was canceled by a user."
          ],
          "type": "string",
          "enum": [
            "STATUS_UNKNOWN",
            "QUEUED",
            "WORKING",
            "SUCCESS",
            "FAILURE",
            "INTERNAL_ERROR",
            "TIMEOUT",
            "CANCELLED"
          ]
        },
        "statusDetail": {
          "description": "Customer-readable message about the current status.",
          "type": "string"
        },
        "source": {
          "description": "Describes where to find the source files to build.",
          "$ref": "Source"
        },
        "steps": {
          "description": "Describes the operations to be performed on the workspace.",
          "type": "array",
          "items": {
            "$ref": "BuildStep"
          }
        },
        "results": {
          "description": "Results of the build.",
          "$ref": "Results"
        },
        "createTime": {
          "description": "Time at which the build was created.",
          "type": "string",
          "format": "google-datetime"
        },
        "startTime": {
          "description": "Time at which execution of the build was started.",
          "type": "string",
          "format": "google-datetime"
        },
        "finishTime": {
          "description": "Time at which execution of the build was finished.",
          "type": "string",
          "format": "google-datetime"
        },
        "timeout": {
          "description": "Amount of time that this build should be allowed to run, to second\ngranularity. If this amount of time elapses, work on the build will cease\nand the build status will be TIMEOUT.\n\nDefault time is ten minutes.",
          "type": "string",
          "format": "google-duration"
        },
        "images": {
          "description": "List of images expected to be built and pushed to Google Container\nRegistry. If an image is listed here and the image is not produced by\none of the build steps, the build will fail. Any images present when\nthe build steps are complete will be pushed to Container Registry.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "logsBucket": {
          "description": "Google Cloud Storage bucket where logs should be written (see\n[Bucket Name\nRequirements](https:\/\/cloud.google.com\/storage\/docs\/bucket-naming#requirements)).\nLogs file names will be of the format `${logs_bucket}\/log-${build_id}.txt`.",
          "type": "string"
        },
        "sourceProvenance": {
          "description": "A permanent fixed identifier for source.",
          "$ref": "SourceProvenance"
        },
        "options": {
          "description": "Special options for this build.",
          "$ref": "BuildOptions"
        }
      }
    },
    "Source": {
      "id": "Source",
      "description": "Source describes the location of the source in a supported storage\nservice.",
      "type": "object",
      "properties": {
        "storageSource": {
          "description": "If provided, get the source from this location in in Google Cloud\nStorage.",
          "$ref": "StorageSource"
        }
      }
    },
    "StorageSource": {
      "id": "StorageSource",
      "description": "StorageSource describes the location of the source in an archive file in\nGoogle Cloud Storage.",
      "type": "object",
      "properties": {
        "bucket": {
          "description": "Google Cloud Storage bucket containing source (see\n[Bucket Name\nRequirements](https:\/\/cloud.google.com\/storage\/docs\/bucket-naming#requirements)).",
          "type": "string"
        },
        "object": {
          "description": "Google Cloud Storage object containing source.\n\nThis object must be a gzipped archive file (.tar.gz) containing source to\nbuild.",
          "type": "string"
        },
        "generation": {
          "description": "Google Cloud Storage generation for the object. If the generation is\nomitted, the latest generation will be used.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "BuildStep": {
      "id": "BuildStep",
      "description": "BuildStep describes a step to perform in the build pipeline.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name of the container image to use for creating this stage in the\npipeline, as presented to `docker pull`.",
          "type": "string"
        },
        "env": {
          "description": "Additional environment variables to set for this step's container.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "args": {
          "description": "Command-line arguments to use when running this step's container.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "dir": {
          "description": "Working directory (relative to project source root) to use when running\nthis operation's container.",
          "type": "string"
        }
      }
    },
    "Results": {
      "id": "Results",
      "description": "Results describes the artifacts created by the build pipeline.",
      "type": "object",
      "properties": {
        "images": {
          "description": "Images that were built as a part of the build.",
          "type": "array",
          "items": {
            "$ref": "BuiltImage"
          }
        }
      }
    },
    "BuiltImage": {
      "id": "BuiltImage",
      "description": "BuiltImage describes an image built by the pipeline.",
      "type": "object",
      "properties": {
        "name": {
          "description": "Name used to push the container image to Google Container Registry, as\npresented to `docker push`.",
          "type": "string"
        },
        "digest": {
          "description": "Docker Registry 2.0 digest.",
          "type": "string"
        }
      }
    },
    "SourceProvenance": {
      "id": "SourceProvenance",
      "description": "Provenance of the source. Ways to find the original source, or verify that\nsome source was used for this build.",
      "type": "object",
      "properties": {
        "fileHashes": {
          "description": "Hash(es) of the build source, which can be used to verify that the original\nsource integrity was maintained in the build. Note that FileHashes will\nonly be populated if BuildOptions has requested a SourceProvenanceHash.\n\nThe keys to this map are file paths used as build source and the values\ncontain the hash values for those files.\n\nIf the build source came in a single package such as a gzipped tarfile\n(.tar.gz), the FileHash will be for the single path to that file.",
          "type": "object",
          "additionalProperties": {
            "$ref": "FileHashes"
          }
        }
      }
    },
    "FileHashes": {
      "id": "FileHashes",
      "description": "Container message for hashes of byte content of files, used in\nSourceProvenance messages to verify integrity of source input to the build.",
      "type": "object",
      "properties": {
        "fileHash": {
          "description": "Collection of file hashes.",
          "type": "array",
          "items": {
            "$ref": "Hash"
          }
        }
      }
    },
    "Hash": {
      "id": "Hash",
      "description": "Container message for hash values.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of hash that was performed.",
          "enumDescriptions": [
            "No hash requested.",
            "Use a sha256 hash."
          ],
          "type": "string",
          "enum": [
            "NONE",
            "SHA256"
          ]
        },
        "value": {
          "description": "The hash value.",
          "type": "string",
          "format": "byte"
        }
      }
    },
    "BuildOptions": {
      "id": "BuildOptions",
      "description": "Optional arguments to enable specific features of builds.",
      "type": "object",
      "properties": {
        "sourceProvenanceHash": {
          "description": "Requested hash for SourceProvenance.",
          "enumDescriptions": [
            "No hash requested.",
            "Use a sha256 hash."
          ],
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "NONE",
              "SHA256"
            ]
          }
        },
        "requestedVerifyOption": {
          "description": "Options for a verifiable build with details uploaded to the Analysis API.",
          "enumDescriptions": [
            "Not a verifiable build. (default)",
            "Verified build."
          ],
          "type": "string",
          "enum": [
            "NOT_VERIFIED",
            "VERIFIED"
          ]
        }
      }
    },
    "Operation": {
      "id": "Operation",
      "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.",
      "type": "object",
      "properties": {
        "name": {
          "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations\/some\/unique\/name`.",
          "type": "string"
        },
        "metadata": {
          "description": "Service-specific metadata associated with the operation.  It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata.  Any method that returns a\nlong-running operation should document the metadata type, if any.",
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object. Contains field @type with type URL."
          }
        },
        "done": {
          "description": "If the value is `false`, it means the operation is still in progress.\nIf true, the operation is completed, and either `error` or `response` is\navailable.",
          "type": "boolean"
        },
        "error": {
          "description": "The error result of the operation in case of failure.",
          "$ref": "Status"
        },
        "response": {
          "description": "The normal response of the operation in case of success.  If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`.  If the original method is standard\n`Get`\/`Create`\/`Update`, the response should be the resource.  For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name.  For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.",
          "type": "object",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object. Contains field @type with type URL."
          }
        }
      }
    },
    "Status": {
      "id": "Status",
      "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https:\/\/github.com\/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed.  The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` which can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n    it may embed the `Status` in the normal response to indicate the partial\n    errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n    have a `Status` message for error reporting purpose.\n\n- Batch operations. If a client uses batch request and batch response, the\n    `Status` message should be used directly inside batch response, one for\n    each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n    results in its response, the status of those operations should be\n    represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n    be used directly after any stripping needed for security\/privacy reasons.",
      "type": "object",
      "properties": {
        "code": {
          "description": "The status code, which should be an enum value of google.rpc.Code.",
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.",
          "type": "string"
        },
        "details": {
          "description": "A list of messages that carry the error details.  There will be a\ncommon set of message types for APIs to use.",
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {
              "type": "any",
              "description": "Properties of the object. Contains field @type with type URL."
            }
          }
        }
      }
    },
    "ListBuildsResponse": {
      "id": "ListBuildsResponse",
      "description": "Response including listed builds.",
      "type": "object",
      "properties": {
        "builds": {
          "description": "Builds will be sorted by create_time, descending.",
          "type": "array",
          "items": {
            "$ref": "Build"
          }
        },
        "nextPageToken": {
          "description": "Token to receive the next page of results.",
          "type": "string"
        }
      }
    },
    "CancelBuildRequest": {
      "id": "CancelBuildRequest",
      "description": "Request to cancel an ongoing build.",
      "type": "object",
      "properties": {
      }
    },
    "ListOperationsResponse": {
      "id": "ListOperationsResponse",
      "description": "The response message for Operations.ListOperations.",
      "type": "object",
      "properties": {
        "operations": {
          "description": "A list of operations that matches the specified filter in the request.",
          "type": "array",
          "items": {
            "$ref": "Operation"
          }
        },
        "nextPageToken": {
          "description": "The standard List next-page token.",
          "type": "string"
        }
      }
    },
    "BuildOperationMetadata": {
      "id": "BuildOperationMetadata",
      "description": "Metadata for build operations.",
      "type": "object",
      "properties": {
        "build": {
          "description": "The build that the operation is tracking.",
          "$ref": "Build"
        }
      }
    }
  },
  "resources": {
    "projects": {
      "resources": {
        "builds": {
          "methods": {
            "create": {
              "id": "cloudbuild.projects.builds.create",
              "path": "v1/projects/{projectId}/builds",
              "flatPath": "v1/projects/{projectId}/builds",
              "httpMethod": "POST",
              "description": "Starts a build with the specified configuration.\n\nThe long-running Operation returned by this method will include the ID of\nthe build, which can be passed to GetBuild to determine its status (e.g.,\nsuccess or failure).",
              "parameters": {
                "projectId": {
                  "description": "ID of the project.",
                  "location": "path",
                  "required": true,
                  "type": "string"
                }
              },
              "parameterOrder": [
                "projectId"
              ],
              "request": {
                "$ref": "Build"
              },
              "response": {
                "$ref": "Operation"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ]
            },
            "get": {
              "id": "cloudbuild.projects.builds.get",
              "path": "v1/projects/{projectId}/builds/{id}",
              "flatPath": "v1/projects/{projectId}/builds/{id}",
              "httpMethod": "GET",
              "description": "Returns information about a previously requested build.\n\nThe Build that is returned includes its status (e.g., success or failure,\nor in-progress), and timing information.",
              "parameters": {
                "projectId": {
                  "description": "ID of the project.",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "id": {
                  "description": "ID of the build.",
                  "location": "path",
                  "required": true,
                  "type": "string"
                }
              },
              "parameterOrder": [
                "projectId",
                "id"
              ],
              "response": {
                "$ref": "Build"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ]
            },
            "list": {
              "id": "cloudbuild.projects.builds.list",
              "path": "v1/projects/{projectId}/builds",
              "flatPath": "v1/projects/{projectId}/builds",
              "httpMethod": "GET",
              "description": "Lists previously requested builds.\n\nPreviously requested builds may still be in-progress, or may have finished\nsuccessfully or unsuccessfully.",
              "parameters": {
                "projectId": {
                  "description": "ID of the project.",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "pageSize": {
                  "description": "Number of results to return in the list.",
                  "location": "query",
                  "type": "integer",
                  "format": "int32"
                },
                "pageToken": {
                  "description": "Token to provide to skip to a particular spot in the list.",
                  "location": "query",
                  "type": "string"
                }
              },
              "parameterOrder": [
                "projectId"
              ],
              "response": {
                "$ref": "ListBuildsResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ]
            },
            "cancel": {
              "id": "cloudbuild.projects.builds.cancel",
              "path": "v1/projects/{projectId}/builds/{id}:cancel",
              "flatPath": "v1/projects/{projectId}/builds/{id}:cancel",
              "httpMethod": "POST",
              "description": "Cancels a requested build in progress.",
              "parameters": {
                "projectId": {
                  "description": "ID of the project.",
                  "location": "path",
                  "required": true,
                  "type": "string"
                },
                "id": {
                  "description": "ID of the build.",
                  "location": "path",
                  "required": true,
                  "type": "string"
                }
              },
              "parameterOrder": [
                "projectId",
                "id"
              ],
              "request": {
                "$ref": "CancelBuildRequest"
              },
              "response": {
                "$ref": "Build"
              },
              "scopes": [
                "https://www.googleapis.com/auth/cloud-platform"
              ]
            }
          }
        }
      }
    },
    "operations": {
      "methods": {
        "get": {
          "id": "cloudbuild.operations.get",
          "path": "v1/{+name}",
          "flatPath": "v1/operations/{operationsId}",
          "httpMethod": "GET",
          "description": "Gets the latest state of a long-running operation.  Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
          "parameters": {
            "name": {
              "description": "The name of the operation resource.",
              "location": "path",
              "required": true,
              "pattern": "^operations\/.*$",
              "type": "string"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "Operation"
          },
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ]
        },
        "list": {
          "id": "cloudbuild.operations.list",
          "path": "v1/{+name}",
          "flatPath": "v1/operations",
          "httpMethod": "GET",
          "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding below allows API services to override the binding\nto use different resource name schemes, such as `users\/*\/operations`.",
          "parameters": {
            "name": {
              "description": "The name of the operation collection.",
              "location": "path",
              "required": true,
              "pattern": "^operations$",
              "type": "string"
            },
            "filter": {
              "description": "The standard list filter.",
              "location": "query",
              "type": "string"
            },
            "pageSize": {
              "description": "The standard list page size.",
              "location": "query",
              "type": "integer",
              "format": "int32"
            },
            "pageToken": {
              "description": "The standard list page token.",
              "location": "query",
              "type": "string"
            }
          },
          "parameterOrder": [
            "name"
          ],
          "response": {
            "$ref": "ListOperationsResponse"
          },
          "scopes": [
            "https://www.googleapis.com/auth/cloud-platform"
          ]
        }
      }
    }
  },
  "basePath": ""
}