# Builds ## List project builds `builds().list(BuildListParamsparams = BuildListParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : BuildListPage` **get** `/v0/builds` List user-triggered builds for a given project. An optional revision can be specified to filter by config commit SHA, or hashes of file contents. ### Parameters - `params: BuildListParams` - `project: Optional` Project name - `branch: Optional` Branch name - `cursor: Optional` Pagination cursor from a previous response. - `limit: Optional` Maximum number of builds to return, defaults to 10 (maximum: 100). - `revision: Optional` A config commit SHA used for the build - `String` - `class UnionMember1:` Hash of the files used for the build - `hash: String` File content hash ### Returns - `class Build:` - `id: String` Build ID - `configCommit: String` - `createdAt: LocalDateTime` - `documentedSpec: Optional` - `class UnionMember0:` - `content: String` - `type: Type` - `CONTENT("content")` - `class UnionMember1:` - `expires: LocalDateTime` - `type: Type` - `URL("url")` - `url: String` - `object_: Object` - `BUILD("build")` - `org: String` - `project: String` - `targets: Targets` - `cli: Optional` - `commit: Commit` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `commit: Optional` - `repo: Repo` - `branch: String` - `host: String` - `name: String` - `owner: String` - `sha: String` - `stats: Optional` - `additions: Long` - `deletions: Long` - `total: Long` - `treeOid: Optional` - `completed: InnerCompleted` deprecated - `commit: Optional` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `installUrl: Optional` - `object_: Object` - `BUILD_TARGET("build_target")` - `status: Status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `build: Optional` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `url: Optional` - `InProgress` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `url: Optional` - `Completed` - `completed: InnerCompleted` deprecated - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `url: Optional` - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `url: Optional` - `lint: Optional` - `test: Optional` - `csharp: Optional` - `go: Optional` - `java: Optional` - `kotlin: Optional` - `node: Optional` - `openAPI: Optional` - `php: Optional` - `python: Optional` - `ruby: Optional` - `sql: Optional` - `terraform: Optional` - `typescript: Optional` - `updatedAt: LocalDateTime` ### Example ```kotlin package com.configure_me_stainless_v0.api.example import com.configure_me_stainless_v0.api.client.StainlessClient import com.configure_me_stainless_v0.api.client.okhttp.StainlessOkHttpClient import com.configure_me_stainless_v0.api.models.builds.BuildListPage import com.configure_me_stainless_v0.api.models.builds.BuildListParams fun main() { val client: StainlessClient = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build() val page: BuildListPage = client.builds().list() } ``` #### Response ```json { "data": [ { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" } ], "has_more": true, "next_cursor": "next_cursor" } ``` ## Create build `builds().create(BuildCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : Build` **post** `/v0/builds` Create a build, on top of a project branch, against a given input revision. The project branch will be modified so that its latest set of config files points to the one specified by the input revision. ### Parameters - `params: BuildCreateParams` - `project: String` Project name - `revision: Revision` Specifies what to build: a branch name, commit SHA, merge command ("base..head"), or file contents. - `String` - `class UnionMember1:` File contents to commit directly - `Content` - `content: String` File content - `Url` - `url: String` URL to fetch file content from - `allowEmpty: Optional` Whether to allow empty commits (no changes). Defaults to false. - `branch: Optional` The project branch to use for the build. If not specified, the branch is inferred from the `revision`, and will 400 when that is not possible. - `commitMessage: Optional` Optional commit message to use when creating a new commit. - `enableAiCommitMessage: Optional` Whether to generate AI-powered commit messages for the build. Cannot be combined with `commit_message` or `target_commit_messages`. - `targetCommitMessages: Optional` Optional commit messages to use for each SDK when making a new commit. SDKs not represented in this object will fallback to the optional `commit_message` parameter, or will fallback further to the default commit message. - `cli: Optional` - `csharp: Optional` - `go: Optional` - `java: Optional` - `kotlin: Optional` - `node: Optional` - `openAPI: Optional` - `php: Optional` - `python: Optional` - `ruby: Optional` - `sql: Optional` - `terraform: Optional` - `typescript: Optional` - `targets: Optional>` Optional list of SDK targets to build. If not specified, all configured targets will be built. - `NODE("node")` - `TYPESCRIPT("typescript")` - `PYTHON("python")` - `GO("go")` - `JAVA("java")` - `KOTLIN("kotlin")` - `RUBY("ruby")` - `TERRAFORM("terraform")` - `CLI("cli")` - `PHP("php")` - `CSHARP("csharp")` - `SQL("sql")` - `OPENAPI("openapi")` ### Returns - `class Build:` - `id: String` Build ID - `configCommit: String` - `createdAt: LocalDateTime` - `documentedSpec: Optional` - `class UnionMember0:` - `content: String` - `type: Type` - `CONTENT("content")` - `class UnionMember1:` - `expires: LocalDateTime` - `type: Type` - `URL("url")` - `url: String` - `object_: Object` - `BUILD("build")` - `org: String` - `project: String` - `targets: Targets` - `cli: Optional` - `commit: Commit` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `commit: Optional` - `repo: Repo` - `branch: String` - `host: String` - `name: String` - `owner: String` - `sha: String` - `stats: Optional` - `additions: Long` - `deletions: Long` - `total: Long` - `treeOid: Optional` - `completed: InnerCompleted` deprecated - `commit: Optional` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `installUrl: Optional` - `object_: Object` - `BUILD_TARGET("build_target")` - `status: Status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `build: Optional` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `url: Optional` - `InProgress` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `url: Optional` - `Completed` - `completed: InnerCompleted` deprecated - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `url: Optional` - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `url: Optional` - `lint: Optional` - `test: Optional` - `csharp: Optional` - `go: Optional` - `java: Optional` - `kotlin: Optional` - `node: Optional` - `openAPI: Optional` - `php: Optional` - `python: Optional` - `ruby: Optional` - `sql: Optional` - `terraform: Optional` - `typescript: Optional` - `updatedAt: LocalDateTime` ### Example ```kotlin package com.configure_me_stainless_v0.api.example import com.configure_me_stainless_v0.api.client.StainlessClient import com.configure_me_stainless_v0.api.client.okhttp.StainlessOkHttpClient import com.configure_me_stainless_v0.api.models.builds.Build import com.configure_me_stainless_v0.api.models.builds.BuildCreateParams fun main() { val client: StainlessClient = StainlessOkHttpClient.fromEnv() val params: BuildCreateParams = BuildCreateParams.builder() .project("project") .revision("string") .build() val build: Build = client.builds().create(params) } ``` #### Response ```json { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" } ``` ## Retrieve build `builds().retrieve(BuildRetrieveParamsparams = BuildRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : Build` **get** `/v0/builds/{buildId}` Retrieve a build by its ID. ### Parameters - `params: BuildRetrieveParams` - `buildId: Optional` Build ID ### Returns - `class Build:` - `id: String` Build ID - `configCommit: String` - `createdAt: LocalDateTime` - `documentedSpec: Optional` - `class UnionMember0:` - `content: String` - `type: Type` - `CONTENT("content")` - `class UnionMember1:` - `expires: LocalDateTime` - `type: Type` - `URL("url")` - `url: String` - `object_: Object` - `BUILD("build")` - `org: String` - `project: String` - `targets: Targets` - `cli: Optional` - `commit: Commit` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `commit: Optional` - `repo: Repo` - `branch: String` - `host: String` - `name: String` - `owner: String` - `sha: String` - `stats: Optional` - `additions: Long` - `deletions: Long` - `total: Long` - `treeOid: Optional` - `completed: InnerCompleted` deprecated - `commit: Optional` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `installUrl: Optional` - `object_: Object` - `BUILD_TARGET("build_target")` - `status: Status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `build: Optional` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `url: Optional` - `InProgress` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `url: Optional` - `Completed` - `completed: InnerCompleted` deprecated - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `url: Optional` - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `url: Optional` - `lint: Optional` - `test: Optional` - `csharp: Optional` - `go: Optional` - `java: Optional` - `kotlin: Optional` - `node: Optional` - `openAPI: Optional` - `php: Optional` - `python: Optional` - `ruby: Optional` - `sql: Optional` - `terraform: Optional` - `typescript: Optional` - `updatedAt: LocalDateTime` ### Example ```kotlin package com.configure_me_stainless_v0.api.example import com.configure_me_stainless_v0.api.client.StainlessClient import com.configure_me_stainless_v0.api.client.okhttp.StainlessOkHttpClient import com.configure_me_stainless_v0.api.models.builds.Build import com.configure_me_stainless_v0.api.models.builds.BuildRetrieveParams fun main() { val client: StainlessClient = StainlessOkHttpClient.fromEnv() val build: Build = client.builds().retrieve("buildId") } ``` #### Response ```json { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" } ``` ## Creates two comparable builds `builds().compare(BuildCompareParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : BuildCompareResponse` **post** `/v0/builds/compare` Create two builds whose outputs can be directly compared with each other. Created builds _modify_ their project branches so that their latest sets of config files point to the ones specified by the input revision. This endpoint is useful because a build has more inputs than the set of config files it uses, so comparing two builds directly may return spurious differences. Builds made via this endpoint are guaranteed to have differences arising from the set of config files, and any custom code. ### Parameters - `params: BuildCompareParams` - `base: Base` Parameters for the base build - `branch: String` Branch to use. When using a branch name as revision, this must match or be omitted. - `revision: Revision` Specifies what to build: a branch name, a commit SHA, or file contents. - `String` - `class UnionMember1:` File contents to commit directly - `Content` - `content: String` File content - `Url` - `url: String` URL to fetch file content from - `commitMessage: Optional` Optional commit message to use when creating a new commit. - `head: Head` Parameters for the head build - `branch: String` Branch to use. When using a branch name as revision, this must match or be omitted. - `revision: Revision` Specifies what to build: a branch name, a commit SHA, or file contents. - `String` - `class UnionMember1:` File contents to commit directly - `Content` - `Url` - `commitMessage: Optional` Optional commit message to use when creating a new commit. - `project: String` Project name - `targets: Optional>` Optional list of SDK targets to build. If not specified, all configured targets will be built. - `NODE("node")` - `TYPESCRIPT("typescript")` - `PYTHON("python")` - `GO("go")` - `JAVA("java")` - `KOTLIN("kotlin")` - `RUBY("ruby")` - `TERRAFORM("terraform")` - `CLI("cli")` - `PHP("php")` - `CSHARP("csharp")` - `SQL("sql")` - `OPENAPI("openapi")` ### Returns - `class BuildCompareResponse:` - `base: Build` - `id: String` Build ID - `configCommit: String` - `createdAt: LocalDateTime` - `documentedSpec: Optional` - `class UnionMember0:` - `content: String` - `type: Type` - `CONTENT("content")` - `class UnionMember1:` - `expires: LocalDateTime` - `type: Type` - `URL("url")` - `url: String` - `object_: Object` - `BUILD("build")` - `org: String` - `project: String` - `targets: Targets` - `cli: Optional` - `commit: Commit` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `commit: Optional` - `repo: Repo` - `branch: String` - `host: String` - `name: String` - `owner: String` - `sha: String` - `stats: Optional` - `additions: Long` - `deletions: Long` - `total: Long` - `treeOid: Optional` - `completed: InnerCompleted` deprecated - `commit: Optional` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `installUrl: Optional` - `object_: Object` - `BUILD_TARGET("build_target")` - `status: Status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `build: Optional` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `url: Optional` - `InProgress` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `url: Optional` - `Completed` - `completed: InnerCompleted` deprecated - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `url: Optional` - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `url: Optional` - `lint: Optional` - `test: Optional` - `csharp: Optional` - `go: Optional` - `java: Optional` - `kotlin: Optional` - `node: Optional` - `openAPI: Optional` - `php: Optional` - `python: Optional` - `ruby: Optional` - `sql: Optional` - `terraform: Optional` - `typescript: Optional` - `updatedAt: LocalDateTime` - `head: Build` ### Example ```kotlin package com.configure_me_stainless_v0.api.example import com.configure_me_stainless_v0.api.client.StainlessClient import com.configure_me_stainless_v0.api.client.okhttp.StainlessOkHttpClient import com.configure_me_stainless_v0.api.models.builds.BuildCompareParams import com.configure_me_stainless_v0.api.models.builds.BuildCompareResponse fun main() { val client: StainlessClient = StainlessOkHttpClient.fromEnv() val params: BuildCompareParams = BuildCompareParams.builder() .base(BuildCompareParams.Base.builder() .branch("branch") .revision("string") .build()) .head(BuildCompareParams.Head.builder() .branch("branch") .revision("string") .build()) .project("project") .build() val response: BuildCompareResponse = client.builds().compare(params) } ``` #### Response ```json { "base": { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" }, "head": { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" } } ``` ## Domain Types ### Build - `class Build:` - `id: String` Build ID - `configCommit: String` - `createdAt: LocalDateTime` - `documentedSpec: Optional` - `class UnionMember0:` - `content: String` - `type: Type` - `CONTENT("content")` - `class UnionMember1:` - `expires: LocalDateTime` - `type: Type` - `URL("url")` - `url: String` - `object_: Object` - `BUILD("build")` - `org: String` - `project: String` - `targets: Targets` - `cli: Optional` - `commit: Commit` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `commit: Optional` - `repo: Repo` - `branch: String` - `host: String` - `name: String` - `owner: String` - `sha: String` - `stats: Optional` - `additions: Long` - `deletions: Long` - `total: Long` - `treeOid: Optional` - `completed: InnerCompleted` deprecated - `commit: Optional` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `installUrl: Optional` - `object_: Object` - `BUILD_TARGET("build_target")` - `status: Status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `build: Optional` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `url: Optional` - `InProgress` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `url: Optional` - `Completed` - `completed: InnerCompleted` deprecated - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `url: Optional` - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `url: Optional` - `lint: Optional` - `test: Optional` - `csharp: Optional` - `go: Optional` - `java: Optional` - `kotlin: Optional` - `node: Optional` - `openAPI: Optional` - `php: Optional` - `python: Optional` - `ruby: Optional` - `sql: Optional` - `terraform: Optional` - `typescript: Optional` - `updatedAt: LocalDateTime` ### Build Target - `class BuildTarget:` - `commit: Commit` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `commit: Optional` - `repo: Repo` - `branch: String` - `host: String` - `name: String` - `owner: String` - `sha: String` - `stats: Optional` - `additions: Long` - `deletions: Long` - `total: Long` - `treeOid: Optional` - `completed: InnerCompleted` deprecated - `commit: Optional` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `completedAt: LocalDateTime` - `conclusion: Conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `mergeConflictPr: Optional` - `number: Double` - `repo: Repo` - `host: String` - `name: String` - `owner: String` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `installUrl: Optional` - `object_: Object` - `BUILD_TARGET("build_target")` - `status: Status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `build: Optional` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `url: Optional` - `InProgress` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `url: Optional` - `Completed` - `completed: InnerCompleted` deprecated - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `url: Optional` - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `url: Optional` - `lint: Optional` - `test: Optional` ### Check Step - `class CheckStep: A class that can be one of several variants.union` - `JsonValue;` - `status: JsonValue; "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `status: JsonValue; "queued"constant` - `QUEUED("queued")` - `url: Optional` - `InProgress` - `status: JsonValue; "in_progress"constant` - `IN_PROGRESS("in_progress")` - `url: Optional` - `Completed` - `completed: InnerCompleted` deprecated - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `url: Optional` - `conclusion: Conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `status: JsonValue; "completed"constant` - `COMPLETED("completed")` - `url: Optional` # Diagnostics ## Get diagnostics for a build `builds().diagnostics().list(DiagnosticListParamsparams = DiagnosticListParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : DiagnosticListPage` **get** `/v0/builds/{buildId}/diagnostics` Get the list of diagnostics for a given build. If no language targets are specified, diagnostics for all languages are returned. ### Parameters - `params: DiagnosticListParams` - `buildId: Optional` Build ID - `cursor: Optional` Pagination cursor from a previous response - `limit: Optional` Maximum number of diagnostics to return, defaults to 100 (maximum: 100) - `severity: Optional` Includes the given severity and above (fatal > error > warning > note). - `FATAL("fatal")` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `targets: Optional` Optional comma-delimited list of language targets to filter diagnostics by ### Returns - `class BuildDiagnostic:` - `code: String` The kind of diagnostic. - `ignored: Boolean` Whether the diagnostic is ignored in the Stainless config. - `level: Level` The severity of the diagnostic. - `FATAL("fatal")` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `message: String` A description of the diagnostic. - `more: Optional` - `Markdown` - `markdown: String` - `type: JsonValue; "markdown"constant` - `MARKDOWN("markdown")` - `Raw` - `raw: String` - `type: JsonValue; "raw"constant` - `RAW("raw")` - `configRef: Optional` A JSON pointer to a relevant field in the Stainless config. - `oasRef: Optional` A JSON pointer to a relevant field in the OpenAPI spec. ### Example ```kotlin package com.configure_me_stainless_v0.api.example import com.configure_me_stainless_v0.api.client.StainlessClient import com.configure_me_stainless_v0.api.client.okhttp.StainlessOkHttpClient import com.configure_me_stainless_v0.api.models.builds.diagnostics.DiagnosticListPage import com.configure_me_stainless_v0.api.models.builds.diagnostics.DiagnosticListParams fun main() { val client: StainlessClient = StainlessOkHttpClient.fromEnv() val page: DiagnosticListPage = client.builds().diagnostics().list("buildId") } ``` #### Response ```json { "data": [ { "code": "code", "ignored": true, "level": "fatal", "message": "message", "more": { "markdown": "markdown", "type": "markdown" }, "config_ref": "config_ref", "oas_ref": "oas_ref" } ], "has_more": true, "next_cursor": "next_cursor" } ``` ## Domain Types ### Build Diagnostic - `class BuildDiagnostic:` - `code: String` The kind of diagnostic. - `ignored: Boolean` Whether the diagnostic is ignored in the Stainless config. - `level: Level` The severity of the diagnostic. - `FATAL("fatal")` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `message: String` A description of the diagnostic. - `more: Optional` - `Markdown` - `markdown: String` - `type: JsonValue; "markdown"constant` - `MARKDOWN("markdown")` - `Raw` - `raw: String` - `type: JsonValue; "raw"constant` - `RAW("raw")` - `configRef: Optional` A JSON pointer to a relevant field in the Stainless config. - `oasRef: Optional` A JSON pointer to a relevant field in the OpenAPI spec. ### Build Diagnostic More - `class BuildDiagnosticMore: A class that can be one of several variants.union` - `Markdown` - `markdown: String` - `type: JsonValue; "markdown"constant` - `MARKDOWN("markdown")` - `Raw` - `raw: String` - `type: JsonValue; "raw"constant` - `RAW("raw")` # Target Outputs ## Download build target output `builds().targetOutputs().retrieve(TargetOutputRetrieveParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : TargetOutputRetrieveResponse` **get** `/v0/build_target_outputs` Retrieve a method to download an output for a given build target. If the requested type of output is `source`, and the requested output method is `url`, a download link to a tarball of the source files is returned. If the requested output method is `git`, a Git remote, ref, and access token (if necessary) is returned. Otherwise, the possible types of outputs are specific to the requested target, and the output method _must_ be `url`. See the documentation for `type` for more information. ### Parameters - `params: TargetOutputRetrieveParams` - `buildId: String` Build ID - `target: Target` SDK language target name - `NODE("node")` - `TYPESCRIPT("typescript")` - `PYTHON("python")` - `GO("go")` - `JAVA("java")` - `KOTLIN("kotlin")` - `RUBY("ruby")` - `TERRAFORM("terraform")` - `CLI("cli")` - `PHP("php")` - `CSHARP("csharp")` - `SQL("sql")` - `OPENAPI("openapi")` - `type: Type` - `SOURCE("source")` - `DIST("dist")` - `WHEEL("wheel")` - `OPENAPI_WITH_TRANSFORMS("openapi-with-transforms")` - `OPENAPI_WITH_CODE_SAMPLES("openapi-with-code-samples")` - `OPENAPI_SDK_SPEC("openapi-sdk-spec")` - `FILE("file")` - `output: Optional` Output format: url (download URL) or git (temporary access token). - `URL("url")` - `GIT("git")` - `path: Optional` The path of the file to get when used with "type": "file". ### Returns - `class TargetOutputRetrieveResponse: A class that can be one of several variants.union` - `Url` - `output: JsonValue; "url"constant` - `URL("url")` - `target: Target` - `NODE("node")` - `TYPESCRIPT("typescript")` - `PYTHON("python")` - `GO("go")` - `JAVA("java")` - `KOTLIN("kotlin")` - `RUBY("ruby")` - `TERRAFORM("terraform")` - `CLI("cli")` - `PHP("php")` - `CSHARP("csharp")` - `SQL("sql")` - `OPENAPI("openapi")` - `type: Type` - `SOURCE("source")` - `DIST("dist")` - `WHEEL("wheel")` - `OPENAPI_WITH_TRANSFORMS("openapi-with-transforms")` - `OPENAPI_WITH_CODE_SAMPLES("openapi-with-code-samples")` - `OPENAPI_SDK_SPEC("openapi-sdk-spec")` - `FILE("file")` - `url: String` URL for direct download - `path: Optional` The path of the file, which is only present when using with the type "file" option. - `Git` - `token: String` Temporary GitHub access token - `output: JsonValue; "git"constant` - `GIT("git")` - `ref: String` Git reference (commit SHA, branch, or tag) - `target: Target` - `type: Type` - `SOURCE("source")` - `DIST("dist")` - `WHEEL("wheel")` - `OPENAPI_WITH_TRANSFORMS("openapi-with-transforms")` - `OPENAPI_WITH_CODE_SAMPLES("openapi-with-code-samples")` - `OPENAPI_SDK_SPEC("openapi-sdk-spec")` - `FILE("file")` - `url: String` URL to git remote ### Example ```kotlin package com.configure_me_stainless_v0.api.example import com.configure_me_stainless_v0.api.client.StainlessClient import com.configure_me_stainless_v0.api.client.okhttp.StainlessOkHttpClient import com.configure_me_stainless_v0.api.models.builds.targetoutputs.TargetOutputRetrieveParams import com.configure_me_stainless_v0.api.models.builds.targetoutputs.TargetOutputRetrieveResponse fun main() { val client: StainlessClient = StainlessOkHttpClient.fromEnv() val params: TargetOutputRetrieveParams = TargetOutputRetrieveParams.builder() .buildId("build_id") .target(TargetOutputRetrieveParams.Target.NODE) .type(TargetOutputRetrieveParams.Type.SOURCE) .build() val targetOutput: TargetOutputRetrieveResponse = client.builds().targetOutputs().retrieve(params) } ``` #### Response ```json { "output": "url", "target": "node", "type": "source", "url": "url", "path": "path" } ```