# Projects ## Retrieve project `Project projects().retrieve(ProjectRetrieveParamsparams = ProjectRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v0/projects/{project}` Retrieve a project by name. ### Parameters - `ProjectRetrieveParams params` - `Optional project` ### Returns - `class Project:` A project is a collection of SDKs generated from the same set of config files. - `String configRepo` - `Optional displayName` - `Object object_` - `PROJECT("project")` - `String org` - `String slug` - `List targets` - `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")` ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.projects.Project; import com.stainless.api.models.projects.ProjectRetrieveParams; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build(); Project project = client.projects().retrieve(); } } ``` #### Response ```json { "config_repo": "config_repo", "display_name": "display_name", "object": "project", "org": "org", "slug": "slug", "targets": [ "node" ] } ``` ## Update project `Project projects().update(ProjectUpdateParamsparams = ProjectUpdateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **patch** `/v0/projects/{project}` Update a project's properties. ### Parameters - `ProjectUpdateParams params` - `Optional project` - `Optional displayName` ### Returns - `class Project:` A project is a collection of SDKs generated from the same set of config files. - `String configRepo` - `Optional displayName` - `Object object_` - `PROJECT("project")` - `String org` - `String slug` - `List targets` - `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")` ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.projects.Project; import com.stainless.api.models.projects.ProjectUpdateParams; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build(); Project project = client.projects().update(); } } ``` #### Response ```json { "config_repo": "config_repo", "display_name": "display_name", "object": "project", "org": "org", "slug": "slug", "targets": [ "node" ] } ``` ## List projects `ProjectListPage projects().list(ProjectListParamsparams = ProjectListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v0/projects` List projects in an organization, from oldest to newest. ### Parameters - `ProjectListParams params` - `Optional cursor` Pagination cursor from a previous response - `Optional limit` Maximum number of projects to return, defaults to 10 (maximum: 100). - `Optional org` ### Returns - `class Project:` A project is a collection of SDKs generated from the same set of config files. - `String configRepo` - `Optional displayName` - `Object object_` - `PROJECT("project")` - `String org` - `String slug` - `List targets` - `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")` ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.projects.ProjectListPage; import com.stainless.api.models.projects.ProjectListParams; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.fromEnv(); ProjectListPage page = client.projects().list(); } } ``` #### Response ```json { "data": [ { "config_repo": "config_repo", "display_name": "display_name", "object": "project", "org": "org", "slug": "slug", "targets": [ "node" ] } ], "has_more": true, "next_cursor": "next_cursor" } ``` ## Create project `Project projects().create(ProjectCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/v0/projects` Create a new project. ### Parameters - `ProjectCreateParams params` - `String displayName` Human-readable project name - `String org` Organization name - `Revision revision` File contents to commit - `Content` - `String content` File content - `Url` - `String url` URL to fetch file content from - `String slug` Project name/slug - `List targets` Targets to generate for - `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 Project:` A project is a collection of SDKs generated from the same set of config files. - `String configRepo` - `Optional displayName` - `Object object_` - `PROJECT("project")` - `String org` - `String slug` - `List targets` - `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")` ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.core.JsonValue; import com.stainless.api.models.Target; import com.stainless.api.models.projects.Project; import com.stainless.api.models.projects.ProjectCreateParams; import java.util.Map; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.fromEnv(); ProjectCreateParams params = ProjectCreateParams.builder() .displayName("display_name") .org("org") .revision(ProjectCreateParams.Revision.builder() .putAdditionalProperty("foo", JsonValue.from(Map.of( "content", "content" ))) .build()) .slug("slug") .addTarget(Target.NODE) .build(); Project project = client.projects().create(params); } } ``` #### Response ```json { "config_repo": "config_repo", "display_name": "display_name", "object": "project", "org": "org", "slug": "slug", "targets": [ "node" ] } ``` ## Generate an AI commit message for a specific SDK `ProjectGenerateCommitMessageResponse projects().generateCommitMessage(ProjectGenerateCommitMessageParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/v0/projects/{project}/generate_commit_message` Generates an AI commit message by comparing two git refs in the SDK repository. ### Parameters - `ProjectGenerateCommitMessageParams params` - `Optional project` - `Target target` Language target - `PYTHON("python")` - `NODE("node")` - `TYPESCRIPT("typescript")` - `JAVA("java")` - `KOTLIN("kotlin")` - `GO("go")` - `RUBY("ruby")` - `TERRAFORM("terraform")` - `CLI("cli")` - `CSHARP("csharp")` - `PHP("php")` - `OPENAPI("openapi")` - `SQL("sql")` - `String baseRef` Base ref for comparison - `String headRef` Head ref for comparison ### Returns - `class ProjectGenerateCommitMessageResponse:` - `String aiCommitMessage` ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.projects.ProjectGenerateCommitMessageParams; import com.stainless.api.models.projects.ProjectGenerateCommitMessageResponse; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build(); ProjectGenerateCommitMessageParams params = ProjectGenerateCommitMessageParams.builder() .target(ProjectGenerateCommitMessageParams.Target.PYTHON) .baseRef("base_ref") .headRef("head_ref") .build(); ProjectGenerateCommitMessageResponse response = client.projects().generateCommitMessage(params); } } ``` #### Response ```json { "ai_commit_message": "ai_commit_message" } ``` ## Domain Types ### Project - `class Project:` A project is a collection of SDKs generated from the same set of config files. - `String configRepo` - `Optional displayName` - `Object object_` - `PROJECT("project")` - `String org` - `String slug` - `List targets` - `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")` # Branches ## Create a new project branch `ProjectBranch projects().branches().create(BranchCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/v0/projects/{project}/branches` Create a new branch for a project. The branch inherits the config files from the revision pointed to by the `branch_from` parameter. In addition, if the revision is a branch name, the branch will also inherit custom code changes from that branch. ### Parameters - `BranchCreateParams params` - `Optional project` - `String branch` Branch name - `String branchFrom` Branch or commit SHA to branch from - `Optional force` Whether to throw an error if the branch already exists. Defaults to false. ### Returns - `class ProjectBranch:` A project branch names a line of development for a project. Like a Git branch, it points to a Git commit with a set of config files. In addition, a project branch also points to a set of custom code changes, corresponding to Git branches in the staging repos. - `String branch` Branch name - `ConfigCommit configCommit` A Git commit that points to the latest set of config files on a given branch. - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `Optional latestBuild` - `String id` Build ID - `String configCommit` - `LocalDateTime createdAt` - `Optional documentedSpec` - `class UnionMember0:` - `String content` - `Type type` - `CONTENT("content")` - `class UnionMember1:` - `LocalDateTime expires` - `Type type` - `URL("url")` - `String url` - `Object object_` - `BUILD("build")` - `String org` - `String project` - `Targets targets` - `Optional cli` - `Commit commit` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `Optional commit` - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `InnerCompleted completed` deprecated - `Optional commit` - `LocalDateTime completedAt` - `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")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `LocalDateTime completedAt` - `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")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional installUrl` - `Object object_` - `BUILD_TARGET("build_target")` - `Status status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `Optional build` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `Optional url` - `InProgress` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `Optional url` - `Completed` - `InnerCompleted completed` deprecated - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `Optional url` - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional 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` - `LocalDateTime updatedAt` - `Object object_` - `PROJECT_BRANCH("project_branch")` - `String org` - `String project` Project name ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.projects.branches.BranchCreateParams; import com.stainless.api.models.projects.branches.ProjectBranch; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build(); BranchCreateParams params = BranchCreateParams.builder() .branch("branch") .branchFrom("branch_from") .build(); ProjectBranch projectBranch = client.projects().branches().create(params); } } ``` #### Response ```json { "branch": "branch", "config_commit": { "repo": { "branch": "branch", "host": "host", "name": "name", "owner": "owner" }, "sha": "sha", "stats": { "additions": 0, "deletions": 0, "total": 0 }, "tree_oid": "tree_oid" }, "latest_build": { "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" }, "object": "project_branch", "org": "org", "project": "project" } ``` ## Retrieve a project branch `ProjectBranch projects().branches().retrieve(BranchRetrieveParamsparams = BranchRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v0/projects/{project}/branches/{branch}` Retrieve a project branch by name. ### Parameters - `BranchRetrieveParams params` - `Optional project` - `Optional branch` ### Returns - `class ProjectBranch:` A project branch names a line of development for a project. Like a Git branch, it points to a Git commit with a set of config files. In addition, a project branch also points to a set of custom code changes, corresponding to Git branches in the staging repos. - `String branch` Branch name - `ConfigCommit configCommit` A Git commit that points to the latest set of config files on a given branch. - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `Optional latestBuild` - `String id` Build ID - `String configCommit` - `LocalDateTime createdAt` - `Optional documentedSpec` - `class UnionMember0:` - `String content` - `Type type` - `CONTENT("content")` - `class UnionMember1:` - `LocalDateTime expires` - `Type type` - `URL("url")` - `String url` - `Object object_` - `BUILD("build")` - `String org` - `String project` - `Targets targets` - `Optional cli` - `Commit commit` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `Optional commit` - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `InnerCompleted completed` deprecated - `Optional commit` - `LocalDateTime completedAt` - `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")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `LocalDateTime completedAt` - `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")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional installUrl` - `Object object_` - `BUILD_TARGET("build_target")` - `Status status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `Optional build` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `Optional url` - `InProgress` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `Optional url` - `Completed` - `InnerCompleted completed` deprecated - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `Optional url` - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional 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` - `LocalDateTime updatedAt` - `Object object_` - `PROJECT_BRANCH("project_branch")` - `String org` - `String project` Project name ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.projects.branches.BranchRetrieveParams; import com.stainless.api.models.projects.branches.ProjectBranch; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build(); ProjectBranch projectBranch = client.projects().branches().retrieve("branch"); } } ``` #### Response ```json { "branch": "branch", "config_commit": { "repo": { "branch": "branch", "host": "host", "name": "name", "owner": "owner" }, "sha": "sha", "stats": { "additions": 0, "deletions": 0, "total": 0 }, "tree_oid": "tree_oid" }, "latest_build": { "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" }, "object": "project_branch", "org": "org", "project": "project" } ``` ## List project branches `BranchListPage projects().branches().list(BranchListParamsparams = BranchListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v0/projects/{project}/branches` Retrieve a project branch by name. ### Parameters - `BranchListParams params` - `Optional project` - `Optional cursor` Pagination cursor from a previous response - `Optional limit` Maximum number of items to return, defaults to 10 (maximum: 100). ### Returns - `class BranchListResponse:` A project branch names a line of development for a project. Like a Git branch, it points to a Git commit with a set of config files. In addition, a project branch also points to a set of custom code changes, corresponding to Git branches in the staging repos. - `String branch` Branch name - `ConfigCommit configCommit` A Git commit that points to the latest set of config files on a given branch. - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `String latestBuildId` - `Object object_` - `PROJECT_BRANCH("project_branch")` - `String org` - `String project` Project name ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.projects.branches.BranchListPage; import com.stainless.api.models.projects.branches.BranchListParams; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build(); BranchListPage page = client.projects().branches().list(); } } ``` #### Response ```json { "data": [ { "branch": "branch", "config_commit": { "repo": { "branch": "branch", "host": "host", "name": "name", "owner": "owner" }, "sha": "sha", "stats": { "additions": 0, "deletions": 0, "total": 0 }, "tree_oid": "tree_oid" }, "latest_build_id": "latest_build_id", "object": "project_branch", "org": "org", "project": "project" } ], "has_more": true, "next_cursor": "next_cursor" } ``` ## Delete a project branch `JsonValue projects().branches().delete(BranchDeleteParamsparams = BranchDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **delete** `/v0/projects/{project}/branches/{branch}` Delete a project branch by name. ### Parameters - `BranchDeleteParams params` - `Optional project` - `Optional branch` ### Returns - `class BranchDeleteResponse:` ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.projects.branches.BranchDeleteParams; import com.stainless.api.models.projects.branches.BranchDeleteResponse; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build(); BranchDeleteResponse branch = client.projects().branches().delete("branch"); } } ``` #### Response ```json {} ``` ## Rebase a project branch `ProjectBranch projects().branches().rebase(BranchRebaseParamsparams = BranchRebaseParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **put** `/v0/projects/{project}/branches/{branch}/rebase` Rebase a project branch. The branch is rebased onto the `base` branch or commit SHA, inheriting any config and custom code changes. ### Parameters - `BranchRebaseParams params` - `Optional project` - `Optional branch` - `Optional base` The branch or commit SHA to rebase onto. Defaults to "main". ### Returns - `class ProjectBranch:` A project branch names a line of development for a project. Like a Git branch, it points to a Git commit with a set of config files. In addition, a project branch also points to a set of custom code changes, corresponding to Git branches in the staging repos. - `String branch` Branch name - `ConfigCommit configCommit` A Git commit that points to the latest set of config files on a given branch. - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `Optional latestBuild` - `String id` Build ID - `String configCommit` - `LocalDateTime createdAt` - `Optional documentedSpec` - `class UnionMember0:` - `String content` - `Type type` - `CONTENT("content")` - `class UnionMember1:` - `LocalDateTime expires` - `Type type` - `URL("url")` - `String url` - `Object object_` - `BUILD("build")` - `String org` - `String project` - `Targets targets` - `Optional cli` - `Commit commit` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `Optional commit` - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `InnerCompleted completed` deprecated - `Optional commit` - `LocalDateTime completedAt` - `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")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `LocalDateTime completedAt` - `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")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional installUrl` - `Object object_` - `BUILD_TARGET("build_target")` - `Status status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `Optional build` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `Optional url` - `InProgress` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `Optional url` - `Completed` - `InnerCompleted completed` deprecated - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `Optional url` - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional 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` - `LocalDateTime updatedAt` - `Object object_` - `PROJECT_BRANCH("project_branch")` - `String org` - `String project` Project name ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.projects.branches.BranchRebaseParams; import com.stainless.api.models.projects.branches.ProjectBranch; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build(); ProjectBranch projectBranch = client.projects().branches().rebase("branch"); } } ``` #### Response ```json { "branch": "branch", "config_commit": { "repo": { "branch": "branch", "host": "host", "name": "name", "owner": "owner" }, "sha": "sha", "stats": { "additions": 0, "deletions": 0, "total": 0 }, "tree_oid": "tree_oid" }, "latest_build": { "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" }, "object": "project_branch", "org": "org", "project": "project" } ``` ## Reset `ProjectBranch projects().branches().reset(BranchResetParamsparams = BranchResetParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **put** `/v0/projects/{project}/branches/{branch}/reset` Reset a project branch. If `branch` === `main`, the branch is reset to `target_config_sha`. Otherwise, the branch is reset to `main`. ### Parameters - `BranchResetParams params` - `Optional project` - `Optional branch` - `Optional targetConfigSha` The commit SHA to reset the main branch to. Required if resetting the main branch; disallowed otherwise. ### Returns - `class ProjectBranch:` A project branch names a line of development for a project. Like a Git branch, it points to a Git commit with a set of config files. In addition, a project branch also points to a set of custom code changes, corresponding to Git branches in the staging repos. - `String branch` Branch name - `ConfigCommit configCommit` A Git commit that points to the latest set of config files on a given branch. - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `Optional latestBuild` - `String id` Build ID - `String configCommit` - `LocalDateTime createdAt` - `Optional documentedSpec` - `class UnionMember0:` - `String content` - `Type type` - `CONTENT("content")` - `class UnionMember1:` - `LocalDateTime expires` - `Type type` - `URL("url")` - `String url` - `Object object_` - `BUILD("build")` - `String org` - `String project` - `Targets targets` - `Optional cli` - `Commit commit` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `Optional commit` - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `InnerCompleted completed` deprecated - `Optional commit` - `LocalDateTime completedAt` - `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")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `LocalDateTime completedAt` - `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")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional installUrl` - `Object object_` - `BUILD_TARGET("build_target")` - `Status status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `Optional build` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `Optional url` - `InProgress` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `Optional url` - `Completed` - `InnerCompleted completed` deprecated - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `Optional url` - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional 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` - `LocalDateTime updatedAt` - `Object object_` - `PROJECT_BRANCH("project_branch")` - `String org` - `String project` Project name ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.projects.branches.BranchResetParams; import com.stainless.api.models.projects.branches.ProjectBranch; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build(); ProjectBranch projectBranch = client.projects().branches().reset("branch"); } } ``` #### Response ```json { "branch": "branch", "config_commit": { "repo": { "branch": "branch", "host": "host", "name": "name", "owner": "owner" }, "sha": "sha", "stats": { "additions": 0, "deletions": 0, "total": 0 }, "tree_oid": "tree_oid" }, "latest_build": { "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" }, "object": "project_branch", "org": "org", "project": "project" } ``` ## Domain Types ### Project Branch - `class ProjectBranch:` A project branch names a line of development for a project. Like a Git branch, it points to a Git commit with a set of config files. In addition, a project branch also points to a set of custom code changes, corresponding to Git branches in the staging repos. - `String branch` Branch name - `ConfigCommit configCommit` A Git commit that points to the latest set of config files on a given branch. - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `Optional latestBuild` - `String id` Build ID - `String configCommit` - `LocalDateTime createdAt` - `Optional documentedSpec` - `class UnionMember0:` - `String content` - `Type type` - `CONTENT("content")` - `class UnionMember1:` - `LocalDateTime expires` - `Type type` - `URL("url")` - `String url` - `Object object_` - `BUILD("build")` - `String org` - `String project` - `Targets targets` - `Optional cli` - `Commit commit` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `Optional commit` - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `InnerCompleted completed` deprecated - `Optional commit` - `LocalDateTime completedAt` - `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")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `LocalDateTime completedAt` - `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")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional installUrl` - `Object object_` - `BUILD_TARGET("build_target")` - `Status status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `Optional build` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `Optional url` - `InProgress` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `Optional url` - `Completed` - `InnerCompleted completed` deprecated - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `Optional url` - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional 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` - `LocalDateTime updatedAt` - `Object object_` - `PROJECT_BRANCH("project_branch")` - `String org` - `String project` Project name # Configs ## Retrieve configuration files `ConfigRetrieveResponse projects().configs().retrieve(ConfigRetrieveParamsparams = ConfigRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v0/projects/{project}/configs` Retrieve the configuration files for a given project. ### Parameters - `ConfigRetrieveParams params` - `Optional project` - `Optional branch` Branch name, defaults to "main". - `Optional include` ### Returns - `class ConfigRetrieveResponse:` Config files contents - `String content` The file content ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.projects.configs.ConfigRetrieveParams; import com.stainless.api.models.projects.configs.ConfigRetrieveResponse; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build(); ConfigRetrieveResponse config = client.projects().configs().retrieve(); } } ``` #### Response ```json { "foo": { "content": "content" } } ``` ## Generate config suggestions `ConfigGuessResponse projects().configs().guess(ConfigGuessParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/v0/projects/{project}/configs/guess` Generate suggestions for changes to config files based on an OpenAPI spec. ### Parameters - `ConfigGuessParams params` - `Optional project` - `String spec` OpenAPI spec - `Optional branch` Branch name ### Returns - `class ConfigGuessResponse:` Config files contents - `String content` The file content ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.projects.configs.ConfigGuessParams; import com.stainless.api.models.projects.configs.ConfigGuessResponse; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build(); ConfigGuessParams params = ConfigGuessParams.builder() .spec("spec") .build(); ConfigGuessResponse response = client.projects().configs().guess(params); } } ``` #### Response ```json { "foo": { "content": "content" } } ```