{"id":22089904,"url":"https://github.com/speakeasy-api/speakeasy-client-sdk-java","last_synced_at":"2025-03-23T22:49:57.228Z","repository":{"id":180742027,"uuid":"560020322","full_name":"speakeasy-api/speakeasy-client-sdk-java","owner":"speakeasy-api","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-30T20:41:12.000Z","size":12524,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-03-15T23:56:01.628Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/speakeasy-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-31T15:19:44.000Z","updated_at":"2025-01-30T20:41:12.000Z","dependencies_parsed_at":"2024-03-27T01:24:25.367Z","dependency_job_id":"1f5bcb0d-4d30-4ec8-b544-63cdf4c5765d","html_url":"https://github.com/speakeasy-api/speakeasy-client-sdk-java","commit_stats":null,"previous_names":["speakeasy-api/speakeasy-client-sdk-java"],"tags_count":219,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/speakeasy-api","download_url":"https://codeload.github.com/speakeasy-api/speakeasy-client-sdk-java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245181549,"owners_count":20573718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T02:14:40.550Z","updated_at":"2025-03-23T22:49:57.222Z","avatar_url":"https://github.com/speakeasy-api.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cno value\u003e\n\n\u003c!-- Start Summary [summary] --\u003e\n## Summary\n\nSpeakeasy API: The Speakeasy API allows teams to manage common operations with their APIs\n\nFor more information about the API: [The Speakeasy Platform Documentation](/docs)\n\u003c!-- End Summary [summary] --\u003e\n\n\u003c!-- Start Table of Contents [toc] --\u003e\n## Table of Contents\n\u003c!-- $toc-max-depth=2 --\u003e\n* [\u003cno value\u003e](#no-value)\n  * [SDK Installation](#sdk-installation)\n  * [SDK Example Usage](#sdk-example-usage)\n  * [Available Resources and Operations](#available-resources-and-operations)\n  * [Server Selection](#server-selection)\n  * [Error Handling](#error-handling)\n  * [Authentication](#authentication)\n  * [Global Parameters](#global-parameters)\n  * [Retries](#retries)\n\n\u003c!-- End Table of Contents [toc] --\u003e\n\n\u003c!-- Start SDK Installation [installation] --\u003e\n## SDK Installation\n\n### Getting started\n\nJDK 11 or later is required.\n\nThe samples below show how a published SDK artifact is used:\n\nGradle:\n```groovy\nimplementation 'dev.speakeasyapi:javaclientsdk:7.26.0'\n```\n\nMaven:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003edev.speakeasyapi\u003c/groupId\u003e\n    \u003cartifactId\u003ejavaclientsdk\u003c/artifactId\u003e\n    \u003cversion\u003e7.26.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### How to build\nAfter cloning the git repository to your file system you can build the SDK artifact from source to the `build` directory by running `./gradlew build` on *nix systems or `gradlew.bat` on Windows systems.\n\nIf you wish to build from source and publish the SDK artifact to your local Maven repository (on your filesystem) then use the following command (after cloning the git repo locally):\n\nOn *nix:\n```bash\n./gradlew publishToMavenLocal -Pskip.signing\n```\nOn Windows:\n```bash\ngradlew.bat publishToMavenLocal -Pskip.signing\n```\n\u003c!-- End SDK Installation [installation] --\u003e\n\n\u003c!-- Start SDK Example Usage [usage] --\u003e\n## SDK Example Usage\n\n### Example\n\n```java\npackage hello.world;\n\nimport dev.speakeasyapi.javaclientsdk.RyanTest;\nimport dev.speakeasyapi.javaclientsdk.models.operations.GetApisRequest;\nimport dev.speakeasyapi.javaclientsdk.models.operations.GetApisResponse;\nimport dev.speakeasyapi.javaclientsdk.models.shared.Security;\nimport java.lang.Exception;\n\npublic class Application {\n\n    public static void main(String[] args) throws Exception {\n\n        RyanTest sdk = RyanTest.builder()\n                .security(Security.builder()\n                    .apiKey(\"\u003cYOUR_API_KEY_HERE\u003e\")\n                    .build())\n            .build();\n\n        GetApisRequest req = GetApisRequest.builder()\n                .build();\n\n        GetApisResponse res = sdk.apis().getApis()\n                .request(req)\n                .call();\n\n        if (res.apis().isPresent()) {\n            // handle response\n        }\n    }\n}\n```\n\u003c!-- End SDK Example Usage [usage] --\u003e\n\n\u003c!-- Start Available Resources and Operations [operations] --\u003e\n## Available Resources and Operations\n\n\u003cdetails open\u003e\n\u003csummary\u003eAvailable methods\u003c/summary\u003e\n\n### [apiEndpoints()](docs/sdks/apiendpoints/README.md)\n\n* [deleteApiEndpoint](docs/sdks/apiendpoints/README.md#deleteapiendpoint) - Delete an ApiEndpoint.\n* [findApiEndpoint](docs/sdks/apiendpoints/README.md#findapiendpoint) - Find an ApiEndpoint via its displayName.\n* [generateOpenApiSpecForApiEndpoint](docs/sdks/apiendpoints/README.md#generateopenapispecforapiendpoint) - Generate an OpenAPI specification for a particular ApiEndpoint.\n* [generatePostmanCollectionForApiEndpoint](docs/sdks/apiendpoints/README.md#generatepostmancollectionforapiendpoint) - Generate a Postman collection for a particular ApiEndpoint.\n* [getAllApiEndpoints](docs/sdks/apiendpoints/README.md#getallapiendpoints) - Get all Api endpoints for a particular apiID.\n* [getAllForVersionApiEndpoints](docs/sdks/apiendpoints/README.md#getallforversionapiendpoints) - Get all ApiEndpoints for a particular apiID and versionID.\n* [getApiEndpoint](docs/sdks/apiendpoints/README.md#getapiendpoint) - Get an ApiEndpoint.\n* [upsertApiEndpoint](docs/sdks/apiendpoints/README.md#upsertapiendpoint) - Upsert an ApiEndpoint.\n\n### [apis()](docs/sdks/apis/README.md)\n\n* [deleteApi](docs/sdks/apis/README.md#deleteapi) - Delete an Api.\n* [generateOpenApiSpec](docs/sdks/apis/README.md#generateopenapispec) - Generate an OpenAPI specification for a particular Api.\n* [generatePostmanCollection](docs/sdks/apis/README.md#generatepostmancollection) - Generate a Postman collection for a particular Api.\n* [getAllApiVersions](docs/sdks/apis/README.md#getallapiversions) - Get all Api versions for a particular ApiEndpoint.\n* [getApis](docs/sdks/apis/README.md#getapis) - Get a list of Apis for a given workspace\n* [upsertApi](docs/sdks/apis/README.md#upsertapi) - Upsert an Api\n\n### [auth()](docs/sdks/auth/README.md)\n\n* [validateApiKey](docs/sdks/auth/README.md#validateapikey) - Validate the current api key.\n\n### [embeds()](docs/sdks/embeds/README.md)\n\n* [getEmbedAccessToken](docs/sdks/embeds/README.md#getembedaccesstoken) - Get an embed access token for the current workspace.\n* [getValidEmbedAccessTokens](docs/sdks/embeds/README.md#getvalidembedaccesstokens) - Get all valid embed access tokens for the current workspace.\n* [revokeEmbedAccessToken](docs/sdks/embeds/README.md#revokeembedaccesstoken) - Revoke an embed access EmbedToken.\n\n### [events()](docs/sdks/events/README.md)\n\n* [postWorkspaceEvents](docs/sdks/events/README.md#postworkspaceevents) - Post events for a specific workspace\n\n### [metadata()](docs/sdks/metadata/README.md)\n\n* [deleteVersionMetadata](docs/sdks/metadata/README.md#deleteversionmetadata) - Delete metadata for a particular apiID and versionID.\n* [getVersionMetadata](docs/sdks/metadata/README.md#getversionmetadata) - Get all metadata for a particular apiID and versionID.\n* [insertVersionMetadata](docs/sdks/metadata/README.md#insertversionmetadata) - Insert metadata for a particular apiID and versionID.\n\n### [requests()](docs/sdks/requests/README.md)\n\n* [generateRequestPostmanCollection](docs/sdks/requests/README.md#generaterequestpostmancollection) - Generate a Postman collection for a particular request.\n* [getRequestFromEventLog](docs/sdks/requests/README.md#getrequestfromeventlog) - Get information about a particular request.\n* [queryEventLog](docs/sdks/requests/README.md#queryeventlog) - Query the event log to retrieve a list of requests.\n\n\n### [schemas()](docs/sdks/schemas/README.md)\n\n* [deleteSchema](docs/sdks/schemas/README.md#deleteschema) - Delete a particular schema revision for an Api.\n* [downloadSchema](docs/sdks/schemas/README.md#downloadschema) - Download the latest schema for a particular apiID.\n* [downloadSchemaRevision](docs/sdks/schemas/README.md#downloadschemarevision) - Download a particular schema revision for an Api.\n* [getSchema](docs/sdks/schemas/README.md#getschema) - Get information about the latest schema.\n* [getSchemaDiff](docs/sdks/schemas/README.md#getschemadiff) - Get a diff of two schema revisions for an Api.\n* [getSchemaRevision](docs/sdks/schemas/README.md#getschemarevision) - Get information about a particular schema revision for an Api.\n* [getSchemas](docs/sdks/schemas/README.md#getschemas) - Get information about all schemas associated with a particular apiID.\n* [registerSchema](docs/sdks/schemas/README.md#registerschema) - Register a schema.\n\n\u003c/details\u003e\n\u003c!-- End Available Resources and Operations [operations] --\u003e\n\n\n\n\u003c!-- Start Server Selection [server] --\u003e\n## Server Selection\n\n### Select Server by Name\n\nYou can override the default server globally using the `.server(AvailableServers server)` builder method when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:\n\n| Name   | Server                              | Description |\n| ------ | ----------------------------------- | ----------- |\n| `prod` | `https://api.prod.speakeasyapi.dev` |             |\n\n#### Example\n\n```java\npackage hello.world;\n\nimport dev.speakeasyapi.javaclientsdk.RyanTest;\nimport dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiRequest;\nimport dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiResponse;\nimport dev.speakeasyapi.javaclientsdk.models.shared.Security;\nimport java.lang.Exception;\n\npublic class Application {\n\n    public static void main(String[] args) throws Exception {\n\n        RyanTest sdk = RyanTest.builder()\n                .server(RyanTest.AvailableServers.PROD)\n                .security(Security.builder()\n                    .apiKey(\"\u003cYOUR_API_KEY_HERE\u003e\")\n                    .build())\n            .build();\n\n        DeleteApiRequest req = DeleteApiRequest.builder()\n                .apiID(\"\u003cid\u003e\")\n                .versionID(\"\u003cid\u003e\")\n                .build();\n\n        DeleteApiResponse res = sdk.apis().deleteApi()\n                .request(req)\n                .call();\n\n        // handle response\n    }\n}\n```\n\n### Override Server URL Per-Client\n\nThe default server can also be overridden globally using the `.serverURL(String serverUrl)` builder method when initializing the SDK client instance. For example:\n```java\npackage hello.world;\n\nimport dev.speakeasyapi.javaclientsdk.RyanTest;\nimport dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiRequest;\nimport dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiResponse;\nimport dev.speakeasyapi.javaclientsdk.models.shared.Security;\nimport java.lang.Exception;\n\npublic class Application {\n\n    public static void main(String[] args) throws Exception {\n\n        RyanTest sdk = RyanTest.builder()\n                .serverURL(\"https://api.prod.speakeasyapi.dev\")\n                .security(Security.builder()\n                    .apiKey(\"\u003cYOUR_API_KEY_HERE\u003e\")\n                    .build())\n            .build();\n\n        DeleteApiRequest req = DeleteApiRequest.builder()\n                .apiID(\"\u003cid\u003e\")\n                .versionID(\"\u003cid\u003e\")\n                .build();\n\n        DeleteApiResponse res = sdk.apis().deleteApi()\n                .request(req)\n                .call();\n\n        // handle response\n    }\n}\n```\n\u003c!-- End Server Selection [server] --\u003e\n\n\u003c!-- Start Error Handling [errors] --\u003e\n## Error Handling\n\nHandling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.\n\nBy default, an API error will throw a `models/errors/SDKError` exception. When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `postWorkspaceEvents` method throws the following exceptions:\n\n| Error Type             | Status Code | Content Type     |\n| ---------------------- | ----------- | ---------------- |\n| models/errors/Error    | 5XX         | application/json |\n| models/errors/SDKError | 4XX         | \\*/\\*            |\n\n### Example\n\n```java\npackage hello.world;\n\nimport dev.speakeasyapi.javaclientsdk.RyanTest;\nimport dev.speakeasyapi.javaclientsdk.models.errors.Error;\nimport dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsRequest;\nimport dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsResponse;\nimport dev.speakeasyapi.javaclientsdk.models.shared.CliEvent;\nimport dev.speakeasyapi.javaclientsdk.models.shared.InteractionType;\nimport dev.speakeasyapi.javaclientsdk.models.shared.Security;\nimport java.lang.Exception;\nimport java.time.OffsetDateTime;\nimport java.util.List;\n\npublic class Application {\n\n    public static void main(String[] args) throws Error, Exception {\n\n        RyanTest sdk = RyanTest.builder()\n                .security(Security.builder()\n                    .apiKey(\"\u003cYOUR_API_KEY_HERE\u003e\")\n                    .build())\n            .build();\n\n        PostWorkspaceEventsRequest req = PostWorkspaceEventsRequest.builder()\n                .requestBody(List.of(\n                    CliEvent.builder()\n                        .createdAt(OffsetDateTime.parse(\"2025-03-02T10:07:28.113Z\"))\n                        .executionId(\"\u003cid\u003e\")\n                        .id(\"\u003cid\u003e\")\n                        .interactionType(InteractionType.TARGET_GENERATE)\n                        .localStartedAt(OffsetDateTime.parse(\"2025-08-12T17:54:17.538Z\"))\n                        .speakeasyApiKeyName(\"\u003cvalue\u003e\")\n                        .speakeasyVersion(\"\u003cvalue\u003e\")\n                        .success(true)\n                        .workspaceId(\"\u003cid\u003e\")\n                        .build()))\n                .workspaceID(\"\u003cid\u003e\")\n                .build();\n\n        PostWorkspaceEventsResponse res = sdk.events().postWorkspaceEvents()\n                .request(req)\n                .call();\n\n        // handle response\n    }\n}\n```\n\u003c!-- End Error Handling [errors] --\u003e\n\n\u003c!-- Start Authentication [security] --\u003e\n## Authentication\n\n### Per-Client Security Schemes\n\nThis SDK supports the following security scheme globally:\n\n| Name     | Type   | Scheme  |\n| -------- | ------ | ------- |\n| `apiKey` | apiKey | API key |\n\nYou can set the security parameters through the `security` builder method when initializing the SDK client instance. For example:\n```java\npackage hello.world;\n\nimport dev.speakeasyapi.javaclientsdk.RyanTest;\nimport dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiRequest;\nimport dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiResponse;\nimport dev.speakeasyapi.javaclientsdk.models.shared.Security;\nimport java.lang.Exception;\n\npublic class Application {\n\n    public static void main(String[] args) throws Exception {\n\n        RyanTest sdk = RyanTest.builder()\n                .security(Security.builder()\n                    .apiKey(\"\u003cYOUR_API_KEY_HERE\u003e\")\n                    .build())\n            .build();\n\n        DeleteApiRequest req = DeleteApiRequest.builder()\n                .apiID(\"\u003cid\u003e\")\n                .versionID(\"\u003cid\u003e\")\n                .build();\n\n        DeleteApiResponse res = sdk.apis().deleteApi()\n                .request(req)\n                .call();\n\n        // handle response\n    }\n}\n```\n\u003c!-- End Authentication [security] --\u003e\n\n\u003c!-- Start Global Parameters [global-parameters] --\u003e\n## Global Parameters\n\nA parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.\n\nFor example, you can set `workspaceID` to `\"\u003cid\u003e\"` at SDK initialization and then you do not have to pass the same value on calls to operations like `postWorkspaceEvents`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.\n\n\n### Available Globals\n\nThe following global parameter is available.\n\n| Name        | Type             | Description                |\n| ----------- | ---------------- | -------------------------- |\n| workspaceID | java.lang.String | The workspaceID parameter. |\n\n### Example\n\n```java\npackage hello.world;\n\nimport dev.speakeasyapi.javaclientsdk.RyanTest;\nimport dev.speakeasyapi.javaclientsdk.models.errors.Error;\nimport dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsRequest;\nimport dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsResponse;\nimport dev.speakeasyapi.javaclientsdk.models.shared.CliEvent;\nimport dev.speakeasyapi.javaclientsdk.models.shared.InteractionType;\nimport dev.speakeasyapi.javaclientsdk.models.shared.Security;\nimport java.lang.Exception;\nimport java.time.OffsetDateTime;\nimport java.util.List;\n\npublic class Application {\n\n    public static void main(String[] args) throws Error, Exception {\n\n        RyanTest sdk = RyanTest.builder()\n                .security(Security.builder()\n                    .apiKey(\"\u003cYOUR_API_KEY_HERE\u003e\")\n                    .build())\n            .build();\n\n        PostWorkspaceEventsRequest req = PostWorkspaceEventsRequest.builder()\n                .requestBody(List.of(\n                    CliEvent.builder()\n                        .createdAt(OffsetDateTime.parse(\"2025-03-02T10:07:28.113Z\"))\n                        .executionId(\"\u003cid\u003e\")\n                        .id(\"\u003cid\u003e\")\n                        .interactionType(InteractionType.TARGET_GENERATE)\n                        .localStartedAt(OffsetDateTime.parse(\"2025-08-12T17:54:17.538Z\"))\n                        .speakeasyApiKeyName(\"\u003cvalue\u003e\")\n                        .speakeasyVersion(\"\u003cvalue\u003e\")\n                        .success(true)\n                        .workspaceId(\"\u003cid\u003e\")\n                        .build()))\n                .workspaceID(\"\u003cid\u003e\")\n                .build();\n\n        PostWorkspaceEventsResponse res = sdk.events().postWorkspaceEvents()\n                .request(req)\n                .call();\n\n        // handle response\n    }\n}\n```\n\u003c!-- End Global Parameters [global-parameters] --\u003e\n\n\u003c!-- Start Retries [retries] --\u003e\n## Retries\n\nSome of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.\n\nTo change the default retry strategy for a single API call, you can provide a `RetryConfig` object through the `retryConfig` builder method:\n```java\npackage hello.world;\n\nimport dev.speakeasyapi.javaclientsdk.RyanTest;\nimport dev.speakeasyapi.javaclientsdk.models.errors.Error;\nimport dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsRequest;\nimport dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsResponse;\nimport dev.speakeasyapi.javaclientsdk.models.shared.CliEvent;\nimport dev.speakeasyapi.javaclientsdk.models.shared.InteractionType;\nimport dev.speakeasyapi.javaclientsdk.models.shared.Security;\nimport dev.speakeasyapi.javaclientsdk.utils.BackoffStrategy;\nimport dev.speakeasyapi.javaclientsdk.utils.RetryConfig;\nimport java.lang.Exception;\nimport java.time.OffsetDateTime;\nimport java.util.List;\nimport java.util.concurrent.TimeUnit;\n\npublic class Application {\n\n    public static void main(String[] args) throws Error, Exception {\n\n        RyanTest sdk = RyanTest.builder()\n                .security(Security.builder()\n                    .apiKey(\"\u003cYOUR_API_KEY_HERE\u003e\")\n                    .build())\n            .build();\n\n        PostWorkspaceEventsRequest req = PostWorkspaceEventsRequest.builder()\n                .requestBody(List.of(\n                    CliEvent.builder()\n                        .createdAt(OffsetDateTime.parse(\"2025-03-02T10:07:28.113Z\"))\n                        .executionId(\"\u003cid\u003e\")\n                        .id(\"\u003cid\u003e\")\n                        .interactionType(InteractionType.TARGET_GENERATE)\n                        .localStartedAt(OffsetDateTime.parse(\"2025-08-12T17:54:17.538Z\"))\n                        .speakeasyApiKeyName(\"\u003cvalue\u003e\")\n                        .speakeasyVersion(\"\u003cvalue\u003e\")\n                        .success(true)\n                        .workspaceId(\"\u003cid\u003e\")\n                        .build()))\n                .workspaceID(\"\u003cid\u003e\")\n                .build();\n\n        PostWorkspaceEventsResponse res = sdk.events().postWorkspaceEvents()\n                .request(req)\n                .retryConfig(RetryConfig.builder()\n                    .backoff(BackoffStrategy.builder()\n                        .initialInterval(1L, TimeUnit.MILLISECONDS)\n                        .maxInterval(50L, TimeUnit.MILLISECONDS)\n                        .maxElapsedTime(1000L, TimeUnit.MILLISECONDS)\n                        .baseFactor(1.1)\n                        .jitterFactor(0.15)\n                        .retryConnectError(false)\n                        .build())\n                    .build())\n                .call();\n\n        // handle response\n    }\n}\n```\n\nIf you'd like to override the default retry strategy for all operations that support retries, you can provide a configuration at SDK initialization:\n```java\npackage hello.world;\n\nimport dev.speakeasyapi.javaclientsdk.RyanTest;\nimport dev.speakeasyapi.javaclientsdk.models.errors.Error;\nimport dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsRequest;\nimport dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsResponse;\nimport dev.speakeasyapi.javaclientsdk.models.shared.CliEvent;\nimport dev.speakeasyapi.javaclientsdk.models.shared.InteractionType;\nimport dev.speakeasyapi.javaclientsdk.models.shared.Security;\nimport dev.speakeasyapi.javaclientsdk.utils.BackoffStrategy;\nimport dev.speakeasyapi.javaclientsdk.utils.RetryConfig;\nimport java.lang.Exception;\nimport java.time.OffsetDateTime;\nimport java.util.List;\nimport java.util.concurrent.TimeUnit;\n\npublic class Application {\n\n    public static void main(String[] args) throws Error, Exception {\n\n        RyanTest sdk = RyanTest.builder()\n                .retryConfig(RetryConfig.builder()\n                    .backoff(BackoffStrategy.builder()\n                        .initialInterval(1L, TimeUnit.MILLISECONDS)\n                        .maxInterval(50L, TimeUnit.MILLISECONDS)\n                        .maxElapsedTime(1000L, TimeUnit.MILLISECONDS)\n                        .baseFactor(1.1)\n                        .jitterFactor(0.15)\n                        .retryConnectError(false)\n                        .build())\n                    .build())\n                .security(Security.builder()\n                    .apiKey(\"\u003cYOUR_API_KEY_HERE\u003e\")\n                    .build())\n            .build();\n\n        PostWorkspaceEventsRequest req = PostWorkspaceEventsRequest.builder()\n                .requestBody(List.of(\n                    CliEvent.builder()\n                        .createdAt(OffsetDateTime.parse(\"2025-03-02T10:07:28.113Z\"))\n                        .executionId(\"\u003cid\u003e\")\n                        .id(\"\u003cid\u003e\")\n                        .interactionType(InteractionType.TARGET_GENERATE)\n                        .localStartedAt(OffsetDateTime.parse(\"2025-08-12T17:54:17.538Z\"))\n                        .speakeasyApiKeyName(\"\u003cvalue\u003e\")\n                        .speakeasyVersion(\"\u003cvalue\u003e\")\n                        .success(true)\n                        .workspaceId(\"\u003cid\u003e\")\n                        .build()))\n                .workspaceID(\"\u003cid\u003e\")\n                .build();\n\n        PostWorkspaceEventsResponse res = sdk.events().postWorkspaceEvents()\n                .request(req)\n                .call();\n\n        // handle response\n    }\n}\n```\n\u003c!-- End Retries [retries] --\u003e\n\n\u003c!-- Placeholder for Future Speakeasy SDK Sections --\u003e\n\n\n\n### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-api%2Fspeakeasy-client-sdk-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeakeasy-api%2Fspeakeasy-client-sdk-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-api%2Fspeakeasy-client-sdk-java/lists"}