# Builds ## List project builds `BuildListPageResponse Builds.List(BuildListParamsparameters, CancellationTokencancellationToken = default)` **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 - `BuildListParams parameters` - `required string project` Project name - `string branch` Branch name - `string cursor` Pagination cursor from a previous response. - `Double limit` Maximum number of builds to return, defaults to 10 (maximum: 100). - `Revision revision` A config commit SHA used for the build - `string` - `IReadOnlyDictionary` - `required string Hash` File content hash ### Returns - `class BuildListPageResponse:` - `required IReadOnlyList Data` - `required string ID` Build ID - `required string ConfigCommit` - `required DateTimeOffset CreatedAt` - `required DocumentedSpec? DocumentedSpec` - `class UnionMember0:` - `required string Content` - `required Type Type` - `"content"Content` - `class UnionMember1:` - `required DateTimeOffset Expires` - `required Type Type` - `"url"Url` - `required string Url` - `required Object Object` - `"build"Build` - `required string Org` - `required string Project` - `required Targets Targets` - `BuildTarget Cli` - `required Commit Commit` - `class NotStarted:` - `class Queued:` - `class InProgress:` - `class Completed:` - `required Commit? Commit` - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Completed Completed` deprecated - `required Commit? Commit` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `JsonElement Status "completed"constant` - `required string? InstallUrl` - `required Object Object` - `"build_target"BuildTarget` - `required Status Status` - `"not_started"NotStarted` - `"codegen"Codegen` - `"postgen"Postgen` - `"completed"Completed` - `CheckStep Build` - `JsonElement` - `Queued` - `JsonElement Status "queued"constant` - `required string? Url` - `InProgress` - `JsonElement Status "in_progress"constant` - `required string? Url` - `Completed` - `required Completed Completed` deprecated - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `required string? Url` - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `JsonElement Status "completed"constant` - `required string? Url` - `CheckStep Lint` - `CheckStep Test` - `BuildTarget Csharp` - `BuildTarget Go` - `BuildTarget Java` - `BuildTarget Kotlin` - `BuildTarget Node` - `BuildTarget OpenAPI` - `BuildTarget Php` - `BuildTarget Python` - `BuildTarget Ruby` - `BuildTarget Sql` - `BuildTarget Terraform` - `BuildTarget Typescript` - `required DateTimeOffset UpdatedAt` - `required Boolean HasMore` - `string NextCursor` ### Example ```csharp BuildListParams parameters = new() { Project = "project" }; var page = await client.Builds.List(parameters); await foreach (var item in page.Paginate()) { Console.WriteLine(item); } ``` #### 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 `Build Builds.Create(BuildCreateParamsparameters, CancellationTokencancellationToken = default)` **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 - `BuildCreateParams parameters` - `required string project` Project name - `required Revision revision` Specifies what to build: a branch name, commit SHA, merge command ("base..head"), or file contents. - `string` - `IReadOnlyDictionary` - `Content` - `required string Content` File content - `Url` - `required string Url` URL to fetch file content from - `Boolean allowEmpty` Whether to allow empty commits (no changes). Defaults to false. - `string branch` 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. - `string commitMessage` Optional commit message to use when creating a new commit. - `Boolean enableAICommitMessage` Whether to generate AI-powered commit messages for the build. Cannot be combined with `commit_message` or `target_commit_messages`. - `TargetCommitMessages targetCommitMessages` 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. - `string Cli` - `string Csharp` - `string Go` - `string Java` - `string Kotlin` - `string Node` - `string OpenAPI` - `string Php` - `string Python` - `string Ruby` - `string Sql` - `string Terraform` - `string Typescript` - `IReadOnlyList targets` 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:` - `required string ID` Build ID - `required string ConfigCommit` - `required DateTimeOffset CreatedAt` - `required DocumentedSpec? DocumentedSpec` - `class UnionMember0:` - `required string Content` - `required Type Type` - `"content"Content` - `class UnionMember1:` - `required DateTimeOffset Expires` - `required Type Type` - `"url"Url` - `required string Url` - `required Object Object` - `"build"Build` - `required string Org` - `required string Project` - `required Targets Targets` - `BuildTarget Cli` - `required Commit Commit` - `class NotStarted:` - `class Queued:` - `class InProgress:` - `class Completed:` - `required Commit? Commit` - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Completed Completed` deprecated - `required Commit? Commit` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `JsonElement Status "completed"constant` - `required string? InstallUrl` - `required Object Object` - `"build_target"BuildTarget` - `required Status Status` - `"not_started"NotStarted` - `"codegen"Codegen` - `"postgen"Postgen` - `"completed"Completed` - `CheckStep Build` - `JsonElement` - `Queued` - `JsonElement Status "queued"constant` - `required string? Url` - `InProgress` - `JsonElement Status "in_progress"constant` - `required string? Url` - `Completed` - `required Completed Completed` deprecated - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `required string? Url` - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `JsonElement Status "completed"constant` - `required string? Url` - `CheckStep Lint` - `CheckStep Test` - `BuildTarget Csharp` - `BuildTarget Go` - `BuildTarget Java` - `BuildTarget Kotlin` - `BuildTarget Node` - `BuildTarget OpenAPI` - `BuildTarget Php` - `BuildTarget Python` - `BuildTarget Ruby` - `BuildTarget Sql` - `BuildTarget Terraform` - `BuildTarget Typescript` - `required DateTimeOffset UpdatedAt` ### Example ```csharp BuildCreateParams parameters = new() { Project = "project", Revision = "string", }; var build = await client.Builds.Create(parameters); Console.WriteLine(build); ``` #### 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 `Build Builds.Retrieve(BuildRetrieveParamsparameters, CancellationTokencancellationToken = default)` **get** `/v0/builds/{buildId}` Retrieve a build by its ID. ### Parameters - `BuildRetrieveParams parameters` - `required string buildID` Build ID ### Returns - `class Build:` - `required string ID` Build ID - `required string ConfigCommit` - `required DateTimeOffset CreatedAt` - `required DocumentedSpec? DocumentedSpec` - `class UnionMember0:` - `required string Content` - `required Type Type` - `"content"Content` - `class UnionMember1:` - `required DateTimeOffset Expires` - `required Type Type` - `"url"Url` - `required string Url` - `required Object Object` - `"build"Build` - `required string Org` - `required string Project` - `required Targets Targets` - `BuildTarget Cli` - `required Commit Commit` - `class NotStarted:` - `class Queued:` - `class InProgress:` - `class Completed:` - `required Commit? Commit` - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Completed Completed` deprecated - `required Commit? Commit` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `JsonElement Status "completed"constant` - `required string? InstallUrl` - `required Object Object` - `"build_target"BuildTarget` - `required Status Status` - `"not_started"NotStarted` - `"codegen"Codegen` - `"postgen"Postgen` - `"completed"Completed` - `CheckStep Build` - `JsonElement` - `Queued` - `JsonElement Status "queued"constant` - `required string? Url` - `InProgress` - `JsonElement Status "in_progress"constant` - `required string? Url` - `Completed` - `required Completed Completed` deprecated - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `required string? Url` - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `JsonElement Status "completed"constant` - `required string? Url` - `CheckStep Lint` - `CheckStep Test` - `BuildTarget Csharp` - `BuildTarget Go` - `BuildTarget Java` - `BuildTarget Kotlin` - `BuildTarget Node` - `BuildTarget OpenAPI` - `BuildTarget Php` - `BuildTarget Python` - `BuildTarget Ruby` - `BuildTarget Sql` - `BuildTarget Terraform` - `BuildTarget Typescript` - `required DateTimeOffset UpdatedAt` ### Example ```csharp BuildRetrieveParams parameters = new() { BuildID = "buildId" }; var build = await client.Builds.Retrieve(parameters); Console.WriteLine(build); ``` #### 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 `BuildCompareResponse Builds.Compare(BuildCompareParamsparameters, CancellationTokencancellationToken = default)` **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 - `BuildCompareParams parameters` - `required Base base` Parameters for the base build - `required string Branch` Branch to use. When using a branch name as revision, this must match or be omitted. - `required Revision Revision` Specifies what to build: a branch name, a commit SHA, or file contents. - `string` - `IReadOnlyDictionary` - `Content` - `required string Content` File content - `Url` - `required string Url` URL to fetch file content from - `string CommitMessage` Optional commit message to use when creating a new commit. - `required Head head` Parameters for the head build - `required string Branch` Branch to use. When using a branch name as revision, this must match or be omitted. - `required Revision Revision` Specifies what to build: a branch name, a commit SHA, or file contents. - `string` - `IReadOnlyDictionary` - `Content` - `Url` - `string CommitMessage` Optional commit message to use when creating a new commit. - `required string project` Project name - `IReadOnlyList targets` 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:` - `required Build Base` - `required string ID` Build ID - `required string ConfigCommit` - `required DateTimeOffset CreatedAt` - `required DocumentedSpec? DocumentedSpec` - `class UnionMember0:` - `required string Content` - `required Type Type` - `"content"Content` - `class UnionMember1:` - `required DateTimeOffset Expires` - `required Type Type` - `"url"Url` - `required string Url` - `required Object Object` - `"build"Build` - `required string Org` - `required string Project` - `required Targets Targets` - `BuildTarget Cli` - `required Commit Commit` - `class NotStarted:` - `class Queued:` - `class InProgress:` - `class Completed:` - `required Commit? Commit` - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Completed Completed` deprecated - `required Commit? Commit` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `JsonElement Status "completed"constant` - `required string? InstallUrl` - `required Object Object` - `"build_target"BuildTarget` - `required Status Status` - `"not_started"NotStarted` - `"codegen"Codegen` - `"postgen"Postgen` - `"completed"Completed` - `CheckStep Build` - `JsonElement` - `Queued` - `JsonElement Status "queued"constant` - `required string? Url` - `InProgress` - `JsonElement Status "in_progress"constant` - `required string? Url` - `Completed` - `required Completed Completed` deprecated - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `required string? Url` - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `JsonElement Status "completed"constant` - `required string? Url` - `CheckStep Lint` - `CheckStep Test` - `BuildTarget Csharp` - `BuildTarget Go` - `BuildTarget Java` - `BuildTarget Kotlin` - `BuildTarget Node` - `BuildTarget OpenAPI` - `BuildTarget Php` - `BuildTarget Python` - `BuildTarget Ruby` - `BuildTarget Sql` - `BuildTarget Terraform` - `BuildTarget Typescript` - `required DateTimeOffset UpdatedAt` - `required Build Head` ### Example ```csharp BuildCompareParams parameters = new() { Base = new() { Branch = "branch", Revision = "string", CommitMessage = "commit_message", }, Head = new() { Branch = "branch", Revision = "string", CommitMessage = "commit_message", }, Project = "project", }; var response = await client.Builds.Compare(parameters); Console.WriteLine(response); ``` #### 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:` - `required string ID` Build ID - `required string ConfigCommit` - `required DateTimeOffset CreatedAt` - `required DocumentedSpec? DocumentedSpec` - `class UnionMember0:` - `required string Content` - `required Type Type` - `"content"Content` - `class UnionMember1:` - `required DateTimeOffset Expires` - `required Type Type` - `"url"Url` - `required string Url` - `required Object Object` - `"build"Build` - `required string Org` - `required string Project` - `required Targets Targets` - `BuildTarget Cli` - `required Commit Commit` - `class NotStarted:` - `class Queued:` - `class InProgress:` - `class Completed:` - `required Commit? Commit` - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Completed Completed` deprecated - `required Commit? Commit` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `JsonElement Status "completed"constant` - `required string? InstallUrl` - `required Object Object` - `"build_target"BuildTarget` - `required Status Status` - `"not_started"NotStarted` - `"codegen"Codegen` - `"postgen"Postgen` - `"completed"Completed` - `CheckStep Build` - `JsonElement` - `Queued` - `JsonElement Status "queued"constant` - `required string? Url` - `InProgress` - `JsonElement Status "in_progress"constant` - `required string? Url` - `Completed` - `required Completed Completed` deprecated - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `required string? Url` - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `JsonElement Status "completed"constant` - `required string? Url` - `CheckStep Lint` - `CheckStep Test` - `BuildTarget Csharp` - `BuildTarget Go` - `BuildTarget Java` - `BuildTarget Kotlin` - `BuildTarget Node` - `BuildTarget OpenAPI` - `BuildTarget Php` - `BuildTarget Python` - `BuildTarget Ruby` - `BuildTarget Sql` - `BuildTarget Terraform` - `BuildTarget Typescript` - `required DateTimeOffset UpdatedAt` ### Build Target - `class BuildTarget:` - `required Commit Commit` - `class NotStarted:` - `class Queued:` - `class InProgress:` - `class Completed:` - `required Commit? Commit` - `required Repo Repo` - `required string Branch` - `required string Host` - `required string Name` - `required string Owner` - `required string Sha` - `required Stats? Stats` - `required Long Additions` - `required Long Deletions` - `required Long Total` - `required string? TreeOid` - `required Completed Completed` deprecated - `required Commit? Commit` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `required DateTimeOffset CompletedAt` - `required Conclusion Conclusion` - `"error"Error` - `"warning"Warning` - `"note"Note` - `"success"Success` - `"merge_conflict"MergeConflict` - `"upstream_merge_conflict"UpstreamMergeConflict` - `"fatal"Fatal` - `"payment_required"PaymentRequired` - `"cancelled"Cancelled` - `"timed_out"TimedOut` - `"noop"Noop` - `"version_bump"VersionBump` - `required MergeConflictPr? MergeConflictPr` - `required Double Number` - `required Repo Repo` - `required string Host` - `required string Name` - `required string Owner` - `JsonElement Status "completed"constant` - `required string? InstallUrl` - `required Object Object` - `"build_target"BuildTarget` - `required Status Status` - `"not_started"NotStarted` - `"codegen"Codegen` - `"postgen"Postgen` - `"completed"Completed` - `CheckStep Build` - `JsonElement` - `Queued` - `JsonElement Status "queued"constant` - `required string? Url` - `InProgress` - `JsonElement Status "in_progress"constant` - `required string? Url` - `Completed` - `required Completed Completed` deprecated - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `required string? Url` - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `JsonElement Status "completed"constant` - `required string? Url` - `CheckStep Lint` - `CheckStep Test` ### Check Step - `class CheckStep: A class that can be one of several variants.union` - `JsonElement` - `Queued` - `JsonElement Status "queued"constant` - `required string? Url` - `InProgress` - `JsonElement Status "in_progress"constant` - `required string? Url` - `Completed` - `required Completed Completed` deprecated - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `required string? Url` - `required Conclusion Conclusion` - `"success"Success` - `"failure"Failure` - `"skipped"Skipped` - `"cancelled"Cancelled` - `"action_required"ActionRequired` - `"neutral"Neutral` - `"timed_out"TimedOut` - `JsonElement Status "completed"constant` - `required string? Url` # Diagnostics ## Get diagnostics for a build `DiagnosticListPageResponse Builds.Diagnostics.List(DiagnosticListParamsparameters, CancellationTokencancellationToken = default)` **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 - `DiagnosticListParams parameters` - `required string buildID` Build ID - `string cursor` Pagination cursor from a previous response - `Double limit` Maximum number of diagnostics to return, defaults to 100 (maximum: 100) - `Severity severity` Includes the given severity and above (fatal > error > warning > note). - `"fatal"Fatal` - `"error"Error` - `"warning"Warning` - `"note"Note` - `string targets` Optional comma-delimited list of language targets to filter diagnostics by ### Returns - `class DiagnosticListPageResponse:` - `required IReadOnlyList Data` - `required string Code` The kind of diagnostic. - `required Boolean Ignored` Whether the diagnostic is ignored in the Stainless config. - `required Level Level` The severity of the diagnostic. - `"fatal"Fatal` - `"error"Error` - `"warning"Warning` - `"note"Note` - `required string Message` A description of the diagnostic. - `required BuildDiagnosticMore? More` - `Markdown` - `required string Markdown` - `JsonElement Type "markdown"constant` - `Raw` - `required string Raw` - `JsonElement Type "raw"constant` - `string ConfigRef` A JSON pointer to a relevant field in the Stainless config. - `string OasRef` A JSON pointer to a relevant field in the OpenAPI spec. - `required Boolean HasMore` - `string NextCursor` ### Example ```csharp DiagnosticListParams parameters = new() { BuildID = "buildId" }; var page = await client.Builds.Diagnostics.List(parameters); await foreach (var item in page.Paginate()) { Console.WriteLine(item); } ``` #### 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:` - `required string Code` The kind of diagnostic. - `required Boolean Ignored` Whether the diagnostic is ignored in the Stainless config. - `required Level Level` The severity of the diagnostic. - `"fatal"Fatal` - `"error"Error` - `"warning"Warning` - `"note"Note` - `required string Message` A description of the diagnostic. - `required BuildDiagnosticMore? More` - `Markdown` - `required string Markdown` - `JsonElement Type "markdown"constant` - `Raw` - `required string Raw` - `JsonElement Type "raw"constant` - `string ConfigRef` A JSON pointer to a relevant field in the Stainless config. - `string OasRef` 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` - `required string Markdown` - `JsonElement Type "markdown"constant` - `Raw` - `required string Raw` - `JsonElement Type "raw"constant` # Target Outputs ## Download build target output `TargetOutputRetrieveResponse Builds.TargetOutputs.Retrieve(TargetOutputRetrieveParamsparameters, CancellationTokencancellationToken = default)` **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 - `TargetOutputRetrieveParams parameters` - `required string buildID` Build ID - `required 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` - `required Type type` - `"source"Source` - `"dist"Dist` - `"wheel"Wheel` - `"openapi-with-transforms"OpenAPIWithTransforms` - `"openapi-with-code-samples"OpenAPIWithCodeSamples` - `"openapi-sdk-spec"OpenAPISdkSpec` - `"file"File` - `Output output` Output format: url (download URL) or git (temporary access token). - `"url"Url` - `"git"Git` - `string path` 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` - `JsonElement Output "url"constant` - `required 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` - `required Type Type` - `"source"Source` - `"dist"Dist` - `"wheel"Wheel` - `"openapi-with-transforms"OpenAPIWithTransforms` - `"openapi-with-code-samples"OpenAPIWithCodeSamples` - `"openapi-sdk-spec"OpenAPISdkSpec` - `"file"File` - `required string Url` URL for direct download - `string Path` The path of the file, which is only present when using with the type "file" option. - `Git` - `required string Token` Temporary GitHub access token - `JsonElement Output "git"constant` - `required string Ref` Git reference (commit SHA, branch, or tag) - `required Target Target` - `required Type Type` - `"source"Source` - `"dist"Dist` - `"wheel"Wheel` - `"openapi-with-transforms"OpenAPIWithTransforms` - `"openapi-with-code-samples"OpenAPIWithCodeSamples` - `"openapi-sdk-spec"OpenAPISdkSpec` - `"file"File` - `required string Url` URL to git remote ### Example ```csharp TargetOutputRetrieveParams parameters = new() { BuildID = "build_id", Target = Target.Node, Type = Type.Source, }; var targetOutput = await client.Builds.TargetOutputs.Retrieve(parameters); Console.WriteLine(targetOutput); ``` #### Response ```json { "output": "url", "target": "node", "type": "source", "url": "url", "path": "path" } ```