From 8da95450bbbd886b4cf1e54a8963b75d9b8f089c Mon Sep 17 00:00:00 2001 From: Brian Demers Date: Mon, 16 Mar 2026 17:56:46 -0400 Subject: [PATCH 01/37] Adding release and pull request information to contrib guide (#18) --- CONTRIBUTING.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f910db9..ed588bf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,7 +40,7 @@ Most tests require you to [run a mock server](https://github.com/stoplightio/pri ./scripts/mock --daemon ``` -The mock serer will run in the background allowing you to run tests from the command line `./gradlew test` or from your IDE. +The mock server will run in the background allowing you to run tests from the command line `./gradlew test` or from your IDE. To stop the mock server run: ```shell @@ -62,3 +62,22 @@ To format and fix all issues automatically: ```sh $ ./scripts/format ``` + +## Release and pull request process + +As mentioned above, most of the code in this repository is generated. So the pull requests process may different from what you are expecting. Here are the steps: + +- Custom code changes should target the `next` branch in [`ArcadeAI/arcade-java`](https://github.com/arcadeai/arcade-java). +- Be selective on what you are changing, as this may cause [merge conflicts](https://www.stainless.com/docs/sdks/configure/custom-code) with the generated code. +- Create a new pull request against `next`, CI will build and test it. +- Once it is merged to `next`, and when there have been upstream changes to the OpenAPI spec, you will see a pull request titled "release: " (where `` is the next version to be released) +- Review it, most of the changes will have been generated, make sure the changes from your pull request are included. +- Approve the PR, and merge it. + - The `next` branch will be rebased to `main`, so you will need to rewrite the branch, something like: `git fetch origin next && git reset --hard origin/next` +- Once changes are merged to `main` a CI job will deploy the version to [Maven Central](https://central.sonatype.com/search?q=arcade-java). There may be a delay between the time it is published until the time it shows up in the Maven Central search results. + +## Troubleshooting tips + +If you are running into issues deploying to Maven Central, run the [`Release Doctor`](https://github.com/ArcadeAI/arcade-java/actions/workflows/release-doctor.yml) CI job, this will check that the required environment variables are set correctly. + +The [`CI` workflow](https://github.com/ArcadeAI/arcade-java/blob/main/.github/workflows/ci.yml), includes a couple of `if` statments that look like: `github.repository == 'stainless-sdks/arcade-engine-java'`. These are ONLY used for pre-release builds when the Stainless SDK code is generated. These are NOT used currently (in the future if there are multiple Java project repositories, this Maven repository could be used to test nightly builds). Otherwise, [build from source](#building-the-repository-from-source). From 521319108a7b064979e96ecf2fff5e74681b56bf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 13:38:18 +0000 Subject: [PATCH 02/37] chore(internal): tweak CI branches --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aaa4cc9..f2d1973 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + branches: + - '**' + - '!integrated/**' + - '!stl-preview-head/**' + - '!stl-preview-base/**' + - '!generated' + - '!codegen/**' + - 'codegen/stl/**' pull_request: branches-ignore: - 'stl-preview-head/**' From 5871f8b7d0a2a89a6cbb57561a292b32381c74b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 03:30:26 +0000 Subject: [PATCH 03/37] feat(api): api update --- .stats.yml | 4 +-- .../dev/arcade/models/tools/ToolListParams.kt | 32 +++++++++++++++++-- .../tools/formatted/FormattedListParams.kt | 27 +++++++++++++++- .../arcade/services/async/ToolServiceAsync.kt | 5 ++- .../arcade/services/blocking/ToolService.kt | 5 ++- .../arcade/models/tools/ToolListParamsTest.kt | 3 ++ .../formatted/FormattedListParamsTest.kt | 3 ++ 7 files changed, 72 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index f7c06a5..19e1128 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-6ff494eafa2c154892716407682bb2296cff4f18c45765c5fb16bdf36f452ae1.yml -openapi_spec_hash: 63dde2481a7d51042a241bfba232b0b0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-299395b669a4d14b85501de63b43317c15964a7491e11eb92fb42909bbf8b68b.yml +openapi_spec_hash: 7d17916818ff231f5a79ae345b0dc01b config_hash: bf64816643634a621cd0ffd93d9c4347 diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolListParams.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolListParams.kt index f5c8025..ad4ae18 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolListParams.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolListParams.kt @@ -14,9 +14,13 @@ import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** Returns a page of tools from the engine configuration, optionally filtered by toolkit */ +/** + * Returns a page of tools from the engine configuration, optionally filtered by toolkit and/or + * metadata + */ class ToolListParams private constructor( + private val filter: String?, private val includeAllVersions: Boolean?, private val includeFormat: List?, private val limit: Long?, @@ -27,6 +31,13 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** + * JSON metadata filter. Array fields (service_domains, operations): shorthand array or object + * with any_of/all_of/none_of operators (case-insensitive). Boolean fields: read_only, + * destructive, idempotent, open_world. Extras: case-sensitive key-value subset match. + */ + fun filter(): Optional = Optional.ofNullable(filter) + /** Include all versions of each tool */ fun includeAllVersions(): Optional = Optional.ofNullable(includeAllVersions) @@ -64,6 +75,7 @@ private constructor( /** A builder for [ToolListParams]. */ class Builder internal constructor() { + private var filter: String? = null private var includeAllVersions: Boolean? = null private var includeFormat: MutableList? = null private var limit: Long? = null @@ -75,6 +87,7 @@ private constructor( @JvmSynthetic internal fun from(toolListParams: ToolListParams) = apply { + filter = toolListParams.filter includeAllVersions = toolListParams.includeAllVersions includeFormat = toolListParams.includeFormat?.toMutableList() limit = toolListParams.limit @@ -85,6 +98,17 @@ private constructor( additionalQueryParams = toolListParams.additionalQueryParams.toBuilder() } + /** + * JSON metadata filter. Array fields (service_domains, operations): shorthand array or + * object with any_of/all_of/none_of operators (case-insensitive). Boolean fields: + * read_only, destructive, idempotent, open_world. Extras: case-sensitive key-value subset + * match. + */ + fun filter(filter: String?) = apply { this.filter = filter } + + /** Alias for calling [Builder.filter] with `filter.orElse(null)`. */ + fun filter(filter: Optional) = filter(filter.getOrNull()) + /** Include all versions of each tool */ fun includeAllVersions(includeAllVersions: Boolean?) = apply { this.includeAllVersions = includeAllVersions @@ -266,6 +290,7 @@ private constructor( */ fun build(): ToolListParams = ToolListParams( + filter, includeAllVersions, includeFormat?.toImmutable(), limit, @@ -282,6 +307,7 @@ private constructor( override fun _queryParams(): QueryParams = QueryParams.builder() .apply { + filter?.let { put("filter", it) } includeAllVersions?.let { put("include_all_versions", it.toString()) } includeFormat?.let { put("include_format", it.joinToString(",") { it.toString() }) } limit?.let { put("limit", it.toString()) } @@ -433,6 +459,7 @@ private constructor( } return other is ToolListParams && + filter == other.filter && includeAllVersions == other.includeAllVersions && includeFormat == other.includeFormat && limit == other.limit && @@ -445,6 +472,7 @@ private constructor( override fun hashCode(): Int = Objects.hash( + filter, includeAllVersions, includeFormat, limit, @@ -456,5 +484,5 @@ private constructor( ) override fun toString() = - "ToolListParams{includeAllVersions=$includeAllVersions, includeFormat=$includeFormat, limit=$limit, offset=$offset, toolkit=$toolkit, userId=$userId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" + "ToolListParams{filter=$filter, includeAllVersions=$includeAllVersions, includeFormat=$includeFormat, limit=$limit, offset=$offset, toolkit=$toolkit, userId=$userId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedListParams.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedListParams.kt index 3112f34..4231263 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedListParams.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedListParams.kt @@ -15,6 +15,7 @@ import kotlin.jvm.optionals.getOrNull */ class FormattedListParams private constructor( + private val filter: String?, private val format: String?, private val includeAllVersions: Boolean?, private val limit: Long?, @@ -25,6 +26,13 @@ private constructor( private val additionalQueryParams: QueryParams, ) : Params { + /** + * JSON metadata filter. Array fields (service_domains, operations): shorthand array or object + * with any_of/all_of/none_of operators (case-insensitive). Boolean fields: read_only, + * destructive, idempotent, open_world. Extras: case-sensitive key-value subset match. + */ + fun filter(): Optional = Optional.ofNullable(filter) + /** Provider format */ fun format(): Optional = Optional.ofNullable(format) @@ -62,6 +70,7 @@ private constructor( /** A builder for [FormattedListParams]. */ class Builder internal constructor() { + private var filter: String? = null private var format: String? = null private var includeAllVersions: Boolean? = null private var limit: Long? = null @@ -73,6 +82,7 @@ private constructor( @JvmSynthetic internal fun from(formattedListParams: FormattedListParams) = apply { + filter = formattedListParams.filter format = formattedListParams.format includeAllVersions = formattedListParams.includeAllVersions limit = formattedListParams.limit @@ -83,6 +93,17 @@ private constructor( additionalQueryParams = formattedListParams.additionalQueryParams.toBuilder() } + /** + * JSON metadata filter. Array fields (service_domains, operations): shorthand array or + * object with any_of/all_of/none_of operators (case-insensitive). Boolean fields: + * read_only, destructive, idempotent, open_world. Extras: case-sensitive key-value subset + * match. + */ + fun filter(filter: String?) = apply { this.filter = filter } + + /** Alias for calling [Builder.filter] with `filter.orElse(null)`. */ + fun filter(filter: Optional) = filter(filter.getOrNull()) + /** Provider format */ fun format(format: String?) = apply { this.format = format } @@ -251,6 +272,7 @@ private constructor( */ fun build(): FormattedListParams = FormattedListParams( + filter, format, includeAllVersions, limit, @@ -267,6 +289,7 @@ private constructor( override fun _queryParams(): QueryParams = QueryParams.builder() .apply { + filter?.let { put("filter", it) } format?.let { put("format", it) } includeAllVersions?.let { put("include_all_versions", it.toString()) } limit?.let { put("limit", it.toString()) } @@ -283,6 +306,7 @@ private constructor( } return other is FormattedListParams && + filter == other.filter && format == other.format && includeAllVersions == other.includeAllVersions && limit == other.limit && @@ -295,6 +319,7 @@ private constructor( override fun hashCode(): Int = Objects.hash( + filter, format, includeAllVersions, limit, @@ -306,5 +331,5 @@ private constructor( ) override fun toString() = - "FormattedListParams{format=$format, includeAllVersions=$includeAllVersions, limit=$limit, offset=$offset, toolkit=$toolkit, userId=$userId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" + "FormattedListParams{filter=$filter, format=$format, includeAllVersions=$includeAllVersions, limit=$limit, offset=$offset, toolkit=$toolkit, userId=$userId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/services/async/ToolServiceAsync.kt b/arcade-java-core/src/main/kotlin/dev/arcade/services/async/ToolServiceAsync.kt index 4a773b7..c59e0f6 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/services/async/ToolServiceAsync.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/services/async/ToolServiceAsync.kt @@ -38,7 +38,10 @@ interface ToolServiceAsync { fun formatted(): FormattedServiceAsync - /** Returns a page of tools from the engine configuration, optionally filtered by toolkit */ + /** + * Returns a page of tools from the engine configuration, optionally filtered by toolkit and/or + * metadata + */ fun list(): CompletableFuture = list(ToolListParams.none()) /** @see list */ diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/services/blocking/ToolService.kt b/arcade-java-core/src/main/kotlin/dev/arcade/services/blocking/ToolService.kt index 22a6d53..c10f1fa 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/services/blocking/ToolService.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/services/blocking/ToolService.kt @@ -38,7 +38,10 @@ interface ToolService { fun formatted(): FormattedService - /** Returns a page of tools from the engine configuration, optionally filtered by toolkit */ + /** + * Returns a page of tools from the engine configuration, optionally filtered by toolkit and/or + * metadata + */ fun list(): ToolListPage = list(ToolListParams.none()) /** @see list */ diff --git a/arcade-java-core/src/test/kotlin/dev/arcade/models/tools/ToolListParamsTest.kt b/arcade-java-core/src/test/kotlin/dev/arcade/models/tools/ToolListParamsTest.kt index 2c07652..9f3f267 100644 --- a/arcade-java-core/src/test/kotlin/dev/arcade/models/tools/ToolListParamsTest.kt +++ b/arcade-java-core/src/test/kotlin/dev/arcade/models/tools/ToolListParamsTest.kt @@ -11,6 +11,7 @@ internal class ToolListParamsTest { @Test fun create() { ToolListParams.builder() + .filter("filter") .includeAllVersions(true) .addIncludeFormat(ToolListParams.IncludeFormat.ARCADE) .limit(0L) @@ -24,6 +25,7 @@ internal class ToolListParamsTest { fun queryParams() { val params = ToolListParams.builder() + .filter("filter") .includeAllVersions(true) .addIncludeFormat(ToolListParams.IncludeFormat.ARCADE) .limit(0L) @@ -37,6 +39,7 @@ internal class ToolListParamsTest { assertThat(queryParams) .isEqualTo( QueryParams.builder() + .put("filter", "filter") .put("include_all_versions", "true") .put("include_format", listOf("arcade").joinToString(",")) .put("limit", "0") diff --git a/arcade-java-core/src/test/kotlin/dev/arcade/models/tools/formatted/FormattedListParamsTest.kt b/arcade-java-core/src/test/kotlin/dev/arcade/models/tools/formatted/FormattedListParamsTest.kt index 48d2dad..06a3344 100644 --- a/arcade-java-core/src/test/kotlin/dev/arcade/models/tools/formatted/FormattedListParamsTest.kt +++ b/arcade-java-core/src/test/kotlin/dev/arcade/models/tools/formatted/FormattedListParamsTest.kt @@ -11,6 +11,7 @@ internal class FormattedListParamsTest { @Test fun create() { FormattedListParams.builder() + .filter("filter") .format("format") .includeAllVersions(true) .limit(0L) @@ -24,6 +25,7 @@ internal class FormattedListParamsTest { fun queryParams() { val params = FormattedListParams.builder() + .filter("filter") .format("format") .includeAllVersions(true) .limit(0L) @@ -37,6 +39,7 @@ internal class FormattedListParamsTest { assertThat(queryParams) .isEqualTo( QueryParams.builder() + .put("filter", "filter") .put("format", "format") .put("include_all_versions", "true") .put("limit", "0") From 993657b3ac45eafee6b85f76a578f2c6daaacfe2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 12:42:01 +0000 Subject: [PATCH 04/37] chore(internal): update retry delay tests --- .../kotlin/dev/arcade/core/http/RetryingHttpClientTest.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arcade-java-core/src/test/kotlin/dev/arcade/core/http/RetryingHttpClientTest.kt b/arcade-java-core/src/test/kotlin/dev/arcade/core/http/RetryingHttpClientTest.kt index 1e64d8e..b7a4609 100644 --- a/arcade-java-core/src/test/kotlin/dev/arcade/core/http/RetryingHttpClientTest.kt +++ b/arcade-java-core/src/test/kotlin/dev/arcade/core/http/RetryingHttpClientTest.kt @@ -400,9 +400,9 @@ internal class RetryingHttpClientTest { assertThat(sleeper.durations).hasSize(3) // retries=1: 0.5s * [0.75, 1.0] assertThat(sleeper.durations[0]).isBetween(Duration.ofMillis(375), Duration.ofMillis(500)) - // retries=2: 1.0s * [0.75, 1.0] + // retries=2: 1s * [0.75, 1.0] assertThat(sleeper.durations[1]).isBetween(Duration.ofMillis(750), Duration.ofMillis(1000)) - // retries=3: 2.0s * [0.75, 1.0] + // retries=3: 2s * [0.75, 1.0] assertThat(sleeper.durations[2]).isBetween(Duration.ofMillis(1500), Duration.ofMillis(2000)) assertNoResponseLeaks() } @@ -427,9 +427,9 @@ internal class RetryingHttpClientTest { assertThat(response.statusCode()).isEqualTo(503) verify(7, postRequestedFor(urlPathEqualTo("/something"))) assertThat(sleeper.durations).hasSize(6) - // retries=5: min(0.5 * 2^4, 8) = 8.0s * [0.75, 1.0] + // retries=5: backoff hits the 8s cap * [0.75, 1.0] assertThat(sleeper.durations[4]).isBetween(Duration.ofMillis(6000), Duration.ofMillis(8000)) - // retries=6: min(0.5 * 2^5, 8) = min(16, 8) = 8.0s * [0.75, 1.0] (capped) + // retries=6: still capped at 8s * [0.75, 1.0] assertThat(sleeper.durations[5]).isBetween(Duration.ofMillis(6000), Duration.ofMillis(8000)) assertNoResponseLeaks() } From f86e1f2dff33a369dd6d52119ce670747dfd2392 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 12:56:02 +0000 Subject: [PATCH 05/37] fix(client): allow updating header/query affecting fields in `toBuilder()` --- .../kotlin/dev/arcade/core/ClientOptions.kt | 7 +++--- .../dev/arcade/core/ClientOptionsTest.kt | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/core/ClientOptions.kt b/arcade-java-core/src/main/kotlin/dev/arcade/core/ClientOptions.kt index 65f5de9..4daef8f 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/core/ClientOptions.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/core/ClientOptions.kt @@ -453,13 +453,14 @@ private constructor( headers.put("X-Stainless-Runtime", "JRE") headers.put("X-Stainless-Runtime-Version", getJavaVersion()) headers.put("X-Stainless-Kotlin-Version", KotlinVersion.CURRENT.toString()) + // We replace after all the default headers to allow end-users to overwrite them. + headers.replaceAll(this.headers.build()) + queryParams.replaceAll(this.queryParams.build()) apiKey.let { if (!it.isEmpty()) { - headers.put("Authorization", it) + headers.replace("Authorization", it) } } - headers.replaceAll(this.headers.build()) - queryParams.replaceAll(this.queryParams.build()) return ClientOptions( httpClient, diff --git a/arcade-java-core/src/test/kotlin/dev/arcade/core/ClientOptionsTest.kt b/arcade-java-core/src/test/kotlin/dev/arcade/core/ClientOptionsTest.kt index 8a79f69..10e787e 100644 --- a/arcade-java-core/src/test/kotlin/dev/arcade/core/ClientOptionsTest.kt +++ b/arcade-java-core/src/test/kotlin/dev/arcade/core/ClientOptionsTest.kt @@ -16,6 +16,29 @@ internal class ClientOptionsTest { private val httpClient = mock() + @Test + fun putHeader_canOverwriteDefaultHeader() { + val clientOptions = + ClientOptions.builder() + .httpClient(httpClient) + .putHeader("User-Agent", "My User Agent") + .apiKey("My API Key") + .build() + + assertThat(clientOptions.headers.values("User-Agent")).containsExactly("My User Agent") + } + + @Test + fun toBuilder_bearerCanBeUpdated() { + var clientOptions = + ClientOptions.builder().httpClient(httpClient).apiKey("My API Key").build() + + clientOptions = clientOptions.toBuilder().apiKey("another My API Key").build() + + assertThat(clientOptions.headers.values("Authorization")) + .containsExactly("another My API Key") + } + @Test fun toBuilder_whenOriginalClientOptionsGarbageCollected_doesNotCloseOriginalClient() { var clientOptions = From ae8ff343537d6ff24a3346fac27516c2bc3e07d9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 03:54:27 +0000 Subject: [PATCH 06/37] refactor(tests): switch from prism to steady --- scripts/mock | 26 +++++++++++++------------- scripts/test | 16 ++++++++-------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/mock b/scripts/mock index bcf3b39..38201de 100755 --- a/scripts/mock +++ b/scripts/mock @@ -19,34 +19,34 @@ fi echo "==> Starting mock server with URL ${URL}" -# Run prism mock on the given spec +# Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version + npm exec --package=@stdy/cli@0.19.3 -- steady --version - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets "$URL" &> .stdy.log & - # Wait for server to come online (max 30s) + # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" attempts=0 - while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do + if ! kill -0 $! 2>/dev/null; then + echo + cat .stdy.log + exit 1 + fi attempts=$((attempts + 1)) if [ "$attempts" -ge 300 ]; then echo - echo "Timed out waiting for Prism server to start" - cat .prism.log + echo "Timed out waiting for Steady server to start" + cat .stdy.log exit 1 fi echo -n "." sleep 0.1 done - if grep -q "✖ fatal" ".prism.log"; then - cat .prism.log - exit 1 - fi - echo else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" + npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 047bc1d..0d08465 100755 --- a/scripts/test +++ b/scripts/test @@ -9,8 +9,8 @@ GREEN='\033[0;32m' YELLOW='\033[0;33m' NC='\033[0m' # No Color -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 +function steady_is_running() { + curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1 } kill_server_on_port() { @@ -25,7 +25,7 @@ function is_overriding_api_base_url() { [ -n "$TEST_API_BASE_URL" ] } -if ! is_overriding_api_base_url && ! prism_is_running ; then +if ! is_overriding_api_base_url && ! steady_is_running ; then # When we exit this script, make sure to kill the background mock server process trap 'kill_server_on_port 4010' EXIT @@ -36,19 +36,19 @@ fi if is_overriding_api_base_url ; then echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" echo -elif ! prism_is_running ; then - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" +elif ! steady_is_running ; then + echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Steady server" echo -e "running against your OpenAPI spec." echo echo -e "To run the server, pass in the path or url of your OpenAPI" - echo -e "spec to the prism command:" + echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets${NC}" echo exit 1 else - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" + echo -e "${GREEN}✔ Mock steady server is running with your OpenAPI spec${NC}" echo fi From f38504b554f72ac9f701716ff1ad40ec5f1a47b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 03:55:02 +0000 Subject: [PATCH 07/37] chore(internal): bump ktfmt --- buildSrc/src/main/kotlin/arcade.kotlin.gradle.kts | 2 +- scripts/fast-format | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/buildSrc/src/main/kotlin/arcade.kotlin.gradle.kts b/buildSrc/src/main/kotlin/arcade.kotlin.gradle.kts index 08c21f3..1fa9c32 100644 --- a/buildSrc/src/main/kotlin/arcade.kotlin.gradle.kts +++ b/buildSrc/src/main/kotlin/arcade.kotlin.gradle.kts @@ -40,7 +40,7 @@ tasks.withType().configureEach { val ktfmt by configurations.creating dependencies { - ktfmt("com.facebook:ktfmt:0.56") + ktfmt("com.facebook:ktfmt:0.61") } fun registerKtfmt( diff --git a/scripts/fast-format b/scripts/fast-format index 1b3bc47..35a1dee 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -24,8 +24,8 @@ if [ ! -f "$FILE_LIST" ]; then exit 1 fi -if ! command -v ktfmt-fast-format &> /dev/null; then - echo "Error: ktfmt-fast-format not found" +if ! command -v ktfmt &> /dev/null; then + echo "Error: ktfmt not found" exit 1 fi @@ -36,7 +36,7 @@ echo "==> Done looking for Kotlin files" if [[ -n "$kt_files" ]]; then echo "==> will format Kotlin files" - echo "$kt_files" | tr '\n' '\0' | xargs -0 ktfmt-fast-format --kotlinlang-style "$@" + echo "$kt_files" | tr '\n' '\0' | xargs -0 ktfmt --kotlinlang-style "$@" else echo "No Kotlin files to format -- expected outcome during incremental formatting" fi From a5530c175d6bb3fd91abc90c05efb34a4fb34ed8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 21:31:35 +0000 Subject: [PATCH 08/37] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 19e1128..236a610 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-299395b669a4d14b85501de63b43317c15964a7491e11eb92fb42909bbf8b68b.yml -openapi_spec_hash: 7d17916818ff231f5a79ae345b0dc01b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-2009b06f1d0a601c5e58beb9fc3386561faed796151695204375be1c2a4b34f4.yml +openapi_spec_hash: cba6691d49a579b05c8068649f933c29 config_hash: bf64816643634a621cd0ffd93d9c4347 From 0d022dfe027631ea83e1794bcb9e79824ab28f0f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 21 Mar 2026 05:11:06 +0000 Subject: [PATCH 09/37] chore(tests): bump steady to v0.19.4 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 38201de..e1c19e8 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.3 -- steady --version + npm exec --package=@stdy/cli@0.19.4 -- steady --version - npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 0d08465..3df5927 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.4 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 From d186f9769310ebff3584418642cc0b31a13e1d1c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 21 Mar 2026 05:16:57 +0000 Subject: [PATCH 10/37] chore(tests): bump steady to v0.19.5 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index e1c19e8..ab814d3 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.4 -- steady --version + npm exec --package=@stdy/cli@0.19.5 -- steady --version - npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 3df5927..7ca8bb4 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.4 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.5 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 From c9b3d8f8b7825876526e6dca16859c9f12fcce37 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 05:15:25 +0000 Subject: [PATCH 11/37] chore(internal): update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b1346e6..90b85e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .prism.log +.stdy.log .gradle .idea .kotlin From b5094e5507917137cf7b30c90e1028c122bd1331 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 05:20:35 +0000 Subject: [PATCH 12/37] chore(tests): bump steady to v0.19.6 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index ab814d3..b319bdf 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.5 -- steady --version + npm exec --package=@stdy/cli@0.19.6 -- steady --version - npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 7ca8bb4..cc7059c 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.5 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.6 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 From d5942be3ea63057a3267602dc72046e71d9a5855 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 03:29:59 +0000 Subject: [PATCH 13/37] chore(ci): skip lint on metadata-only changes Note that we still want to run tests, as these depend on the metadata. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2d1973..017bd77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: timeout-minutes: 15 name: lint runs-on: ${{ github.repository == 'stainless-sdks/arcade-engine-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 @@ -46,7 +46,7 @@ jobs: contents: read id-token: write runs-on: ${{ github.repository == 'stainless-sdks/arcade-engine-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 From 231a1a764782bb5bdcd1118630b3bbd544333aa4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 03:30:30 +0000 Subject: [PATCH 14/37] chore(tests): bump steady to v0.19.7 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index b319bdf..09eb49f 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.6 -- steady --version + npm exec --package=@stdy/cli@0.19.7 -- steady --version - npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index cc7059c..ec1f890 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.6 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 From 9f53255c94a7bf8bf24ad4bd50b787cb543b47f8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 22:28:53 +0000 Subject: [PATCH 15/37] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 236a610..ddbd45b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-2009b06f1d0a601c5e58beb9fc3386561faed796151695204375be1c2a4b34f4.yml -openapi_spec_hash: cba6691d49a579b05c8068649f933c29 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-611f307f990449873a2d43b8dab131ac7d796df8a72f784e94d7ea5db186b770.yml +openapi_spec_hash: 4450df94b2af6e5965d51682de32e7fd config_hash: bf64816643634a621cd0ffd93d9c4347 From 59fb8e2de6ae7f151f8198dbbb258e7e3708360a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 23:10:12 +0000 Subject: [PATCH 16/37] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index ddbd45b..fdca6e2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-611f307f990449873a2d43b8dab131ac7d796df8a72f784e94d7ea5db186b770.yml -openapi_spec_hash: 4450df94b2af6e5965d51682de32e7fd -config_hash: bf64816643634a621cd0ffd93d9c4347 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-537300bc28122d048ddd1b35dd797cf80154ea8e2282c92ce7cc8e041802184d.yml +openapi_spec_hash: 58474f523bca2c01c89dc1391dc8570b +config_hash: 2d4163acdeacd75903f978cd79c35d14 From abeec961730398bb0c49f01ea13312468be4787c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 06:44:53 +0000 Subject: [PATCH 17/37] chore(internal): update multipart form array serialization --- scripts/mock | 4 ++-- scripts/test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/mock b/scripts/mock index 09eb49f..290e21b 100755 --- a/scripts/mock +++ b/scripts/mock @@ -24,7 +24,7 @@ if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout npm exec --package=@stdy/cli@0.19.7 -- steady --version - npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index ec1f890..415d174 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=brackets --validator-query-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 From b93699052685356a902c34f38d8e46a617e77454 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 08:58:49 +0000 Subject: [PATCH 18/37] chore(tests): bump steady to v0.20.1 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 290e21b..15c2994 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.7 -- steady --version + npm exec --package=@stdy/cli@0.20.1 -- steady --version - npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 415d174..d533ebc 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 From 7dfba2ef15e2c5f6412a64f23cde8138159c42ea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 09:03:23 +0000 Subject: [PATCH 19/37] chore(tests): bump steady to v0.20.2 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 15c2994..5cd7c15 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.20.1 -- steady --version + npm exec --package=@stdy/cli@0.20.2 -- steady --version - npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index d533ebc..61c1163 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.2 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 From acfd5b0aedbb445e1269a6b879111ff19c8aeef5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 20:57:32 +0000 Subject: [PATCH 20/37] feat(api): api update --- .stats.yml | 4 +- .../arcade/models/workers/WorkerResponse.kt | 102 +++++++++++++++++- .../workers/WorkerListPageResponseTest.kt | 6 ++ .../models/workers/WorkerResponseTest.kt | 6 ++ 4 files changed, 112 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index fdca6e2..8b2cd98 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-537300bc28122d048ddd1b35dd797cf80154ea8e2282c92ce7cc8e041802184d.yml -openapi_spec_hash: 58474f523bca2c01c89dc1391dc8570b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-1ef78b1a5567d95e588e2e41522ada4568b5ef06258a7b1a752226f58d3c519e.yml +openapi_spec_hash: 7ad5c8d91d66b56d56b0788b5ef40d77 config_hash: 2d4163acdeacd75903f978cd79c35d14 diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerResponse.kt index 51843b5..45ff0b1 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerResponse.kt @@ -1297,8 +1297,10 @@ private constructor( class Mcp @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( + private val externalId: JsonField, private val headers: JsonField, private val oauth2: JsonField, + private val redirectUri: JsonField, private val retry: JsonField, private val secrets: JsonField, private val timeout: JsonField, @@ -1308,13 +1310,35 @@ private constructor( @JsonCreator private constructor( + @JsonProperty("external_id") + @ExcludeMissing + externalId: JsonField = JsonMissing.of(), @JsonProperty("headers") @ExcludeMissing headers: JsonField = JsonMissing.of(), @JsonProperty("oauth2") @ExcludeMissing oauth2: JsonField = JsonMissing.of(), + @JsonProperty("redirect_uri") + @ExcludeMissing + redirectUri: JsonField = JsonMissing.of(), @JsonProperty("retry") @ExcludeMissing retry: JsonField = JsonMissing.of(), @JsonProperty("secrets") @ExcludeMissing secrets: JsonField = JsonMissing.of(), @JsonProperty("timeout") @ExcludeMissing timeout: JsonField = JsonMissing.of(), @JsonProperty("uri") @ExcludeMissing uri: JsonField = JsonMissing.of(), - ) : this(headers, oauth2, retry, secrets, timeout, uri, mutableMapOf()) + ) : this( + externalId, + headers, + oauth2, + redirectUri, + retry, + secrets, + timeout, + uri, + mutableMapOf(), + ) + + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun externalId(): Optional = externalId.getOptional("external_id") /** * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -1328,6 +1352,12 @@ private constructor( */ fun oauth2(): Optional = oauth2.getOptional("oauth2") + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun redirectUri(): Optional = redirectUri.getOptional("redirect_uri") + /** * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1352,6 +1382,15 @@ private constructor( */ fun uri(): Optional = uri.getOptional("uri") + /** + * Returns the raw JSON value of [externalId]. + * + * Unlike [externalId], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("external_id") + @ExcludeMissing + fun _externalId(): JsonField = externalId + /** * Returns the raw JSON value of [headers]. * @@ -1366,6 +1405,15 @@ private constructor( */ @JsonProperty("oauth2") @ExcludeMissing fun _oauth2(): JsonField = oauth2 + /** + * Returns the raw JSON value of [redirectUri]. + * + * Unlike [redirectUri], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("redirect_uri") + @ExcludeMissing + fun _redirectUri(): JsonField = redirectUri + /** * Returns the raw JSON value of [retry]. * @@ -1415,8 +1463,10 @@ private constructor( /** A builder for [Mcp]. */ class Builder internal constructor() { + private var externalId: JsonField = JsonMissing.of() private var headers: JsonField = JsonMissing.of() private var oauth2: JsonField = JsonMissing.of() + private var redirectUri: JsonField = JsonMissing.of() private var retry: JsonField = JsonMissing.of() private var secrets: JsonField = JsonMissing.of() private var timeout: JsonField = JsonMissing.of() @@ -1425,8 +1475,10 @@ private constructor( @JvmSynthetic internal fun from(mcp: Mcp) = apply { + externalId = mcp.externalId headers = mcp.headers oauth2 = mcp.oauth2 + redirectUri = mcp.redirectUri retry = mcp.retry secrets = mcp.secrets timeout = mcp.timeout @@ -1434,6 +1486,17 @@ private constructor( additionalProperties = mcp.additionalProperties.toMutableMap() } + fun externalId(externalId: String) = externalId(JsonField.of(externalId)) + + /** + * Sets [Builder.externalId] to an arbitrary JSON value. + * + * You should usually call [Builder.externalId] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun externalId(externalId: JsonField) = apply { this.externalId = externalId } + fun headers(headers: Headers) = headers(JsonField.of(headers)) /** @@ -1456,6 +1519,19 @@ private constructor( */ fun oauth2(oauth2: JsonField) = apply { this.oauth2 = oauth2 } + fun redirectUri(redirectUri: String) = redirectUri(JsonField.of(redirectUri)) + + /** + * Sets [Builder.redirectUri] to an arbitrary JSON value. + * + * You should usually call [Builder.redirectUri] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun redirectUri(redirectUri: JsonField) = apply { + this.redirectUri = redirectUri + } + fun retry(retry: Long) = retry(JsonField.of(retry)) /** @@ -1526,8 +1602,10 @@ private constructor( */ fun build(): Mcp = Mcp( + externalId, headers, oauth2, + redirectUri, retry, secrets, timeout, @@ -1543,8 +1621,10 @@ private constructor( return@apply } + externalId() headers().ifPresent { it.validate() } oauth2().ifPresent { it.validate() } + redirectUri() retry() secrets().ifPresent { it.validate() } timeout() @@ -1568,8 +1648,10 @@ private constructor( */ @JvmSynthetic internal fun validity(): Int = - (headers.asKnown().getOrNull()?.validity() ?: 0) + + (if (externalId.asKnown().isPresent) 1 else 0) + + (headers.asKnown().getOrNull()?.validity() ?: 0) + (oauth2.asKnown().getOrNull()?.validity() ?: 0) + + (if (redirectUri.asKnown().isPresent) 1 else 0) + (if (retry.asKnown().isPresent) 1 else 0) + (secrets.asKnown().getOrNull()?.validity() ?: 0) + (if (timeout.asKnown().isPresent) 1 else 0) + @@ -2572,8 +2654,10 @@ private constructor( } return other is Mcp && + externalId == other.externalId && headers == other.headers && oauth2 == other.oauth2 && + redirectUri == other.redirectUri && retry == other.retry && secrets == other.secrets && timeout == other.timeout && @@ -2582,13 +2666,23 @@ private constructor( } private val hashCode: Int by lazy { - Objects.hash(headers, oauth2, retry, secrets, timeout, uri, additionalProperties) + Objects.hash( + externalId, + headers, + oauth2, + redirectUri, + retry, + secrets, + timeout, + uri, + additionalProperties, + ) } override fun hashCode(): Int = hashCode override fun toString() = - "Mcp{headers=$headers, oauth2=$oauth2, retry=$retry, secrets=$secrets, timeout=$timeout, uri=$uri, additionalProperties=$additionalProperties}" + "Mcp{externalId=$externalId, headers=$headers, oauth2=$oauth2, redirectUri=$redirectUri, retry=$retry, secrets=$secrets, timeout=$timeout, uri=$uri, additionalProperties=$additionalProperties}" } class Requirements diff --git a/arcade-java-core/src/test/kotlin/dev/arcade/models/workers/WorkerListPageResponseTest.kt b/arcade-java-core/src/test/kotlin/dev/arcade/models/workers/WorkerListPageResponseTest.kt index bfe4dee..36db9bd 100644 --- a/arcade-java-core/src/test/kotlin/dev/arcade/models/workers/WorkerListPageResponseTest.kt +++ b/arcade-java-core/src/test/kotlin/dev/arcade/models/workers/WorkerListPageResponseTest.kt @@ -43,6 +43,7 @@ internal class WorkerListPageResponseTest { .managed(true) .mcp( WorkerResponse.Mcp.builder() + .externalId("external_id") .headers( WorkerResponse.Mcp.Headers.builder() .putAdditionalProperty("foo", JsonValue.from("string")) @@ -68,6 +69,7 @@ internal class WorkerListPageResponseTest { .addSupportedScope("string") .build() ) + .redirectUri("redirect_uri") .retry(0L) .secrets( WorkerResponse.Mcp.Secrets.builder() @@ -142,6 +144,7 @@ internal class WorkerListPageResponseTest { .managed(true) .mcp( WorkerResponse.Mcp.builder() + .externalId("external_id") .headers( WorkerResponse.Mcp.Headers.builder() .putAdditionalProperty("foo", JsonValue.from("string")) @@ -167,6 +170,7 @@ internal class WorkerListPageResponseTest { .addSupportedScope("string") .build() ) + .redirectUri("redirect_uri") .retry(0L) .secrets( WorkerResponse.Mcp.Secrets.builder() @@ -244,6 +248,7 @@ internal class WorkerListPageResponseTest { .managed(true) .mcp( WorkerResponse.Mcp.builder() + .externalId("external_id") .headers( WorkerResponse.Mcp.Headers.builder() .putAdditionalProperty("foo", JsonValue.from("string")) @@ -269,6 +274,7 @@ internal class WorkerListPageResponseTest { .addSupportedScope("string") .build() ) + .redirectUri("redirect_uri") .retry(0L) .secrets( WorkerResponse.Mcp.Secrets.builder() diff --git a/arcade-java-core/src/test/kotlin/dev/arcade/models/workers/WorkerResponseTest.kt b/arcade-java-core/src/test/kotlin/dev/arcade/models/workers/WorkerResponseTest.kt index c280d01..bf49033 100644 --- a/arcade-java-core/src/test/kotlin/dev/arcade/models/workers/WorkerResponseTest.kt +++ b/arcade-java-core/src/test/kotlin/dev/arcade/models/workers/WorkerResponseTest.kt @@ -40,6 +40,7 @@ internal class WorkerResponseTest { .managed(true) .mcp( WorkerResponse.Mcp.builder() + .externalId("external_id") .headers( WorkerResponse.Mcp.Headers.builder() .putAdditionalProperty("foo", JsonValue.from("string")) @@ -64,6 +65,7 @@ internal class WorkerResponseTest { .addSupportedScope("string") .build() ) + .redirectUri("redirect_uri") .retry(0L) .secrets( WorkerResponse.Mcp.Secrets.builder() @@ -131,6 +133,7 @@ internal class WorkerResponseTest { assertThat(workerResponse.mcp()) .contains( WorkerResponse.Mcp.builder() + .externalId("external_id") .headers( WorkerResponse.Mcp.Headers.builder() .putAdditionalProperty("foo", JsonValue.from("string")) @@ -153,6 +156,7 @@ internal class WorkerResponseTest { .addSupportedScope("string") .build() ) + .redirectUri("redirect_uri") .retry(0L) .secrets( WorkerResponse.Mcp.Secrets.builder() @@ -223,6 +227,7 @@ internal class WorkerResponseTest { .managed(true) .mcp( WorkerResponse.Mcp.builder() + .externalId("external_id") .headers( WorkerResponse.Mcp.Headers.builder() .putAdditionalProperty("foo", JsonValue.from("string")) @@ -247,6 +252,7 @@ internal class WorkerResponseTest { .addSupportedScope("string") .build() ) + .redirectUri("redirect_uri") .retry(0L) .secrets( WorkerResponse.Mcp.Secrets.builder() From b4525d2ea5a247b1041378ca5e95f5f92980803a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 00:45:03 +0000 Subject: [PATCH 21/37] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8b2cd98..e39bb5d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-1ef78b1a5567d95e588e2e41522ada4568b5ef06258a7b1a752226f58d3c519e.yml -openapi_spec_hash: 7ad5c8d91d66b56d56b0788b5ef40d77 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-872f878f0f5dabc42b1102a2408e36653d9e5b4942af0e740ba7ab362916e6c7.yml +openapi_spec_hash: ff3a9433714b0a5de70800bbe267af99 config_hash: 2d4163acdeacd75903f978cd79c35d14 From f7f972bc274de10da54ffe2004d9d50fa16bc5a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 21:29:00 +0000 Subject: [PATCH 22/37] feat(api): api update --- .stats.yml | 4 +-- .../models/tools/ExecuteToolResponse.kt | 27 +++++++++++++++++++ .../models/tools/ToolExecutionAttempt.kt | 27 +++++++++++++++++++ 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e39bb5d..d7172cb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-872f878f0f5dabc42b1102a2408e36653d9e5b4942af0e740ba7ab362916e6c7.yml -openapi_spec_hash: ff3a9433714b0a5de70800bbe267af99 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-a509111298b23d3851de5439560c96b7d7831556094a790ba838cf11e9277ee7.yml +openapi_spec_hash: 0ad3aecc9853e08130587d8e4b1bb468 config_hash: 2d4163acdeacd75903f978cd79c35d14 diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ExecuteToolResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ExecuteToolResponse.kt index eb5c67b..88d33a0 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ExecuteToolResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ExecuteToolResponse.kt @@ -1231,6 +1231,17 @@ private constructor( @JvmField val UPSTREAM_RUNTIME_UNMAPPED = of("UPSTREAM_RUNTIME_UNMAPPED") + @JvmField + val NETWORK_TRANSPORT_RUNTIME_TIMEOUT = of("NETWORK_TRANSPORT_RUNTIME_TIMEOUT") + + @JvmField + val NETWORK_TRANSPORT_RUNTIME_UNREACHABLE = + of("NETWORK_TRANSPORT_RUNTIME_UNREACHABLE") + + @JvmField + val NETWORK_TRANSPORT_RUNTIME_UNMAPPED = + of("NETWORK_TRANSPORT_RUNTIME_UNMAPPED") + @JvmField val UNKNOWN = of("UNKNOWN") @JvmStatic fun of(value: String) = Kind(JsonField.of(value)) @@ -1257,6 +1268,9 @@ private constructor( UPSTREAM_RUNTIME_RATE_LIMIT, UPSTREAM_RUNTIME_SERVER_ERROR, UPSTREAM_RUNTIME_UNMAPPED, + NETWORK_TRANSPORT_RUNTIME_TIMEOUT, + NETWORK_TRANSPORT_RUNTIME_UNREACHABLE, + NETWORK_TRANSPORT_RUNTIME_UNMAPPED, UNKNOWN, } @@ -1289,6 +1303,9 @@ private constructor( UPSTREAM_RUNTIME_RATE_LIMIT, UPSTREAM_RUNTIME_SERVER_ERROR, UPSTREAM_RUNTIME_UNMAPPED, + NETWORK_TRANSPORT_RUNTIME_TIMEOUT, + NETWORK_TRANSPORT_RUNTIME_UNREACHABLE, + NETWORK_TRANSPORT_RUNTIME_UNMAPPED, UNKNOWN, /** * An enum member indicating that [Kind] was instantiated with an unknown value. @@ -1324,6 +1341,11 @@ private constructor( UPSTREAM_RUNTIME_RATE_LIMIT -> Value.UPSTREAM_RUNTIME_RATE_LIMIT UPSTREAM_RUNTIME_SERVER_ERROR -> Value.UPSTREAM_RUNTIME_SERVER_ERROR UPSTREAM_RUNTIME_UNMAPPED -> Value.UPSTREAM_RUNTIME_UNMAPPED + NETWORK_TRANSPORT_RUNTIME_TIMEOUT -> Value.NETWORK_TRANSPORT_RUNTIME_TIMEOUT + NETWORK_TRANSPORT_RUNTIME_UNREACHABLE -> + Value.NETWORK_TRANSPORT_RUNTIME_UNREACHABLE + NETWORK_TRANSPORT_RUNTIME_UNMAPPED -> + Value.NETWORK_TRANSPORT_RUNTIME_UNMAPPED UNKNOWN -> Value.UNKNOWN else -> Value._UNKNOWN } @@ -1358,6 +1380,11 @@ private constructor( UPSTREAM_RUNTIME_RATE_LIMIT -> Known.UPSTREAM_RUNTIME_RATE_LIMIT UPSTREAM_RUNTIME_SERVER_ERROR -> Known.UPSTREAM_RUNTIME_SERVER_ERROR UPSTREAM_RUNTIME_UNMAPPED -> Known.UPSTREAM_RUNTIME_UNMAPPED + NETWORK_TRANSPORT_RUNTIME_TIMEOUT -> Known.NETWORK_TRANSPORT_RUNTIME_TIMEOUT + NETWORK_TRANSPORT_RUNTIME_UNREACHABLE -> + Known.NETWORK_TRANSPORT_RUNTIME_UNREACHABLE + NETWORK_TRANSPORT_RUNTIME_UNMAPPED -> + Known.NETWORK_TRANSPORT_RUNTIME_UNMAPPED UNKNOWN -> Known.UNKNOWN else -> throw ArcadeInvalidDataException("Unknown Kind: $value") } diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolExecutionAttempt.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolExecutionAttempt.kt index fd3dbb5..42fd644 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolExecutionAttempt.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolExecutionAttempt.kt @@ -1046,6 +1046,17 @@ private constructor( @JvmField val UPSTREAM_RUNTIME_UNMAPPED = of("UPSTREAM_RUNTIME_UNMAPPED") + @JvmField + val NETWORK_TRANSPORT_RUNTIME_TIMEOUT = of("NETWORK_TRANSPORT_RUNTIME_TIMEOUT") + + @JvmField + val NETWORK_TRANSPORT_RUNTIME_UNREACHABLE = + of("NETWORK_TRANSPORT_RUNTIME_UNREACHABLE") + + @JvmField + val NETWORK_TRANSPORT_RUNTIME_UNMAPPED = + of("NETWORK_TRANSPORT_RUNTIME_UNMAPPED") + @JvmField val UNKNOWN = of("UNKNOWN") @JvmStatic fun of(value: String) = Kind(JsonField.of(value)) @@ -1072,6 +1083,9 @@ private constructor( UPSTREAM_RUNTIME_RATE_LIMIT, UPSTREAM_RUNTIME_SERVER_ERROR, UPSTREAM_RUNTIME_UNMAPPED, + NETWORK_TRANSPORT_RUNTIME_TIMEOUT, + NETWORK_TRANSPORT_RUNTIME_UNREACHABLE, + NETWORK_TRANSPORT_RUNTIME_UNMAPPED, UNKNOWN, } @@ -1104,6 +1118,9 @@ private constructor( UPSTREAM_RUNTIME_RATE_LIMIT, UPSTREAM_RUNTIME_SERVER_ERROR, UPSTREAM_RUNTIME_UNMAPPED, + NETWORK_TRANSPORT_RUNTIME_TIMEOUT, + NETWORK_TRANSPORT_RUNTIME_UNREACHABLE, + NETWORK_TRANSPORT_RUNTIME_UNMAPPED, UNKNOWN, /** * An enum member indicating that [Kind] was instantiated with an unknown value. @@ -1139,6 +1156,11 @@ private constructor( UPSTREAM_RUNTIME_RATE_LIMIT -> Value.UPSTREAM_RUNTIME_RATE_LIMIT UPSTREAM_RUNTIME_SERVER_ERROR -> Value.UPSTREAM_RUNTIME_SERVER_ERROR UPSTREAM_RUNTIME_UNMAPPED -> Value.UPSTREAM_RUNTIME_UNMAPPED + NETWORK_TRANSPORT_RUNTIME_TIMEOUT -> Value.NETWORK_TRANSPORT_RUNTIME_TIMEOUT + NETWORK_TRANSPORT_RUNTIME_UNREACHABLE -> + Value.NETWORK_TRANSPORT_RUNTIME_UNREACHABLE + NETWORK_TRANSPORT_RUNTIME_UNMAPPED -> + Value.NETWORK_TRANSPORT_RUNTIME_UNMAPPED UNKNOWN -> Value.UNKNOWN else -> Value._UNKNOWN } @@ -1173,6 +1195,11 @@ private constructor( UPSTREAM_RUNTIME_RATE_LIMIT -> Known.UPSTREAM_RUNTIME_RATE_LIMIT UPSTREAM_RUNTIME_SERVER_ERROR -> Known.UPSTREAM_RUNTIME_SERVER_ERROR UPSTREAM_RUNTIME_UNMAPPED -> Known.UPSTREAM_RUNTIME_UNMAPPED + NETWORK_TRANSPORT_RUNTIME_TIMEOUT -> Known.NETWORK_TRANSPORT_RUNTIME_TIMEOUT + NETWORK_TRANSPORT_RUNTIME_UNREACHABLE -> + Known.NETWORK_TRANSPORT_RUNTIME_UNREACHABLE + NETWORK_TRANSPORT_RUNTIME_UNMAPPED -> + Known.NETWORK_TRANSPORT_RUNTIME_UNMAPPED UNKNOWN -> Known.UNKNOWN else -> throw ArcadeInvalidDataException("Unknown Kind: $value") } From bca6f993c4876c486640b25ca1d41ff45f299263 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 08:09:21 +0000 Subject: [PATCH 23/37] chore(tests): bump steady to v0.22.1 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 5cd7c15..feebe5e 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.20.2 -- steady --version + npm exec --package=@stdy/cli@0.22.1 -- steady --version - npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" + npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index 61c1163..7d7f08e 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.2 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.22.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}" echo exit 1 From ab408c56d083ce064e76c602b36e8a5c90c65a78 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 21:39:17 +0000 Subject: [PATCH 24/37] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d7172cb..c174a65 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-a509111298b23d3851de5439560c96b7d7831556094a790ba838cf11e9277ee7.yml -openapi_spec_hash: 0ad3aecc9853e08130587d8e4b1bb468 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-9b736411986351b871a8ea6cdf5254aeb6d340ed298afdaf282bb95242bf85d8.yml +openapi_spec_hash: 20cb0123c87291910407195611e70674 config_hash: 2d4163acdeacd75903f978cd79c35d14 From 0bea8047ba21c7991164fee281c5f23e3276a7ba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 17:08:43 +0000 Subject: [PATCH 25/37] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c174a65..9b7b32e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-9b736411986351b871a8ea6cdf5254aeb6d340ed298afdaf282bb95242bf85d8.yml -openapi_spec_hash: 20cb0123c87291910407195611e70674 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-f5fe6dab09f0766f1c01cec4951802c6a83945ce0c4cba226990134098508c2f.yml +openapi_spec_hash: 58067af4f7f7ffcb6bd3d85d8e1944d7 config_hash: 2d4163acdeacd75903f978cd79c35d14 From aa565048f02eb4a21657d4e51c4975376968b579 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 21:06:21 +0000 Subject: [PATCH 26/37] feat(api): api update --- .stats.yml | 2 +- .../AuthProviderUpdateRequest.kt | 1207 ++++++++++++++++- .../AuthProviderPatchParamsTest.kt | 132 ++ .../AuthProviderUpdateRequestTest.kt | 118 ++ .../admin/AuthProviderServiceAsyncTest.kt | 52 + .../blocking/admin/AuthProviderServiceTest.kt | 52 + 6 files changed, 1561 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9b7b32e..87ac9c3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-f5fe6dab09f0766f1c01cec4951802c6a83945ce0c4cba226990134098508c2f.yml -openapi_spec_hash: 58067af4f7f7ffcb6bd3d85d8e1944d7 +openapi_spec_hash: 2923fbda6c2899ade719d00540c34ff6 config_hash: 2d4163acdeacd75903f978cd79c35d14 diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderUpdateRequest.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderUpdateRequest.kt index 159520d..0a4ffff 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderUpdateRequest.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderUpdateRequest.kt @@ -309,6 +309,7 @@ private constructor( private val pkce: JsonField, private val refreshRequest: JsonField, private val scopeDelimiter: JsonField, + private val tokenIntrospectionRequest: JsonField, private val tokenRequest: JsonField, private val userInfoRequest: JsonField, private val additionalProperties: MutableMap, @@ -332,6 +333,9 @@ private constructor( @JsonProperty("scope_delimiter") @ExcludeMissing scopeDelimiter: JsonField = JsonMissing.of(), + @JsonProperty("token_introspection_request") + @ExcludeMissing + tokenIntrospectionRequest: JsonField = JsonMissing.of(), @JsonProperty("token_request") @ExcludeMissing tokenRequest: JsonField = JsonMissing.of(), @@ -345,6 +349,7 @@ private constructor( pkce, refreshRequest, scopeDelimiter, + tokenIntrospectionRequest, tokenRequest, userInfoRequest, mutableMapOf(), @@ -389,6 +394,13 @@ private constructor( fun scopeDelimiter(): Optional = scopeDelimiter.getOptional("scope_delimiter") + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun tokenIntrospectionRequest(): Optional = + tokenIntrospectionRequest.getOptional("token_introspection_request") + /** * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -456,6 +468,17 @@ private constructor( @ExcludeMissing fun _scopeDelimiter(): JsonField = scopeDelimiter + /** + * Returns the raw JSON value of [tokenIntrospectionRequest]. + * + * Unlike [tokenIntrospectionRequest], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("token_introspection_request") + @ExcludeMissing + fun _tokenIntrospectionRequest(): JsonField = + tokenIntrospectionRequest + /** * Returns the raw JSON value of [tokenRequest]. * @@ -503,6 +526,8 @@ private constructor( private var pkce: JsonField = JsonMissing.of() private var refreshRequest: JsonField = JsonMissing.of() private var scopeDelimiter: JsonField = JsonMissing.of() + private var tokenIntrospectionRequest: JsonField = + JsonMissing.of() private var tokenRequest: JsonField = JsonMissing.of() private var userInfoRequest: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -515,6 +540,7 @@ private constructor( pkce = oauth2.pkce refreshRequest = oauth2.refreshRequest scopeDelimiter = oauth2.scopeDelimiter + tokenIntrospectionRequest = oauth2.tokenIntrospectionRequest tokenRequest = oauth2.tokenRequest userInfoRequest = oauth2.userInfoRequest additionalProperties = oauth2.additionalProperties.toMutableMap() @@ -597,6 +623,20 @@ private constructor( this.scopeDelimiter = scopeDelimiter } + fun tokenIntrospectionRequest(tokenIntrospectionRequest: TokenIntrospectionRequest) = + tokenIntrospectionRequest(JsonField.of(tokenIntrospectionRequest)) + + /** + * Sets [Builder.tokenIntrospectionRequest] to an arbitrary JSON value. + * + * You should usually call [Builder.tokenIntrospectionRequest] with a well-typed + * [TokenIntrospectionRequest] value instead. This method is primarily for setting the + * field to an undocumented or not yet supported value. + */ + fun tokenIntrospectionRequest( + tokenIntrospectionRequest: JsonField + ) = apply { this.tokenIntrospectionRequest = tokenIntrospectionRequest } + fun tokenRequest(tokenRequest: TokenRequest) = tokenRequest(JsonField.of(tokenRequest)) /** @@ -656,6 +696,7 @@ private constructor( pkce, refreshRequest, scopeDelimiter, + tokenIntrospectionRequest, tokenRequest, userInfoRequest, additionalProperties.toMutableMap(), @@ -675,6 +716,7 @@ private constructor( pkce().ifPresent { it.validate() } refreshRequest().ifPresent { it.validate() } scopeDelimiter().ifPresent { it.validate() } + tokenIntrospectionRequest().ifPresent { it.validate() } tokenRequest().ifPresent { it.validate() } userInfoRequest().ifPresent { it.validate() } validated = true @@ -702,6 +744,7 @@ private constructor( (pkce.asKnown().getOrNull()?.validity() ?: 0) + (refreshRequest.asKnown().getOrNull()?.validity() ?: 0) + (scopeDelimiter.asKnown().getOrNull()?.validity() ?: 0) + + (tokenIntrospectionRequest.asKnown().getOrNull()?.validity() ?: 0) + (tokenRequest.asKnown().getOrNull()?.validity() ?: 0) + (userInfoRequest.asKnown().getOrNull()?.validity() ?: 0) @@ -2871,6 +2914,1166 @@ private constructor( override fun toString() = value.toString() } + class TokenIntrospectionRequest + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val authHeaderValueFormat: JsonField, + private val authMethod: JsonField, + private val endpoint: JsonField, + private val method: JsonField, + private val params: JsonField, + private val requestContentType: JsonField, + private val responseContentType: JsonField, + private val responseMap: JsonField, + private val triggers: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("auth_header_value_format") + @ExcludeMissing + authHeaderValueFormat: JsonField = JsonMissing.of(), + @JsonProperty("auth_method") + @ExcludeMissing + authMethod: JsonField = JsonMissing.of(), + @JsonProperty("endpoint") + @ExcludeMissing + endpoint: JsonField = JsonMissing.of(), + @JsonProperty("method") + @ExcludeMissing + method: JsonField = JsonMissing.of(), + @JsonProperty("params") + @ExcludeMissing + params: JsonField = JsonMissing.of(), + @JsonProperty("request_content_type") + @ExcludeMissing + requestContentType: JsonField = JsonMissing.of(), + @JsonProperty("response_content_type") + @ExcludeMissing + responseContentType: JsonField = JsonMissing.of(), + @JsonProperty("response_map") + @ExcludeMissing + responseMap: JsonField = JsonMissing.of(), + @JsonProperty("triggers") + @ExcludeMissing + triggers: JsonField = JsonMissing.of(), + ) : this( + authHeaderValueFormat, + authMethod, + endpoint, + method, + params, + requestContentType, + responseContentType, + responseMap, + triggers, + mutableMapOf(), + ) + + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun authHeaderValueFormat(): Optional = + authHeaderValueFormat.getOptional("auth_header_value_format") + + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun authMethod(): Optional = authMethod.getOptional("auth_method") + + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun endpoint(): Optional = endpoint.getOptional("endpoint") + + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun method(): Optional = method.getOptional("method") + + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun params(): Optional = params.getOptional("params") + + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun requestContentType(): Optional = + requestContentType.getOptional("request_content_type") + + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun responseContentType(): Optional = + responseContentType.getOptional("response_content_type") + + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun responseMap(): Optional = responseMap.getOptional("response_map") + + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun triggers(): Optional = triggers.getOptional("triggers") + + /** + * Returns the raw JSON value of [authHeaderValueFormat]. + * + * Unlike [authHeaderValueFormat], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("auth_header_value_format") + @ExcludeMissing + fun _authHeaderValueFormat(): JsonField = authHeaderValueFormat + + /** + * Returns the raw JSON value of [authMethod]. + * + * Unlike [authMethod], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("auth_method") + @ExcludeMissing + fun _authMethod(): JsonField = authMethod + + /** + * Returns the raw JSON value of [endpoint]. + * + * Unlike [endpoint], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("endpoint") @ExcludeMissing fun _endpoint(): JsonField = endpoint + + /** + * Returns the raw JSON value of [method]. + * + * Unlike [method], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("method") @ExcludeMissing fun _method(): JsonField = method + + /** + * Returns the raw JSON value of [params]. + * + * Unlike [params], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("params") @ExcludeMissing fun _params(): JsonField = params + + /** + * Returns the raw JSON value of [requestContentType]. + * + * Unlike [requestContentType], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("request_content_type") + @ExcludeMissing + fun _requestContentType(): JsonField = requestContentType + + /** + * Returns the raw JSON value of [responseContentType]. + * + * Unlike [responseContentType], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("response_content_type") + @ExcludeMissing + fun _responseContentType(): JsonField = responseContentType + + /** + * Returns the raw JSON value of [responseMap]. + * + * Unlike [responseMap], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("response_map") + @ExcludeMissing + fun _responseMap(): JsonField = responseMap + + /** + * Returns the raw JSON value of [triggers]. + * + * Unlike [triggers], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("triggers") + @ExcludeMissing + fun _triggers(): JsonField = triggers + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of + * [TokenIntrospectionRequest]. + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [TokenIntrospectionRequest]. */ + class Builder internal constructor() { + + private var authHeaderValueFormat: JsonField = JsonMissing.of() + private var authMethod: JsonField = JsonMissing.of() + private var endpoint: JsonField = JsonMissing.of() + private var method: JsonField = JsonMissing.of() + private var params: JsonField = JsonMissing.of() + private var requestContentType: JsonField = JsonMissing.of() + private var responseContentType: JsonField = JsonMissing.of() + private var responseMap: JsonField = JsonMissing.of() + private var triggers: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(tokenIntrospectionRequest: TokenIntrospectionRequest) = apply { + authHeaderValueFormat = tokenIntrospectionRequest.authHeaderValueFormat + authMethod = tokenIntrospectionRequest.authMethod + endpoint = tokenIntrospectionRequest.endpoint + method = tokenIntrospectionRequest.method + params = tokenIntrospectionRequest.params + requestContentType = tokenIntrospectionRequest.requestContentType + responseContentType = tokenIntrospectionRequest.responseContentType + responseMap = tokenIntrospectionRequest.responseMap + triggers = tokenIntrospectionRequest.triggers + additionalProperties = + tokenIntrospectionRequest.additionalProperties.toMutableMap() + } + + fun authHeaderValueFormat(authHeaderValueFormat: String) = + authHeaderValueFormat(JsonField.of(authHeaderValueFormat)) + + /** + * Sets [Builder.authHeaderValueFormat] to an arbitrary JSON value. + * + * You should usually call [Builder.authHeaderValueFormat] with a well-typed + * [String] value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun authHeaderValueFormat(authHeaderValueFormat: JsonField) = apply { + this.authHeaderValueFormat = authHeaderValueFormat + } + + fun authMethod(authMethod: String) = authMethod(JsonField.of(authMethod)) + + /** + * Sets [Builder.authMethod] to an arbitrary JSON value. + * + * You should usually call [Builder.authMethod] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun authMethod(authMethod: JsonField) = apply { + this.authMethod = authMethod + } + + fun endpoint(endpoint: String) = endpoint(JsonField.of(endpoint)) + + /** + * Sets [Builder.endpoint] to an arbitrary JSON value. + * + * You should usually call [Builder.endpoint] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun endpoint(endpoint: JsonField) = apply { this.endpoint = endpoint } + + fun method(method: String) = method(JsonField.of(method)) + + /** + * Sets [Builder.method] to an arbitrary JSON value. + * + * You should usually call [Builder.method] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun method(method: JsonField) = apply { this.method = method } + + fun params(params: Params) = params(JsonField.of(params)) + + /** + * Sets [Builder.params] to an arbitrary JSON value. + * + * You should usually call [Builder.params] with a well-typed [Params] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun params(params: JsonField) = apply { this.params = params } + + fun requestContentType(requestContentType: RequestContentType) = + requestContentType(JsonField.of(requestContentType)) + + /** + * Sets [Builder.requestContentType] to an arbitrary JSON value. + * + * You should usually call [Builder.requestContentType] with a well-typed + * [RequestContentType] value instead. This method is primarily for setting the + * field to an undocumented or not yet supported value. + */ + fun requestContentType(requestContentType: JsonField) = apply { + this.requestContentType = requestContentType + } + + fun responseContentType(responseContentType: ResponseContentType) = + responseContentType(JsonField.of(responseContentType)) + + /** + * Sets [Builder.responseContentType] to an arbitrary JSON value. + * + * You should usually call [Builder.responseContentType] with a well-typed + * [ResponseContentType] value instead. This method is primarily for setting the + * field to an undocumented or not yet supported value. + */ + fun responseContentType(responseContentType: JsonField) = + apply { + this.responseContentType = responseContentType + } + + fun responseMap(responseMap: ResponseMap) = responseMap(JsonField.of(responseMap)) + + /** + * Sets [Builder.responseMap] to an arbitrary JSON value. + * + * You should usually call [Builder.responseMap] with a well-typed [ResponseMap] + * value instead. This method is primarily for setting the field to an undocumented + * or not yet supported value. + */ + fun responseMap(responseMap: JsonField) = apply { + this.responseMap = responseMap + } + + fun triggers(triggers: Triggers) = triggers(JsonField.of(triggers)) + + /** + * Sets [Builder.triggers] to an arbitrary JSON value. + * + * You should usually call [Builder.triggers] with a well-typed [Triggers] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun triggers(triggers: JsonField) = apply { this.triggers = triggers } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [TokenIntrospectionRequest]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): TokenIntrospectionRequest = + TokenIntrospectionRequest( + authHeaderValueFormat, + authMethod, + endpoint, + method, + params, + requestContentType, + responseContentType, + responseMap, + triggers, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): TokenIntrospectionRequest = apply { + if (validated) { + return@apply + } + + authHeaderValueFormat() + authMethod() + endpoint() + method() + params().ifPresent { it.validate() } + requestContentType().ifPresent { it.validate() } + responseContentType().ifPresent { it.validate() } + responseMap().ifPresent { it.validate() } + triggers().ifPresent { it.validate() } + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: ArcadeInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (authHeaderValueFormat.asKnown().isPresent) 1 else 0) + + (if (authMethod.asKnown().isPresent) 1 else 0) + + (if (endpoint.asKnown().isPresent) 1 else 0) + + (if (method.asKnown().isPresent) 1 else 0) + + (params.asKnown().getOrNull()?.validity() ?: 0) + + (requestContentType.asKnown().getOrNull()?.validity() ?: 0) + + (responseContentType.asKnown().getOrNull()?.validity() ?: 0) + + (responseMap.asKnown().getOrNull()?.validity() ?: 0) + + (triggers.asKnown().getOrNull()?.validity() ?: 0) + + class Params + @JsonCreator + private constructor( + @com.fasterxml.jackson.annotation.JsonValue + private val additionalProperties: Map + ) { + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = additionalProperties + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Params]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Params]. */ + class Builder internal constructor() { + + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(params: Params) = apply { + additionalProperties = params.additionalProperties.toMutableMap() + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Params]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Params = Params(additionalProperties.toImmutable()) + } + + private var validated: Boolean = false + + fun validate(): Params = apply { + if (validated) { + return@apply + } + + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: ArcadeInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + additionalProperties.count { (_, value) -> + !value.isNull() && !value.isMissing() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Params && additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = "Params{additionalProperties=$additionalProperties}" + } + + class RequestContentType + @JsonCreator + private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField + val APPLICATION_X_WWW_FORM_URLENCODED = of("application/x-www-form-urlencoded") + + @JvmField val APPLICATION_JSON = of("application/json") + + @JvmStatic fun of(value: String) = RequestContentType(JsonField.of(value)) + } + + /** An enum containing [RequestContentType]'s known values. */ + enum class Known { + APPLICATION_X_WWW_FORM_URLENCODED, + APPLICATION_JSON, + } + + /** + * An enum containing [RequestContentType]'s known values, as well as an [_UNKNOWN] + * member. + * + * An instance of [RequestContentType] can contain an unknown value in a couple of + * cases: + * - It was deserialized from data that doesn't match any known member. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + APPLICATION_X_WWW_FORM_URLENCODED, + APPLICATION_JSON, + /** + * An enum member indicating that [RequestContentType] was instantiated with an + * unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if + * you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + APPLICATION_X_WWW_FORM_URLENCODED -> Value.APPLICATION_X_WWW_FORM_URLENCODED + APPLICATION_JSON -> Value.APPLICATION_JSON + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws ArcadeInvalidDataException if this class instance's value is a not a + * known member. + */ + fun known(): Known = + when (this) { + APPLICATION_X_WWW_FORM_URLENCODED -> Known.APPLICATION_X_WWW_FORM_URLENCODED + APPLICATION_JSON -> Known.APPLICATION_JSON + else -> + throw ArcadeInvalidDataException("Unknown RequestContentType: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws ArcadeInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + ArcadeInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): RequestContentType = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: ArcadeInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is RequestContentType && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + class ResponseContentType + @JsonCreator + private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that + * doesn't match any known member, and you want to know that value. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField + val APPLICATION_X_WWW_FORM_URLENCODED = of("application/x-www-form-urlencoded") + + @JvmField val APPLICATION_JSON = of("application/json") + + @JvmStatic fun of(value: String) = ResponseContentType(JsonField.of(value)) + } + + /** An enum containing [ResponseContentType]'s known values. */ + enum class Known { + APPLICATION_X_WWW_FORM_URLENCODED, + APPLICATION_JSON, + } + + /** + * An enum containing [ResponseContentType]'s known values, as well as an [_UNKNOWN] + * member. + * + * An instance of [ResponseContentType] can contain an unknown value in a couple of + * cases: + * - It was deserialized from data that doesn't match any known member. For example, + * if the SDK is on an older version than the API, then the API may respond with + * new members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + APPLICATION_X_WWW_FORM_URLENCODED, + APPLICATION_JSON, + /** + * An enum member indicating that [ResponseContentType] was instantiated with an + * unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if + * you want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + APPLICATION_X_WWW_FORM_URLENCODED -> Value.APPLICATION_X_WWW_FORM_URLENCODED + APPLICATION_JSON -> Value.APPLICATION_JSON + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws ArcadeInvalidDataException if this class instance's value is a not a + * known member. + */ + fun known(): Known = + when (this) { + APPLICATION_X_WWW_FORM_URLENCODED -> Known.APPLICATION_X_WWW_FORM_URLENCODED + APPLICATION_JSON -> Known.APPLICATION_JSON + else -> + throw ArcadeInvalidDataException("Unknown ResponseContentType: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws ArcadeInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + ArcadeInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): ResponseContentType = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: ArcadeInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is ResponseContentType && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + class ResponseMap + @JsonCreator + private constructor( + @com.fasterxml.jackson.annotation.JsonValue + private val additionalProperties: Map + ) { + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = additionalProperties + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [ResponseMap]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [ResponseMap]. */ + class Builder internal constructor() { + + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(responseMap: ResponseMap) = apply { + additionalProperties = responseMap.additionalProperties.toMutableMap() + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [ResponseMap]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): ResponseMap = ResponseMap(additionalProperties.toImmutable()) + } + + private var validated: Boolean = false + + fun validate(): ResponseMap = apply { + if (validated) { + return@apply + } + + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: ArcadeInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + additionalProperties.count { (_, value) -> + !value.isNull() && !value.isMissing() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is ResponseMap && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = "ResponseMap{additionalProperties=$additionalProperties}" + } + + class Triggers + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val onTokenGrant: JsonField, + private val onTokenRefresh: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("on_token_grant") + @ExcludeMissing + onTokenGrant: JsonField = JsonMissing.of(), + @JsonProperty("on_token_refresh") + @ExcludeMissing + onTokenRefresh: JsonField = JsonMissing.of(), + ) : this(onTokenGrant, onTokenRefresh, mutableMapOf()) + + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun onTokenGrant(): Optional = onTokenGrant.getOptional("on_token_grant") + + /** + * @throws ArcadeInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun onTokenRefresh(): Optional = + onTokenRefresh.getOptional("on_token_refresh") + + /** + * Returns the raw JSON value of [onTokenGrant]. + * + * Unlike [onTokenGrant], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("on_token_grant") + @ExcludeMissing + fun _onTokenGrant(): JsonField = onTokenGrant + + /** + * Returns the raw JSON value of [onTokenRefresh]. + * + * Unlike [onTokenRefresh], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("on_token_refresh") + @ExcludeMissing + fun _onTokenRefresh(): JsonField = onTokenRefresh + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Triggers]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Triggers]. */ + class Builder internal constructor() { + + private var onTokenGrant: JsonField = JsonMissing.of() + private var onTokenRefresh: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(triggers: Triggers) = apply { + onTokenGrant = triggers.onTokenGrant + onTokenRefresh = triggers.onTokenRefresh + additionalProperties = triggers.additionalProperties.toMutableMap() + } + + fun onTokenGrant(onTokenGrant: Boolean) = + onTokenGrant(JsonField.of(onTokenGrant)) + + /** + * Sets [Builder.onTokenGrant] to an arbitrary JSON value. + * + * You should usually call [Builder.onTokenGrant] with a well-typed [Boolean] + * value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun onTokenGrant(onTokenGrant: JsonField) = apply { + this.onTokenGrant = onTokenGrant + } + + fun onTokenRefresh(onTokenRefresh: Boolean) = + onTokenRefresh(JsonField.of(onTokenRefresh)) + + /** + * Sets [Builder.onTokenRefresh] to an arbitrary JSON value. + * + * You should usually call [Builder.onTokenRefresh] with a well-typed [Boolean] + * value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun onTokenRefresh(onTokenRefresh: JsonField) = apply { + this.onTokenRefresh = onTokenRefresh + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Triggers]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Triggers = + Triggers(onTokenGrant, onTokenRefresh, additionalProperties.toMutableMap()) + } + + private var validated: Boolean = false + + fun validate(): Triggers = apply { + if (validated) { + return@apply + } + + onTokenGrant() + onTokenRefresh() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: ArcadeInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (onTokenGrant.asKnown().isPresent) 1 else 0) + + (if (onTokenRefresh.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Triggers && + onTokenGrant == other.onTokenGrant && + onTokenRefresh == other.onTokenRefresh && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(onTokenGrant, onTokenRefresh, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Triggers{onTokenGrant=$onTokenGrant, onTokenRefresh=$onTokenRefresh, additionalProperties=$additionalProperties}" + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is TokenIntrospectionRequest && + authHeaderValueFormat == other.authHeaderValueFormat && + authMethod == other.authMethod && + endpoint == other.endpoint && + method == other.method && + params == other.params && + requestContentType == other.requestContentType && + responseContentType == other.responseContentType && + responseMap == other.responseMap && + triggers == other.triggers && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash( + authHeaderValueFormat, + authMethod, + endpoint, + method, + params, + requestContentType, + responseContentType, + responseMap, + triggers, + additionalProperties, + ) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "TokenIntrospectionRequest{authHeaderValueFormat=$authHeaderValueFormat, authMethod=$authMethod, endpoint=$endpoint, method=$method, params=$params, requestContentType=$requestContentType, responseContentType=$responseContentType, responseMap=$responseMap, triggers=$triggers, additionalProperties=$additionalProperties}" + } + class TokenRequest @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( @@ -4962,6 +6165,7 @@ private constructor( pkce == other.pkce && refreshRequest == other.refreshRequest && scopeDelimiter == other.scopeDelimiter && + tokenIntrospectionRequest == other.tokenIntrospectionRequest && tokenRequest == other.tokenRequest && userInfoRequest == other.userInfoRequest && additionalProperties == other.additionalProperties @@ -4975,6 +6179,7 @@ private constructor( pkce, refreshRequest, scopeDelimiter, + tokenIntrospectionRequest, tokenRequest, userInfoRequest, additionalProperties, @@ -4984,7 +6189,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "Oauth2{authorizeRequest=$authorizeRequest, clientId=$clientId, clientSecret=$clientSecret, pkce=$pkce, refreshRequest=$refreshRequest, scopeDelimiter=$scopeDelimiter, tokenRequest=$tokenRequest, userInfoRequest=$userInfoRequest, additionalProperties=$additionalProperties}" + "Oauth2{authorizeRequest=$authorizeRequest, clientId=$clientId, clientSecret=$clientSecret, pkce=$pkce, refreshRequest=$refreshRequest, scopeDelimiter=$scopeDelimiter, tokenIntrospectionRequest=$tokenIntrospectionRequest, tokenRequest=$tokenRequest, userInfoRequest=$userInfoRequest, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/arcade-java-core/src/test/kotlin/dev/arcade/models/admin/authproviders/AuthProviderPatchParamsTest.kt b/arcade-java-core/src/test/kotlin/dev/arcade/models/admin/authproviders/AuthProviderPatchParamsTest.kt index 6e659de..b0d2dab 100644 --- a/arcade-java-core/src/test/kotlin/dev/arcade/models/admin/authproviders/AuthProviderPatchParamsTest.kt +++ b/arcade-java-core/src/test/kotlin/dev/arcade/models/admin/authproviders/AuthProviderPatchParamsTest.kt @@ -90,6 +90,46 @@ internal class AuthProviderPatchParamsTest { .scopeDelimiter( AuthProviderUpdateRequest.Oauth2.ScopeDelimiter.Unknown2 ) + .tokenIntrospectionRequest( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest.builder() + .authHeaderValueFormat("auth_header_value_format") + .authMethod("auth_method") + .endpoint("endpoint") + .method("method") + .params( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .Params + .builder() + .putAdditionalProperty("foo", JsonValue.from("string")) + .build() + ) + .requestContentType( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .RequestContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseContentType( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .ResponseContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseMap( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .ResponseMap + .builder() + .putAdditionalProperty("foo", JsonValue.from("string")) + .build() + ) + .triggers( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .Triggers + .builder() + .onTokenGrant(true) + .onTokenRefresh(true) + .build() + ) + .build() + ) .tokenRequest( AuthProviderUpdateRequest.Oauth2.TokenRequest.builder() .authHeaderValueFormat("auth_header_value_format") @@ -276,6 +316,58 @@ internal class AuthProviderPatchParamsTest { .scopeDelimiter( AuthProviderUpdateRequest.Oauth2.ScopeDelimiter.Unknown2 ) + .tokenIntrospectionRequest( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .builder() + .authHeaderValueFormat("auth_header_value_format") + .authMethod("auth_method") + .endpoint("endpoint") + .method("method") + .params( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .Params + .builder() + .putAdditionalProperty( + "foo", + JsonValue.from("string"), + ) + .build() + ) + .requestContentType( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .RequestContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseContentType( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .ResponseContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseMap( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .ResponseMap + .builder() + .putAdditionalProperty( + "foo", + JsonValue.from("string"), + ) + .build() + ) + .triggers( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .Triggers + .builder() + .onTokenGrant(true) + .onTokenRefresh(true) + .build() + ) + .build() + ) .tokenRequest( AuthProviderUpdateRequest.Oauth2.TokenRequest.builder() .authHeaderValueFormat("auth_header_value_format") @@ -448,6 +540,46 @@ internal class AuthProviderPatchParamsTest { .scopeDelimiter( AuthProviderUpdateRequest.Oauth2.ScopeDelimiter.Unknown2 ) + .tokenIntrospectionRequest( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest.builder() + .authHeaderValueFormat("auth_header_value_format") + .authMethod("auth_method") + .endpoint("endpoint") + .method("method") + .params( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .Params + .builder() + .putAdditionalProperty("foo", JsonValue.from("string")) + .build() + ) + .requestContentType( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .RequestContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseContentType( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .ResponseContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseMap( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .ResponseMap + .builder() + .putAdditionalProperty("foo", JsonValue.from("string")) + .build() + ) + .triggers( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .Triggers + .builder() + .onTokenGrant(true) + .onTokenRefresh(true) + .build() + ) + .build() + ) .tokenRequest( AuthProviderUpdateRequest.Oauth2.TokenRequest.builder() .authHeaderValueFormat("auth_header_value_format") diff --git a/arcade-java-core/src/test/kotlin/dev/arcade/models/admin/authproviders/AuthProviderUpdateRequestTest.kt b/arcade-java-core/src/test/kotlin/dev/arcade/models/admin/authproviders/AuthProviderUpdateRequestTest.kt index c551713..b07bc1d 100644 --- a/arcade-java-core/src/test/kotlin/dev/arcade/models/admin/authproviders/AuthProviderUpdateRequestTest.kt +++ b/arcade-java-core/src/test/kotlin/dev/arcade/models/admin/authproviders/AuthProviderUpdateRequestTest.kt @@ -86,6 +86,46 @@ internal class AuthProviderUpdateRequestTest { .build() ) .scopeDelimiter(AuthProviderUpdateRequest.Oauth2.ScopeDelimiter.Unknown2) + .tokenIntrospectionRequest( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest.builder() + .authHeaderValueFormat("auth_header_value_format") + .authMethod("auth_method") + .endpoint("endpoint") + .method("method") + .params( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .Params + .builder() + .putAdditionalProperty("foo", JsonValue.from("string")) + .build() + ) + .requestContentType( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .RequestContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseContentType( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .ResponseContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseMap( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .ResponseMap + .builder() + .putAdditionalProperty("foo", JsonValue.from("string")) + .build() + ) + .triggers( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .Triggers + .builder() + .onTokenGrant(true) + .onTokenRefresh(true) + .build() + ) + .build() + ) .tokenRequest( AuthProviderUpdateRequest.Oauth2.TokenRequest.builder() .authHeaderValueFormat("auth_header_value_format") @@ -227,6 +267,44 @@ internal class AuthProviderUpdateRequestTest { .build() ) .scopeDelimiter(AuthProviderUpdateRequest.Oauth2.ScopeDelimiter.Unknown2) + .tokenIntrospectionRequest( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest.builder() + .authHeaderValueFormat("auth_header_value_format") + .authMethod("auth_method") + .endpoint("endpoint") + .method("method") + .params( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest.Params + .builder() + .putAdditionalProperty("foo", JsonValue.from("string")) + .build() + ) + .requestContentType( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .RequestContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseContentType( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .ResponseContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseMap( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .ResponseMap + .builder() + .putAdditionalProperty("foo", JsonValue.from("string")) + .build() + ) + .triggers( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest.Triggers + .builder() + .onTokenGrant(true) + .onTokenRefresh(true) + .build() + ) + .build() + ) .tokenRequest( AuthProviderUpdateRequest.Oauth2.TokenRequest.builder() .authHeaderValueFormat("auth_header_value_format") @@ -370,6 +448,46 @@ internal class AuthProviderUpdateRequestTest { .build() ) .scopeDelimiter(AuthProviderUpdateRequest.Oauth2.ScopeDelimiter.Unknown2) + .tokenIntrospectionRequest( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest.builder() + .authHeaderValueFormat("auth_header_value_format") + .authMethod("auth_method") + .endpoint("endpoint") + .method("method") + .params( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .Params + .builder() + .putAdditionalProperty("foo", JsonValue.from("string")) + .build() + ) + .requestContentType( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .RequestContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseContentType( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .ResponseContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseMap( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .ResponseMap + .builder() + .putAdditionalProperty("foo", JsonValue.from("string")) + .build() + ) + .triggers( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .Triggers + .builder() + .onTokenGrant(true) + .onTokenRefresh(true) + .build() + ) + .build() + ) .tokenRequest( AuthProviderUpdateRequest.Oauth2.TokenRequest.builder() .authHeaderValueFormat("auth_header_value_format") diff --git a/arcade-java-core/src/test/kotlin/dev/arcade/services/async/admin/AuthProviderServiceAsyncTest.kt b/arcade-java-core/src/test/kotlin/dev/arcade/services/async/admin/AuthProviderServiceAsyncTest.kt index 04a3bb6..6c53381 100644 --- a/arcade-java-core/src/test/kotlin/dev/arcade/services/async/admin/AuthProviderServiceAsyncTest.kt +++ b/arcade-java-core/src/test/kotlin/dev/arcade/services/async/admin/AuthProviderServiceAsyncTest.kt @@ -373,6 +373,58 @@ internal class AuthProviderServiceAsyncTest { .scopeDelimiter( AuthProviderUpdateRequest.Oauth2.ScopeDelimiter.Unknown2 ) + .tokenIntrospectionRequest( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .builder() + .authHeaderValueFormat("auth_header_value_format") + .authMethod("auth_method") + .endpoint("endpoint") + .method("method") + .params( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .Params + .builder() + .putAdditionalProperty( + "foo", + JsonValue.from("string"), + ) + .build() + ) + .requestContentType( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .RequestContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseContentType( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .ResponseContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseMap( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .ResponseMap + .builder() + .putAdditionalProperty( + "foo", + JsonValue.from("string"), + ) + .build() + ) + .triggers( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .Triggers + .builder() + .onTokenGrant(true) + .onTokenRefresh(true) + .build() + ) + .build() + ) .tokenRequest( AuthProviderUpdateRequest.Oauth2.TokenRequest.builder() .authHeaderValueFormat("auth_header_value_format") diff --git a/arcade-java-core/src/test/kotlin/dev/arcade/services/blocking/admin/AuthProviderServiceTest.kt b/arcade-java-core/src/test/kotlin/dev/arcade/services/blocking/admin/AuthProviderServiceTest.kt index dcfea65..aa06f1e 100644 --- a/arcade-java-core/src/test/kotlin/dev/arcade/services/blocking/admin/AuthProviderServiceTest.kt +++ b/arcade-java-core/src/test/kotlin/dev/arcade/services/blocking/admin/AuthProviderServiceTest.kt @@ -369,6 +369,58 @@ internal class AuthProviderServiceTest { .scopeDelimiter( AuthProviderUpdateRequest.Oauth2.ScopeDelimiter.Unknown2 ) + .tokenIntrospectionRequest( + AuthProviderUpdateRequest.Oauth2.TokenIntrospectionRequest + .builder() + .authHeaderValueFormat("auth_header_value_format") + .authMethod("auth_method") + .endpoint("endpoint") + .method("method") + .params( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .Params + .builder() + .putAdditionalProperty( + "foo", + JsonValue.from("string"), + ) + .build() + ) + .requestContentType( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .RequestContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseContentType( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .ResponseContentType + .APPLICATION_X_WWW_FORM_URLENCODED + ) + .responseMap( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .ResponseMap + .builder() + .putAdditionalProperty( + "foo", + JsonValue.from("string"), + ) + .build() + ) + .triggers( + AuthProviderUpdateRequest.Oauth2 + .TokenIntrospectionRequest + .Triggers + .builder() + .onTokenGrant(true) + .onTokenRefresh(true) + .build() + ) + .build() + ) .tokenRequest( AuthProviderUpdateRequest.Oauth2.TokenRequest.builder() .authHeaderValueFormat("auth_header_value_format") From 219088d6cdc541d7ae57d36a438f2e6b8894f106 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 04:19:52 +0000 Subject: [PATCH 27/37] feat: support setting headers via env --- .../src/main/kotlin/dev/arcade/core/ClientOptions.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/core/ClientOptions.kt b/arcade-java-core/src/main/kotlin/dev/arcade/core/ClientOptions.kt index 4daef8f..40f36d7 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/core/ClientOptions.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/core/ClientOptions.kt @@ -405,6 +405,14 @@ private constructor( (System.getProperty("arcade.apiKey") ?: System.getenv("ARCADE_API_KEY"))?.let { apiKey(it) } + System.getenv("ARCADE_CUSTOM_HEADERS")?.let { customHeadersEnv -> + for (line in customHeadersEnv.split("\n")) { + val colon = line.indexOf(':') + if (colon >= 0) { + putHeader(line.substring(0, colon).trim(), line.substring(colon + 1).trim()) + } + } + } } /** From 9c2be786170807df261ac1aa350cf260f82c00d7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 19:23:20 +0000 Subject: [PATCH 28/37] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 87ac9c3..eb89a25 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-f5fe6dab09f0766f1c01cec4951802c6a83945ce0c4cba226990134098508c2f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-26a717927e892f445524d54e015a9e6353e4c1d66d2a724a3d153f295ea71037.yml openapi_spec_hash: 2923fbda6c2899ade719d00540c34ff6 config_hash: 2d4163acdeacd75903f978cd79c35d14 From 317c328ecaf054e2fbdea4b6dbfb3a1451bb5070 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 07:04:46 +0000 Subject: [PATCH 29/37] chore(internal): codegen related update --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index e1b0ef4..6e61ac9 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ import dev.arcade.client.ArcadeClient; import dev.arcade.client.okhttp.ArcadeOkHttpClient; import dev.arcade.models.tools.ExecuteToolRequest; import dev.arcade.models.tools.ExecuteToolResponse; -import dev.arcade.models.tools.ToolExecuteParams; // Configures using the `arcade.apiKey` and `arcade.baseUrl` system properties // Or configures using the `ARCADE_API_KEY` and `ARCADE_BASE_URL` environment variables @@ -186,7 +185,6 @@ import dev.arcade.client.ArcadeClient; import dev.arcade.client.okhttp.ArcadeOkHttpClient; import dev.arcade.models.tools.ExecuteToolRequest; import dev.arcade.models.tools.ExecuteToolResponse; -import dev.arcade.models.tools.ToolExecuteParams; import java.util.concurrent.CompletableFuture; // Configures using the `arcade.apiKey` and `arcade.baseUrl` system properties @@ -206,7 +204,6 @@ import dev.arcade.client.ArcadeClientAsync; import dev.arcade.client.okhttp.ArcadeOkHttpClientAsync; import dev.arcade.models.tools.ExecuteToolRequest; import dev.arcade.models.tools.ExecuteToolResponse; -import dev.arcade.models.tools.ToolExecuteParams; import java.util.concurrent.CompletableFuture; // Configures using the `arcade.apiKey` and `arcade.baseUrl` system properties @@ -232,7 +229,6 @@ import dev.arcade.core.http.Headers; import dev.arcade.core.http.HttpResponseFor; import dev.arcade.models.chat.ChatRequest; import dev.arcade.models.chat.ChatResponse; -import dev.arcade.models.chat.completions.CompletionCreateParams; ChatRequest params = ChatRequest.builder().build(); HttpResponseFor chatResponse = client.chat().completions().withRawResponse().create(params); From 17956dff7b21fd6d015644c70ee1f1c5859393f4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 06:20:38 +0000 Subject: [PATCH 30/37] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index eb89a25..c4ecfc9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-26a717927e892f445524d54e015a9e6353e4c1d66d2a724a3d153f295ea71037.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai/arcade-engine-26a717927e892f445524d54e015a9e6353e4c1d66d2a724a3d153f295ea71037.yml openapi_spec_hash: 2923fbda6c2899ade719d00540c34ff6 config_hash: 2d4163acdeacd75903f978cd79c35d14 From 8396fddd62b922fd3354928198f1e0b8ef26109f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 05:03:02 +0000 Subject: [PATCH 31/37] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c4ecfc9..f413d4c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai/arcade-engine-26a717927e892f445524d54e015a9e6353e4c1d66d2a724a3d153f295ea71037.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai/arcade-engine-22ce2a59bb1f308059c59ed19600698c5562a62c75f15c85429d186e9d8bdde6.yml openapi_spec_hash: 2923fbda6c2899ade719d00540c34ff6 config_hash: 2d4163acdeacd75903f978cd79c35d14 From 00533674a82a9ec0815ef3d6cb12390927aa9cd2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 05:41:47 +0000 Subject: [PATCH 32/37] docs: clarify forwards compat behavior --- README.md | 4 +- .../client/okhttp/ArcadeOkHttpClient.kt | 3 + .../client/okhttp/ArcadeOkHttpClientAsync.kt | 3 + .../kotlin/dev/arcade/core/ClientOptions.kt | 6 + .../kotlin/dev/arcade/core/RequestOptions.kt | 9 + .../dev/arcade/models/AuthorizationContext.kt | 17 + .../arcade/models/AuthorizationResponse.kt | 17 + .../main/kotlin/dev/arcade/models/Error.kt | 8 + .../AuthProviderCreateRequest.kt | 307 ++++++++++++++++++ .../authproviders/AuthProviderListResponse.kt | 8 + .../authproviders/AuthProviderResponse.kt | 236 ++++++++++++++ .../AuthProviderUpdateRequest.kt | 307 ++++++++++++++++++ .../admin/secrets/SecretCreateParams.kt | 9 + .../admin/secrets/SecretListResponse.kt | 8 + .../models/admin/secrets/SecretResponse.kt | 27 ++ .../UserConnectionListPageResponse.kt | 8 + .../userconnections/UserConnectionResponse.kt | 8 + .../dev/arcade/models/auth/AuthRequest.kt | 27 ++ .../arcade/models/auth/ConfirmUserRequest.kt | 8 + .../arcade/models/auth/ConfirmUserResponse.kt | 8 + .../dev/arcade/models/chat/ChatMessage.kt | 37 +++ .../dev/arcade/models/chat/ChatRequest.kt | 45 +++ .../dev/arcade/models/chat/ChatResponse.kt | 8 + .../kotlin/dev/arcade/models/chat/Choice.kt | 8 + .../kotlin/dev/arcade/models/chat/Usage.kt | 8 + .../dev/arcade/models/health/HealthSchema.kt | 8 + .../models/tools/AuthorizeToolRequest.kt | 8 + .../arcade/models/tools/ExecuteToolRequest.kt | 17 + .../models/tools/ExecuteToolResponse.kt | 57 ++++ .../dev/arcade/models/tools/ToolDefinition.kt | 152 +++++++++ .../dev/arcade/models/tools/ToolExecution.kt | 8 + .../models/tools/ToolExecutionAttempt.kt | 57 ++++ .../dev/arcade/models/tools/ToolGetParams.kt | 9 + .../models/tools/ToolListPageResponse.kt | 8 + .../dev/arcade/models/tools/ToolListParams.kt | 9 + .../dev/arcade/models/tools/ValueSchema.kt | 8 + .../tools/formatted/FormattedGetResponse.kt | 8 + .../formatted/FormattedListPageResponse.kt | 8 + .../tools/formatted/FormattedListResponse.kt | 8 + .../tools/scheduled/ScheduledGetResponse.kt | 17 + .../scheduled/ScheduledListPageResponse.kt | 8 + .../models/workers/CreateWorkerRequest.kt | 56 ++++ .../models/workers/UpdateWorkerRequest.kt | 56 ++++ .../models/workers/WorkerHealthResponse.kt | 8 + .../models/workers/WorkerListPageResponse.kt | 8 + .../arcade/models/workers/WorkerResponse.kt | 153 +++++++++ .../models/workers/WorkerToolsPageResponse.kt | 8 + 47 files changed, 1812 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e61ac9..779619a 100644 --- a/README.md +++ b/README.md @@ -706,7 +706,9 @@ In rare cases, the API may return a response that doesn't match the expected typ By default, the SDK will not throw an exception in this case. It will throw [`ArcadeInvalidDataException`](arcade-java-core/src/main/kotlin/dev/arcade/errors/ArcadeInvalidDataException.kt) only if you directly access the property. -If you would prefer to check that the response is completely well-typed upfront, then either call `validate()`: +Validating the response is _not_ forwards compatible with new types from the API for existing fields. + +If you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`: ```java import dev.arcade.models.tools.ExecuteToolResponse; diff --git a/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClient.kt b/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClient.kt index df8b6ec..db14a9f 100644 --- a/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClient.kt +++ b/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClient.kt @@ -230,6 +230,9 @@ class ArcadeOkHttpClient private constructor() { /** * Whether to call `validate` on every response before returning it. * + * Setting this to `true` is _not_ forwards compatible with new types from the API for + * existing fields. + * * Defaults to false, which means the shape of the response will not be validated upfront. * Instead, validation will only occur for the parts of the response that are accessed. */ diff --git a/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClientAsync.kt b/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClientAsync.kt index 5eee0ac..f03cabe 100644 --- a/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClientAsync.kt +++ b/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClientAsync.kt @@ -230,6 +230,9 @@ class ArcadeOkHttpClientAsync private constructor() { /** * Whether to call `validate` on every response before returning it. * + * Setting this to `true` is _not_ forwards compatible with new types from the API for + * existing fields. + * * Defaults to false, which means the shape of the response will not be validated upfront. * Instead, validation will only occur for the parts of the response that are accessed. */ diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/core/ClientOptions.kt b/arcade-java-core/src/main/kotlin/dev/arcade/core/ClientOptions.kt index 40f36d7..ffa81fc 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/core/ClientOptions.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/core/ClientOptions.kt @@ -80,6 +80,9 @@ private constructor( /** * Whether to call `validate` on every response before returning it. * + * Setting this to `true` is _not_ forwards compatible with new types from the API for existing + * fields. + * * Defaults to false, which means the shape of the response will not be validated upfront. * Instead, validation will only occur for the parts of the response that are accessed. */ @@ -260,6 +263,9 @@ private constructor( /** * Whether to call `validate` on every response before returning it. * + * Setting this to `true` is _not_ forwards compatible with new types from the API for + * existing fields. + * * Defaults to false, which means the shape of the response will not be validated upfront. * Instead, validation will only occur for the parts of the response that are accessed. */ diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/core/RequestOptions.kt b/arcade-java-core/src/main/kotlin/dev/arcade/core/RequestOptions.kt index 59a7d7f..f1f8154 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/core/RequestOptions.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/core/RequestOptions.kt @@ -33,6 +33,15 @@ class RequestOptions private constructor(val responseValidation: Boolean?, val t private var responseValidation: Boolean? = null private var timeout: Timeout? = null + /** + * Whether to call `validate` on the response before returning it. + * + * Setting this to `true` is _not_ forwards compatible with new types from the API for + * existing fields. + * + * Defaults to false, which means the shape of the response will not be validated upfront. + * Instead, validation will only occur for the parts of the response that are accessed. + */ fun responseValidation(responseValidation: Boolean) = apply { this.responseValidation = responseValidation } diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/AuthorizationContext.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/AuthorizationContext.kt index 6adbac1..0336aaf 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/AuthorizationContext.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/AuthorizationContext.kt @@ -140,6 +140,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): AuthorizationContext = apply { if (validated) { return@apply @@ -226,6 +234,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): UserInfo = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/AuthorizationResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/AuthorizationResponse.kt index 0eddad8..4aa970f 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/AuthorizationResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/AuthorizationResponse.kt @@ -308,6 +308,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): AuthorizationResponse = apply { if (validated) { return@apply @@ -445,6 +453,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Status = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/Error.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/Error.kt index 40800cb..2c37ff7 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/Error.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/Error.kt @@ -136,6 +136,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Error = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderCreateRequest.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderCreateRequest.kt index dbff3f9..abe0c9a 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderCreateRequest.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderCreateRequest.kt @@ -311,6 +311,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): AuthProviderCreateRequest = apply { if (validated) { return@apply @@ -768,6 +776,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Oauth2 = apply { if (validated) { return@apply @@ -1190,6 +1207,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): AuthorizeRequest = apply { if (validated) { return@apply @@ -1292,6 +1319,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -1433,6 +1470,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): RequestContentType = apply { if (validated) { return@apply @@ -1569,6 +1616,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseContentType = apply { if (validated) { return@apply @@ -1668,6 +1725,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -1887,6 +1954,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Pkce = apply { if (validated) { return@apply @@ -2316,6 +2393,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): RefreshRequest = apply { if (validated) { return@apply @@ -2418,6 +2505,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -2559,6 +2656,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): RequestContentType = apply { if (validated) { return@apply @@ -2695,6 +2802,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseContentType = apply { if (validated) { return@apply @@ -2794,6 +2911,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -2969,6 +3096,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ScopeDelimiter = apply { if (validated) { return@apply @@ -3426,6 +3563,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): TokenIntrospectionRequest = apply { if (validated) { return@apply @@ -3613,6 +3760,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Triggers = apply { if (validated) { return@apply @@ -3724,6 +3881,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -3865,6 +4032,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): RequestContentType = apply { if (validated) { return@apply @@ -4001,6 +4178,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseContentType = apply { if (validated) { return@apply @@ -4100,6 +4287,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -4562,6 +4759,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): TokenRequest = apply { if (validated) { return@apply @@ -4664,6 +4871,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -4805,6 +5022,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): RequestContentType = apply { if (validated) { return@apply @@ -4941,6 +5168,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseContentType = apply { if (validated) { return@apply @@ -5040,6 +5277,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -5538,6 +5785,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): UserInfoRequest = apply { if (validated) { return@apply @@ -5725,6 +5982,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Triggers = apply { if (validated) { return@apply @@ -5836,6 +6103,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -5977,6 +6254,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): RequestContentType = apply { if (validated) { return@apply @@ -6113,6 +6400,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseContentType = apply { if (validated) { return@apply @@ -6212,6 +6509,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderListResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderListResponse.kt index d6bc9c0..4c94a07 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderListResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderListResponse.kt @@ -245,6 +245,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): AuthProviderListResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderResponse.kt index c00cfb8..5117fd4 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderResponse.kt @@ -359,6 +359,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): AuthProviderResponse = apply { if (validated) { return@apply @@ -524,6 +532,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Binding = apply { if (validated) { return@apply @@ -653,6 +670,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Type = apply { if (validated) { return@apply @@ -1153,6 +1180,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Oauth2 = apply { if (validated) { return@apply @@ -1600,6 +1636,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): AuthorizeRequest = apply { if (validated) { return@apply @@ -1704,6 +1750,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -1808,6 +1864,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -2087,6 +2153,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ClientSecret = apply { if (validated) { return@apply @@ -2225,6 +2301,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Binding = apply { if (validated) { return@apply @@ -2424,6 +2510,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Pkce = apply { if (validated) { return@apply @@ -2876,6 +2972,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): RefreshRequest = apply { if (validated) { return@apply @@ -2980,6 +3086,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -3084,6 +3200,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -3640,6 +3766,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): TokenIntrospectionRequest = apply { if (validated) { return@apply @@ -3748,6 +3884,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -3852,6 +3998,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -4040,6 +4196,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Triggers = apply { if (validated) { return@apply @@ -4535,6 +4701,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): TokenRequest = apply { if (validated) { return@apply @@ -4639,6 +4815,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -4743,6 +4929,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -5263,6 +5459,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): UserInfoRequest = apply { if (validated) { return@apply @@ -5369,6 +5575,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -5473,6 +5689,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -5661,6 +5887,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Triggers = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderUpdateRequest.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderUpdateRequest.kt index 0a4ffff..9057d6c 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderUpdateRequest.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/authproviders/AuthProviderUpdateRequest.kt @@ -264,6 +264,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): AuthProviderUpdateRequest = apply { if (validated) { return@apply @@ -705,6 +713,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Oauth2 = apply { if (validated) { return@apply @@ -1112,6 +1129,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): AuthorizeRequest = apply { if (validated) { return@apply @@ -1214,6 +1241,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -1355,6 +1392,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): RequestContentType = apply { if (validated) { return@apply @@ -1491,6 +1538,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseContentType = apply { if (validated) { return@apply @@ -1590,6 +1647,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -1809,6 +1876,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Pkce = apply { if (validated) { return@apply @@ -2223,6 +2300,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): RefreshRequest = apply { if (validated) { return@apply @@ -2325,6 +2412,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -2466,6 +2563,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): RequestContentType = apply { if (validated) { return@apply @@ -2602,6 +2709,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseContentType = apply { if (validated) { return@apply @@ -2701,6 +2818,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -2876,6 +3003,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ScopeDelimiter = apply { if (validated) { return@apply @@ -3317,6 +3454,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): TokenIntrospectionRequest = apply { if (validated) { return@apply @@ -3421,6 +3568,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -3562,6 +3719,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): RequestContentType = apply { if (validated) { return@apply @@ -3698,6 +3865,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseContentType = apply { if (validated) { return@apply @@ -3797,6 +3974,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -3985,6 +4172,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Triggers = apply { if (validated) { return@apply @@ -4438,6 +4635,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): TokenRequest = apply { if (validated) { return@apply @@ -4540,6 +4747,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -4681,6 +4898,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): RequestContentType = apply { if (validated) { return@apply @@ -4817,6 +5044,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseContentType = apply { if (validated) { return@apply @@ -4916,6 +5153,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -5396,6 +5643,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): UserInfoRequest = apply { if (validated) { return@apply @@ -5500,6 +5757,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Params = apply { if (validated) { return@apply @@ -5641,6 +5908,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): RequestContentType = apply { if (validated) { return@apply @@ -5777,6 +6054,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseContentType = apply { if (validated) { return@apply @@ -5876,6 +6163,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ResponseMap = apply { if (validated) { return@apply @@ -6064,6 +6361,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Triggers = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/secrets/SecretCreateParams.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/secrets/SecretCreateParams.kt index a52b828..d180e72 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/secrets/SecretCreateParams.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/secrets/SecretCreateParams.kt @@ -430,6 +430,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Body = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/secrets/SecretListResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/secrets/SecretListResponse.kt index 9459f39..3f5778d 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/secrets/SecretListResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/secrets/SecretListResponse.kt @@ -243,6 +243,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): SecretListResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/secrets/SecretResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/secrets/SecretResponse.kt index 4146152..5cf6ffe 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/secrets/SecretResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/secrets/SecretResponse.kt @@ -295,6 +295,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): SecretResponse = apply { if (validated) { return@apply @@ -456,6 +464,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Binding = apply { if (validated) { return@apply @@ -585,6 +602,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Type = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/userconnections/UserConnectionListPageResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/userconnections/UserConnectionListPageResponse.kt index 3d40096..8b8c721 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/userconnections/UserConnectionListPageResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/userconnections/UserConnectionListPageResponse.kt @@ -249,6 +249,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): UserConnectionListPageResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/userconnections/UserConnectionResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/userconnections/UserConnectionResponse.kt index e1ea340..7a71e2a 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/userconnections/UserConnectionResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/admin/userconnections/UserConnectionResponse.kt @@ -395,6 +395,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): UserConnectionResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/auth/AuthRequest.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/auth/AuthRequest.kt index 6c761a5..fee209b 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/auth/AuthRequest.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/auth/AuthRequest.kt @@ -200,6 +200,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): AuthRequest = apply { if (validated) { return@apply @@ -433,6 +441,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): AuthRequirement = apply { if (validated) { return@apply @@ -584,6 +601,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Oauth2 = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/auth/ConfirmUserRequest.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/auth/ConfirmUserRequest.kt index dcf9388..8cb22e2 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/auth/ConfirmUserRequest.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/auth/ConfirmUserRequest.kt @@ -157,6 +157,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ConfirmUserRequest = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/auth/ConfirmUserResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/auth/ConfirmUserResponse.kt index c76f5ba..cda22df 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/auth/ConfirmUserResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/auth/ConfirmUserResponse.kt @@ -156,6 +156,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ConfirmUserResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/ChatMessage.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/ChatMessage.kt index d65d93a..6f6b40d 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/ChatMessage.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/ChatMessage.kt @@ -283,6 +283,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ChatMessage = apply { if (validated) { return@apply @@ -471,6 +479,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ToolCall = apply { if (validated) { return@apply @@ -634,6 +651,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Function = apply { if (validated) { return@apply @@ -767,6 +794,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Type = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/ChatRequest.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/ChatRequest.kt index 39bceff..1d7add6 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/ChatRequest.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/ChatRequest.kt @@ -768,6 +768,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ChatRequest = apply { if (validated) { return@apply @@ -891,6 +899,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): LogitBias = apply { if (validated) { return@apply @@ -1027,6 +1044,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ResponseFormat = apply { if (validated) { return@apply @@ -1141,6 +1167,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Type = apply { if (validated) { return@apply @@ -1312,6 +1348,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): StreamOptions = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/ChatResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/ChatResponse.kt index 20f907b..5530254 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/ChatResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/ChatResponse.kt @@ -310,6 +310,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ChatResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/Choice.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/Choice.kt index e652d4e..661cd0e 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/Choice.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/Choice.kt @@ -301,6 +301,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Choice = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/Usage.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/Usage.kt index 2166b90..1805d25 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/Usage.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/chat/Usage.kt @@ -181,6 +181,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Usage = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/health/HealthSchema.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/health/HealthSchema.kt index 27720dd..7d4d392 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/health/HealthSchema.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/health/HealthSchema.kt @@ -140,6 +140,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): HealthSchema = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/AuthorizeToolRequest.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/AuthorizeToolRequest.kt index 4842ecd..826d1f3 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/AuthorizeToolRequest.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/AuthorizeToolRequest.kt @@ -226,6 +226,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): AuthorizeToolRequest = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ExecuteToolRequest.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ExecuteToolRequest.kt index 487040d..1e922e5 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ExecuteToolRequest.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ExecuteToolRequest.kt @@ -308,6 +308,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ExecuteToolRequest = apply { if (validated) { return@apply @@ -408,6 +416,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Input = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ExecuteToolResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ExecuteToolResponse.kt index 88d33a0..de75202 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ExecuteToolResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ExecuteToolResponse.kt @@ -380,6 +380,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ExecuteToolResponse = apply { if (validated) { return@apply @@ -687,6 +695,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Output = apply { if (validated) { return@apply @@ -1128,6 +1145,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Error = apply { if (validated) { return@apply @@ -1405,6 +1432,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Kind = apply { if (validated) { return@apply @@ -1504,6 +1541,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Extra = apply { if (validated) { return@apply @@ -1768,6 +1815,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Log = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolDefinition.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolDefinition.kt index 7be442a..ab6b906 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolDefinition.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolDefinition.kt @@ -440,6 +440,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ToolDefinition = apply { if (validated) { return@apply @@ -601,6 +609,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Input = apply { if (validated) { return@apply @@ -888,6 +905,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Parameter = apply { if (validated) { return@apply @@ -1149,6 +1176,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Toolkit = apply { if (validated) { return@apply @@ -1260,6 +1296,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): FormattedSchema = apply { if (validated) { return@apply @@ -1464,6 +1509,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Metadata = apply { if (validated) { return@apply @@ -1756,6 +1810,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Behavior = apply { if (validated) { return@apply @@ -1945,6 +2009,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Classification = apply { if (validated) { return@apply @@ -2050,6 +2124,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Extras = apply { if (validated) { return@apply @@ -2302,6 +2386,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Output = apply { if (validated) { return@apply @@ -2536,6 +2629,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Requirements = apply { if (validated) { return@apply @@ -2884,6 +2986,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Authorization = apply { if (validated) { return@apply @@ -3044,6 +3156,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Oauth2 = apply { if (validated) { return@apply @@ -3181,6 +3303,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Status = apply { if (validated) { return@apply @@ -3325,6 +3457,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): TokenStatus = apply { if (validated) { return@apply @@ -3580,6 +3722,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Secret = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolExecution.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolExecution.kt index f03513d..b110338 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolExecution.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolExecution.kt @@ -468,6 +468,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ToolExecution = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolExecutionAttempt.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolExecutionAttempt.kt index 42fd644..dbf0d89 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolExecutionAttempt.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolExecutionAttempt.kt @@ -273,6 +273,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ToolExecutionAttempt = apply { if (validated) { return@apply @@ -502,6 +510,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Output = apply { if (validated) { return@apply @@ -943,6 +960,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Error = apply { if (validated) { return@apply @@ -1220,6 +1247,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Kind = apply { if (validated) { return@apply @@ -1319,6 +1356,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Extra = apply { if (validated) { return@apply @@ -1583,6 +1630,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Log = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolGetParams.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolGetParams.kt index f851a95..301be76 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolGetParams.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolGetParams.kt @@ -323,6 +323,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): IncludeFormat = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolListPageResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolListPageResponse.kt index 4910d9b..f961478 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolListPageResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolListPageResponse.kt @@ -243,6 +243,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ToolListPageResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolListParams.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolListParams.kt index ad4ae18..0b27170 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolListParams.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ToolListParams.kt @@ -415,6 +415,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): IncludeFormat = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ValueSchema.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ValueSchema.kt index 06139a7..0e5223b 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ValueSchema.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/ValueSchema.kt @@ -209,6 +209,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ValueSchema = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedGetResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedGetResponse.kt index 3ebb65e..c0c1d55 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedGetResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedGetResponse.kt @@ -68,6 +68,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): FormattedGetResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedListPageResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedListPageResponse.kt index 0d6c9cb..7494c4b 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedListPageResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedListPageResponse.kt @@ -247,6 +247,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): FormattedListPageResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedListResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedListResponse.kt index c2c3672..2ee357b 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedListResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/formatted/FormattedListResponse.kt @@ -69,6 +69,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): FormattedListResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/scheduled/ScheduledGetResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/scheduled/ScheduledGetResponse.kt index b8b575d..c4c95d1 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/scheduled/ScheduledGetResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/scheduled/ScheduledGetResponse.kt @@ -549,6 +549,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ScheduledGetResponse = apply { if (validated) { return@apply @@ -659,6 +667,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Input = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/scheduled/ScheduledListPageResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/scheduled/ScheduledListPageResponse.kt index 98f1c94..c637e90 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/scheduled/ScheduledListPageResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/tools/scheduled/ScheduledListPageResponse.kt @@ -246,6 +246,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): ScheduledListPageResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/CreateWorkerRequest.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/CreateWorkerRequest.kt index ed1a052..747f590 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/CreateWorkerRequest.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/CreateWorkerRequest.kt @@ -242,6 +242,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): CreateWorkerRequest = apply { if (validated) { return@apply @@ -482,6 +490,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Http = apply { if (validated) { return@apply @@ -800,6 +817,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Mcp = apply { if (validated) { return@apply @@ -898,6 +924,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Headers = apply { if (validated) { return@apply @@ -1154,6 +1190,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Oauth2 = apply { if (validated) { return@apply @@ -1277,6 +1323,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Secrets = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/UpdateWorkerRequest.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/UpdateWorkerRequest.kt index 039958e..31bda7a 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/UpdateWorkerRequest.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/UpdateWorkerRequest.kt @@ -166,6 +166,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): UpdateWorkerRequest = apply { if (validated) { return@apply @@ -376,6 +384,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Http = apply { if (validated) { return@apply @@ -676,6 +693,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Mcp = apply { if (validated) { return@apply @@ -774,6 +800,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Headers = apply { if (validated) { return@apply @@ -994,6 +1030,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Oauth2 = apply { if (validated) { return@apply @@ -1108,6 +1154,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Secrets = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerHealthResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerHealthResponse.kt index 8a54a8c..f9dae32 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerHealthResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerHealthResponse.kt @@ -191,6 +191,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): WorkerHealthResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerListPageResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerListPageResponse.kt index 8609944..d9aea4b 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerListPageResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerListPageResponse.kt @@ -243,6 +243,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): WorkerListPageResponse = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerResponse.kt index 45ff0b1..444c77e 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerResponse.kt @@ -320,6 +320,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): WorkerResponse = apply { if (validated) { return@apply @@ -483,6 +491,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Binding = apply { if (validated) { return@apply @@ -612,6 +629,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Type = apply { if (validated) { return@apply @@ -849,6 +876,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Http = apply { if (validated) { return@apply @@ -1072,6 +1108,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Secret = apply { if (validated) { return@apply @@ -1210,6 +1256,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Binding = apply { if (validated) { return@apply @@ -1616,6 +1672,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Mcp = apply { if (validated) { return@apply @@ -1718,6 +1783,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Headers = apply { if (validated) { return@apply @@ -2069,6 +2144,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Oauth2 = apply { if (validated) { return@apply @@ -2311,6 +2396,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): ClientSecret = apply { if (validated) { return@apply @@ -2451,6 +2546,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected + * types recursively. + * + * This method is _not_ forwards compatible with new types from the API for + * existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't + * match its expected type. + */ fun validate(): Binding = apply { if (validated) { return@apply @@ -2607,6 +2712,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Secrets = apply { if (validated) { return@apply @@ -2817,6 +2932,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Requirements = apply { if (validated) { return@apply @@ -2973,6 +3097,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Authorization = apply { if (validated) { return@apply @@ -3100,6 +3234,16 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match + * its expected type. + */ fun validate(): Oauth2 = apply { if (validated) { return@apply @@ -3274,6 +3418,15 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): Type = apply { if (validated) { return@apply diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerToolsPageResponse.kt b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerToolsPageResponse.kt index b585877..d4f4d91 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerToolsPageResponse.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/models/workers/WorkerToolsPageResponse.kt @@ -244,6 +244,14 @@ private constructor( private var validated: Boolean = false + /** + * Validates that the types of all values in this object match their expected types recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing fields. + * + * @throws ArcadeInvalidDataException if any value type in this object doesn't match its + * expected type. + */ fun validate(): WorkerToolsPageResponse = apply { if (validated) { return@apply From 1043b591c5cee640130803058086ab444bd07b58 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 05:43:59 +0000 Subject: [PATCH 33/37] feat(client): more robust error parsing --- .../main/kotlin/dev/arcade/errors/BadRequestException.kt | 6 +++++- .../kotlin/dev/arcade/errors/InternalServerException.kt | 7 ++++++- .../src/main/kotlin/dev/arcade/errors/NotFoundException.kt | 6 +++++- .../kotlin/dev/arcade/errors/PermissionDeniedException.kt | 6 +++++- .../main/kotlin/dev/arcade/errors/RateLimitException.kt | 6 +++++- .../main/kotlin/dev/arcade/errors/UnauthorizedException.kt | 6 +++++- .../dev/arcade/errors/UnexpectedStatusCodeException.kt | 7 ++++++- .../dev/arcade/errors/UnprocessableEntityException.kt | 6 +++++- 8 files changed, 42 insertions(+), 8 deletions(-) diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/errors/BadRequestException.kt b/arcade-java-core/src/main/kotlin/dev/arcade/errors/BadRequestException.kt index b5cd72d..9c90f64 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/errors/BadRequestException.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/errors/BadRequestException.kt @@ -5,12 +5,16 @@ package dev.arcade.errors import dev.arcade.core.JsonValue import dev.arcade.core.checkRequired import dev.arcade.core.http.Headers +import dev.arcade.core.jsonMapper import java.util.Optional import kotlin.jvm.optionals.getOrNull class BadRequestException private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) : - ArcadeServiceException("400: $body", cause) { + ArcadeServiceException( + "400: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}", + cause, + ) { override fun statusCode(): Int = 400 diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/errors/InternalServerException.kt b/arcade-java-core/src/main/kotlin/dev/arcade/errors/InternalServerException.kt index faa5ede..b3e6868 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/errors/InternalServerException.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/errors/InternalServerException.kt @@ -5,6 +5,7 @@ package dev.arcade.errors import dev.arcade.core.JsonValue import dev.arcade.core.checkRequired import dev.arcade.core.http.Headers +import dev.arcade.core.jsonMapper import java.util.Optional import kotlin.jvm.optionals.getOrNull @@ -14,7 +15,11 @@ private constructor( private val headers: Headers, private val body: JsonValue, cause: Throwable?, -) : ArcadeServiceException("$statusCode: $body", cause) { +) : + ArcadeServiceException( + "$statusCode: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}", + cause, + ) { override fun statusCode(): Int = statusCode diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/errors/NotFoundException.kt b/arcade-java-core/src/main/kotlin/dev/arcade/errors/NotFoundException.kt index b156be1..9971517 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/errors/NotFoundException.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/errors/NotFoundException.kt @@ -5,12 +5,16 @@ package dev.arcade.errors import dev.arcade.core.JsonValue import dev.arcade.core.checkRequired import dev.arcade.core.http.Headers +import dev.arcade.core.jsonMapper import java.util.Optional import kotlin.jvm.optionals.getOrNull class NotFoundException private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) : - ArcadeServiceException("404: $body", cause) { + ArcadeServiceException( + "404: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}", + cause, + ) { override fun statusCode(): Int = 404 diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/errors/PermissionDeniedException.kt b/arcade-java-core/src/main/kotlin/dev/arcade/errors/PermissionDeniedException.kt index 5c77c7a..9cbb855 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/errors/PermissionDeniedException.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/errors/PermissionDeniedException.kt @@ -5,12 +5,16 @@ package dev.arcade.errors import dev.arcade.core.JsonValue import dev.arcade.core.checkRequired import dev.arcade.core.http.Headers +import dev.arcade.core.jsonMapper import java.util.Optional import kotlin.jvm.optionals.getOrNull class PermissionDeniedException private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) : - ArcadeServiceException("403: $body", cause) { + ArcadeServiceException( + "403: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}", + cause, + ) { override fun statusCode(): Int = 403 diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/errors/RateLimitException.kt b/arcade-java-core/src/main/kotlin/dev/arcade/errors/RateLimitException.kt index 290070c..f96f7ef 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/errors/RateLimitException.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/errors/RateLimitException.kt @@ -5,12 +5,16 @@ package dev.arcade.errors import dev.arcade.core.JsonValue import dev.arcade.core.checkRequired import dev.arcade.core.http.Headers +import dev.arcade.core.jsonMapper import java.util.Optional import kotlin.jvm.optionals.getOrNull class RateLimitException private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) : - ArcadeServiceException("429: $body", cause) { + ArcadeServiceException( + "429: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}", + cause, + ) { override fun statusCode(): Int = 429 diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/errors/UnauthorizedException.kt b/arcade-java-core/src/main/kotlin/dev/arcade/errors/UnauthorizedException.kt index 258076a..094b13f 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/errors/UnauthorizedException.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/errors/UnauthorizedException.kt @@ -5,12 +5,16 @@ package dev.arcade.errors import dev.arcade.core.JsonValue import dev.arcade.core.checkRequired import dev.arcade.core.http.Headers +import dev.arcade.core.jsonMapper import java.util.Optional import kotlin.jvm.optionals.getOrNull class UnauthorizedException private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) : - ArcadeServiceException("401: $body", cause) { + ArcadeServiceException( + "401: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}", + cause, + ) { override fun statusCode(): Int = 401 diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/errors/UnexpectedStatusCodeException.kt b/arcade-java-core/src/main/kotlin/dev/arcade/errors/UnexpectedStatusCodeException.kt index a7a0400..3813475 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/errors/UnexpectedStatusCodeException.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/errors/UnexpectedStatusCodeException.kt @@ -5,6 +5,7 @@ package dev.arcade.errors import dev.arcade.core.JsonValue import dev.arcade.core.checkRequired import dev.arcade.core.http.Headers +import dev.arcade.core.jsonMapper import java.util.Optional import kotlin.jvm.optionals.getOrNull @@ -14,7 +15,11 @@ private constructor( private val headers: Headers, private val body: JsonValue, cause: Throwable?, -) : ArcadeServiceException("$statusCode: $body", cause) { +) : + ArcadeServiceException( + "$statusCode: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}", + cause, + ) { override fun statusCode(): Int = statusCode diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/errors/UnprocessableEntityException.kt b/arcade-java-core/src/main/kotlin/dev/arcade/errors/UnprocessableEntityException.kt index b94b126..115d3b4 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/errors/UnprocessableEntityException.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/errors/UnprocessableEntityException.kt @@ -5,12 +5,16 @@ package dev.arcade.errors import dev.arcade.core.JsonValue import dev.arcade.core.checkRequired import dev.arcade.core.http.Headers +import dev.arcade.core.jsonMapper import java.util.Optional import kotlin.jvm.optionals.getOrNull class UnprocessableEntityException private constructor(private val headers: Headers, private val body: JsonValue, cause: Throwable?) : - ArcadeServiceException("422: $body", cause) { + ArcadeServiceException( + "422: ${if (body.isMissing()) "Unknown" else jsonMapper().writeValueAsString(body)}", + cause, + ) { override fun statusCode(): Int = 422 From 8e3a087be33daae54aa87f67cdc62a22f566d504 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 05:48:14 +0000 Subject: [PATCH 34/37] chore: remove duplicated dokka setup --- build.gradle.kts | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2348249..fde505e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,7 +22,6 @@ subprojects { group = "Verification" description = "Verifies all source files are formatted." } - apply(plugin = "org.jetbrains.dokka") } subprojects { From be744132658d4afa95b3d42edc256a3d245a931a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 05:51:08 +0000 Subject: [PATCH 35/37] perf(client): create one json mapper --- .../src/main/kotlin/dev/arcade/core/ObjectMappers.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/core/ObjectMappers.kt b/arcade-java-core/src/main/kotlin/dev/arcade/core/ObjectMappers.kt index 9fb2ee7..6a815ab 100644 --- a/arcade-java-core/src/main/kotlin/dev/arcade/core/ObjectMappers.kt +++ b/arcade-java-core/src/main/kotlin/dev/arcade/core/ObjectMappers.kt @@ -29,7 +29,9 @@ import java.time.ZoneId import java.time.format.DateTimeFormatter import java.time.temporal.ChronoField -fun jsonMapper(): JsonMapper = +fun jsonMapper(): JsonMapper = JSON_MAPPER + +private val JSON_MAPPER: JsonMapper = JsonMapper.builder() .addModule(kotlinModule()) .addModule(Jdk8Module()) From 93ca7737f605353b1709e92b80ba5a0dc4075c41 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 05:54:10 +0000 Subject: [PATCH 36/37] feat(client): support proxy authentication --- README.md | 15 ++ .../client/okhttp/ArcadeOkHttpClient.kt | 17 ++ .../client/okhttp/ArcadeOkHttpClientAsync.kt | 17 ++ .../dev/arcade/client/okhttp/OkHttpClient.kt | 234 +++++++++++------- .../arcade/core/http/ProxyAuthenticator.kt | 59 +++++ 5 files changed, 257 insertions(+), 85 deletions(-) create mode 100644 arcade-java-core/src/main/kotlin/dev/arcade/core/http/ProxyAuthenticator.kt diff --git a/README.md b/README.md index 779619a..9b25375 100644 --- a/README.md +++ b/README.md @@ -480,6 +480,21 @@ ArcadeClient client = ArcadeOkHttpClient.builder() .build(); ``` +If the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`: + +```java +import dev.arcade.client.ArcadeClient; +import dev.arcade.client.okhttp.ArcadeOkHttpClient; +import dev.arcade.core.http.ProxyAuthenticator; + +ArcadeClient client = ArcadeOkHttpClient.builder() + .fromEnv() + .proxy(...) + // Or a custom implementation of `ProxyAuthenticator`. + .proxyAuthenticator(ProxyAuthenticator.basic("username", "password")) + .build(); +``` + ### Connection pooling To customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods: diff --git a/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClient.kt b/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClient.kt index db14a9f..65e5150 100644 --- a/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClient.kt +++ b/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClient.kt @@ -11,6 +11,7 @@ import dev.arcade.core.Timeout import dev.arcade.core.http.AsyncStreamResponse import dev.arcade.core.http.Headers import dev.arcade.core.http.HttpClient +import dev.arcade.core.http.ProxyAuthenticator import dev.arcade.core.http.QueryParams import dev.arcade.core.jsonMapper import java.net.Proxy @@ -49,6 +50,7 @@ class ArcadeOkHttpClient private constructor() { private var clientOptions: ClientOptions.Builder = ClientOptions.builder() private var dispatcherExecutorService: ExecutorService? = null private var proxy: Proxy? = null + private var proxyAuthenticator: ProxyAuthenticator? = null private var maxIdleConnections: Int? = null private var keepAliveDuration: Duration? = null private var sslSocketFactory: SSLSocketFactory? = null @@ -79,6 +81,20 @@ class ArcadeOkHttpClient private constructor() { /** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */ fun proxy(proxy: Optional) = proxy(proxy.getOrNull()) + /** + * Provides credentials when an HTTP proxy responds with `407 Proxy Authentication + * Required`. + */ + fun proxyAuthenticator(proxyAuthenticator: ProxyAuthenticator?) = apply { + this.proxyAuthenticator = proxyAuthenticator + } + + /** + * Alias for calling [Builder.proxyAuthenticator] with `proxyAuthenticator.orElse(null)`. + */ + fun proxyAuthenticator(proxyAuthenticator: Optional) = + proxyAuthenticator(proxyAuthenticator.getOrNull()) + /** * The maximum number of idle connections kept by the underlying OkHttp connection pool. * @@ -376,6 +392,7 @@ class ArcadeOkHttpClient private constructor() { OkHttpClient.builder() .timeout(clientOptions.timeout()) .proxy(proxy) + .proxyAuthenticator(proxyAuthenticator) .maxIdleConnections(maxIdleConnections) .keepAliveDuration(keepAliveDuration) .dispatcherExecutorService(dispatcherExecutorService) diff --git a/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClientAsync.kt b/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClientAsync.kt index f03cabe..4f21bd7 100644 --- a/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClientAsync.kt +++ b/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/ArcadeOkHttpClientAsync.kt @@ -11,6 +11,7 @@ import dev.arcade.core.Timeout import dev.arcade.core.http.AsyncStreamResponse import dev.arcade.core.http.Headers import dev.arcade.core.http.HttpClient +import dev.arcade.core.http.ProxyAuthenticator import dev.arcade.core.http.QueryParams import dev.arcade.core.jsonMapper import java.net.Proxy @@ -49,6 +50,7 @@ class ArcadeOkHttpClientAsync private constructor() { private var clientOptions: ClientOptions.Builder = ClientOptions.builder() private var dispatcherExecutorService: ExecutorService? = null private var proxy: Proxy? = null + private var proxyAuthenticator: ProxyAuthenticator? = null private var maxIdleConnections: Int? = null private var keepAliveDuration: Duration? = null private var sslSocketFactory: SSLSocketFactory? = null @@ -79,6 +81,20 @@ class ArcadeOkHttpClientAsync private constructor() { /** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */ fun proxy(proxy: Optional) = proxy(proxy.getOrNull()) + /** + * Provides credentials when an HTTP proxy responds with `407 Proxy Authentication + * Required`. + */ + fun proxyAuthenticator(proxyAuthenticator: ProxyAuthenticator?) = apply { + this.proxyAuthenticator = proxyAuthenticator + } + + /** + * Alias for calling [Builder.proxyAuthenticator] with `proxyAuthenticator.orElse(null)`. + */ + fun proxyAuthenticator(proxyAuthenticator: Optional) = + proxyAuthenticator(proxyAuthenticator.getOrNull()) + /** * The maximum number of idle connections kept by the underlying OkHttp connection pool. * @@ -376,6 +392,7 @@ class ArcadeOkHttpClientAsync private constructor() { OkHttpClient.builder() .timeout(clientOptions.timeout()) .proxy(proxy) + .proxyAuthenticator(proxyAuthenticator) .maxIdleConnections(maxIdleConnections) .keepAliveDuration(keepAliveDuration) .dispatcherExecutorService(dispatcherExecutorService) diff --git a/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/OkHttpClient.kt b/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/OkHttpClient.kt index decc575..e925822 100644 --- a/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/OkHttpClient.kt +++ b/arcade-java-client-okhttp/src/main/kotlin/dev/arcade/client/okhttp/OkHttpClient.kt @@ -8,9 +8,11 @@ import dev.arcade.core.http.HttpMethod import dev.arcade.core.http.HttpRequest import dev.arcade.core.http.HttpRequestBody import dev.arcade.core.http.HttpResponse +import dev.arcade.core.http.ProxyAuthenticator import dev.arcade.errors.ArcadeIoException import java.io.IOException import java.io.InputStream +import java.io.OutputStream import java.net.Proxy import java.time.Duration import java.util.concurrent.CancellationException @@ -20,10 +22,12 @@ import java.util.concurrent.TimeUnit import javax.net.ssl.HostnameVerifier import javax.net.ssl.SSLSocketFactory import javax.net.ssl.X509TrustManager +import kotlin.jvm.optionals.getOrNull import okhttp3.Call import okhttp3.Callback import okhttp3.ConnectionPool import okhttp3.Dispatcher +import okhttp3.HttpUrl import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.MediaType import okhttp3.MediaType.Companion.toMediaType @@ -33,6 +37,8 @@ import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.Response import okhttp3.logging.HttpLoggingInterceptor import okio.BufferedSink +import okio.buffer +import okio.sink class OkHttpClient internal constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClient) : HttpClient { @@ -41,7 +47,7 @@ internal constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClie val call = newCall(request, requestOptions) return try { - call.execute().toResponse() + call.execute().toHttpResponse() } catch (e: IOException) { throw ArcadeIoException("Request failed", e) } finally { @@ -59,7 +65,7 @@ internal constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClie call.enqueue( object : Callback { override fun onResponse(call: Call, response: Response) { - future.complete(response.toResponse()) + future.complete(response.toHttpResponse()) } override fun onFailure(call: Call, e: IOException) { @@ -111,89 +117,6 @@ internal constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClie return client.newCall(request.toRequest(client)) } - private fun HttpRequest.toRequest(client: okhttp3.OkHttpClient): Request { - var body: RequestBody? = body?.toRequestBody() - if (body == null && requiresBody(method)) { - body = "".toRequestBody() - } - - val builder = Request.Builder().url(toUrl()).method(method.name, body) - headers.names().forEach { name -> - headers.values(name).forEach { builder.addHeader(name, it) } - } - - if ( - !headers.names().contains("X-Stainless-Read-Timeout") && client.readTimeoutMillis != 0 - ) { - builder.addHeader( - "X-Stainless-Read-Timeout", - Duration.ofMillis(client.readTimeoutMillis.toLong()).seconds.toString(), - ) - } - if (!headers.names().contains("X-Stainless-Timeout") && client.callTimeoutMillis != 0) { - builder.addHeader( - "X-Stainless-Timeout", - Duration.ofMillis(client.callTimeoutMillis.toLong()).seconds.toString(), - ) - } - - return builder.build() - } - - /** `OkHttpClient` always requires a request body for some methods. */ - private fun requiresBody(method: HttpMethod): Boolean = - when (method) { - HttpMethod.POST, - HttpMethod.PUT, - HttpMethod.PATCH -> true - else -> false - } - - private fun HttpRequest.toUrl(): String { - val builder = baseUrl.toHttpUrl().newBuilder() - pathSegments.forEach(builder::addPathSegment) - queryParams.keys().forEach { key -> - queryParams.values(key).forEach { builder.addQueryParameter(key, it) } - } - - return builder.toString() - } - - private fun HttpRequestBody.toRequestBody(): RequestBody { - val mediaType = contentType()?.toMediaType() - val length = contentLength() - - return object : RequestBody() { - override fun contentType(): MediaType? = mediaType - - override fun contentLength(): Long = length - - override fun isOneShot(): Boolean = !repeatable() - - override fun writeTo(sink: BufferedSink) = writeTo(sink.outputStream()) - } - } - - private fun Response.toResponse(): HttpResponse { - val headers = headers.toHeaders() - - return object : HttpResponse { - override fun statusCode(): Int = code - - override fun headers(): Headers = headers - - override fun body(): InputStream = body!!.byteStream() - - override fun close() = body!!.close() - } - } - - private fun okhttp3.Headers.toHeaders(): Headers { - val headersBuilder = Headers.builder() - forEach { (name, value) -> headersBuilder.put(name, value) } - return headersBuilder.build() - } - companion object { @JvmStatic fun builder() = Builder() } @@ -202,6 +125,7 @@ internal constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClie private var timeout: Timeout = Timeout.default() private var proxy: Proxy? = null + private var proxyAuthenticator: ProxyAuthenticator? = null private var maxIdleConnections: Int? = null private var keepAliveDuration: Duration? = null private var dispatcherExecutorService: ExecutorService? = null @@ -215,6 +139,10 @@ internal constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClie fun proxy(proxy: Proxy?) = apply { this.proxy = proxy } + fun proxyAuthenticator(proxyAuthenticator: ProxyAuthenticator?) = apply { + this.proxyAuthenticator = proxyAuthenticator + } + /** * Sets the maximum number of idle connections kept by the underlying [ConnectionPool]. * @@ -264,6 +192,19 @@ internal constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClie .callTimeout(timeout.request()) .proxy(proxy) .apply { + proxyAuthenticator?.let { auth -> + proxyAuthenticator { route, response -> + auth + .authenticate( + route?.proxy ?: Proxy.NO_PROXY, + response.request.toHttpRequest(), + response.toHttpResponse(), + ) + .getOrNull() + ?.toRequest(client = null) + } + } + dispatcherExecutorService?.let { dispatcher(Dispatcher(it)) } val maxIdleConnections = maxIdleConnections @@ -303,3 +244,126 @@ internal constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClie ) } } + +private fun HttpRequest.toRequest(client: okhttp3.OkHttpClient?): Request { + var body: RequestBody? = body?.toRequestBody() + if (body == null && requiresBody(method)) { + body = "".toRequestBody() + } + + val builder = Request.Builder().url(toUrl()).method(method.name, body) + headers.names().forEach { name -> headers.values(name).forEach { builder.addHeader(name, it) } } + + if (client != null) { + if ( + !headers.names().contains("X-Stainless-Read-Timeout") && client.readTimeoutMillis != 0 + ) { + builder.addHeader( + "X-Stainless-Read-Timeout", + Duration.ofMillis(client.readTimeoutMillis.toLong()).seconds.toString(), + ) + } + if (!headers.names().contains("X-Stainless-Timeout") && client.callTimeoutMillis != 0) { + builder.addHeader( + "X-Stainless-Timeout", + Duration.ofMillis(client.callTimeoutMillis.toLong()).seconds.toString(), + ) + } + } + + return builder.build() +} + +/** `OkHttpClient` always requires a request body for some methods. */ +private fun requiresBody(method: HttpMethod): Boolean = + when (method) { + HttpMethod.POST, + HttpMethod.PUT, + HttpMethod.PATCH -> true + else -> false + } + +private fun HttpRequest.toUrl(): String { + val builder = baseUrl.toHttpUrl().newBuilder() + pathSegments.forEach(builder::addPathSegment) + queryParams.keys().forEach { key -> + queryParams.values(key).forEach { builder.addQueryParameter(key, it) } + } + + return builder.toString() +} + +private fun HttpRequestBody.toRequestBody(): RequestBody { + val mediaType = contentType()?.toMediaType() + val length = contentLength() + + return object : RequestBody() { + override fun contentType(): MediaType? = mediaType + + override fun contentLength(): Long = length + + override fun isOneShot(): Boolean = !repeatable() + + override fun writeTo(sink: BufferedSink) = writeTo(sink.outputStream()) + } +} + +private fun Request.toHttpRequest(): HttpRequest { + val builder = HttpRequest.builder().method(HttpMethod.valueOf(method)).baseUrl(url.toBaseUrl()) + url.pathSegments.forEach(builder::addPathSegment) + url.queryParameterNames.forEach { name -> + url.queryParameterValues(name).filterNotNull().forEach { builder.putQueryParam(name, it) } + } + headers.forEach { (name, value) -> builder.putHeader(name, value) } + body?.let { builder.body(it.toHttpRequestBody()) } + return builder.build() +} + +private fun HttpUrl.toBaseUrl(): String = buildString { + append(scheme).append("://").append(host) + if (port != HttpUrl.defaultPort(scheme)) { + append(":").append(port) + } +} + +private fun RequestBody.toHttpRequestBody(): HttpRequestBody { + val mediaType = contentType()?.toString() + val length = contentLength() + val isOneShot = isOneShot() + val source = this + return object : HttpRequestBody { + override fun contentType(): String? = mediaType + + override fun contentLength(): Long = length + + override fun repeatable(): Boolean = !isOneShot + + override fun writeTo(outputStream: OutputStream) { + val sink = outputStream.sink().buffer() + source.writeTo(sink) + sink.flush() + } + + override fun close() {} + } +} + +private fun Response.toHttpResponse(): HttpResponse { + val headers = headers.toHeaders() + + return object : HttpResponse { + override fun statusCode(): Int = code + + override fun headers(): Headers = headers + + override fun body(): InputStream = body!!.byteStream() + + override fun close() = body!!.close() + } +} + +private fun okhttp3.Headers.toHeaders(): Headers { + val headersBuilder = Headers.builder() + forEach { (name, value) -> headersBuilder.put(name, value) } + return headersBuilder.build() +} diff --git a/arcade-java-core/src/main/kotlin/dev/arcade/core/http/ProxyAuthenticator.kt b/arcade-java-core/src/main/kotlin/dev/arcade/core/http/ProxyAuthenticator.kt new file mode 100644 index 0000000..3339ed2 --- /dev/null +++ b/arcade-java-core/src/main/kotlin/dev/arcade/core/http/ProxyAuthenticator.kt @@ -0,0 +1,59 @@ +package dev.arcade.core.http + +import java.net.Proxy +import java.nio.charset.Charset +import java.nio.charset.StandardCharsets +import java.util.Base64 +import java.util.Optional + +/** + * Provides credentials when an HTTP proxy responds with `407 Proxy Authentication Required`. + * + * Implementations inspect the 407 [response] (typically its `Proxy-Authenticate` header) and return + * the request to retry with a `Proxy-Authorization` header set, or [Optional.empty] to abandon + * authentication and surface the 407 to the caller. + * + * Implementations must be thread-safe; they may be invoked concurrently from multiple HTTP calls. + */ +fun interface ProxyAuthenticator { + + /** + * @param proxy the proxy that produced the challenge, or [Proxy.NO_PROXY] if the route is not + * yet established + * @param request the request that produced [response] + * @param response the 407 challenge response + * @return the retry request to send (typically [request] with a `Proxy-Authorization` header + * added), or [Optional.empty] to abandon authentication + */ + fun authenticate( + proxy: Proxy, + request: HttpRequest, + response: HttpResponse, + ): Optional + + companion object { + + /** + * A [ProxyAuthenticator] that uses RFC 7617 Basic authentication with the ISO-8859-1 + * charset. + */ + @JvmStatic + fun basic(username: String, password: String): ProxyAuthenticator = + basic(username, password, StandardCharsets.ISO_8859_1) + + /** + * A [ProxyAuthenticator] that uses RFC 7617 Basic authentication with the given [charset]. + */ + @JvmStatic + fun basic(username: String, password: String, charset: Charset): ProxyAuthenticator { + val token = + Base64.getEncoder().encodeToString("$username:$password".toByteArray(charset)) + val headerValue = "Basic $token" + return ProxyAuthenticator { _, request, _ -> + Optional.of( + request.toBuilder().putHeader("Proxy-Authorization", headerValue).build() + ) + } + } + } +} From f09e9516dcadf44640169e21ec6bfce0be4694a5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 05:54:47 +0000 Subject: [PATCH 37/37] release: 0.1.0-alpha.6 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 53 +++++++++++++++++++++++++++++++++++ README.md | 10 +++---- build.gradle.kts | 2 +- 4 files changed, 60 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e8285b7..4f9005e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.5" + ".": "0.1.0-alpha.6" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 30401cf..b4d6d2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,58 @@ # Changelog +## 0.1.0-alpha.6 (2026-05-06) + +Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/ArcadeAI/arcade-java/compare/v0.1.0-alpha.5...v0.1.0-alpha.6) + +### Features + +* **api:** api update ([aa56504](https://github.com/ArcadeAI/arcade-java/commit/aa565048f02eb4a21657d4e51c4975376968b579)) +* **api:** api update ([f7f972b](https://github.com/ArcadeAI/arcade-java/commit/f7f972bc274de10da54ffe2004d9d50fa16bc5a3)) +* **api:** api update ([acfd5b0](https://github.com/ArcadeAI/arcade-java/commit/acfd5b0aedbb445e1269a6b879111ff19c8aeef5)) +* **api:** api update ([5871f8b](https://github.com/ArcadeAI/arcade-java/commit/5871f8b7d0a2a89a6cbb57561a292b32381c74b6)) +* **client:** more robust error parsing ([1043b59](https://github.com/ArcadeAI/arcade-java/commit/1043b591c5cee640130803058086ab444bd07b58)) +* **client:** support proxy authentication ([93ca773](https://github.com/ArcadeAI/arcade-java/commit/93ca7737f605353b1709e92b80ba5a0dc4075c41)) +* support setting headers via env ([219088d](https://github.com/ArcadeAI/arcade-java/commit/219088d6cdc541d7ae57d36a438f2e6b8894f106)) + + +### Bug Fixes + +* **client:** allow updating header/query affecting fields in `toBuilder()` ([f86e1f2](https://github.com/ArcadeAI/arcade-java/commit/f86e1f2dff33a369dd6d52119ce670747dfd2392)) + + +### Performance Improvements + +* **client:** create one json mapper ([be74413](https://github.com/ArcadeAI/arcade-java/commit/be744132658d4afa95b3d42edc256a3d245a931a)) + + +### Chores + +* **ci:** skip lint on metadata-only changes ([d5942be](https://github.com/ArcadeAI/arcade-java/commit/d5942be3ea63057a3267602dc72046e71d9a5855)) +* **internal:** bump ktfmt ([f38504b](https://github.com/ArcadeAI/arcade-java/commit/f38504b554f72ac9f701716ff1ad40ec5f1a47b2)) +* **internal:** codegen related update ([317c328](https://github.com/ArcadeAI/arcade-java/commit/317c328ecaf054e2fbdea4b6dbfb3a1451bb5070)) +* **internal:** tweak CI branches ([5213191](https://github.com/ArcadeAI/arcade-java/commit/521319108a7b064979e96ecf2fff5e74681b56bf)) +* **internal:** update gitignore ([c9b3d8f](https://github.com/ArcadeAI/arcade-java/commit/c9b3d8f8b7825876526e6dca16859c9f12fcce37)) +* **internal:** update multipart form array serialization ([abeec96](https://github.com/ArcadeAI/arcade-java/commit/abeec961730398bb0c49f01ea13312468be4787c)) +* **internal:** update retry delay tests ([993657b](https://github.com/ArcadeAI/arcade-java/commit/993657b3ac45eafee6b85f76a578f2c6daaacfe2)) +* remove duplicated dokka setup ([8e3a087](https://github.com/ArcadeAI/arcade-java/commit/8e3a087be33daae54aa87f67cdc62a22f566d504)) +* **tests:** bump steady to v0.19.4 ([0d022df](https://github.com/ArcadeAI/arcade-java/commit/0d022dfe027631ea83e1794bcb9e79824ab28f0f)) +* **tests:** bump steady to v0.19.5 ([d186f97](https://github.com/ArcadeAI/arcade-java/commit/d186f9769310ebff3584418642cc0b31a13e1d1c)) +* **tests:** bump steady to v0.19.6 ([b5094e5](https://github.com/ArcadeAI/arcade-java/commit/b5094e5507917137cf7b30c90e1028c122bd1331)) +* **tests:** bump steady to v0.19.7 ([231a1a7](https://github.com/ArcadeAI/arcade-java/commit/231a1a764782bb5bdcd1118630b3bbd544333aa4)) +* **tests:** bump steady to v0.20.1 ([b936990](https://github.com/ArcadeAI/arcade-java/commit/b93699052685356a902c34f38d8e46a617e77454)) +* **tests:** bump steady to v0.20.2 ([7dfba2e](https://github.com/ArcadeAI/arcade-java/commit/7dfba2ef15e2c5f6412a64f23cde8138159c42ea)) +* **tests:** bump steady to v0.22.1 ([bca6f99](https://github.com/ArcadeAI/arcade-java/commit/bca6f993c4876c486640b25ca1d41ff45f299263)) + + +### Documentation + +* clarify forwards compat behavior ([0053367](https://github.com/ArcadeAI/arcade-java/commit/00533674a82a9ec0815ef3d6cb12390927aa9cd2)) + + +### Refactors + +* **tests:** switch from prism to steady ([ae8ff34](https://github.com/ArcadeAI/arcade-java/commit/ae8ff343537d6ff24a3346fac27516c2bc3e07d9)) + ## 0.1.0-alpha.5 (2026-03-16) Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/ArcadeAI/arcade-java/compare/v0.1.0-alpha.4...v0.1.0-alpha.5) diff --git a/README.md b/README.md index 9b25375..62c7c9d 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/dev.arcade/arcade-java)](https://central.sonatype.com/artifact/dev.arcade/arcade-java/0.1.0-alpha.5) -[![javadoc](https://javadoc.io/badge2/dev.arcade/arcade-java/0.1.0-alpha.5/javadoc.svg)](https://javadoc.io/doc/dev.arcade/arcade-java/0.1.0-alpha.5) +[![Maven Central](https://img.shields.io/maven-central/v/dev.arcade/arcade-java)](https://central.sonatype.com/artifact/dev.arcade/arcade-java/0.1.0-alpha.6) +[![javadoc](https://javadoc.io/badge2/dev.arcade/arcade-java/0.1.0-alpha.6/javadoc.svg)](https://javadoc.io/doc/dev.arcade/arcade-java/0.1.0-alpha.6) @@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/). -The REST API documentation can be found on [docs.arcade.dev](https://docs.arcade.dev). Javadocs are available on [javadoc.io](https://javadoc.io/doc/dev.arcade/arcade-java/0.1.0-alpha.5). +The REST API documentation can be found on [docs.arcade.dev](https://docs.arcade.dev). Javadocs are available on [javadoc.io](https://javadoc.io/doc/dev.arcade/arcade-java/0.1.0-alpha.6). @@ -24,7 +24,7 @@ The REST API documentation can be found on [docs.arcade.dev](https://docs.arcade ### Gradle ```kotlin -implementation("dev.arcade:arcade-java:0.1.0-alpha.5") +implementation("dev.arcade:arcade-java:0.1.0-alpha.6") ``` ### Maven @@ -33,7 +33,7 @@ implementation("dev.arcade:arcade-java:0.1.0-alpha.5") dev.arcade arcade-java - 0.1.0-alpha.5 + 0.1.0-alpha.6 ``` diff --git a/build.gradle.kts b/build.gradle.kts index fde505e..aec4e08 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ repositories { allprojects { group = "dev.arcade" - version = "0.1.0-alpha.5" // x-release-please-version + version = "0.1.0-alpha.6" // x-release-please-version } subprojects {