From ae9ceea7472466a345dd5da09d9402518104389f Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 5 Sep 2024 22:14:23 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.390.7 --- .speakeasy/gen.lock | 666 +-- .speakeasy/workflow.lock | 6 +- README.md | 96 +- RELEASES.md | 12 +- USAGE.md | 10 +- build.gradle | 10 +- codeSamples.yaml | 1702 +++--- docs/sdks/apiendpoints/README.md | 82 +- docs/sdks/apis/README.md | 62 +- docs/sdks/artifacts/README.md | 78 +- docs/sdks/auth/README.md | 34 +- docs/sdks/embeds/README.md | 28 +- docs/sdks/events/README.md | 52 +- docs/sdks/github/README.md | 90 +- docs/sdks/metadata/README.md | 32 +- docs/sdks/organizations/README.md | 34 +- docs/sdks/reports/README.md | 34 +- docs/sdks/requests/README.md | 30 +- docs/sdks/schemas/README.md | 84 +- docs/sdks/shorturls/README.md | 10 +- docs/sdks/suggest/README.md | 34 +- docs/sdks/workspaces/README.md | 10 +- gen.yaml | 2 +- gradlew.bat | 184 +- .../javaclientsdk/ApiEndpoints.java | 1135 ++++ .../dev/speakeasyapi/javaclientsdk/Apis.java | 879 ++++ .../speakeasyapi/javaclientsdk/Artifacts.java | 1106 ++++ .../dev/speakeasyapi/javaclientsdk/Auth.java | 605 +++ .../speakeasyapi/javaclientsdk/Embeds.java | 433 ++ .../speakeasyapi/javaclientsdk/Events.java | 641 +++ .../speakeasyapi/javaclientsdk/Github.java | 1176 +++++ .../speakeasyapi/javaclientsdk/Metadata.java | 446 ++ .../javaclientsdk/Organizations.java | 556 ++ .../speakeasyapi/javaclientsdk/Reports.java | 411 ++ .../speakeasyapi/javaclientsdk/Requests.java | 452 ++ .../dev/speakeasyapi/javaclientsdk/SDK.java | 367 ++ .../javaclientsdk/SDKConfiguration.java | 66 + .../speakeasyapi/javaclientsdk/Schemas.java | 1135 ++++ .../javaclientsdk/SecuritySource.java | 28 + .../speakeasyapi/javaclientsdk/ShortURLs.java | 169 + .../speakeasyapi/javaclientsdk/Suggest.java | 451 ++ .../javaclientsdk/Workspaces.java | 170 + .../javaclientsdk/hooks/SDKHooks.java | 26 + .../models/errors/AuthException.java | 33 + .../javaclientsdk/models/errors/Error.java | 140 + .../javaclientsdk/models/errors/SDKError.java | 85 + .../operations/ApplyOperationIDsRequest.java | 156 + .../ApplyOperationIDsRequestBody.java | 131 + .../ApplyOperationIDsRequestBuilder.java | 29 + .../operations/ApplyOperationIDsResponse.java | 370 ++ .../models/operations/CheckAccessRequest.java | 118 + .../operations/CheckAccessRequestBuilder.java | 29 + .../operations/CheckAccessResponse.java | 252 + .../ConfigureCodeSamplesRequestBuilder.java | 30 + .../ConfigureCodeSamplesResponse.java | 312 ++ .../ConfigureMintlifyRepoRequestBuilder.java | 30 + .../ConfigureMintlifyRepoResponse.java | 252 + .../ConfigureTargetRequestBuilder.java | 30 + .../operations/ConfigureTargetResponse.java | 252 + .../CreateFreeTrialRequestBuilder.java | 20 + .../operations/CreateFreeTrialResponse.java | 252 + .../models/operations/CreateRequestBody.java | 101 + .../operations/CreateRequestBuilder.java | 29 + .../models/operations/CreateResponse.java | 252 + .../operations/DeleteApiEndpointRequest.java | 183 + .../DeleteApiEndpointRequestBuilder.java | 29 + .../operations/DeleteApiEndpointResponse.java | 252 + .../models/operations/DeleteApiRequest.java | 142 + .../operations/DeleteApiRequestBuilder.java | 29 + .../models/operations/DeleteApiResponse.java | 252 + .../operations/DeleteSchemaRequest.java | 183 + .../DeleteSchemaRequestBuilder.java | 29 + .../operations/DeleteSchemaResponse.java | 252 + .../DeleteVersionMetadataRequest.java | 224 + .../DeleteVersionMetadataRequestBuilder.java | 29 + .../DeleteVersionMetadataResponse.java | 252 + .../operations/DownloadSchemaRequest.java | 142 + .../DownloadSchemaRequestBuilder.java | 29 + .../operations/DownloadSchemaResponse.java | 370 ++ .../DownloadSchemaRevisionRequest.java | 183 + .../DownloadSchemaRevisionRequestBuilder.java | 29 + .../DownloadSchemaRevisionResponse.java | 370 ++ .../operations/FetchPublishingPRsRequest.java | 147 + .../FetchPublishingPRsRequestBuilder.java | 29 + .../FetchPublishingPRsResponse.java | 312 ++ .../javaclientsdk/models/operations/File.java | 118 + .../operations/FindApiEndpointRequest.java | 183 + .../FindApiEndpointRequestBuilder.java | 29 + .../operations/FindApiEndpointResponse.java | 312 ++ ...erateOpenApiSpecForApiEndpointRequest.java | 183 + ...enApiSpecForApiEndpointRequestBuilder.java | 29 + ...rateOpenApiSpecForApiEndpointResponse.java | 312 ++ .../GenerateOpenApiSpecRequest.java | 142 + .../GenerateOpenApiSpecRequestBuilder.java | 29 + .../GenerateOpenApiSpecResponse.java | 312 ++ ...ostmanCollectionForApiEndpointRequest.java | 183 + ...ollectionForApiEndpointRequestBuilder.java | 29 + ...stmanCollectionForApiEndpointResponse.java | 311 ++ .../GeneratePostmanCollectionRequest.java | 142 + ...neratePostmanCollectionRequestBuilder.java | 29 + .../GeneratePostmanCollectionResponse.java | 311 ++ ...nerateRequestPostmanCollectionRequest.java | 101 + ...equestPostmanCollectionRequestBuilder.java | 29 + ...erateRequestPostmanCollectionResponse.java | 311 ++ .../operations/GetAccessTokenRequest.java | 101 + .../GetAccessTokenRequestBuilder.java | 29 + .../operations/GetAccessTokenResponse.java | 312 ++ .../models/operations/GetActionRequest.java | 184 + .../operations/GetActionRequestBuilder.java | 29 + .../models/operations/GetActionResponse.java | 312 ++ .../operations/GetAllApiEndpointsRequest.java | 101 + .../GetAllApiEndpointsRequestBuilder.java | 29 + .../GetAllApiEndpointsResponse.java | 313 ++ .../operations/GetAllApiVersionsRequest.java | 230 + .../GetAllApiVersionsRequestBuilder.java | 29 + .../operations/GetAllApiVersionsResponse.java | 313 ++ .../GetAllForVersionApiEndpointsRequest.java | 142 + ...lForVersionApiEndpointsRequestBuilder.java | 29 + .../GetAllForVersionApiEndpointsResponse.java | 313 ++ .../operations/GetApiEndpointRequest.java | 183 + .../GetApiEndpointRequestBuilder.java | 29 + .../operations/GetApiEndpointResponse.java | 312 ++ .../models/operations/GetApisRequest.java | 188 + .../operations/GetApisRequestBuilder.java | 29 + .../models/operations/GetApisResponse.java | 313 ++ .../models/operations/GetBlobRequest.java | 176 + .../operations/GetBlobRequestBuilder.java | 29 + .../models/operations/GetBlobResponse.java | 311 ++ .../GetChangesReportSignedUrlRequest.java | 101 + ...tChangesReportSignedUrlRequestBuilder.java | 29 + .../GetChangesReportSignedUrlResponse.java | 251 + ...GetChangesReportSignedUrlSignedAccess.java | 92 + .../GetEmbedAccessTokenRequest.java | 246 + .../GetEmbedAccessTokenRequestBuilder.java | 29 + .../GetEmbedAccessTokenResponse.java | 312 ++ .../GetLintingReportSignedUrlRequest.java | 101 + ...tLintingReportSignedUrlRequestBuilder.java | 29 + .../GetLintingReportSignedUrlResponse.java | 251 + ...GetLintingReportSignedUrlSignedAccess.java | 92 + .../models/operations/GetManifestRequest.java | 188 + .../operations/GetManifestRequestBuilder.java | 29 + .../operations/GetManifestResponse.java | 312 ++ .../GetNamespacesRequestBuilder.java | 20 + .../operations/GetNamespacesResponse.java | 311 ++ .../operations/GetOASSummaryRequest.java | 118 + .../GetOASSummaryRequestBuilder.java | 29 + .../operations/GetOASSummaryResponse.java | 312 ++ .../operations/GetOrganizationRequest.java | 101 + .../GetOrganizationRequestBuilder.java | 29 + .../operations/GetOrganizationResponse.java | 312 ++ .../GetOrganizationUsageRequestBuilder.java | 20 + .../GetOrganizationUsageResponse.java | 312 ++ .../GetOrganizationsRequestBuilder.java | 20 + .../operations/GetOrganizationsResponse.java | 313 ++ .../GetRequestFromEventLogRequest.java | 101 + .../GetRequestFromEventLogRequestBuilder.java | 29 + .../GetRequestFromEventLogResponse.java | 312 ++ .../operations/GetRevisionsRequest.java | 154 + .../GetRevisionsRequestBuilder.java | 29 + .../operations/GetRevisionsResponse.java | 311 ++ .../operations/GetSchemaDiffRequest.java | 224 + .../GetSchemaDiffRequestBuilder.java | 29 + .../operations/GetSchemaDiffResponse.java | 312 ++ .../models/operations/GetSchemaRequest.java | 142 + .../operations/GetSchemaRequestBuilder.java | 29 + .../models/operations/GetSchemaResponse.java | 312 ++ .../operations/GetSchemaRevisionRequest.java | 183 + .../GetSchemaRevisionRequestBuilder.java | 29 + .../operations/GetSchemaRevisionResponse.java | 312 ++ .../models/operations/GetSchemasRequest.java | 142 + .../operations/GetSchemasRequestBuilder.java | 29 + .../models/operations/GetSchemasResponse.java | 313 ++ .../models/operations/GetTagsRequest.java | 89 + .../operations/GetTagsRequestBuilder.java | 29 + .../models/operations/GetTagsResponse.java | 311 ++ .../operations/GetUserRequestBuilder.java | 20 + .../models/operations/GetUserResponse.java | 312 ++ ...tValidEmbedAccessTokensRequestBuilder.java | 20 + .../GetValidEmbedAccessTokensResponse.java | 313 ++ .../operations/GetVersionMetadataRequest.java | 142 + .../GetVersionMetadataRequestBuilder.java | 29 + .../GetVersionMetadataResponse.java | 313 ++ .../operations/GetWorkspaceAccessRequest.java | 243 + .../GetWorkspaceAccessRequestBuilder.java | 48 + .../GetWorkspaceAccessResponse.java | 252 + .../GetWorkspaceEventsByTargetRequest.java | 226 + ...WorkspaceEventsByTargetRequestBuilder.java | 29 + .../GetWorkspaceEventsByTargetResponse.java | 253 + .../operations/GetWorkspaceRequest.java | 124 + .../GetWorkspaceRequestBuilder.java | 29 + .../operations/GetWorkspaceResponse.java | 312 ++ .../GetWorkspaceTargetsRequest.java | 184 + .../GetWorkspaceTargetsRequestBuilder.java | 29 + .../GetWorkspaceTargetsResponse.java | 253 + .../GithubCheckPublishingSecretsRequest.java | 89 + ...bCheckPublishingSecretsRequestBuilder.java | 29 + .../GithubCheckPublishingSecretsResponse.java | 312 ++ ...bStorePublishingSecretsRequestBuilder.java | 30 + .../GithubStorePublishingSecretsResponse.java | 252 + .../InsertVersionMetadataRequest.java | 184 + .../InsertVersionMetadataRequestBuilder.java | 29 + .../InsertVersionMetadataResponse.java | 312 ++ .../javaclientsdk/models/operations/Op.java | 105 + .../models/operations/PostTagsRequest.java | 157 + .../operations/PostTagsRequestBuilder.java | 29 + .../models/operations/PostTagsResponse.java | 252 + .../PostWorkspaceEventsRequest.java | 156 + .../PostWorkspaceEventsRequestBuilder.java | 48 + .../PostWorkspaceEventsResponse.java | 183 + .../operations/PreflightRequestBuilder.java | 37 + .../models/operations/PreflightResponse.java | 312 ++ .../operations/QueryEventLogRequest.java | 127 + .../QueryEventLogRequestBuilder.java | 29 + .../operations/QueryEventLogResponse.java | 313 ++ .../models/operations/QueryParamOp.java | 105 + .../models/operations/RegisterSchemaFile.java | 118 + .../operations/RegisterSchemaRequest.java | 183 + .../operations/RegisterSchemaRequestBody.java | 92 + .../RegisterSchemaRequestBuilder.java | 29 + .../operations/RegisterSchemaResponse.java | 252 + .../RevokeEmbedAccessTokenRequest.java | 101 + .../RevokeEmbedAccessTokenRequestBuilder.java | 29 + .../RevokeEmbedAccessTokenResponse.java | 252 + .../operations/SDKMethodInterfaces.java | 422 ++ .../models/operations/Schema.java | 118 + .../SearchWorkspaceEventsRequest.java | 422 ++ .../SearchWorkspaceEventsRequestBuilder.java | 29 + .../SearchWorkspaceEventsResponse.java | 253 + .../SuggestOpenAPIRegistryRequest.java | 229 + .../SuggestOpenAPIRegistryRequestBuilder.java | 29 + .../SuggestOpenAPIRegistryResponse.java | 251 + .../operations/SuggestOpenAPIRequest.java | 130 + .../operations/SuggestOpenAPIRequestBody.java | 142 + .../SuggestOpenAPIRequestBuilder.java | 29 + .../operations/SuggestOpenAPIResponse.java | 251 + .../TriggerActionRequestBuilder.java | 30 + .../operations/TriggerActionResponse.java | 252 + .../operations/UploadReportRequestBody.java | 122 + .../UploadReportRequestBuilder.java | 29 + .../operations/UploadReportResponse.java | 251 + .../UploadReportUploadedReport.java | 92 + .../operations/UpsertApiEndpointRequest.java | 225 + .../UpsertApiEndpointRequestBuilder.java | 29 + .../operations/UpsertApiEndpointResponse.java | 312 ++ .../models/operations/UpsertApiRequest.java | 143 + .../operations/UpsertApiRequestBuilder.java | 29 + .../models/operations/UpsertApiResponse.java | 312 ++ .../ValidateApiKeyRequestBuilder.java | 20 + .../operations/ValidateApiKeyResponse.java | 312 ++ .../models/shared/AccessDetails.java | 172 + .../models/shared/AccessToken.java | 248 + .../models/shared/AccessTokenUser.java | 321 ++ .../models/shared/AccountType.java | 26 + .../javaclientsdk/models/shared/AddTags.java | 146 + .../models/shared/Annotations.java | 772 +++ .../javaclientsdk/models/shared/Api.java | 448 ++ .../models/shared/ApiEndpoint.java | 552 ++ .../models/shared/ApiEndpointInput.java | 309 ++ .../javaclientsdk/models/shared/ApiInput.java | 260 + .../models/shared/ApiKeyDetails.java | 361 ++ .../javaclientsdk/models/shared/Auth.java | 118 + .../models/shared/BoundedRequest.java | 681 +++ .../javaclientsdk/models/shared/Claims.java | 61 + .../javaclientsdk/models/shared/CliEvent.java | 4591 +++++++++++++++++ .../models/shared/Diagnostic.java | 254 + .../shared/EmbedAccessTokenResponse.java | 92 + .../models/shared/EmbedToken.java | 545 ++ .../models/shared/FeatureFlag.java | 143 + .../javaclientsdk/models/shared/Filter.java | 186 + .../javaclientsdk/models/shared/Filters.java | 229 + .../models/shared/GenerateBumpType.java | 32 + .../shared/GenerateOpenApiSpecDiff.java | 118 + .../models/shared/GetNamespacesResponse.java | 90 + .../models/shared/GetRevisionsResponse.java | 119 + .../models/shared/GetTagsResponse.java | 90 + .../GithubConfigureCodeSamplesRequest.java | 186 + .../GithubConfigureCodeSamplesResponse.java | 214 + .../GithubConfigureMintlifyRepoRequest.java | 299 ++ .../shared/GithubConfigureTargetRequest.java | 145 + .../shared/GithubGetActionResponse.java | 190 + ...ithubMissingPublishingSecretsResponse.java | 115 + .../shared/GithubPublishingPRResponse.java | 154 + .../GithubStorePublishingSecretsRequest.java | 175 + .../shared/GithubTriggerActionRequest.java | 377 ++ .../models/shared/InteractionType.java | 36 + .../javaclientsdk/models/shared/Level.java | 25 + .../javaclientsdk/models/shared/License.java | 109 + .../javaclientsdk/models/shared/Manifest.java | 375 ++ .../models/shared/Namespace.java | 204 + .../javaclientsdk/models/shared/OASInfo.java | 205 + .../models/shared/OASOperation.java | 206 + .../models/shared/OASSummary.java | 119 + .../models/shared/OpenapiDiffBumpType.java | 29 + .../models/shared/Organization.java | 360 ++ .../models/shared/OrganizationUsage.java | 350 ++ .../shared/OrganizationUsageResponse.java | 247 + .../models/shared/PreflightRequest.java | 89 + .../models/shared/PreflightToken.java | 112 + .../javaclientsdk/models/shared/Report.java | 111 + .../models/shared/RequestMetadata.java | 154 + .../javaclientsdk/models/shared/Revision.java | 248 + .../javaclientsdk/models/shared/Schema.java | 310 ++ .../models/shared/SchemaDiff.java | 188 + .../javaclientsdk/models/shared/Security.java | 147 + .../javaclientsdk/models/shared/ShortURL.java | 118 + .../models/shared/SuggestOpts.java | 142 + .../models/shared/SuggestionType.java | 24 + .../javaclientsdk/models/shared/Tag.java | 200 + .../models/shared/TargetSDK.java | 2122 ++++++++ .../javaclientsdk/models/shared/Type.java | 24 + .../models/shared/UnboundedRequest.java | 270 + .../javaclientsdk/models/shared/User.java | 669 +++ .../models/shared/V2Descriptor.java | 313 ++ .../models/shared/ValueChange.java | 142 + .../models/shared/VersionMetadata.java | 310 ++ .../models/shared/VersionMetadataInput.java | 145 + .../models/shared/WorkflowDocument.java | 144 + .../models/shared/Workspace.java | 396 ++ .../models/shared/Workspaces.java | 238 + .../javaclientsdk/utils/BackoffStrategy.java | 250 + .../javaclientsdk/utils/BigDecimalString.java | 105 + .../javaclientsdk/utils/BigIntegerString.java | 105 + .../javaclientsdk/utils/Deserializers.java | 241 + .../javaclientsdk/utils/EventStream.java | 126 + .../utils/EventStreamLineReader.java | 71 + .../utils/EventStreamMessage.java | 57 + .../utils/EventStreamReader.java | 156 + .../javaclientsdk/utils/FormMetadata.java | 23 + .../javaclientsdk/utils/HTTPClient.java | 32 + .../javaclientsdk/utils/HTTPRequest.java | 94 + .../javaclientsdk/utils/HeaderMetadata.java | 22 + .../javaclientsdk/utils/Helpers.java | 48 + .../javaclientsdk/utils/Hook.java | 272 + .../javaclientsdk/utils/Hooks.java | 197 + .../javaclientsdk/utils/JSON.java | 27 + .../utils/LazySingletonValue.java | 31 + .../javaclientsdk/utils/Metadata.java | 83 + .../utils/MultipartFormMetadata.java | 23 + .../utils/OneOfDeserializer.java | 271 + .../javaclientsdk/utils/Options.java | 59 + .../utils/PathParamsMetadata.java | 23 + .../javaclientsdk/utils/QueryParameters.java | 240 + .../utils/QueryParamsMetadata.java | 23 + .../javaclientsdk/utils/RequestBody.java | 351 ++ .../javaclientsdk/utils/RequestMetadata.java | 20 + .../javaclientsdk/utils/Response.java | 26 + .../javaclientsdk/utils/Retries.java | 215 + .../javaclientsdk/utils/RetryConfig.java | 110 + .../javaclientsdk/utils/Security.java | 176 + .../javaclientsdk/utils/SecurityMetadata.java | 24 + .../javaclientsdk/utils/SerializedBody.java | 28 + .../utils/SpeakeasyHTTPClient.java | 22 + .../utils/SpeakeasyMetadata.java | 16 + .../javaclientsdk/utils/TypedObject.java | 60 + .../javaclientsdk/utils/Types.java | 52 + .../javaclientsdk/utils/Utils.java | 1053 ++++ 356 files changed, 71001 insertions(+), 1686 deletions(-) create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/ApiEndpoints.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Apis.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Artifacts.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Auth.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Embeds.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Events.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Github.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Metadata.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Organizations.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Reports.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Requests.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/SDK.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/SDKConfiguration.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Schemas.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/SecuritySource.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/ShortURLs.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Suggest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/Workspaces.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/hooks/SDKHooks.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/AuthException.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/Error.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/SDKError.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequestBody.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureCodeSamplesRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureCodeSamplesResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureMintlifyRepoRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureMintlifyRepoResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureTargetRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureTargetResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateFreeTrialRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateFreeTrialResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateRequestBody.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/File.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlSignedAccess.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlSignedAccess.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetNamespacesRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetNamespacesResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationUsageRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationUsageResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetUserRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetUserResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetValidEmbedAccessTokensRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetValidEmbedAccessTokensResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubStorePublishingSecretsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubStorePublishingSecretsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/Op.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PreflightRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PreflightResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryParamOp.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaFile.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequestBody.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SDKMethodInterfaces.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/Schema.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequestBody.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/TriggerActionRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/TriggerActionResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportRequestBody.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportUploadedReport.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ValidateApiKeyRequestBuilder.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ValidateApiKeyResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessDetails.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessToken.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessTokenUser.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccountType.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AddTags.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Annotations.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Api.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiEndpoint.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiEndpointInput.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiInput.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiKeyDetails.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Auth.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/BoundedRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Claims.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/CliEvent.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Diagnostic.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/EmbedAccessTokenResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/EmbedToken.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/FeatureFlag.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Filter.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Filters.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GenerateBumpType.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GenerateOpenApiSpecDiff.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetNamespacesResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetRevisionsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetTagsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureCodeSamplesRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureCodeSamplesResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureMintlifyRepoRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureTargetRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubGetActionResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubMissingPublishingSecretsResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubPublishingPRResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubStorePublishingSecretsRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubTriggerActionRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/InteractionType.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Level.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/License.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Manifest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Namespace.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASInfo.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASOperation.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASSummary.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OpenapiDiffBumpType.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Organization.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OrganizationUsage.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OrganizationUsageResponse.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/PreflightRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/PreflightToken.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Report.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/RequestMetadata.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Revision.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Schema.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SchemaDiff.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Security.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ShortURL.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SuggestOpts.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SuggestionType.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Tag.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/TargetSDK.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Type.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/UnboundedRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/User.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/V2Descriptor.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ValueChange.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/VersionMetadata.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/VersionMetadataInput.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/WorkflowDocument.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Workspace.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Workspaces.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/BackoffStrategy.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/BigDecimalString.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/BigIntegerString.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/Deserializers.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStream.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamLineReader.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamMessage.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamReader.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/FormMetadata.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/HTTPClient.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/HTTPRequest.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/HeaderMetadata.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/Helpers.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/Hook.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/Hooks.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/JSON.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/LazySingletonValue.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/Metadata.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/MultipartFormMetadata.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/OneOfDeserializer.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/Options.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/PathParamsMetadata.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/QueryParameters.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/QueryParamsMetadata.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/RequestBody.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/RequestMetadata.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/Response.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/Retries.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/RetryConfig.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/Security.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/SecurityMetadata.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/SerializedBody.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/SpeakeasyHTTPClient.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/SpeakeasyMetadata.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/TypedObject.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/Types.java create mode 100644 src/main/java/dev/speakeasyapi/javaclientsdk/utils/Utils.java diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 560264c4..95a48dce 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -5,8 +5,8 @@ management: docVersion: 0.4.0 . speakeasyVersion: 1.390.7 generationVersion: 2.409.8 - releaseVersion: 7.16.7 - configChecksum: babcbc85a6cd258f1775d0f2cf232da1 + releaseVersion: 7.16.8 + configChecksum: 2b7415c592c53ea385dcd1cc7cdd39be repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-java.git repoSubDirectory: . published: true @@ -28,93 +28,93 @@ features: sdkHooks: 0.1.0 serverIDs: 2.81.1 generatedFiles: - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/SecuritySource.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/SDKConfiguration.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Apis.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/ApiEndpoints.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Metadata.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Schemas.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Artifacts.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Auth.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Requests.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Github.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Organizations.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Reports.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/ShortURLs.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Suggest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Embeds.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Workspaces.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/Events.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DeleteApiRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GenerateOpenApiSpecRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GeneratePostmanCollectionRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetAllApiVersionsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetApisRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/UpsertApiRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DeleteApiEndpointRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/FindApiEndpointRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetAllApiEndpointsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetAllForVersionApiEndpointsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetApiEndpointRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/UpsertApiEndpointRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DeleteVersionMetadataRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetVersionMetadataRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/InsertVersionMetadataRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DeleteSchemaRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DownloadSchemaRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DownloadSchemaRevisionRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetSchemaRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetSchemaDiffRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetSchemaRevisionRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetSchemasRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/RegisterSchemaRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetBlobRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetManifestRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetNamespacesRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetOASSummaryRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetRevisionsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetTagsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/PostTagsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/PreflightRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetAccessTokenRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetUserRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetWorkspaceAccessRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/ValidateApiKeyRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GenerateRequestPostmanCollectionRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetRequestFromEventLogRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/QueryEventLogRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/CheckAccessRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/ConfigureCodeSamplesRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/ConfigureMintlifyRepoRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/ConfigureTargetRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/FetchPublishingPRsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetActionRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GithubCheckPublishingSecretsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GithubStorePublishingSecretsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/TriggerActionRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/CreateFreeTrialRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetOrganizationRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetOrganizationUsageRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetOrganizationsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetChangesReportSignedUrlRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetLintingReportSignedUrlRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/UploadReportRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/CreateRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/ApplyOperationIDsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/SuggestOpenAPIRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/SuggestOpenAPIRegistryRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetEmbedAccessTokenRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetValidEmbedAccessTokensRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/RevokeEmbedAccessTokenRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetWorkspaceRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetWorkspaceEventsByTargetRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetWorkspaceTargetsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/PostWorkspaceEventsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/SearchWorkspaceEventsRequestBuilder.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/SDKMethodInterfaces.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/SDK.java + - src/main/java/dev/speakeasyapi/javaclientsdk/SecuritySource.java + - src/main/java/dev/speakeasyapi/javaclientsdk/SDKConfiguration.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Apis.java + - src/main/java/dev/speakeasyapi/javaclientsdk/ApiEndpoints.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Metadata.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Schemas.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Artifacts.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Auth.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Requests.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Github.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Organizations.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Reports.java + - src/main/java/dev/speakeasyapi/javaclientsdk/ShortURLs.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Suggest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Embeds.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Workspaces.java + - src/main/java/dev/speakeasyapi/javaclientsdk/Events.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetNamespacesRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PreflightRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetUserRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ValidateApiKeyRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureCodeSamplesRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureMintlifyRepoRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureTargetRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubStorePublishingSecretsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/TriggerActionRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateFreeTrialRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationUsageRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetValidEmbedAccessTokensRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsRequestBuilder.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SDKMethodInterfaces.java + - src/main/java/dev/speakeasyapi/javaclientsdk/SDK.java - .gitattributes - build.gradle - gradle/wrapper/gradle-wrapper.jar @@ -122,250 +122,250 @@ generatedFiles: - gradlew - gradlew.bat - settings.gradle - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/BackoffStrategy.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/BigDecimalString.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/BigIntegerString.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/Deserializers.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/EventStream.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/EventStreamLineReader.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/EventStreamMessage.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/EventStreamReader.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/FormMetadata.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/HTTPClient.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/HTTPRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/HeaderMetadata.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/Helpers.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/Hook.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/Hooks.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/JSON.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/LazySingletonValue.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/Metadata.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/MultipartFormMetadata.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/OneOfDeserializer.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/Options.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/PathParamsMetadata.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/QueryParameters.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/QueryParamsMetadata.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/RequestBody.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/RequestMetadata.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/Response.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/Retries.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/RetryConfig.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/Security.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/SecurityMetadata.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/SerializedBody.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/SpeakeasyHTTPClient.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/SpeakeasyMetadata.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/TypedObject.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/Types.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/utils/Utils.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/errors/AuthException.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/errors/SDKError.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DeleteApiRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DeleteApiResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GenerateOpenApiSpecRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GenerateOpenApiSpecResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GeneratePostmanCollectionRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GeneratePostmanCollectionResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/Op.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetAllApiVersionsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetAllApiVersionsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/QueryParamOp.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetApisRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetApisResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/UpsertApiRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/UpsertApiResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DeleteApiEndpointRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DeleteApiEndpointResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/FindApiEndpointRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/FindApiEndpointResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetAllApiEndpointsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetAllApiEndpointsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetAllForVersionApiEndpointsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetAllForVersionApiEndpointsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetApiEndpointRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetApiEndpointResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/UpsertApiEndpointRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/UpsertApiEndpointResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DeleteVersionMetadataRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DeleteVersionMetadataResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetVersionMetadataRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetVersionMetadataResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/InsertVersionMetadataRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/InsertVersionMetadataResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DeleteSchemaRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DeleteSchemaResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DownloadSchemaRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DownloadSchemaResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DownloadSchemaRevisionRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/DownloadSchemaRevisionResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetSchemaRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetSchemaResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetSchemaDiffRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetSchemaDiffResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetSchemaRevisionRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetSchemaRevisionResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetSchemasRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetSchemasResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/RegisterSchemaFile.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/RegisterSchemaRequestBody.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/RegisterSchemaRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/RegisterSchemaResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetBlobRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetBlobResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetManifestRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetManifestResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetNamespacesResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetOASSummaryRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetOASSummaryResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetRevisionsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetRevisionsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetTagsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetTagsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/PostTagsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/PostTagsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/PreflightResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetAccessTokenRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetAccessTokenResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetUserResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetWorkspaceAccessRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetWorkspaceAccessResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/ValidateApiKeyResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GenerateRequestPostmanCollectionRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GenerateRequestPostmanCollectionResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetRequestFromEventLogRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetRequestFromEventLogResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/QueryEventLogRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/QueryEventLogResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/CheckAccessRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/CheckAccessResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/ConfigureCodeSamplesResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/ConfigureMintlifyRepoResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/ConfigureTargetResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/FetchPublishingPRsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/FetchPublishingPRsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetActionRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetActionResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GithubCheckPublishingSecretsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GithubCheckPublishingSecretsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GithubStorePublishingSecretsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/TriggerActionResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/CreateFreeTrialResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetOrganizationRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetOrganizationResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetOrganizationUsageResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetOrganizationsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetChangesReportSignedUrlRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetChangesReportSignedUrlSignedAccess.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetChangesReportSignedUrlResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetLintingReportSignedUrlRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetLintingReportSignedUrlSignedAccess.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetLintingReportSignedUrlResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/File.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/UploadReportRequestBody.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/UploadReportUploadedReport.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/UploadReportResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/CreateRequestBody.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/CreateResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/ApplyOperationIDsRequestBody.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/ApplyOperationIDsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/ApplyOperationIDsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/Schema.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/SuggestOpenAPIRequestBody.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/SuggestOpenAPIRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/SuggestOpenAPIResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/SuggestOpenAPIRegistryRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/SuggestOpenAPIRegistryResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetEmbedAccessTokenRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetEmbedAccessTokenResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetValidEmbedAccessTokensResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/RevokeEmbedAccessTokenRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/RevokeEmbedAccessTokenResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetWorkspaceRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetWorkspaceResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetWorkspaceEventsByTargetRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetWorkspaceEventsByTargetResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetWorkspaceTargetsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/GetWorkspaceTargetsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/PostWorkspaceEventsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/PostWorkspaceEventsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/SearchWorkspaceEventsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/operations/SearchWorkspaceEventsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/errors/Error.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GenerateOpenApiSpecDiff.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Api.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/ApiInput.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/ApiEndpoint.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/ApiEndpointInput.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/VersionMetadata.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/VersionMetadataInput.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Schema.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/ValueChange.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/SchemaDiff.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Manifest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/V2Descriptor.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Annotations.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GetNamespacesResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Namespace.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/OASSummary.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/OASOperation.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/License.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/OASInfo.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GetRevisionsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Revision.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GetTagsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Tag.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/AddTags.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/PreflightToken.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/PreflightRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Claims.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/AccessTokenUser.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Workspaces.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/AccessToken.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/AccountType.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/FeatureFlag.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/User.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Level.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/AccessDetails.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/ApiKeyDetails.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/UnboundedRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/BoundedRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/RequestMetadata.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Filters.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Filter.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GithubConfigureCodeSamplesResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Auth.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/WorkflowDocument.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GithubConfigureCodeSamplesRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GithubConfigureMintlifyRepoRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GithubConfigureTargetRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GithubPublishingPRResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GithubGetActionResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GithubMissingPublishingSecretsResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GithubStorePublishingSecretsRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GithubTriggerActionRequest.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Organization.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/OrganizationUsageResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/OrganizationUsage.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Type.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Report.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/ShortURL.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/SuggestionType.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/SuggestOpts.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Diagnostic.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/EmbedAccessTokenResponse.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/EmbedToken.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Workspace.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/GenerateBumpType.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/OpenapiDiffBumpType.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/CliEvent.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/InteractionType.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/TargetSDK.java - - src/main/java/io/github/speakeasy_sdks_staging/javaclientsdk/models/shared/Security.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/BackoffStrategy.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/BigDecimalString.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/BigIntegerString.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/Deserializers.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStream.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamLineReader.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamMessage.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamReader.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/FormMetadata.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/HTTPClient.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/HTTPRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/HeaderMetadata.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/Helpers.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/Hook.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/Hooks.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/JSON.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/LazySingletonValue.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/Metadata.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/MultipartFormMetadata.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/OneOfDeserializer.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/Options.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/PathParamsMetadata.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/QueryParameters.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/QueryParamsMetadata.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/RequestBody.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/RequestMetadata.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/Response.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/Retries.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/RetryConfig.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/Security.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/SecurityMetadata.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/SerializedBody.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/SpeakeasyHTTPClient.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/SpeakeasyMetadata.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/TypedObject.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/Types.java + - src/main/java/dev/speakeasyapi/javaclientsdk/utils/Utils.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/AuthException.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/SDKError.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/Op.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryParamOp.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaFile.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequestBody.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetNamespacesResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PreflightResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetUserResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ValidateApiKeyResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureCodeSamplesResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureMintlifyRepoResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureTargetResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubStorePublishingSecretsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/TriggerActionResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateFreeTrialResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationUsageResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlSignedAccess.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlSignedAccess.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/File.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportRequestBody.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportUploadedReport.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateRequestBody.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequestBody.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/Schema.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequestBody.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetValidEmbedAccessTokensResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/Error.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GenerateOpenApiSpecDiff.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Api.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiInput.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiEndpoint.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiEndpointInput.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/VersionMetadata.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/VersionMetadataInput.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Schema.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ValueChange.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SchemaDiff.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Manifest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/V2Descriptor.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Annotations.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetNamespacesResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Namespace.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASSummary.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASOperation.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/License.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASInfo.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetRevisionsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Revision.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetTagsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Tag.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AddTags.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/PreflightToken.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/PreflightRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Claims.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessTokenUser.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Workspaces.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessToken.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccountType.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/FeatureFlag.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/User.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Level.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessDetails.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiKeyDetails.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/UnboundedRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/BoundedRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/RequestMetadata.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Filters.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Filter.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureCodeSamplesResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Auth.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/WorkflowDocument.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureCodeSamplesRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureMintlifyRepoRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureTargetRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubPublishingPRResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubGetActionResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubMissingPublishingSecretsResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubStorePublishingSecretsRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubTriggerActionRequest.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Organization.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OrganizationUsageResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OrganizationUsage.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Type.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Report.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ShortURL.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SuggestionType.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SuggestOpts.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Diagnostic.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/EmbedAccessTokenResponse.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/EmbedToken.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Workspace.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GenerateBumpType.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OpenapiDiffBumpType.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/CliEvent.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/InteractionType.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/TargetSDK.java + - src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Security.java - docs/models/operations/DeleteApiRequest.md - docs/models/operations/DeleteApiResponse.md - docs/models/operations/GenerateOpenApiSpecRequest.md diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 609f2c6a..58333a75 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -3,7 +3,7 @@ sources: first-source: {} my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:180fe61191a8aee7ec167a0afc07433fe74e7a716d202256ab7e9def84c1a7f6 + sourceRevisionDigest: sha256:33dce1d111c53379b18f578720d8c456a096f29aa8f8812e95fc28e97104b4b3 sourceBlobDigest: sha256:a4bfd0ba65778a5104220868c475a6a29870a95c9018891ea04ffe956383d374 tags: - latest @@ -12,10 +12,10 @@ targets: java-target: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:180fe61191a8aee7ec167a0afc07433fe74e7a716d202256ab7e9def84c1a7f6 + sourceRevisionDigest: sha256:33dce1d111c53379b18f578720d8c456a096f29aa8f8812e95fc28e97104b4b3 sourceBlobDigest: sha256:a4bfd0ba65778a5104220868c475a6a29870a95c9018891ea04ffe956383d374 codeSamplesNamespace: code-samples-java-java-target - codeSamplesRevisionDigest: sha256:ffe894d84cad4c00757e0337a29a6efdf18a0673ea5cfe62a2082b63f54a9e33 + codeSamplesRevisionDigest: sha256:cd12b773ff6feb89b3b8b6539387d0c408c269a5348267b48ab458ac93a8da9b outLocation: /github/workspace/repo py: source: first-source diff --git a/README.md b/README.md index b25287f6..ebf4a2ab 100755 --- a/README.md +++ b/README.md @@ -32,15 +32,15 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'io.github.speakeasy-sdks-staging:javaclientsdk:7.16.7' +implementation 'dev.speakeasyapi:javaclientsdk:7.16.8' ``` Maven: ```xml - io.github.speakeasy-sdks-staging + dev.speakeasyapi javaclientsdk - 7.16.7 + 7.16.8 ``` @@ -67,11 +67,11 @@ gradlew.bat publishToMavenLocal -Pskip.signing ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetApisRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetApisResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApisRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApisResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -242,11 +242,11 @@ You can override the default server globally by passing a server name to the `se ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -289,11 +289,11 @@ The default server can also be overridden globally by passing a URL to the `serv ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -345,11 +345,11 @@ Handling errors in this SDK should largely match your expectations. All operati ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceEventsByTargetRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceEventsByTargetResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceEventsByTargetRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceEventsByTargetResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -373,7 +373,7 @@ public class Application { if (res.cliEventBatch().isPresent()) { // handle response } - } catch (io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.Error e) { + } catch (dev.speakeasyapi.javaclientsdk.models.errors.Error e) { // handle exception throw e; } catch (SDKError e) { @@ -405,11 +405,11 @@ You can set the security parameters through the `security` builder method when i ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -467,11 +467,11 @@ The following global parameter is available. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -516,13 +516,13 @@ To change the default retry strategy for a single API call, you can provide a `R ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceAccessRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceAccessResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; -import io.github.speakeasy_sdks_staging.javaclientsdk.utils.BackoffStrategy; -import io.github.speakeasy_sdks_staging.javaclientsdk.utils.RetryConfig; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.utils.BackoffStrategy; +import dev.speakeasyapi.javaclientsdk.utils.RetryConfig; import java.lang.Exception; import java.util.concurrent.TimeUnit; @@ -572,13 +572,13 @@ If you'd like to override the default retry strategy for all operations that sup ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceAccessRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceAccessResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; -import io.github.speakeasy_sdks_staging.javaclientsdk.utils.BackoffStrategy; -import io.github.speakeasy_sdks_staging.javaclientsdk.utils.RetryConfig; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.utils.BackoffStrategy; +import dev.speakeasyapi.javaclientsdk.utils.RetryConfig; import java.lang.Exception; import java.util.concurrent.TimeUnit; diff --git a/RELEASES.md b/RELEASES.md index 63f04c05..d82b7850 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1666,4 +1666,14 @@ Based on: ### Generated - [java v7.16.7] . ### Releases -- [Maven Central v7.16.7] https://central.sonatype.com/artifact/io.github.speakeasy-sdks-staging/javaclientsdk/7.16.7 - . \ No newline at end of file +- [Maven Central v7.16.7] https://central.sonatype.com/artifact/io.github.speakeasy-sdks-staging/javaclientsdk/7.16.7 - . + +## 2024-09-05 22:13:24 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.390.7 (2.409.8) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v7.16.8] . +### Releases +- [Maven Central v7.16.8] https://central.sonatype.com/artifact/dev.speakeasyapi/javaclientsdk/7.16.8 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 61efc9d9..39a154e4 100644 --- a/USAGE.md +++ b/USAGE.md @@ -2,11 +2,11 @@ ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetApisRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetApisResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApisRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApisResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/build.gradle b/build.gradle index 09fac387..81643985 100644 --- a/build.gradle +++ b/build.gradle @@ -41,7 +41,7 @@ model { jar { dependsOn(":generatePomFileForMavenPublication") - into("META-INF/maven/io.github.speakeasy-sdks-staging/javaclientsdk") { + into("META-INF/maven/dev.speakeasyapi/javaclientsdk") { from("$buildDir/pom.xml") } } @@ -60,8 +60,8 @@ tasks.withType(Javadoc) { options.addStringOption('Xdoclint:none', '-quiet') } -group = "io.github.speakeasy-sdks-staging" -version = "7.16.7" +group = "dev.speakeasyapi" +version = "7.16.8" sourcesJar { archiveBaseName = "javaclientsdk" @@ -86,9 +86,9 @@ publishing { publications { maven(MavenPublication) { - groupId = 'io.github.speakeasy-sdks-staging' + groupId = 'dev.speakeasyapi' artifactId = 'javaclientsdk' - version = '7.16.7' + version = '7.16.8' from components.java diff --git a/codeSamples.yaml b/codeSamples.yaml index 18e177d8..c5675892 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,19 +3,19 @@ info: title: CodeSamples overlay for java target version: 0.0.0 actions: - - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/revisions/{revision_reference}/summary"]["get"] + - target: $["paths"]["/v1/github/check_access"]["get"] update: x-codeSamples: - lang: java - label: getOASSummary + label: checkAccess source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetOASSummaryRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetOASSummaryResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.CheckAccessRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.CheckAccessResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -28,18 +28,16 @@ actions: .build()) .build(); - GetOASSummaryRequest req = GetOASSummaryRequest.builder() - .namespaceName("") - .revisionReference("") + CheckAccessRequest req = CheckAccessRequest.builder() + .org("") + .repo("") .build(); - GetOASSummaryResponse res = sdk.artifacts().getOASSummary() + CheckAccessResponse res = sdk.github().checkAccess() .request(req) .call(); - if (res.oasSummary().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -50,20 +48,21 @@ actions: } } - - target: $["paths"]["/v1/oci/v2/{organization_slug}/{workspace_slug}/{namespace_name}/manifests/{revision_reference}"]["get"] + - target: $["paths"]["/v1/github/configure_mintlify_repo"]["post"] update: x-codeSamples: - lang: java - label: getManifest + label: configureMintlifyRepo source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetManifestRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetManifestResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.ConfigureMintlifyRepoResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureMintlifyRepoRequest; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; + import java.util.List; public class Application { @@ -75,20 +74,19 @@ actions: .build()) .build(); - GetManifestRequest req = GetManifestRequest.builder() - .organizationSlug("") - .workspaceSlug("") - .namespaceName("") - .revisionReference("") + GithubConfigureMintlifyRepoRequest req = GithubConfigureMintlifyRepoRequest.builder() + .org("") + .repo("") + .input("") + .overlays(List.of( + "")) .build(); - GetManifestResponse res = sdk.artifacts().getManifest() + ConfigureMintlifyRepoResponse res = sdk.github().configureMintlifyRepo() .request(req) .call(); - if (res.manifest().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -99,19 +97,19 @@ actions: } } - - target: $["paths"]["/v1/short_urls"]["post"] + - target: $["paths"]["/v1/github/action"]["get"] update: x-codeSamples: - lang: java - label: create + label: getAction source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.CreateRequestBody; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.CreateResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetActionRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetActionResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -124,15 +122,16 @@ actions: .build()) .build(); - CreateRequestBody req = CreateRequestBody.builder() - .url("") + GetActionRequest req = GetActionRequest.builder() + .org("") + .repo("") .build(); - CreateResponse res = sdk.shortURLs().create() + GetActionResponse res = sdk.github().getAction() .request(req) .call(); - if (res.shortURL().isPresent()) { + if (res.githubGetActionResponse().isPresent()) { // handle response } } catch (SDKError e) { @@ -145,19 +144,19 @@ actions: } } - - target: $["paths"]["/v1/github/publishing_secrets"]["get"] + - target: $["paths"]["/v1/oci/v2/{organization_slug}/{workspace_slug}/{namespace_name}/blobs/{digest}"]["get"] update: x-codeSamples: - lang: java - label: githubCheckPublishingSecrets + label: getBlob source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GithubCheckPublishingSecretsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GithubCheckPublishingSecretsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetBlobRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetBlobResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -170,15 +169,18 @@ actions: .build()) .build(); - GithubCheckPublishingSecretsRequest req = GithubCheckPublishingSecretsRequest.builder() - .generateGenLockId("") + GetBlobRequest req = GetBlobRequest.builder() + .organizationSlug("") + .workspaceSlug("") + .namespaceName("") + .digest("") .build(); - GithubCheckPublishingSecretsResponse res = sdk.github().githubCheckPublishingSecrets() + GetBlobResponse res = sdk.artifacts().getBlob() .request(req) .call(); - if (res.githubMissingPublishingSecretsResponse().isPresent()) { + if (res.blob().isPresent()) { // handle response } } catch (SDKError e) { @@ -191,19 +193,19 @@ actions: } } - - target: $["paths"]["/v1/workspace/{workspaceID}/events/targets/{targetID}/events"]["get"] + - target: $["paths"]["/v1/apis/{apiID}"]["get"] update: x-codeSamples: - lang: java - label: getWorkspaceEventsByTarget + label: getAllApiVersions source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceEventsByTargetRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceEventsByTargetResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiVersionsRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiVersionsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -216,20 +218,17 @@ actions: .build()) .build(); - GetWorkspaceEventsByTargetRequest req = GetWorkspaceEventsByTargetRequest.builder() - .targetID("") + GetAllApiVersionsRequest req = GetAllApiVersionsRequest.builder() + .apiID("") .build(); - GetWorkspaceEventsByTargetResponse res = sdk.events().getWorkspaceEventsByTarget() + GetAllApiVersionsResponse res = sdk.apis().getAllApiVersions() .request(req) .call(); - if (res.cliEventBatch().isPresent()) { + if (res.apis().isPresent()) { // handle response } - } catch (io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.Error e) { - // handle exception - throw e; } catch (SDKError e) { // handle exception throw e; @@ -240,19 +239,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/metadata/{metaKey}/{metaValue}"]["delete"] update: x-codeSamples: - lang: java - label: getAllApiVersions + label: deleteVersionMetadata source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAllApiVersionsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAllApiVersionsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.DeleteVersionMetadataRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.DeleteVersionMetadataResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -265,17 +264,18 @@ actions: .build()) .build(); - GetAllApiVersionsRequest req = GetAllApiVersionsRequest.builder() + DeleteVersionMetadataRequest req = DeleteVersionMetadataRequest.builder() .apiID("") + .versionID("") + .metaKey("") + .metaValue("") .build(); - GetAllApiVersionsResponse res = sdk.apis().getAllApiVersions() + DeleteVersionMetadataResponse res = sdk.metadata().deleteVersionMetadata() .request(req) .call(); - if (res.apis().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -286,19 +286,20 @@ actions: } } - - target: $["paths"]["/v1/github/configure_code_samples"]["post"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/metadata"]["post"] update: x-codeSamples: - lang: java - label: configureCodeSamples + label: insertVersionMetadata source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.ConfigureCodeSamplesResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.GithubConfigureCodeSamplesRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.InsertVersionMetadataRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.InsertVersionMetadataResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.models.shared.VersionMetadataInput; import java.lang.Exception; public class Application { @@ -311,17 +312,20 @@ actions: .build()) .build(); - GithubConfigureCodeSamplesRequest req = GithubConfigureCodeSamplesRequest.builder() - .org("") - .repo("") - .targetName("") + InsertVersionMetadataRequest req = InsertVersionMetadataRequest.builder() + .apiID("") + .versionID("") + .versionMetadata(VersionMetadataInput.builder() + .metaKey("") + .metaValue("") + .build()) .build(); - ConfigureCodeSamplesResponse res = sdk.github().configureCodeSamples() + InsertVersionMetadataResponse res = sdk.metadata().insertVersionMetadata() .request(req) .call(); - if (res.githubConfigureCodeSamplesResponse().isPresent()) { + if (res.versionMetadata().isPresent()) { // handle response } } catch (SDKError e) { @@ -334,19 +338,19 @@ actions: } } - - target: $["paths"]["/v1/github/configure_target"]["post"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{baseRevisionID}/diff/{targetRevisionID}"]["get"] update: x-codeSamples: - lang: java - label: configureTarget + label: getSchemaDiff source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.ConfigureTargetResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.GithubConfigureTargetRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaDiffRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaDiffResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -359,16 +363,20 @@ actions: .build()) .build(); - GithubConfigureTargetRequest req = GithubConfigureTargetRequest.builder() - .org("") - .repoName("") + GetSchemaDiffRequest req = GetSchemaDiffRequest.builder() + .apiID("") + .versionID("") + .baseRevisionID("") + .targetRevisionID("") .build(); - ConfigureTargetResponse res = sdk.github().configureTarget() + GetSchemaDiffResponse res = sdk.schemas().getSchemaDiff() .request(req) .call(); - // handle response + if (res.schemaDiff().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -379,18 +387,19 @@ actions: } } - - target: $["paths"]["/v1/organization"]["get"] + - target: $["paths"]["/v1/reports/changes/{documentChecksum}"]["get"] update: x-codeSamples: - lang: java - label: getOrganizations + label: getChangesReportSignedUrl source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetOrganizationsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetChangesReportSignedUrlRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetChangesReportSignedUrlResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -403,10 +412,15 @@ actions: .build()) .build(); - GetOrganizationsResponse res = sdk.organizations().getOrganizations() + GetChangesReportSignedUrlRequest req = GetChangesReportSignedUrlRequest.builder() + .documentChecksum("") + .build(); + + GetChangesReportSignedUrlResponse res = sdk.reports().getChangesReportSignedUrl() + .request(req) .call(); - if (res.organizations().isPresent()) { + if (res.signedAccess().isPresent()) { // handle response } } catch (SDKError e) { @@ -419,20 +433,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}"]["put"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}"]["delete"] update: x-codeSamples: - lang: java - label: upsertApiEndpoint + label: deleteApiEndpoint source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UpsertApiEndpointRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UpsertApiEndpointResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.ApiEndpointInput; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiEndpointRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiEndpointResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -445,27 +458,17 @@ actions: .build()) .build(); - UpsertApiEndpointRequest req = UpsertApiEndpointRequest.builder() + DeleteApiEndpointRequest req = DeleteApiEndpointRequest.builder() .apiID("") .versionID("") .apiEndpointID("") - .apiEndpoint(ApiEndpointInput.builder() - .apiEndpointId("") - .description("") - .displayName("") - .method("") - .path("") - .versionId("") - .build()) .build(); - UpsertApiEndpointResponse res = sdk.apiEndpoints().upsertApiEndpoint() + DeleteApiEndpointResponse res = sdk.apiEndpoints().deleteApiEndpoint() .request(req) .call(); - if (res.apiEndpoint().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -476,18 +479,20 @@ actions: } } - - target: $["paths"]["/v1/user"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}"]["put"] update: x-codeSamples: - lang: java - label: getUser + label: upsertApiEndpoint source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetUserResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiEndpointRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiEndpointResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.ApiEndpointInput; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -500,10 +505,25 @@ actions: .build()) .build(); - GetUserResponse res = sdk.auth().getUser() + UpsertApiEndpointRequest req = UpsertApiEndpointRequest.builder() + .apiID("") + .versionID("") + .apiEndpointID("") + .apiEndpoint(ApiEndpointInput.builder() + .apiEndpointId("") + .description("") + .displayName("") + .method("") + .path("") + .versionId("") + .build()) + .build(); + + UpsertApiEndpointResponse res = sdk.apiEndpoints().upsertApiEndpoint() + .request(req) .call(); - if (res.user().isPresent()) { + if (res.apiEndpoint().isPresent()) { // handle response } } catch (SDKError e) { @@ -516,20 +536,24 @@ actions: } } - - target: $["paths"]["/v1/reports/linting/{documentChecksum}"]["get"] + - target: $["paths"]["/v1/workspace/{workspaceID}/events"]["post"] update: x-codeSamples: - lang: java - label: getLintingReportSignedUrl + label: postWorkspaceEvents source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetLintingReportSignedUrlRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetLintingReportSignedUrlResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.CliEvent; + import dev.speakeasyapi.javaclientsdk.models.shared.InteractionType; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; + import java.time.OffsetDateTime; + import java.util.List; public class Application { @@ -541,17 +565,29 @@ actions: .build()) .build(); - GetLintingReportSignedUrlRequest req = GetLintingReportSignedUrlRequest.builder() - .documentChecksum("") + PostWorkspaceEventsRequest req = PostWorkspaceEventsRequest.builder() + .requestBody(List.of( + CliEvent.builder() + .id("") + .executionId("") + .workspaceId("") + .speakeasyApiKeyName("") + .interactionType(InteractionType.PUBLISH) + .localStartedAt(OffsetDateTime.parse("2022-05-18T11:28:11.328Z")) + .createdAt(OffsetDateTime.parse("2024-05-07T12:35:47.182Z")) + .speakeasyVersion("") + .success(false) + .build())) .build(); - GetLintingReportSignedUrlResponse res = sdk.reports().getLintingReportSignedUrl() + PostWorkspaceEventsResponse res = sdk.events().postWorkspaceEvents() .request(req) .call(); - if (res.signedAccess().isPresent()) { - // handle response - } + // handle response + } catch (dev.speakeasyapi.javaclientsdk.models.errors.Error e) { + // handle exception + throw e; } catch (SDKError e) { // handle exception throw e; @@ -562,19 +598,19 @@ actions: } } - - target: $["paths"]["/v1/github/publishing_secrets"]["post"] + - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/revisions/{revision_reference}/summary"]["get"] update: x-codeSamples: - lang: java - label: githubStorePublishingSecrets + label: getOASSummary source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GithubStorePublishingSecretsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.GithubStorePublishingSecretsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetOASSummaryRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetOASSummaryResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -587,15 +623,18 @@ actions: .build()) .build(); - GithubStorePublishingSecretsRequest req = GithubStorePublishingSecretsRequest.builder() - .generateGenLockId("") + GetOASSummaryRequest req = GetOASSummaryRequest.builder() + .namespaceName("") + .revisionReference("") .build(); - GithubStorePublishingSecretsResponse res = sdk.github().githubStorePublishingSecrets() + GetOASSummaryResponse res = sdk.artifacts().getOASSummary() .request(req) .call(); - // handle response + if (res.oasSummary().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -606,19 +645,19 @@ actions: } } - - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/tags"]["post"] + - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/tags"]["get"] update: x-codeSamples: - lang: java - label: postTags + label: getTags source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.PostTagsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.PostTagsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetTagsRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetTagsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -631,15 +670,17 @@ actions: .build()) .build(); - PostTagsRequest req = PostTagsRequest.builder() + GetTagsRequest req = GetTagsRequest.builder() .namespaceName("") .build(); - PostTagsResponse res = sdk.artifacts().postTags() + GetTagsResponse res = sdk.artifacts().getTags() .request(req) .call(); - // handle response + if (res.getTagsResponse().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -650,21 +691,19 @@ actions: } } - - target: $["paths"]["/v1/reports"]["post"] + - target: $["paths"]["/v1/suggest/operation_ids/apply"]["post"] update: x-codeSamples: - lang: java - label: uploadReport + label: applyOperationIDs source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UploadReportFile; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UploadReportRequestBody; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UploadReportResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Report; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.ApplyOperationIDsRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.ApplyOperationIDsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -677,20 +716,15 @@ actions: .build()) .build(); - UploadReportRequestBody req = UploadReportRequestBody.builder() - .data(Report.builder() - .build()) - .file(UploadReportFile.builder() - .fileName("") - .content("0xA329C0ad85".getBytes()) - .build()) + ApplyOperationIDsRequest req = ApplyOperationIDsRequest.builder() + .xSessionId("") .build(); - UploadReportResponse res = sdk.reports().uploadReport() + ApplyOperationIDsResponse res = sdk.suggest().applyOperationIDs() .request(req) .call(); - if (res.uploadedReport().isPresent()) { + if (res.twoHundredApplicationJsonSchema().isPresent()) { // handle response } } catch (SDKError e) { @@ -703,21 +737,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema"]["post"] + - target: $["paths"]["/v1/apis/{apiID}/api_endpoints"]["get"] update: x-codeSamples: - lang: java - label: registerSchema + label: getAllApiEndpoints source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.File; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.RegisterSchemaRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.RegisterSchemaRequestBody; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.RegisterSchemaResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiEndpointsRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiEndpointsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -730,22 +762,17 @@ actions: .build()) .build(); - RegisterSchemaRequest req = RegisterSchemaRequest.builder() + GetAllApiEndpointsRequest req = GetAllApiEndpointsRequest.builder() .apiID("") - .versionID("") - .requestBody(RegisterSchemaRequestBody.builder() - .file(File.builder() - .fileName("") - .content("0xCAFCA03e0e".getBytes()) - .build()) - .build()) .build(); - RegisterSchemaResponse res = sdk.schemas().registerSchema() + GetAllApiEndpointsResponse res = sdk.apiEndpoints().getAllApiEndpoints() .request(req) .call(); - // handle response + if (res.apiEndpoints().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -756,19 +783,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}"]["get"] update: x-codeSamples: - lang: java - label: getSchemaRevision + label: getApiEndpoint source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemaRevisionRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemaRevisionResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetApiEndpointRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetApiEndpointResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -781,17 +808,17 @@ actions: .build()) .build(); - GetSchemaRevisionRequest req = GetSchemaRevisionRequest.builder() + GetApiEndpointRequest req = GetApiEndpointRequest.builder() .apiID("") .versionID("") - .revisionID("") + .apiEndpointID("") .build(); - GetSchemaRevisionResponse res = sdk.schemas().getSchemaRevision() + GetApiEndpointResponse res = sdk.apiEndpoints().getApiEndpoint() .request(req) .call(); - if (res.schema().isPresent()) { + if (res.apiEndpoint().isPresent()) { // handle response } } catch (SDKError e) { @@ -812,11 +839,11 @@ actions: source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GenerateRequestPostmanCollectionRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GenerateRequestPostmanCollectionResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GenerateRequestPostmanCollectionRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GenerateRequestPostmanCollectionResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -850,19 +877,18 @@ actions: } } - - target: $["paths"]["/v1/organization/{organizationID}"]["get"] + - target: $["paths"]["/v1/organization/usage"]["get"] update: x-codeSamples: - lang: java - label: getOrganization + label: getOrganizationUsage source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetOrganizationRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetOrganizationResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationUsageResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -875,15 +901,10 @@ actions: .build()) .build(); - GetOrganizationRequest req = GetOrganizationRequest.builder() - .organizationID("") - .build(); - - GetOrganizationResponse res = sdk.organizations().getOrganization() - .request(req) + GetOrganizationUsageResponse res = sdk.organizations().getOrganizationUsage() .call(); - if (res.organization().isPresent()) { + if (res.organizationUsageResponse().isPresent()) { // handle response } } catch (SDKError e) { @@ -896,19 +917,19 @@ actions: } } - - target: $["paths"]["/v1/workspace/embed-access-token"]["get"] + - target: $["paths"]["/v1/apis"]["get"] update: x-codeSamples: - lang: java - label: getEmbedAccessToken + label: getApis source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetEmbedAccessTokenRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetEmbedAccessTokenResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetApisRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetApisResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -921,14 +942,14 @@ actions: .build()) .build(); - GetEmbedAccessTokenRequest req = GetEmbedAccessTokenRequest.builder() + GetApisRequest req = GetApisRequest.builder() .build(); - GetEmbedAccessTokenResponse res = sdk.embeds().getEmbedAccessToken() + GetApisResponse res = sdk.apis().getApis() .request(req) .call(); - if (res.embedAccessTokenResponse().isPresent()) { + if (res.apis().isPresent()) { // handle response } } catch (SDKError e) { @@ -941,18 +962,18 @@ actions: } } - - target: $["paths"]["/v1/workspace/embed-access-tokens/valid"]["get"] + - target: $["paths"]["/v1/auth/validate"]["get"] update: x-codeSamples: - lang: java - label: getValidEmbedAccessTokens + label: validateApiKey source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetValidEmbedAccessTokensResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.ValidateApiKeyResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -965,10 +986,10 @@ actions: .build()) .build(); - GetValidEmbedAccessTokensResponse res = sdk.embeds().getValidEmbedAccessTokens() + ValidateApiKeyResponse res = sdk.auth().validateApiKey() .call(); - if (res.embedTokens().isPresent()) { + if (res.apiKeyDetails().isPresent()) { // handle response } } catch (SDKError e) { @@ -981,19 +1002,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints"]["get"] + - target: $["paths"]["/v1/suggest/openapi/{namespace_name}/{revision_reference}"]["post"] update: x-codeSamples: - lang: java - label: getAllForVersionApiEndpoints + label: suggestOpenAPIRegistry source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAllForVersionApiEndpointsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAllForVersionApiEndpointsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRegistryRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRegistryResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1006,16 +1027,17 @@ actions: .build()) .build(); - GetAllForVersionApiEndpointsRequest req = GetAllForVersionApiEndpointsRequest.builder() - .apiID("") - .versionID("") + SuggestOpenAPIRegistryRequest req = SuggestOpenAPIRegistryRequest.builder() + .namespaceName("") + .revisionReference("") + .xSessionId("") .build(); - GetAllForVersionApiEndpointsResponse res = sdk.apiEndpoints().getAllForVersionApiEndpoints() + SuggestOpenAPIRegistryResponse res = sdk.suggest().suggestOpenAPIRegistry() .request(req) .call(); - if (res.apiEndpoints().isPresent()) { + if (res.schema().isPresent()) { // handle response } } catch (SDKError e) { @@ -1028,19 +1050,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}"]["delete"] + - target: $["paths"]["/v1/short_urls"]["post"] update: x-codeSamples: - lang: java - label: deleteApiEndpoint + label: create source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiEndpointRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiEndpointResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.CreateRequestBody; + import dev.speakeasyapi.javaclientsdk.models.operations.CreateResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1053,17 +1075,17 @@ actions: .build()) .build(); - DeleteApiEndpointRequest req = DeleteApiEndpointRequest.builder() - .apiID("") - .versionID("") - .apiEndpointID("") + CreateRequestBody req = CreateRequestBody.builder() + .url("") .build(); - DeleteApiEndpointResponse res = sdk.apiEndpoints().deleteApiEndpoint() + CreateResponse res = sdk.shortURLs().create() .request(req) .call(); - // handle response + if (res.shortURL().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -1074,19 +1096,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{baseRevisionID}/diff/{targetRevisionID}"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/generate/openapi"]["get"] update: x-codeSamples: - lang: java - label: getSchemaDiff + label: generateOpenApiSpec source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemaDiffRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemaDiffResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1099,18 +1121,16 @@ actions: .build()) .build(); - GetSchemaDiffRequest req = GetSchemaDiffRequest.builder() + GenerateOpenApiSpecRequest req = GenerateOpenApiSpecRequest.builder() .apiID("") .versionID("") - .baseRevisionID("") - .targetRevisionID("") .build(); - GetSchemaDiffResponse res = sdk.schemas().getSchemaDiff() + GenerateOpenApiSpecResponse res = sdk.apis().generateOpenApiSpec() .request(req) .call(); - if (res.schemaDiff().isPresent()) { + if (res.generateOpenApiSpecDiff().isPresent()) { // handle response } } catch (SDKError e) { @@ -1131,11 +1151,11 @@ actions: source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetVersionMetadataRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetVersionMetadataResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetVersionMetadataRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetVersionMetadataResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1170,19 +1190,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema"]["get"] + - target: $["paths"]["/v1/workspace/{workspaceID}"]["get"] update: x-codeSamples: - lang: java - label: getSchema + label: getWorkspace source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemaRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemaResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1195,16 +1215,14 @@ actions: .build()) .build(); - GetSchemaRequest req = GetSchemaRequest.builder() - .apiID("") - .versionID("") + GetWorkspaceRequest req = GetWorkspaceRequest.builder() .build(); - GetSchemaResponse res = sdk.schemas().getSchema() + GetWorkspaceResponse res = sdk.workspaces().getWorkspace() .request(req) .call(); - if (res.schema().isPresent()) { + if (res.workspace().isPresent()) { // handle response } } catch (SDKError e) { @@ -1217,19 +1235,19 @@ actions: } } - - target: $["paths"]["/v1/eventlog/{requestID}"]["get"] + - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/revisions"]["get"] update: x-codeSamples: - lang: java - label: getRequestFromEventLog + label: getRevisions source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetRequestFromEventLogRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetRequestFromEventLogResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetRevisionsRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetRevisionsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1242,15 +1260,15 @@ actions: .build()) .build(); - GetRequestFromEventLogRequest req = GetRequestFromEventLogRequest.builder() - .requestID("") + GetRevisionsRequest req = GetRevisionsRequest.builder() + .namespaceName("") .build(); - GetRequestFromEventLogResponse res = sdk.requests().getRequestFromEventLog() + GetRevisionsResponse res = sdk.artifacts().getRevisions() .request(req) .call(); - if (res.unboundedRequest().isPresent()) { + if (res.getRevisionsResponse().isPresent()) { // handle response } } catch (SDKError e) { @@ -1263,18 +1281,19 @@ actions: } } - - target: $["paths"]["/v1/organization/free_trial"]["post"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}"]["delete"] update: x-codeSamples: - lang: java - label: createFreeTrial + label: deleteSchema source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.CreateFreeTrialResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.DeleteSchemaRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.DeleteSchemaResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1287,7 +1306,14 @@ actions: .build()) .build(); - CreateFreeTrialResponse res = sdk.organizations().createFreeTrial() + DeleteSchemaRequest req = DeleteSchemaRequest.builder() + .apiID("") + .versionID("") + .revisionID("") + .build(); + + DeleteSchemaResponse res = sdk.schemas().deleteSchema() + .request(req) .call(); // handle response @@ -1301,19 +1327,19 @@ actions: } } - - target: $["paths"]["/v1/github/check_access"]["get"] + - target: $["paths"]["/v1/organization/{organizationID}"]["get"] update: x-codeSamples: - lang: java - label: checkAccess + label: getOrganization source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.CheckAccessRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.CheckAccessResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1326,16 +1352,17 @@ actions: .build()) .build(); - CheckAccessRequest req = CheckAccessRequest.builder() - .org("") - .repo("") + GetOrganizationRequest req = GetOrganizationRequest.builder() + .organizationID("") .build(); - CheckAccessResponse res = sdk.github().checkAccess() + GetOrganizationResponse res = sdk.organizations().getOrganization() .request(req) .call(); - // handle response + if (res.organization().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -1346,19 +1373,19 @@ actions: } } - - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/tags"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schemas"]["get"] update: x-codeSamples: - lang: java - label: getTags + label: getSchemas source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetTagsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetTagsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemasRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemasResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1371,15 +1398,16 @@ actions: .build()) .build(); - GetTagsRequest req = GetTagsRequest.builder() - .namespaceName("") + GetSchemasRequest req = GetSchemasRequest.builder() + .apiID("") + .versionID("") .build(); - GetTagsResponse res = sdk.artifacts().getTags() + GetSchemasResponse res = sdk.schemas().getSchemas() .request(req) .call(); - if (res.getTagsResponse().isPresent()) { + if (res.schemata().isPresent()) { // handle response } } catch (SDKError e) { @@ -1392,19 +1420,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}"]["delete"] + - target: $["paths"]["/v1/github/trigger_action"]["post"] update: x-codeSamples: - lang: java - label: deleteApi + label: triggerAction source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.TriggerActionResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.GithubTriggerActionRequest; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1417,12 +1445,13 @@ actions: .build()) .build(); - DeleteApiRequest req = DeleteApiRequest.builder() - .apiID("") - .versionID("") + GithubTriggerActionRequest req = GithubTriggerActionRequest.builder() + .org("") + .repoName("") + .genLockId("") .build(); - DeleteApiResponse res = sdk.apis().deleteApi() + TriggerActionResponse res = sdk.github().triggerAction() .request(req) .call(); @@ -1437,19 +1466,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/postman"]["get"] update: x-codeSamples: - lang: java - label: getApiEndpoint + label: generatePostmanCollectionForApiEndpoint source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetApiEndpointRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetApiEndpointResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1462,17 +1491,17 @@ actions: .build()) .build(); - GetApiEndpointRequest req = GetApiEndpointRequest.builder() + GeneratePostmanCollectionForApiEndpointRequest req = GeneratePostmanCollectionForApiEndpointRequest.builder() .apiID("") .versionID("") .apiEndpointID("") .build(); - GetApiEndpointResponse res = sdk.apiEndpoints().getApiEndpoint() + GeneratePostmanCollectionForApiEndpointResponse res = sdk.apiEndpoints().generatePostmanCollectionForApiEndpoint() .request(req) .call(); - if (res.apiEndpoint().isPresent()) { + if (res.postmanCollection().isPresent()) { // handle response } } catch (SDKError e) { @@ -1485,20 +1514,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/metadata"]["post"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema"]["get"] update: x-codeSamples: - lang: java - label: insertVersionMetadata + label: getSchema source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.InsertVersionMetadataRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.InsertVersionMetadataResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.VersionMetadataInput; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1511,20 +1539,16 @@ actions: .build()) .build(); - InsertVersionMetadataRequest req = InsertVersionMetadataRequest.builder() + GetSchemaRequest req = GetSchemaRequest.builder() .apiID("") .versionID("") - .versionMetadata(VersionMetadataInput.builder() - .metaKey("") - .metaValue("") - .build()) .build(); - InsertVersionMetadataResponse res = sdk.metadata().insertVersionMetadata() + GetSchemaResponse res = sdk.schemas().getSchema() .request(req) .call(); - if (res.versionMetadata().isPresent()) { + if (res.schema().isPresent()) { // handle response } } catch (SDKError e) { @@ -1537,19 +1561,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/metadata/{metaKey}/{metaValue}"]["delete"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/openapi"]["get"] update: x-codeSamples: - lang: java - label: deleteVersionMetadata + label: generateOpenApiSpecForApiEndpoint source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteVersionMetadataRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteVersionMetadataResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1562,18 +1586,19 @@ actions: .build()) .build(); - DeleteVersionMetadataRequest req = DeleteVersionMetadataRequest.builder() + GenerateOpenApiSpecForApiEndpointRequest req = GenerateOpenApiSpecForApiEndpointRequest.builder() .apiID("") .versionID("") - .metaKey("") - .metaValue("") + .apiEndpointID("") .build(); - DeleteVersionMetadataResponse res = sdk.metadata().deleteVersionMetadata() + GenerateOpenApiSpecForApiEndpointResponse res = sdk.apiEndpoints().generateOpenApiSpecForApiEndpoint() .request(req) .call(); - // handle response + if (res.generateOpenApiSpecDiff().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -1584,41 +1609,34 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/download"]["get"] + - target: $["paths"]["/v1/user"]["get"] update: x-codeSamples: - lang: java - label: downloadSchema + label: getUser source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DownloadSchemaRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DownloadSchemaResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetUserResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { public static void main(String[] args) throws Exception { try { - SDK sdk = SDK.builder() - .security(Security.builder() - .apiKey("") - .build()) - .build(); - - DownloadSchemaRequest req = DownloadSchemaRequest.builder() - .apiID("") - .versionID("") + SDK sdk = SDK.builder() + .security(Security.builder() + .apiKey("") + .build()) .build(); - DownloadSchemaResponse res = sdk.schemas().downloadSchema() - .request(req) + GetUserResponse res = sdk.auth().getUser() .call(); - if (res.twoHundredApplicationJsonSchema().isPresent()) { + if (res.user().isPresent()) { // handle response } } catch (SDKError e) { @@ -1631,19 +1649,18 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}"]["delete"] + - target: $["paths"]["/v1/organization/free_trial"]["post"] update: x-codeSamples: - lang: java - label: deleteSchema + label: createFreeTrial source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteSchemaRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteSchemaResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.CreateFreeTrialResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1656,14 +1673,7 @@ actions: .build()) .build(); - DeleteSchemaRequest req = DeleteSchemaRequest.builder() - .apiID("") - .versionID("") - .revisionID("") - .build(); - - DeleteSchemaResponse res = sdk.schemas().deleteSchema() - .request(req) + CreateFreeTrialResponse res = sdk.organizations().createFreeTrial() .call(); // handle response @@ -1677,19 +1687,19 @@ actions: } } - - target: $["paths"]["/v1/apis"]["get"] + - target: $["paths"]["/v1/oci/v2/{organization_slug}/{workspace_slug}/{namespace_name}/manifests/{revision_reference}"]["get"] update: x-codeSamples: - lang: java - label: getApis + label: getManifest source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetApisRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetApisResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetManifestRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetManifestResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1702,14 +1712,18 @@ actions: .build()) .build(); - GetApisRequest req = GetApisRequest.builder() + GetManifestRequest req = GetManifestRequest.builder() + .organizationSlug("") + .workspaceSlug("") + .namespaceName("") + .revisionReference("") .build(); - GetApisResponse res = sdk.apis().getApis() + GetManifestResponse res = sdk.artifacts().getManifest() .request(req) .call(); - if (res.apis().isPresent()) { + if (res.manifest().isPresent()) { // handle response } } catch (SDKError e) { @@ -1722,20 +1736,21 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}"]["put"] + - target: $["paths"]["/v1/reports"]["post"] update: x-codeSamples: - lang: java - label: upsertApi + label: uploadReport source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UpsertApiRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UpsertApiResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.ApiInput; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.UploadReportFile; + import dev.speakeasyapi.javaclientsdk.models.operations.UploadReportRequestBody; + import dev.speakeasyapi.javaclientsdk.models.operations.UploadReportResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Report; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1748,20 +1763,20 @@ actions: .build()) .build(); - UpsertApiRequest req = UpsertApiRequest.builder() - .apiID("") - .api(ApiInput.builder() - .apiId("") - .description("") - .versionId("") + UploadReportRequestBody req = UploadReportRequestBody.builder() + .data(Report.builder() + .build()) + .file(UploadReportFile.builder() + .fileName("") + .content("0xA329C0ad85".getBytes()) .build()) .build(); - UpsertApiResponse res = sdk.apis().upsertApi() + UploadReportResponse res = sdk.reports().uploadReport() .request(req) .call(); - if (res.api().isPresent()) { + if (res.uploadedReport().isPresent()) { // handle response } } catch (SDKError e) { @@ -1774,19 +1789,21 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/generate/openapi"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema"]["post"] update: x-codeSamples: - lang: java - label: generateOpenApiSpec + label: registerSchema source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GenerateOpenApiSpecRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GenerateOpenApiSpecResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.File; + import dev.speakeasyapi.javaclientsdk.models.operations.RegisterSchemaRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.RegisterSchemaRequestBody; + import dev.speakeasyapi.javaclientsdk.models.operations.RegisterSchemaResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1799,18 +1816,22 @@ actions: .build()) .build(); - GenerateOpenApiSpecRequest req = GenerateOpenApiSpecRequest.builder() + RegisterSchemaRequest req = RegisterSchemaRequest.builder() .apiID("") .versionID("") + .requestBody(RegisterSchemaRequestBody.builder() + .file(File.builder() + .fileName("") + .content("0xCAFCA03e0e".getBytes()) + .build()) + .build()) .build(); - GenerateOpenApiSpecResponse res = sdk.apis().generateOpenApiSpec() + RegisterSchemaResponse res = sdk.schemas().registerSchema() .request(req) .call(); - if (res.generateOpenApiSpecDiff().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -1821,21 +1842,19 @@ actions: } } - - target: $["paths"]["/v1/suggest/openapi"]["post"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}"]["get"] update: x-codeSamples: - lang: java - label: suggestOpenAPI + label: getSchemaRevision source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.Schema; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SuggestOpenAPIRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SuggestOpenAPIRequestBody; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SuggestOpenAPIResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRevisionRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRevisionResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1848,17 +1867,13 @@ actions: .build()) .build(); - SuggestOpenAPIRequest req = SuggestOpenAPIRequest.builder() - .xSessionId("") - .requestBody(SuggestOpenAPIRequestBody.builder() - .schema(Schema.builder() - .fileName("") - .content("0x0FbfeAEcc8".getBytes()) - .build()) - .build()) + GetSchemaRevisionRequest req = GetSchemaRevisionRequest.builder() + .apiID("") + .versionID("") + .revisionID("") .build(); - SuggestOpenAPIResponse res = sdk.suggest().suggestOpenAPI() + GetSchemaRevisionResponse res = sdk.schemas().getSchemaRevision() .request(req) .call(); @@ -1875,19 +1890,19 @@ actions: } } - - target: $["paths"]["/v1/suggest/openapi/{namespace_name}/{revision_reference}"]["post"] + - target: $["paths"]["/v1/workspace/access"]["get"] update: x-codeSamples: - lang: java - label: suggestOpenAPIRegistry + label: getWorkspaceAccess source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SuggestOpenAPIRegistryRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SuggestOpenAPIRegistryResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1900,17 +1915,14 @@ actions: .build()) .build(); - SuggestOpenAPIRegistryRequest req = SuggestOpenAPIRegistryRequest.builder() - .namespaceName("") - .revisionReference("") - .xSessionId("") + GetWorkspaceAccessRequest req = GetWorkspaceAccessRequest.builder() .build(); - SuggestOpenAPIRegistryResponse res = sdk.suggest().suggestOpenAPIRegistry() + GetWorkspaceAccessResponse res = sdk.auth().getWorkspaceAccess() .request(req) .call(); - if (res.schema().isPresent()) { + if (res.accessDetails().isPresent()) { // handle response } } catch (SDKError e) { @@ -1923,19 +1935,19 @@ actions: } } - - target: $["paths"]["/v1/suggest/operation_ids/apply"]["post"] + - target: $["paths"]["/v1/github/publishing_secrets"]["post"] update: x-codeSamples: - lang: java - label: applyOperationIDs + label: githubStorePublishingSecrets source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.ApplyOperationIDsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.ApplyOperationIDsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GithubStorePublishingSecretsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.GithubStorePublishingSecretsRequest; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1948,17 +1960,15 @@ actions: .build()) .build(); - ApplyOperationIDsRequest req = ApplyOperationIDsRequest.builder() - .xSessionId("") + GithubStorePublishingSecretsRequest req = GithubStorePublishingSecretsRequest.builder() + .generateGenLockId("") .build(); - ApplyOperationIDsResponse res = sdk.suggest().applyOperationIDs() + GithubStorePublishingSecretsResponse res = sdk.github().githubStorePublishingSecrets() .request(req) .call(); - if (res.twoHundredApplicationJsonSchema().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -1969,19 +1979,19 @@ actions: } } - - target: $["paths"]["/v1/eventlog/query"]["get"] + - target: $["paths"]["/v1/github/configure_code_samples"]["post"] update: x-codeSamples: - lang: java - label: queryEventLog + label: configureCodeSamples source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.QueryEventLogRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.QueryEventLogResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.ConfigureCodeSamplesResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureCodeSamplesRequest; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -1994,14 +2004,17 @@ actions: .build()) .build(); - QueryEventLogRequest req = QueryEventLogRequest.builder() + GithubConfigureCodeSamplesRequest req = GithubConfigureCodeSamplesRequest.builder() + .org("") + .repo("") + .targetName("") .build(); - QueryEventLogResponse res = sdk.requests().queryEventLog() + ConfigureCodeSamplesResponse res = sdk.github().configureCodeSamples() .request(req) .call(); - if (res.boundedRequests().isPresent()) { + if (res.githubConfigureCodeSamplesResponse().isPresent()) { // handle response } } catch (SDKError e) { @@ -2014,19 +2027,19 @@ actions: } } - - target: $["paths"]["/v1/reports/changes/{documentChecksum}"]["get"] + - target: $["paths"]["/v1/workspace/{workspaceID}/events/targets/{targetID}/events"]["get"] update: x-codeSamples: - lang: java - label: getChangesReportSignedUrl + label: getWorkspaceEventsByTarget source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetChangesReportSignedUrlRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetChangesReportSignedUrlResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceEventsByTargetRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceEventsByTargetResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2039,17 +2052,20 @@ actions: .build()) .build(); - GetChangesReportSignedUrlRequest req = GetChangesReportSignedUrlRequest.builder() - .documentChecksum("") + GetWorkspaceEventsByTargetRequest req = GetWorkspaceEventsByTargetRequest.builder() + .targetID("") .build(); - GetChangesReportSignedUrlResponse res = sdk.reports().getChangesReportSignedUrl() + GetWorkspaceEventsByTargetResponse res = sdk.events().getWorkspaceEventsByTarget() .request(req) .call(); - if (res.signedAccess().isPresent()) { + if (res.cliEventBatch().isPresent()) { // handle response } + } catch (dev.speakeasyapi.javaclientsdk.models.errors.Error e) { + // handle exception + throw e; } catch (SDKError e) { // handle exception throw e; @@ -2060,18 +2076,18 @@ actions: } } - - target: $["paths"]["/v1/auth/access_token"]["get"] + - target: $["paths"]["/v1/artifacts/namespaces"]["get"] update: x-codeSamples: - lang: java - label: getAccessToken + label: getNamespaces source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAccessTokenRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAccessTokenResponse; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetNamespacesResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2079,17 +2095,15 @@ actions: public static void main(String[] args) throws Exception { try { SDK sdk = SDK.builder() + .security(Security.builder() + .apiKey("") + .build()) .build(); - GetAccessTokenRequest req = GetAccessTokenRequest.builder() - .workspaceId("") - .build(); - - GetAccessTokenResponse res = sdk.auth().getAccessToken() - .request(req) + GetNamespacesResponse res = sdk.artifacts().getNamespaces() .call(); - if (res.accessToken().isPresent()) { + if (res.getNamespacesResponse().isPresent()) { // handle response } } catch (SDKError e) { @@ -2102,19 +2116,20 @@ actions: } } - - target: $["paths"]["/v1/workspace/access"]["get"] + - target: $["paths"]["/v1/apis/{apiID}"]["put"] update: x-codeSamples: - lang: java - label: getWorkspaceAccess + label: upsertApi source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceAccessRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceAccessResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.ApiInput; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2127,14 +2142,20 @@ actions: .build()) .build(); - GetWorkspaceAccessRequest req = GetWorkspaceAccessRequest.builder() + UpsertApiRequest req = UpsertApiRequest.builder() + .apiID("") + .api(ApiInput.builder() + .apiId("") + .description("") + .versionId("") + .build()) .build(); - GetWorkspaceAccessResponse res = sdk.auth().getWorkspaceAccess() + UpsertApiResponse res = sdk.apis().upsertApi() .request(req) .call(); - if (res.accessDetails().isPresent()) { + if (res.api().isPresent()) { // handle response } } catch (SDKError e) { @@ -2147,21 +2168,20 @@ actions: } } - - target: $["paths"]["/v1/github/configure_mintlify_repo"]["post"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}"]["delete"] update: x-codeSamples: - lang: java - label: configureMintlifyRepo + label: deleteApi source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.ConfigureMintlifyRepoResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.GithubConfigureMintlifyRepoRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; - import java.util.List; public class Application { @@ -2173,15 +2193,12 @@ actions: .build()) .build(); - GithubConfigureMintlifyRepoRequest req = GithubConfigureMintlifyRepoRequest.builder() - .org("") - .repo("") - .input("") - .overlays(List.of( - "")) + DeleteApiRequest req = DeleteApiRequest.builder() + .apiID("") + .versionID("") .build(); - ConfigureMintlifyRepoResponse res = sdk.github().configureMintlifyRepo() + DeleteApiResponse res = sdk.apis().deleteApi() .request(req) .call(); @@ -2196,18 +2213,19 @@ actions: } } - - target: $["paths"]["/v1/organization/usage"]["get"] + - target: $["paths"]["/v1/eventlog/query"]["get"] update: x-codeSamples: - lang: java - label: getOrganizationUsage + label: queryEventLog source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetOrganizationUsageResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.QueryEventLogRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.QueryEventLogResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2220,10 +2238,14 @@ actions: .build()) .build(); - GetOrganizationUsageResponse res = sdk.organizations().getOrganizationUsage() + QueryEventLogRequest req = QueryEventLogRequest.builder() + .build(); + + QueryEventLogResponse res = sdk.requests().queryEventLog() + .request(req) .call(); - if (res.organizationUsageResponse().isPresent()) { + if (res.boundedRequests().isPresent()) { // handle response } } catch (SDKError e) { @@ -2236,24 +2258,20 @@ actions: } } - - target: $["paths"]["/v1/workspace/{workspaceID}/events"]["post"] + - target: $["paths"]["/v1/workspace/embed-access-token"]["get"] update: x-codeSamples: - lang: java - label: postWorkspaceEvents + label: getEmbedAccessToken source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.PostWorkspaceEventsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.PostWorkspaceEventsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.CliEvent; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.InteractionType; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetEmbedAccessTokenRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetEmbedAccessTokenResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; - import java.time.OffsetDateTime; - import java.util.List; public class Application { @@ -2265,29 +2283,16 @@ actions: .build()) .build(); - PostWorkspaceEventsRequest req = PostWorkspaceEventsRequest.builder() - .requestBody(List.of( - CliEvent.builder() - .id("") - .executionId("") - .workspaceId("") - .speakeasyApiKeyName("") - .interactionType(InteractionType.PUBLISH) - .localStartedAt(OffsetDateTime.parse("2022-05-18T11:28:11.328Z")) - .createdAt(OffsetDateTime.parse("2024-05-07T12:35:47.182Z")) - .speakeasyVersion("") - .success(false) - .build())) + GetEmbedAccessTokenRequest req = GetEmbedAccessTokenRequest.builder() .build(); - PostWorkspaceEventsResponse res = sdk.events().postWorkspaceEvents() + GetEmbedAccessTokenResponse res = sdk.embeds().getEmbedAccessToken() .request(req) .call(); - // handle response - } catch (io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.Error e) { - // handle exception - throw e; + if (res.embedAccessTokenResponse().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -2298,19 +2303,19 @@ actions: } } - - target: $["paths"]["/v1/workspace/{workspaceID}/events/targets"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/download"]["get"] update: x-codeSamples: - lang: java - label: getWorkspaceTargets + label: downloadSchema source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceTargetsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceTargetsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2323,19 +2328,18 @@ actions: .build()) .build(); - GetWorkspaceTargetsRequest req = GetWorkspaceTargetsRequest.builder() + DownloadSchemaRequest req = DownloadSchemaRequest.builder() + .apiID("") + .versionID("") .build(); - GetWorkspaceTargetsResponse res = sdk.events().getWorkspaceTargets() + DownloadSchemaResponse res = sdk.schemas().downloadSchema() .request(req) .call(); - if (res.targetSDKList().isPresent()) { + if (res.twoHundredApplicationJsonSchema().isPresent()) { // handle response } - } catch (io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.Error e) { - // handle exception - throw e; } catch (SDKError e) { // handle exception throw e; @@ -2346,18 +2350,18 @@ actions: } } - - target: $["paths"]["/v1/auth/validate"]["get"] + - target: $["paths"]["/v1/auth/access_token"]["get"] update: x-codeSamples: - lang: java - label: validateApiKey + label: getAccessToken source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.ValidateApiKeyResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetAccessTokenRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetAccessTokenResponse; import java.lang.Exception; public class Application { @@ -2365,15 +2369,17 @@ actions: public static void main(String[] args) throws Exception { try { SDK sdk = SDK.builder() - .security(Security.builder() - .apiKey("") - .build()) .build(); - ValidateApiKeyResponse res = sdk.auth().validateApiKey() + GetAccessTokenRequest req = GetAccessTokenRequest.builder() + .workspaceId("") + .build(); + + GetAccessTokenResponse res = sdk.auth().getAccessToken() + .request(req) .call(); - if (res.apiKeyDetails().isPresent()) { + if (res.accessToken().isPresent()) { // handle response } } catch (SDKError e) { @@ -2386,19 +2392,21 @@ actions: } } - - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/revisions"]["get"] + - target: $["paths"]["/v1/suggest/openapi"]["post"] update: x-codeSamples: - lang: java - label: getRevisions + label: suggestOpenAPI source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetRevisionsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetRevisionsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.Schema; + import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRequestBody; + import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2411,15 +2419,21 @@ actions: .build()) .build(); - GetRevisionsRequest req = GetRevisionsRequest.builder() - .namespaceName("") + SuggestOpenAPIRequest req = SuggestOpenAPIRequest.builder() + .xSessionId("") + .requestBody(SuggestOpenAPIRequestBody.builder() + .schema(Schema.builder() + .fileName("") + .content("0x0FbfeAEcc8".getBytes()) + .build()) + .build()) .build(); - GetRevisionsResponse res = sdk.artifacts().getRevisions() + SuggestOpenAPIResponse res = sdk.suggest().suggestOpenAPI() .request(req) .call(); - if (res.getRevisionsResponse().isPresent()) { + if (res.schema().isPresent()) { // handle response } } catch (SDKError e) { @@ -2432,19 +2446,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/find/{displayName}"]["get"] + - target: $["paths"]["/v1/github/configure_target"]["post"] update: x-codeSamples: - lang: java - label: findApiEndpoint + label: configureTarget source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.FindApiEndpointRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.FindApiEndpointResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.ConfigureTargetResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureTargetRequest; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2457,19 +2471,16 @@ actions: .build()) .build(); - FindApiEndpointRequest req = FindApiEndpointRequest.builder() - .apiID("") - .versionID("") - .displayName("") + GithubConfigureTargetRequest req = GithubConfigureTargetRequest.builder() + .org("") + .repoName("") .build(); - FindApiEndpointResponse res = sdk.apiEndpoints().findApiEndpoint() + ConfigureTargetResponse res = sdk.github().configureTarget() .request(req) .call(); - if (res.apiEndpoint().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -2480,19 +2491,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/openapi"]["get"] + - target: $["paths"]["/v1/reports/linting/{documentChecksum}"]["get"] update: x-codeSamples: - lang: java - label: generateOpenApiSpecForApiEndpoint + label: getLintingReportSignedUrl source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetLintingReportSignedUrlRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetLintingReportSignedUrlResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2505,17 +2516,15 @@ actions: .build()) .build(); - GenerateOpenApiSpecForApiEndpointRequest req = GenerateOpenApiSpecForApiEndpointRequest.builder() - .apiID("") - .versionID("") - .apiEndpointID("") + GetLintingReportSignedUrlRequest req = GetLintingReportSignedUrlRequest.builder() + .documentChecksum("") .build(); - GenerateOpenApiSpecForApiEndpointResponse res = sdk.apiEndpoints().generateOpenApiSpecForApiEndpoint() + GetLintingReportSignedUrlResponse res = sdk.reports().getLintingReportSignedUrl() .request(req) .call(); - if (res.generateOpenApiSpecDiff().isPresent()) { + if (res.signedAccess().isPresent()) { // handle response } } catch (SDKError e) { @@ -2528,19 +2537,19 @@ actions: } } - - target: $["paths"]["/v1/artifacts/preflight"]["post"] + - target: $["paths"]["/v1/workspace/{workspaceID}/events"]["get"] update: x-codeSamples: - lang: java - label: preflight + label: searchWorkspaceEvents source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.PreflightResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.PreflightRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.SearchWorkspaceEventsRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.SearchWorkspaceEventsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2553,17 +2562,19 @@ actions: .build()) .build(); - PreflightRequest req = PreflightRequest.builder() - .namespaceName("") + SearchWorkspaceEventsRequest req = SearchWorkspaceEventsRequest.builder() .build(); - PreflightResponse res = sdk.artifacts().preflight() + SearchWorkspaceEventsResponse res = sdk.events().searchWorkspaceEvents() .request(req) .call(); - if (res.preflightToken().isPresent()) { + if (res.cliEventBatch().isPresent()) { // handle response } + } catch (dev.speakeasyapi.javaclientsdk.models.errors.Error e) { + // handle exception + throw e; } catch (SDKError e) { // handle exception throw e; @@ -2574,18 +2585,19 @@ actions: } } - - target: $["paths"]["/v1/artifacts/namespaces"]["get"] + - target: $["paths"]["/v1/github/publishing_prs"]["get"] update: x-codeSamples: - lang: java - label: getNamespaces + label: fetchPublishingPRs source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetNamespacesResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.FetchPublishingPRsRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.FetchPublishingPRsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2598,10 +2610,17 @@ actions: .build()) .build(); - GetNamespacesResponse res = sdk.artifacts().getNamespaces() + FetchPublishingPRsRequest req = FetchPublishingPRsRequest.builder() + .generateGenLockId("") + .org("") + .repo("") + .build(); + + FetchPublishingPRsResponse res = sdk.github().fetchPublishingPRs() + .request(req) .call(); - if (res.getNamespacesResponse().isPresent()) { + if (res.githubPublishingPRResponse().isPresent()) { // handle response } } catch (SDKError e) { @@ -2614,19 +2633,19 @@ actions: } } - - target: $["paths"]["/v1/github/publishing_prs"]["get"] + - target: $["paths"]["/v1/workspace/embed-access-tokens/{tokenID}"]["delete"] update: x-codeSamples: - lang: java - label: fetchPublishingPRs + label: revokeEmbedAccessToken source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.FetchPublishingPRsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.FetchPublishingPRsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.RevokeEmbedAccessTokenRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.RevokeEmbedAccessTokenResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2639,19 +2658,15 @@ actions: .build()) .build(); - FetchPublishingPRsRequest req = FetchPublishingPRsRequest.builder() - .generateGenLockId("") - .org("") - .repo("") + RevokeEmbedAccessTokenRequest req = RevokeEmbedAccessTokenRequest.builder() + .tokenID("") .build(); - FetchPublishingPRsResponse res = sdk.github().fetchPublishingPRs() + RevokeEmbedAccessTokenResponse res = sdk.embeds().revokeEmbedAccessToken() .request(req) .call(); - if (res.githubPublishingPRResponse().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -2662,19 +2677,18 @@ actions: } } - - target: $["paths"]["/v1/github/trigger_action"]["post"] + - target: $["paths"]["/v1/organization"]["get"] update: x-codeSamples: - lang: java - label: triggerAction + label: getOrganizations source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.TriggerActionResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.GithubTriggerActionRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2687,17 +2701,12 @@ actions: .build()) .build(); - GithubTriggerActionRequest req = GithubTriggerActionRequest.builder() - .org("") - .repoName("") - .genLockId("") - .build(); - - TriggerActionResponse res = sdk.github().triggerAction() - .request(req) + GetOrganizationsResponse res = sdk.organizations().getOrganizations() .call(); - // handle response + if (res.organizations().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -2708,19 +2717,19 @@ actions: } } - - target: $["paths"]["/v1/workspace/embed-access-tokens/{tokenID}"]["delete"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints"]["get"] update: x-codeSamples: - lang: java - label: revokeEmbedAccessToken + label: getAllForVersionApiEndpoints source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.RevokeEmbedAccessTokenRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.RevokeEmbedAccessTokenResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetAllForVersionApiEndpointsRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetAllForVersionApiEndpointsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2733,15 +2742,18 @@ actions: .build()) .build(); - RevokeEmbedAccessTokenRequest req = RevokeEmbedAccessTokenRequest.builder() - .tokenID("") + GetAllForVersionApiEndpointsRequest req = GetAllForVersionApiEndpointsRequest.builder() + .apiID("") + .versionID("") .build(); - RevokeEmbedAccessTokenResponse res = sdk.embeds().revokeEmbedAccessToken() + GetAllForVersionApiEndpointsResponse res = sdk.apiEndpoints().getAllForVersionApiEndpoints() .request(req) .call(); - // handle response + if (res.apiEndpoints().isPresent()) { + // handle response + } } catch (SDKError e) { // handle exception throw e; @@ -2752,19 +2764,19 @@ actions: } } - - target: $["paths"]["/v1/workspace/{workspaceID}/events"]["get"] + - target: $["paths"]["/v1/github/publishing_secrets"]["get"] update: x-codeSamples: - lang: java - label: searchWorkspaceEvents + label: githubCheckPublishingSecrets source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SearchWorkspaceEventsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SearchWorkspaceEventsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingSecretsRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingSecretsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2777,19 +2789,17 @@ actions: .build()) .build(); - SearchWorkspaceEventsRequest req = SearchWorkspaceEventsRequest.builder() + GithubCheckPublishingSecretsRequest req = GithubCheckPublishingSecretsRequest.builder() + .generateGenLockId("") .build(); - SearchWorkspaceEventsResponse res = sdk.events().searchWorkspaceEvents() + GithubCheckPublishingSecretsResponse res = sdk.github().githubCheckPublishingSecrets() .request(req) .call(); - if (res.cliEventBatch().isPresent()) { + if (res.githubMissingPublishingSecretsResponse().isPresent()) { // handle response } - } catch (io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.Error e) { - // handle exception - throw e; } catch (SDKError e) { // handle exception throw e; @@ -2800,19 +2810,19 @@ actions: } } - - target: $["paths"]["/v1/workspace/{workspaceID}"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}/download"]["get"] update: x-codeSamples: - lang: java - label: getWorkspace + label: downloadSchemaRevision source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRevisionRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRevisionResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2825,14 +2835,17 @@ actions: .build()) .build(); - GetWorkspaceRequest req = GetWorkspaceRequest.builder() + DownloadSchemaRevisionRequest req = DownloadSchemaRevisionRequest.builder() + .apiID("") + .versionID("") + .revisionID("") .build(); - GetWorkspaceResponse res = sdk.workspaces().getWorkspace() + DownloadSchemaRevisionResponse res = sdk.schemas().downloadSchemaRevision() .request(req) .call(); - if (res.workspace().isPresent()) { + if (res.twoHundredApplicationJsonSchema().isPresent()) { // handle response } } catch (SDKError e) { @@ -2845,19 +2858,19 @@ actions: } } - - target: $["paths"]["/v1/oci/v2/{organization_slug}/{workspace_slug}/{namespace_name}/blobs/{digest}"]["get"] + - target: $["paths"]["/v1/eventlog/{requestID}"]["get"] update: x-codeSamples: - lang: java - label: getBlob + label: getRequestFromEventLog source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetBlobRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetBlobResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetRequestFromEventLogRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetRequestFromEventLogResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2870,18 +2883,15 @@ actions: .build()) .build(); - GetBlobRequest req = GetBlobRequest.builder() - .organizationSlug("") - .workspaceSlug("") - .namespaceName("") - .digest("") + GetRequestFromEventLogRequest req = GetRequestFromEventLogRequest.builder() + .requestID("") .build(); - GetBlobResponse res = sdk.artifacts().getBlob() + GetRequestFromEventLogResponse res = sdk.requests().getRequestFromEventLog() .request(req) .call(); - if (res.blob().isPresent()) { + if (res.unboundedRequest().isPresent()) { // handle response } } catch (SDKError e) { @@ -2894,19 +2904,18 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/generate/postman"]["get"] + - target: $["paths"]["/v1/workspace/embed-access-tokens/valid"]["get"] update: x-codeSamples: - lang: java - label: generatePostmanCollection + label: getValidEmbedAccessTokens source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GeneratePostmanCollectionRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GeneratePostmanCollectionResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetValidEmbedAccessTokensResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2919,16 +2928,10 @@ actions: .build()) .build(); - GeneratePostmanCollectionRequest req = GeneratePostmanCollectionRequest.builder() - .apiID("") - .versionID("") - .build(); - - GeneratePostmanCollectionResponse res = sdk.apis().generatePostmanCollection() - .request(req) + GetValidEmbedAccessTokensResponse res = sdk.embeds().getValidEmbedAccessTokens() .call(); - if (res.postmanCollection().isPresent()) { + if (res.embedTokens().isPresent()) { // handle response } } catch (SDKError e) { @@ -2941,19 +2944,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/api_endpoints"]["get"] + - target: $["paths"]["/v1/workspace/{workspaceID}/events/targets"]["get"] update: x-codeSamples: - lang: java - label: getAllApiEndpoints + label: getWorkspaceTargets source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAllApiEndpointsRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAllApiEndpointsResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceTargetsRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceTargetsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -2966,17 +2969,19 @@ actions: .build()) .build(); - GetAllApiEndpointsRequest req = GetAllApiEndpointsRequest.builder() - .apiID("") + GetWorkspaceTargetsRequest req = GetWorkspaceTargetsRequest.builder() .build(); - GetAllApiEndpointsResponse res = sdk.apiEndpoints().getAllApiEndpoints() + GetWorkspaceTargetsResponse res = sdk.events().getWorkspaceTargets() .request(req) .call(); - if (res.apiEndpoints().isPresent()) { + if (res.targetSDKList().isPresent()) { // handle response } + } catch (dev.speakeasyapi.javaclientsdk.models.errors.Error e) { + // handle exception + throw e; } catch (SDKError e) { // handle exception throw e; @@ -2987,19 +2992,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/postman"]["get"] + - target: $["paths"]["/v1/artifacts/preflight"]["post"] update: x-codeSamples: - lang: java - label: generatePostmanCollectionForApiEndpoint + label: preflight source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.PreflightResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.PreflightRequest; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -3012,17 +3017,15 @@ actions: .build()) .build(); - GeneratePostmanCollectionForApiEndpointRequest req = GeneratePostmanCollectionForApiEndpointRequest.builder() - .apiID("") - .versionID("") - .apiEndpointID("") + PreflightRequest req = PreflightRequest.builder() + .namespaceName("") .build(); - GeneratePostmanCollectionForApiEndpointResponse res = sdk.apiEndpoints().generatePostmanCollectionForApiEndpoint() + PreflightResponse res = sdk.artifacts().preflight() .request(req) .call(); - if (res.postmanCollection().isPresent()) { + if (res.preflightToken().isPresent()) { // handle response } } catch (SDKError e) { @@ -3035,19 +3038,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}/download"]["get"] + - target: $["paths"]["/v1/artifacts/namespaces/{namespace_name}/tags"]["post"] update: x-codeSamples: - lang: java - label: downloadSchemaRevision + label: postTags source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DownloadSchemaRevisionRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DownloadSchemaRevisionResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.PostTagsRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.PostTagsResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -3060,19 +3063,15 @@ actions: .build()) .build(); - DownloadSchemaRevisionRequest req = DownloadSchemaRevisionRequest.builder() - .apiID("") - .versionID("") - .revisionID("") + PostTagsRequest req = PostTagsRequest.builder() + .namespaceName("") .build(); - DownloadSchemaRevisionResponse res = sdk.schemas().downloadSchemaRevision() + PostTagsResponse res = sdk.artifacts().postTags() .request(req) .call(); - if (res.twoHundredApplicationJsonSchema().isPresent()) { - // handle response - } + // handle response } catch (SDKError e) { // handle exception throw e; @@ -3083,19 +3082,19 @@ actions: } } - - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/schemas"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/generate/postman"]["get"] update: x-codeSamples: - lang: java - label: getSchemas + label: generatePostmanCollection source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemasRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemasResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -3108,16 +3107,16 @@ actions: .build()) .build(); - GetSchemasRequest req = GetSchemasRequest.builder() + GeneratePostmanCollectionRequest req = GeneratePostmanCollectionRequest.builder() .apiID("") .versionID("") .build(); - GetSchemasResponse res = sdk.schemas().getSchemas() + GeneratePostmanCollectionResponse res = sdk.apis().generatePostmanCollection() .request(req) .call(); - if (res.schemata().isPresent()) { + if (res.postmanCollection().isPresent()) { // handle response } } catch (SDKError e) { @@ -3130,19 +3129,19 @@ actions: } } - - target: $["paths"]["/v1/github/action"]["get"] + - target: $["paths"]["/v1/apis/{apiID}/version/{versionID}/api_endpoints/find/{displayName}"]["get"] update: x-codeSamples: - lang: java - label: getAction + label: findApiEndpoint source: |- package hello.world; - import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetActionRequest; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetActionResponse; - import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; + import dev.speakeasyapi.javaclientsdk.SDK; + import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; + import dev.speakeasyapi.javaclientsdk.models.operations.FindApiEndpointRequest; + import dev.speakeasyapi.javaclientsdk.models.operations.FindApiEndpointResponse; + import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -3155,16 +3154,17 @@ actions: .build()) .build(); - GetActionRequest req = GetActionRequest.builder() - .org("") - .repo("") + FindApiEndpointRequest req = FindApiEndpointRequest.builder() + .apiID("") + .versionID("") + .displayName("") .build(); - GetActionResponse res = sdk.github().getAction() + FindApiEndpointResponse res = sdk.apiEndpoints().findApiEndpoint() .request(req) .call(); - if (res.githubGetActionResponse().isPresent()) { + if (res.apiEndpoint().isPresent()) { // handle response } } catch (SDKError e) { diff --git a/docs/sdks/apiendpoints/README.md b/docs/sdks/apiendpoints/README.md index f6a52aca..78ad1c3a 100644 --- a/docs/sdks/apiendpoints/README.md +++ b/docs/sdks/apiendpoints/README.md @@ -25,11 +25,11 @@ Delete an ApiEndpoint. This will also delete all associated Request Logs (if usi ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiEndpointRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiEndpointResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiEndpointRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiEndpointResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -92,11 +92,11 @@ This is useful for finding the ID of an ApiEndpoint to use in the /v1/apis/{apiI ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.FindApiEndpointRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.FindApiEndpointResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.FindApiEndpointRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.FindApiEndpointResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -161,11 +161,11 @@ Returns the original document and the newly generated document allowing a diff t ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -229,11 +229,11 @@ Generates a postman collection that allows the endpoint to be called from postma ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -297,11 +297,11 @@ Get all Api endpoints for a particular apiID. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAllApiEndpointsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAllApiEndpointsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiEndpointsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiEndpointsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -363,11 +363,11 @@ Get all ApiEndpoints for a particular apiID and versionID. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAllForVersionApiEndpointsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAllForVersionApiEndpointsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllForVersionApiEndpointsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllForVersionApiEndpointsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -430,11 +430,11 @@ Get an ApiEndpoint. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetApiEndpointRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetApiEndpointResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApiEndpointRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApiEndpointResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -498,12 +498,12 @@ Upsert an ApiEndpoint. If the ApiEndpoint does not exist it will be created, oth ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UpsertApiEndpointRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UpsertApiEndpointResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.ApiEndpointInput; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiEndpointRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiEndpointResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.ApiEndpointInput; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/docs/sdks/apis/README.md b/docs/sdks/apis/README.md index d12372b6..9b9c7b7b 100644 --- a/docs/sdks/apis/README.md +++ b/docs/sdks/apis/README.md @@ -23,11 +23,11 @@ Delete a particular version of an Api. The will also delete all associated ApiEn ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteApiResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -89,11 +89,11 @@ Returns the original document and the newly generated document allowing a diff t ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GenerateOpenApiSpecRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GenerateOpenApiSpecResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -156,11 +156,11 @@ Generates a postman collection containing all endpoints for a particular API. In ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GeneratePostmanCollectionRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GeneratePostmanCollectionResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -224,11 +224,11 @@ Supports filtering the versions based on metadata attributes. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAllApiVersionsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAllApiVersionsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiVersionsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiVersionsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -291,11 +291,11 @@ Supports filtering the APIs based on metadata attributes. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetApisRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetApisResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApisRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApisResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -357,12 +357,12 @@ If the Api exists, it will be updated. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UpsertApiRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UpsertApiResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.ApiInput; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.ApiInput; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/docs/sdks/artifacts/README.md b/docs/sdks/artifacts/README.md index fface511..04366815 100644 --- a/docs/sdks/artifacts/README.md +++ b/docs/sdks/artifacts/README.md @@ -25,11 +25,11 @@ Get blob for a particular digest ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetBlobRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetBlobResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetBlobRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetBlobResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -94,11 +94,11 @@ Get manifest for a particular reference ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetManifestRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetManifestResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetManifestRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetManifestResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -163,10 +163,10 @@ Each namespace contains many revisions. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetNamespacesResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetNamespacesResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -215,11 +215,11 @@ public class Application { ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetOASSummaryRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetOASSummaryResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOASSummaryRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOASSummaryResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -280,11 +280,11 @@ public class Application { ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetRevisionsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetRevisionsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetRevisionsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetRevisionsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -344,11 +344,11 @@ public class Application { ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetTagsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetTagsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetTagsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetTagsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -410,11 +410,11 @@ Add tags to an existing revision ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.PostTagsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.PostTagsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.PostTagsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.PostTagsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -474,11 +474,11 @@ Get access token for communicating with OCI distribution endpoints ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.PreflightResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.PreflightRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.PreflightResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.PreflightRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/docs/sdks/auth/README.md b/docs/sdks/auth/README.md index 286d4638..0fd72d55 100644 --- a/docs/sdks/auth/README.md +++ b/docs/sdks/auth/README.md @@ -21,10 +21,10 @@ Get or refresh an access token for the current workspace. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAccessTokenRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetAccessTokenResponse; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAccessTokenRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAccessTokenResponse; import java.lang.Exception; public class Application { @@ -83,10 +83,10 @@ Get information about the current user. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetUserResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetUserResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -137,11 +137,11 @@ Checks if generation is permitted for a particular run of the CLI ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceAccessRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceAccessResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -202,10 +202,10 @@ Validate the current api key. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.ValidateApiKeyResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.ValidateApiKeyResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/docs/sdks/embeds/README.md b/docs/sdks/embeds/README.md index 5ed35b0c..824052cc 100644 --- a/docs/sdks/embeds/README.md +++ b/docs/sdks/embeds/README.md @@ -21,11 +21,11 @@ Filters can be applied allowing views to be filtered to things like particular c ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetEmbedAccessTokenRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetEmbedAccessTokenResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetEmbedAccessTokenRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetEmbedAccessTokenResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -86,10 +86,10 @@ Get all valid embed access tokens for the current workspace. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetValidEmbedAccessTokensResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetValidEmbedAccessTokensResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -140,11 +140,11 @@ Revoke an embed access EmbedToken. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.RevokeEmbedAccessTokenRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.RevokeEmbedAccessTokenResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.RevokeEmbedAccessTokenRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.RevokeEmbedAccessTokenResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index 18a745fc..de02a410 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -21,11 +21,11 @@ Load recent events for a particular workspace ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceEventsByTargetRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceEventsByTargetResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceEventsByTargetRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceEventsByTargetResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -49,7 +49,7 @@ public class Application { if (res.cliEventBatch().isPresent()) { // handle response } - } catch (io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.Error e) { + } catch (dev.speakeasyapi.javaclientsdk.models.errors.Error e) { // handle exception throw e; } catch (SDKError e) { @@ -91,11 +91,11 @@ Load targets for a particular workspace ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceTargetsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceTargetsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceTargetsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceTargetsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -118,7 +118,7 @@ public class Application { if (res.targetSDKList().isPresent()) { // handle response } - } catch (io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.Error e) { + } catch (dev.speakeasyapi.javaclientsdk.models.errors.Error e) { // handle exception throw e; } catch (SDKError e) { @@ -160,13 +160,13 @@ Sends an array of events to be stored for a particular workspace. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.PostWorkspaceEventsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.PostWorkspaceEventsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.CliEvent; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.InteractionType; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.CliEvent; +import dev.speakeasyapi.javaclientsdk.models.shared.InteractionType; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; import java.time.OffsetDateTime; import java.util.List; @@ -201,7 +201,7 @@ public class Application { .call(); // handle response - } catch (io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.Error e) { + } catch (dev.speakeasyapi.javaclientsdk.models.errors.Error e) { // handle exception throw e; } catch (SDKError e) { @@ -243,11 +243,11 @@ Search events for a particular workspace by any field ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SearchWorkspaceEventsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SearchWorkspaceEventsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.SearchWorkspaceEventsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.SearchWorkspaceEventsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -270,7 +270,7 @@ public class Application { if (res.cliEventBatch().isPresent()) { // handle response } - } catch (io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.Error e) { + } catch (dev.speakeasyapi.javaclientsdk.models.errors.Error e) { // handle exception throw e; } catch (SDKError e) { diff --git a/docs/sdks/github/README.md b/docs/sdks/github/README.md index a721c912..25870cf6 100644 --- a/docs/sdks/github/README.md +++ b/docs/sdks/github/README.md @@ -22,11 +22,11 @@ ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.CheckAccessRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.CheckAccessResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.CheckAccessRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.CheckAccessResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -85,11 +85,11 @@ public class Application { ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.ConfigureCodeSamplesResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.GithubConfigureCodeSamplesRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.ConfigureCodeSamplesResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureCodeSamplesRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -151,11 +151,11 @@ public class Application { ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.ConfigureMintlifyRepoResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.GithubConfigureMintlifyRepoRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.ConfigureMintlifyRepoResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureMintlifyRepoRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; import java.util.List; @@ -218,11 +218,11 @@ public class Application { ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.ConfigureTargetResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.GithubConfigureTargetRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.ConfigureTargetResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureTargetRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -281,11 +281,11 @@ public class Application { ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.FetchPublishingPRsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.FetchPublishingPRsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.FetchPublishingPRsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.FetchPublishingPRsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -347,11 +347,11 @@ public class Application { ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetActionRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetActionResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetActionRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetActionResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -412,11 +412,11 @@ public class Application { ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GithubCheckPublishingSecretsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GithubCheckPublishingSecretsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingSecretsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingSecretsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -476,11 +476,11 @@ public class Application { ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GithubStorePublishingSecretsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.GithubStorePublishingSecretsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GithubStorePublishingSecretsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubStorePublishingSecretsRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -538,11 +538,11 @@ public class Application { ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.TriggerActionResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.GithubTriggerActionRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.TriggerActionResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubTriggerActionRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/docs/sdks/metadata/README.md b/docs/sdks/metadata/README.md index c0a0bab9..2a7a8309 100644 --- a/docs/sdks/metadata/README.md +++ b/docs/sdks/metadata/README.md @@ -20,11 +20,11 @@ Delete metadata for a particular apiID and versionID. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteVersionMetadataRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteVersionMetadataResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteVersionMetadataRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteVersionMetadataResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -87,11 +87,11 @@ Get all metadata for a particular apiID and versionID. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetVersionMetadataRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetVersionMetadataResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetVersionMetadataRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetVersionMetadataResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -154,12 +154,12 @@ Insert metadata for a particular apiID and versionID. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.InsertVersionMetadataRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.InsertVersionMetadataResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.VersionMetadataInput; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.InsertVersionMetadataRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.InsertVersionMetadataResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.models.shared.VersionMetadataInput; import java.lang.Exception; public class Application { diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md index 007de438..fc48d494 100644 --- a/docs/sdks/organizations/README.md +++ b/docs/sdks/organizations/README.md @@ -19,10 +19,10 @@ Creates a free trial for an organization ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.CreateFreeTrialResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.CreateFreeTrialResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -71,11 +71,11 @@ Get information about a particular organization. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetOrganizationRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetOrganizationResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -137,10 +137,10 @@ Returns a billing usage summary by target languages for a particular organizatio ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetOrganizationUsageResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationUsageResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -191,10 +191,10 @@ Returns a list of organizations a user has access too ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetOrganizationsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/docs/sdks/reports/README.md b/docs/sdks/reports/README.md index 280a6689..df633226 100644 --- a/docs/sdks/reports/README.md +++ b/docs/sdks/reports/README.md @@ -20,11 +20,11 @@ Get the signed access url for the change reports for a particular document. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetChangesReportSignedUrlRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetChangesReportSignedUrlResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetChangesReportSignedUrlRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetChangesReportSignedUrlResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -86,11 +86,11 @@ Get the signed access url for the linting reports for a particular document. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetLintingReportSignedUrlRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetLintingReportSignedUrlResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetLintingReportSignedUrlRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetLintingReportSignedUrlResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -152,13 +152,13 @@ Upload a report. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.File; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UploadReportRequestBody; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.UploadReportResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Report; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.File; +import dev.speakeasyapi.javaclientsdk.models.operations.UploadReportRequestBody; +import dev.speakeasyapi.javaclientsdk.models.operations.UploadReportResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Report; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/docs/sdks/requests/README.md b/docs/sdks/requests/README.md index c1f1153f..1515f13f 100644 --- a/docs/sdks/requests/README.md +++ b/docs/sdks/requests/README.md @@ -21,11 +21,11 @@ Allowing it to be replayed with the same inputs that were captured by the SDK. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GenerateRequestPostmanCollectionRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GenerateRequestPostmanCollectionResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateRequestPostmanCollectionRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateRequestPostmanCollectionResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -87,11 +87,11 @@ Get information about a particular request. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetRequestFromEventLogRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetRequestFromEventLogResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetRequestFromEventLogRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetRequestFromEventLogResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -154,11 +154,11 @@ Allows the filtering of requests on a number of criteria such as ApiID, VersionI ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.QueryEventLogRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.QueryEventLogResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.QueryEventLogRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.QueryEventLogResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/docs/sdks/schemas/README.md b/docs/sdks/schemas/README.md index cf677fa1..fc5b7fd8 100644 --- a/docs/sdks/schemas/README.md +++ b/docs/sdks/schemas/README.md @@ -25,11 +25,11 @@ Delete a particular schema revision for an Api. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteSchemaRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DeleteSchemaResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteSchemaRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteSchemaResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -91,11 +91,11 @@ Download the latest schema for a particular apiID. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DownloadSchemaRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DownloadSchemaResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -158,11 +158,11 @@ Download a particular schema revision for an Api. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DownloadSchemaRevisionRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.DownloadSchemaRevisionResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRevisionRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRevisionResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -227,11 +227,11 @@ This won't include the schema itself, that can be retrieved via the downloadSche ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemaRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemaResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -294,11 +294,11 @@ Get a diff of two schema revisions for an Api. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemaDiffRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemaDiffResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaDiffRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaDiffResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -364,11 +364,11 @@ This won't include the schema itself, that can be retrieved via the downloadSche ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemaRevisionRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemaRevisionResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRevisionRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRevisionResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -433,11 +433,11 @@ This won't include the schemas themselves, they can be retrieved via the downloa ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemasRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetSchemasResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemasRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemasResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -501,13 +501,13 @@ This will be used to populate ApiEndpoints and used as a base for any schema gen ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.RegisterSchemaFile; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.RegisterSchemaRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.RegisterSchemaRequestBody; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.RegisterSchemaResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.RegisterSchemaFile; +import dev.speakeasyapi.javaclientsdk.models.operations.RegisterSchemaRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.RegisterSchemaRequestBody; +import dev.speakeasyapi.javaclientsdk.models.operations.RegisterSchemaResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/docs/sdks/shorturls/README.md b/docs/sdks/shorturls/README.md index 6f61bac1..f80f5532 100644 --- a/docs/sdks/shorturls/README.md +++ b/docs/sdks/shorturls/README.md @@ -18,11 +18,11 @@ Shorten a URL. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.CreateRequestBody; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.CreateResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.CreateRequestBody; +import dev.speakeasyapi.javaclientsdk.models.operations.CreateResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/docs/sdks/suggest/README.md b/docs/sdks/suggest/README.md index 2e785c28..350df4dd 100644 --- a/docs/sdks/suggest/README.md +++ b/docs/sdks/suggest/README.md @@ -20,11 +20,11 @@ Apply operation ID suggestions and download result. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.ApplyOperationIDsRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.ApplyOperationIDsResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.ApplyOperationIDsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.ApplyOperationIDsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -86,13 +86,13 @@ Get suggestions from an LLM model for improving an OpenAPI document. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.Schema; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SuggestOpenAPIRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SuggestOpenAPIRequestBody; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SuggestOpenAPIResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.Schema; +import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRequestBody; +import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { @@ -160,11 +160,11 @@ Get suggestions from an LLM model for improving an OpenAPI document stored in th ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SuggestOpenAPIRegistryRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.SuggestOpenAPIRegistryResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRegistryRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRegistryResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/docs/sdks/workspaces/README.md b/docs/sdks/workspaces/README.md index 8264e56d..2f051126 100644 --- a/docs/sdks/workspaces/README.md +++ b/docs/sdks/workspaces/README.md @@ -16,11 +16,11 @@ Get information about a particular workspace. ```java package hello.world; -import io.github.speakeasy_sdks_staging.javaclientsdk.SDK; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.errors.SDKError; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceRequest; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.operations.GetWorkspaceResponse; -import io.github.speakeasy_sdks_staging.javaclientsdk.models.shared.Security; +import dev.speakeasyapi.javaclientsdk.SDK; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Security; import java.lang.Exception; public class Application { diff --git a/gen.yaml b/gen.yaml index a5e8fd23..bc4cc4a1 100644 --- a/gen.yaml +++ b/gen.yaml @@ -10,7 +10,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false java: - version: 7.16.7 + version: 7.16.8 additionalDependencies: [] additionalPlugins: [] artifactID: javaclientsdk diff --git a/gradlew.bat b/gradlew.bat index 93e3f59f..6689b85b 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,92 +1,92 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/ApiEndpoints.java b/src/main/java/dev/speakeasyapi/javaclientsdk/ApiEndpoints.java new file mode 100644 index 00000000..3ff61d41 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/ApiEndpoints.java @@ -0,0 +1,1135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiEndpointRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiEndpointRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiEndpointResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.FindApiEndpointRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.FindApiEndpointRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.FindApiEndpointResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiEndpointsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiEndpointsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiEndpointsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllForVersionApiEndpointsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllForVersionApiEndpointsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllForVersionApiEndpointsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApiEndpointRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApiEndpointRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApiEndpointResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiEndpointRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiEndpointRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiEndpointResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.ApiEndpoint; +import dev.speakeasyapi.javaclientsdk.models.shared.GenerateOpenApiSpecDiff; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.SerializedBody; +import dev.speakeasyapi.javaclientsdk.utils.Utils.JsonShape; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +/** + * REST APIs for managing ApiEndpoint entities + */ +public class ApiEndpoints implements + MethodCallDeleteApiEndpoint, + MethodCallFindApiEndpoint, + MethodCallGenerateOpenApiSpecForApiEndpoint, + MethodCallGeneratePostmanCollectionForApiEndpoint, + MethodCallGetAllApiEndpoints, + MethodCallGetAllForVersionApiEndpoints, + MethodCallGetApiEndpoint, + MethodCallUpsertApiEndpoint { + + private final SDKConfiguration sdkConfiguration; + + ApiEndpoints(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Delete an ApiEndpoint. + * Delete an ApiEndpoint. This will also delete all associated Request Logs (if using a Postgres datastore). + * @return The call builder + */ + public DeleteApiEndpointRequestBuilder deleteApiEndpoint() { + return new DeleteApiEndpointRequestBuilder(this); + } + + /** + * Delete an ApiEndpoint. + * Delete an ApiEndpoint. This will also delete all associated Request Logs (if using a Postgres datastore). + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteApiEndpointResponse deleteApiEndpoint( + DeleteApiEndpointRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + DeleteApiEndpointRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "DELETE"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "deleteApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "deleteApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "deleteApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "deleteApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteApiEndpointResponse.Builder _resBuilder = + DeleteApiEndpointResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + DeleteApiEndpointResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Find an ApiEndpoint via its displayName. + * Find an ApiEndpoint via its displayName (set by operationId from a registered OpenAPI schema). + * This is useful for finding the ID of an ApiEndpoint to use in the /v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID} endpoints. + * @return The call builder + */ + public FindApiEndpointRequestBuilder findApiEndpoint() { + return new FindApiEndpointRequestBuilder(this); + } + + /** + * Find an ApiEndpoint via its displayName. + * Find an ApiEndpoint via its displayName (set by operationId from a registered OpenAPI schema). + * This is useful for finding the ID of an ApiEndpoint to use in the /v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID} endpoints. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public FindApiEndpointResponse findApiEndpoint( + FindApiEndpointRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + FindApiEndpointRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/api_endpoints/find/{displayName}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "findApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "findApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "findApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "findApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + FindApiEndpointResponse.Builder _resBuilder = + FindApiEndpointResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + FindApiEndpointResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ApiEndpoint _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withApiEndpoint(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Generate an OpenAPI specification for a particular ApiEndpoint. + * This endpoint will generate a new operation in any registered OpenAPI document if the operation does not already exist in the document. + * Returns the original document and the newly generated document allowing a diff to be performed to see what has changed. + * @return The call builder + */ + public GenerateOpenApiSpecForApiEndpointRequestBuilder generateOpenApiSpecForApiEndpoint() { + return new GenerateOpenApiSpecForApiEndpointRequestBuilder(this); + } + + /** + * Generate an OpenAPI specification for a particular ApiEndpoint. + * This endpoint will generate a new operation in any registered OpenAPI document if the operation does not already exist in the document. + * Returns the original document and the newly generated document allowing a diff to be performed to see what has changed. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GenerateOpenApiSpecForApiEndpointResponse generateOpenApiSpecForApiEndpoint( + GenerateOpenApiSpecForApiEndpointRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GenerateOpenApiSpecForApiEndpointRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/openapi", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "generateOpenApiSpecForApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "generateOpenApiSpecForApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "generateOpenApiSpecForApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "generateOpenApiSpecForApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GenerateOpenApiSpecForApiEndpointResponse.Builder _resBuilder = + GenerateOpenApiSpecForApiEndpointResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GenerateOpenApiSpecForApiEndpointResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GenerateOpenApiSpecDiff _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withGenerateOpenApiSpecDiff(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Generate a Postman collection for a particular ApiEndpoint. + * Generates a postman collection that allows the endpoint to be called from postman variables produced for any path/query/header parameters included in the OpenAPI document. + * @return The call builder + */ + public GeneratePostmanCollectionForApiEndpointRequestBuilder generatePostmanCollectionForApiEndpoint() { + return new GeneratePostmanCollectionForApiEndpointRequestBuilder(this); + } + + /** + * Generate a Postman collection for a particular ApiEndpoint. + * Generates a postman collection that allows the endpoint to be called from postman variables produced for any path/query/header parameters included in the OpenAPI document. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GeneratePostmanCollectionForApiEndpointResponse generatePostmanCollectionForApiEndpoint( + GeneratePostmanCollectionForApiEndpointRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GeneratePostmanCollectionForApiEndpointRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/postman", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json;q=1, application/octet-stream;q=0") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "generatePostmanCollectionForApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "generatePostmanCollectionForApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "generatePostmanCollectionForApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "generatePostmanCollectionForApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GeneratePostmanCollectionForApiEndpointResponse.Builder _resBuilder = + GeneratePostmanCollectionForApiEndpointResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200") && Utils.contentTypeMatches(_contentType, "application/octet-stream")) { + _resBuilder.postmanCollection(_httpRes.body()); + } + + GeneratePostmanCollectionForApiEndpointResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/octet-stream")) { + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get all Api endpoints for a particular apiID. + * @return The call builder + */ + public GetAllApiEndpointsRequestBuilder getAllApiEndpoints() { + return new GetAllApiEndpointsRequestBuilder(this); + } + + /** + * Get all Api endpoints for a particular apiID. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAllApiEndpointsResponse getAllApiEndpoints( + GetAllApiEndpointsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetAllApiEndpointsRequest.class, + _baseUrl, + "/v1/apis/{apiID}/api_endpoints", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getAllApiEndpoints", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getAllApiEndpoints", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getAllApiEndpoints", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getAllApiEndpoints", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAllApiEndpointsResponse.Builder _resBuilder = + GetAllApiEndpointsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetAllApiEndpointsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withApiEndpoints(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get all ApiEndpoints for a particular apiID and versionID. + * @return The call builder + */ + public GetAllForVersionApiEndpointsRequestBuilder getAllForVersionApiEndpoints() { + return new GetAllForVersionApiEndpointsRequestBuilder(this); + } + + /** + * Get all ApiEndpoints for a particular apiID and versionID. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAllForVersionApiEndpointsResponse getAllForVersionApiEndpoints( + GetAllForVersionApiEndpointsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetAllForVersionApiEndpointsRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/api_endpoints", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getAllForVersionApiEndpoints", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getAllForVersionApiEndpoints", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getAllForVersionApiEndpoints", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getAllForVersionApiEndpoints", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAllForVersionApiEndpointsResponse.Builder _resBuilder = + GetAllForVersionApiEndpointsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetAllForVersionApiEndpointsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withAPIEndpoints(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get an ApiEndpoint. + * @return The call builder + */ + public GetApiEndpointRequestBuilder getApiEndpoint() { + return new GetApiEndpointRequestBuilder(this); + } + + /** + * Get an ApiEndpoint. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetApiEndpointResponse getApiEndpoint( + GetApiEndpointRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetApiEndpointRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetApiEndpointResponse.Builder _resBuilder = + GetApiEndpointResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetApiEndpointResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ApiEndpoint _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withApiEndpoint(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Upsert an ApiEndpoint. + * Upsert an ApiEndpoint. If the ApiEndpoint does not exist it will be created, otherwise it will be updated. + * @return The call builder + */ + public UpsertApiEndpointRequestBuilder upsertApiEndpoint() { + return new UpsertApiEndpointRequestBuilder(this); + } + + /** + * Upsert an ApiEndpoint. + * Upsert an ApiEndpoint. If the ApiEndpoint does not exist it will be created, otherwise it will be updated. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpsertApiEndpointResponse upsertApiEndpoint( + UpsertApiEndpointRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + UpsertApiEndpointRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "PUT"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "apiEndpoint", + "json", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "upsertApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "upsertApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "upsertApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "upsertApiEndpoint", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + UpsertApiEndpointResponse.Builder _resBuilder = + UpsertApiEndpointResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + UpsertApiEndpointResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ApiEndpoint _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withApiEndpoint(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Apis.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Apis.java new file mode 100644 index 00000000..3a43208e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Apis.java @@ -0,0 +1,879 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiVersionsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiVersionsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiVersionsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApisRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApisRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetApisResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.Api; +import dev.speakeasyapi.javaclientsdk.models.shared.GenerateOpenApiSpecDiff; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.SerializedBody; +import dev.speakeasyapi.javaclientsdk.utils.Utils.JsonShape; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +/** + * REST APIs for managing Api entities + */ +public class Apis implements + MethodCallDeleteApi, + MethodCallGenerateOpenApiSpec, + MethodCallGeneratePostmanCollection, + MethodCallGetAllApiVersions, + MethodCallGetApis, + MethodCallUpsertApi { + + private final SDKConfiguration sdkConfiguration; + + Apis(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Delete an Api. + * Delete a particular version of an Api. The will also delete all associated ApiEndpoints, Metadata, Schemas & Request Logs (if using a Postgres datastore). + * @return The call builder + */ + public DeleteApiRequestBuilder deleteApi() { + return new DeleteApiRequestBuilder(this); + } + + /** + * Delete an Api. + * Delete a particular version of an Api. The will also delete all associated ApiEndpoints, Metadata, Schemas & Request Logs (if using a Postgres datastore). + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteApiResponse deleteApi( + DeleteApiRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + DeleteApiRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "DELETE"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "deleteApi", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "deleteApi", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "deleteApi", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "deleteApi", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteApiResponse.Builder _resBuilder = + DeleteApiResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + DeleteApiResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Generate an OpenAPI specification for a particular Api. + * This endpoint will generate any missing operations in any registered OpenAPI document if the operation does not already exist in the document. + * Returns the original document and the newly generated document allowing a diff to be performed to see what has changed. + * @return The call builder + */ + public GenerateOpenApiSpecRequestBuilder generateOpenApiSpec() { + return new GenerateOpenApiSpecRequestBuilder(this); + } + + /** + * Generate an OpenAPI specification for a particular Api. + * This endpoint will generate any missing operations in any registered OpenAPI document if the operation does not already exist in the document. + * Returns the original document and the newly generated document allowing a diff to be performed to see what has changed. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GenerateOpenApiSpecResponse generateOpenApiSpec( + GenerateOpenApiSpecRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GenerateOpenApiSpecRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/generate/openapi", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "generateOpenApiSpec", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "generateOpenApiSpec", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "generateOpenApiSpec", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "generateOpenApiSpec", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GenerateOpenApiSpecResponse.Builder _resBuilder = + GenerateOpenApiSpecResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GenerateOpenApiSpecResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GenerateOpenApiSpecDiff _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withGenerateOpenApiSpecDiff(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Generate a Postman collection for a particular Api. + * Generates a postman collection containing all endpoints for a particular API. Includes variables produced for any path/query/header parameters included in the OpenAPI document. + * @return The call builder + */ + public GeneratePostmanCollectionRequestBuilder generatePostmanCollection() { + return new GeneratePostmanCollectionRequestBuilder(this); + } + + /** + * Generate a Postman collection for a particular Api. + * Generates a postman collection containing all endpoints for a particular API. Includes variables produced for any path/query/header parameters included in the OpenAPI document. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GeneratePostmanCollectionResponse generatePostmanCollection( + GeneratePostmanCollectionRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GeneratePostmanCollectionRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/generate/postman", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json;q=1, application/octet-stream;q=0") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "generatePostmanCollection", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "generatePostmanCollection", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "generatePostmanCollection", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "generatePostmanCollection", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GeneratePostmanCollectionResponse.Builder _resBuilder = + GeneratePostmanCollectionResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200") && Utils.contentTypeMatches(_contentType, "application/octet-stream")) { + _resBuilder.postmanCollection(_httpRes.body()); + } + + GeneratePostmanCollectionResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/octet-stream")) { + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get all Api versions for a particular ApiEndpoint. + * Get all Api versions for a particular ApiEndpoint. + * Supports filtering the versions based on metadata attributes. + * @return The call builder + */ + public GetAllApiVersionsRequestBuilder getAllApiVersions() { + return new GetAllApiVersionsRequestBuilder(this); + } + + /** + * Get all Api versions for a particular ApiEndpoint. + * Get all Api versions for a particular ApiEndpoint. + * Supports filtering the versions based on metadata attributes. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAllApiVersionsResponse getAllApiVersions( + GetAllApiVersionsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetAllApiVersionsRequest.class, + _baseUrl, + "/v1/apis/{apiID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + GetAllApiVersionsRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getAllApiVersions", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getAllApiVersions", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getAllApiVersions", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getAllApiVersions", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAllApiVersionsResponse.Builder _resBuilder = + GetAllApiVersionsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetAllApiVersionsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withApis(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get a list of Apis for a given workspace + * Get a list of all Apis and their versions for a given workspace. + * Supports filtering the APIs based on metadata attributes. + * @return The call builder + */ + public GetApisRequestBuilder getApis() { + return new GetApisRequestBuilder(this); + } + + /** + * Get a list of Apis for a given workspace + * Get a list of all Apis and their versions for a given workspace. + * Supports filtering the APIs based on metadata attributes. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetApisResponse getApis( + GetApisRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/apis"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + GetApisRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getApis", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getApis", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getApis", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getApis", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetApisResponse.Builder _resBuilder = + GetApisResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetApisResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withApis(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Upsert an Api + * Upsert an Api. If the Api does not exist, it will be created. + * If the Api exists, it will be updated. + * @return The call builder + */ + public UpsertApiRequestBuilder upsertApi() { + return new UpsertApiRequestBuilder(this); + } + + /** + * Upsert an Api + * Upsert an Api. If the Api does not exist, it will be created. + * If the Api exists, it will be updated. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UpsertApiResponse upsertApi( + UpsertApiRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + UpsertApiRequest.class, + _baseUrl, + "/v1/apis/{apiID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "PUT"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "api", + "json", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "upsertApi", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "upsertApi", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "upsertApi", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "upsertApi", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + UpsertApiResponse.Builder _resBuilder = + UpsertApiResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + UpsertApiResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Api _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withApi(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Artifacts.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Artifacts.java new file mode 100644 index 00000000..31c1d3c3 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Artifacts.java @@ -0,0 +1,1106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetBlobRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetBlobRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetBlobResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetManifestRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetManifestRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetManifestResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetNamespacesRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetNamespacesResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOASSummaryRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOASSummaryRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOASSummaryResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetRevisionsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetRevisionsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetRevisionsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetTagsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetTagsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetTagsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.PostTagsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.PostTagsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.PostTagsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.PreflightRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.PreflightResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.shared.Manifest; +import dev.speakeasyapi.javaclientsdk.models.shared.OASSummary; +import dev.speakeasyapi.javaclientsdk.models.shared.PreflightRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.PreflightToken; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.SerializedBody; +import dev.speakeasyapi.javaclientsdk.utils.Utils.JsonShape; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +/** + * REST APIs for working with Registry artifacts + */ +public class Artifacts implements + MethodCallGetBlob, + MethodCallGetManifest, + MethodCallGetNamespaces, + MethodCallGetOASSummary, + MethodCallGetRevisions, + MethodCallGetTags, + MethodCallPostTags, + MethodCallPreflight { + + private final SDKConfiguration sdkConfiguration; + + Artifacts(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Get blob for a particular digest + * @return The call builder + */ + public GetBlobRequestBuilder getBlob() { + return new GetBlobRequestBuilder(this); + } + + /** + * Get blob for a particular digest + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetBlobResponse getBlob( + GetBlobRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetBlobRequest.class, + _baseUrl, + "/v1/oci/v2/{organization_slug}/{workspace_slug}/{namespace_name}/blobs/{digest}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json;q=1, application/octet-stream;q=0") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getBlob", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getBlob", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getBlob", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getBlob", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetBlobResponse.Builder _resBuilder = + GetBlobResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200") && Utils.contentTypeMatches(_contentType, "application/octet-stream")) { + _resBuilder.blob(_httpRes.body()); + } + + GetBlobResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/octet-stream")) { + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get manifest for a particular reference + * @return The call builder + */ + public GetManifestRequestBuilder getManifest() { + return new GetManifestRequestBuilder(this); + } + + /** + * Get manifest for a particular reference + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetManifestResponse getManifest( + GetManifestRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetManifestRequest.class, + _baseUrl, + "/v1/oci/v2/{organization_slug}/{workspace_slug}/{namespace_name}/manifests/{revision_reference}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json;q=1, application/vnd.oci.image.manifest.v1+json;q=0") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getManifest", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getManifest", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getManifest", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getManifest", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetManifestResponse.Builder _resBuilder = + GetManifestResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetManifestResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/vnd.oci.image.manifest.v1+json")) { + Manifest _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withManifest(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Each namespace contains many revisions. + * @return The call builder + */ + public GetNamespacesRequestBuilder getNamespaces() { + return new GetNamespacesRequestBuilder(this); + } + + /** + * Each namespace contains many revisions. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetNamespacesResponse getNamespacesDirect() throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/artifacts/namespaces"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getNamespaces", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getNamespaces", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getNamespaces", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getNamespaces", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetNamespacesResponse.Builder _resBuilder = + GetNamespacesResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetNamespacesResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + dev.speakeasyapi.javaclientsdk.models.shared.GetNamespacesResponse _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withGetNamespacesResponse(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + public GetOASSummaryRequestBuilder getOASSummary() { + return new GetOASSummaryRequestBuilder(this); + } + + public GetOASSummaryResponse getOASSummary( + GetOASSummaryRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetOASSummaryRequest.class, + _baseUrl, + "/v1/artifacts/namespaces/{namespace_name}/revisions/{revision_reference}/summary", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getOASSummary", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getOASSummary", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getOASSummary", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getOASSummary", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetOASSummaryResponse.Builder _resBuilder = + GetOASSummaryResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetOASSummaryResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + OASSummary _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withOASSummary(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + public GetRevisionsRequestBuilder getRevisions() { + return new GetRevisionsRequestBuilder(this); + } + + public GetRevisionsResponse getRevisions( + GetRevisionsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetRevisionsRequest.class, + _baseUrl, + "/v1/artifacts/namespaces/{namespace_name}/revisions", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + GetRevisionsRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getRevisions", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getRevisions", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getRevisions", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getRevisions", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetRevisionsResponse.Builder _resBuilder = + GetRevisionsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetRevisionsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + dev.speakeasyapi.javaclientsdk.models.shared.GetRevisionsResponse _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withGetRevisionsResponse(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + public GetTagsRequestBuilder getTags() { + return new GetTagsRequestBuilder(this); + } + + public GetTagsResponse getTags( + GetTagsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetTagsRequest.class, + _baseUrl, + "/v1/artifacts/namespaces/{namespace_name}/tags", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getTags", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getTags", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getTags", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getTags", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetTagsResponse.Builder _resBuilder = + GetTagsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetTagsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + dev.speakeasyapi.javaclientsdk.models.shared.GetTagsResponse _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withGetTagsResponse(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Add tags to an existing revision + * @return The call builder + */ + public PostTagsRequestBuilder postTags() { + return new PostTagsRequestBuilder(this); + } + + /** + * Add tags to an existing revision + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public PostTagsResponse postTags( + PostTagsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + PostTagsRequest.class, + _baseUrl, + "/v1/artifacts/namespaces/{namespace_name}/tags", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "addTags", + "json", + false); + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "postTags", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "postTags", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "postTags", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "postTags", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PostTagsResponse.Builder _resBuilder = + PostTagsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + PostTagsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get access token for communicating with OCI distribution endpoints + * @return The call builder + */ + public PreflightRequestBuilder preflight() { + return new PreflightRequestBuilder(this); + } + + /** + * Get access token for communicating with OCI distribution endpoints + * @return The response from the API call + * @throws Exception if the API call fails + */ + public PreflightResponse preflightDirect() throws Exception { + return preflight(Optional.empty()); + } + + /** + * Get access token for communicating with OCI distribution endpoints + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public PreflightResponse preflight( + Optional request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/artifacts/preflight"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference>() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "request", + "json", + false); + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "preflight", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "preflight", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "preflight", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "preflight", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PreflightResponse.Builder _resBuilder = + PreflightResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + PreflightResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + PreflightToken _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withPreflightToken(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Auth.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Auth.java new file mode 100644 index 00000000..baf8521c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Auth.java @@ -0,0 +1,605 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAccessTokenRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAccessTokenRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetAccessTokenResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetUserRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetUserResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.operations.ValidateApiKeyRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.ValidateApiKeyResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.AccessDetails; +import dev.speakeasyapi.javaclientsdk.models.shared.AccessToken; +import dev.speakeasyapi.javaclientsdk.models.shared.ApiKeyDetails; +import dev.speakeasyapi.javaclientsdk.models.shared.User; +import dev.speakeasyapi.javaclientsdk.utils.BackoffStrategy; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Options; +import dev.speakeasyapi.javaclientsdk.utils.Retries.NonRetryableException; +import dev.speakeasyapi.javaclientsdk.utils.Retries; +import dev.speakeasyapi.javaclientsdk.utils.RetryConfig; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + +/** + * REST APIs for managing Authentication + */ +public class Auth implements + MethodCallGetAccessToken, + MethodCallGetUser, + MethodCallGetWorkspaceAccess, + MethodCallValidateApiKey { + + private final SDKConfiguration sdkConfiguration; + + Auth(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Get or refresh an access token for the current workspace. + * @return The call builder + */ + public GetAccessTokenRequestBuilder getAccessToken() { + return new GetAccessTokenRequestBuilder(this); + } + + /** + * Get or refresh an access token for the current workspace. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetAccessTokenResponse getAccessToken( + GetAccessTokenRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/auth/access_token"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + GetAccessTokenRequest.class, + request, + this.sdkConfiguration.globals)); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getAccessToken", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getAccessToken", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getAccessToken", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getAccessToken", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetAccessTokenResponse.Builder _resBuilder = + GetAccessTokenResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetAccessTokenResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + AccessToken _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withAccessToken(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get information about the current user. + * @return The call builder + */ + public GetUserRequestBuilder getUser() { + return new GetUserRequestBuilder(this); + } + + /** + * Get information about the current user. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetUserResponse getUserDirect() throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/user"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getUser", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getUser", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getUser", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getUser", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetUserResponse.Builder _resBuilder = + GetUserResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetUserResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + User _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withUser(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get access allowances for a particular workspace + * Checks if generation is permitted for a particular run of the CLI + * @return The call builder + */ + public GetWorkspaceAccessRequestBuilder getWorkspaceAccess() { + return new GetWorkspaceAccessRequestBuilder(this); + } + + /** + * Get access allowances for a particular workspace + * Checks if generation is permitted for a particular run of the CLI + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetWorkspaceAccessResponse getWorkspaceAccess( + GetWorkspaceAccessRequest request) throws Exception { + return getWorkspaceAccess(request, Optional.empty()); + } + + /** + * Get access allowances for a particular workspace + * Checks if generation is permitted for a particular run of the CLI + * @param request The request object containing all of the parameters for the API call. + * @param options additional options + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetWorkspaceAccessResponse getWorkspaceAccess( + GetWorkspaceAccessRequest request, + Optional options) throws Exception { + + if (options.isPresent()) { + options.get().validate(Arrays.asList(dev.speakeasyapi.javaclientsdk.utils.Options.Option.RETRY_CONFIG)); + } + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/workspace/access"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + GetWorkspaceAccessRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HTTPRequest _finalReq = _req; + RetryConfig _retryConfig; + if (options.isPresent() && options.get().retryConfig().isPresent()) { + _retryConfig = options.get().retryConfig().get(); + } else if (this.sdkConfiguration.retryConfig.isPresent()) { + _retryConfig = this.sdkConfiguration.retryConfig.get(); + } else { + _retryConfig = RetryConfig.builder() + .backoff(BackoffStrategy.builder() + .initialInterval(100, TimeUnit.MILLISECONDS) + .maxInterval(2000, TimeUnit.MILLISECONDS) + .baseFactor((double)(1.5)) + .maxElapsedTime(60000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build(); + } + List _statusCodes = new ArrayList<>(); + _statusCodes.add("408"); + _statusCodes.add("500"); + _statusCodes.add("502"); + _statusCodes.add("503"); + Retries _retries = Retries.builder() + .action(() -> { + HttpRequest _r = null; + try { + _r = sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getWorkspaceAccess", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _finalReq.build()); + } catch (Exception _e) { + throw new NonRetryableException(_e); + } + try { + return _client.send(_r); + } catch (Exception _e) { + return sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getWorkspaceAccess", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + }) + .retryConfig(_retryConfig) + .statusCodes(_statusCodes) + .build(); + HttpResponse _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getWorkspaceAccess", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _retries.run()); + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetWorkspaceAccessResponse.Builder _resBuilder = + GetWorkspaceAccessResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetWorkspaceAccessResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + AccessDetails _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withAccessDetails(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Validate the current api key. + * @return The call builder + */ + public ValidateApiKeyRequestBuilder validateApiKey() { + return new ValidateApiKeyRequestBuilder(this); + } + + /** + * Validate the current api key. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ValidateApiKeyResponse validateApiKeyDirect() throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/auth/validate"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "validateApiKey", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "validateApiKey", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "validateApiKey", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "validateApiKey", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ValidateApiKeyResponse.Builder _resBuilder = + ValidateApiKeyResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + ValidateApiKeyResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ApiKeyDetails _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withApiKeyDetails(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Embeds.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Embeds.java new file mode 100644 index 00000000..957d43fd --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Embeds.java @@ -0,0 +1,433 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetEmbedAccessTokenRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetEmbedAccessTokenRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetEmbedAccessTokenResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetValidEmbedAccessTokensRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetValidEmbedAccessTokensResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.RevokeEmbedAccessTokenRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.RevokeEmbedAccessTokenRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.RevokeEmbedAccessTokenResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.shared.EmbedAccessTokenResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.EmbedToken; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +/** + * REST APIs for managing embeds + */ +public class Embeds implements + MethodCallGetEmbedAccessToken, + MethodCallGetValidEmbedAccessTokens, + MethodCallRevokeEmbedAccessToken { + + private final SDKConfiguration sdkConfiguration; + + Embeds(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Get an embed access token for the current workspace. + * Returns an embed access token for the current workspace. This can be used to authenticate access to externally embedded content. + * Filters can be applied allowing views to be filtered to things like particular customerIds. + * @return The call builder + */ + public GetEmbedAccessTokenRequestBuilder getEmbedAccessToken() { + return new GetEmbedAccessTokenRequestBuilder(this); + } + + /** + * Get an embed access token for the current workspace. + * Returns an embed access token for the current workspace. This can be used to authenticate access to externally embedded content. + * Filters can be applied allowing views to be filtered to things like particular customerIds. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetEmbedAccessTokenResponse getEmbedAccessToken( + GetEmbedAccessTokenRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/workspace/embed-access-token"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + GetEmbedAccessTokenRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getEmbedAccessToken", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getEmbedAccessToken", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getEmbedAccessToken", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getEmbedAccessToken", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetEmbedAccessTokenResponse.Builder _resBuilder = + GetEmbedAccessTokenResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetEmbedAccessTokenResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + EmbedAccessTokenResponse _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withEmbedAccessTokenResponse(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get all valid embed access tokens for the current workspace. + * @return The call builder + */ + public GetValidEmbedAccessTokensRequestBuilder getValidEmbedAccessTokens() { + return new GetValidEmbedAccessTokensRequestBuilder(this); + } + + /** + * Get all valid embed access tokens for the current workspace. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetValidEmbedAccessTokensResponse getValidEmbedAccessTokensDirect() throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/workspace/embed-access-tokens/valid"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getValidEmbedAccessTokens", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getValidEmbedAccessTokens", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getValidEmbedAccessTokens", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getValidEmbedAccessTokens", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetValidEmbedAccessTokensResponse.Builder _resBuilder = + GetValidEmbedAccessTokensResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetValidEmbedAccessTokensResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withEmbedTokens(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Revoke an embed access EmbedToken. + * @return The call builder + */ + public RevokeEmbedAccessTokenRequestBuilder revokeEmbedAccessToken() { + return new RevokeEmbedAccessTokenRequestBuilder(this); + } + + /** + * Revoke an embed access EmbedToken. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public RevokeEmbedAccessTokenResponse revokeEmbedAccessToken( + RevokeEmbedAccessTokenRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + RevokeEmbedAccessTokenRequest.class, + _baseUrl, + "/v1/workspace/embed-access-tokens/{tokenID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "DELETE"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "revokeEmbedAccessToken", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "revokeEmbedAccessToken", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "revokeEmbedAccessToken", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "revokeEmbedAccessToken", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RevokeEmbedAccessTokenResponse.Builder _resBuilder = + RevokeEmbedAccessTokenResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + RevokeEmbedAccessTokenResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Events.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Events.java new file mode 100644 index 00000000..0be2c542 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Events.java @@ -0,0 +1,641 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceEventsByTargetRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceEventsByTargetRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceEventsByTargetResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceTargetsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceTargetsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceTargetsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.operations.SearchWorkspaceEventsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.SearchWorkspaceEventsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.SearchWorkspaceEventsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.CliEvent; +import dev.speakeasyapi.javaclientsdk.models.shared.TargetSDK; +import dev.speakeasyapi.javaclientsdk.utils.BackoffStrategy; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Options; +import dev.speakeasyapi.javaclientsdk.utils.Retries.NonRetryableException; +import dev.speakeasyapi.javaclientsdk.utils.Retries; +import dev.speakeasyapi.javaclientsdk.utils.RetryConfig; +import dev.speakeasyapi.javaclientsdk.utils.SerializedBody; +import dev.speakeasyapi.javaclientsdk.utils.Utils.JsonShape; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + +/** + * REST APIs for capturing event data + */ +public class Events implements + MethodCallGetWorkspaceEventsByTarget, + MethodCallGetWorkspaceTargets, + MethodCallPostWorkspaceEvents, + MethodCallSearchWorkspaceEvents { + + private final SDKConfiguration sdkConfiguration; + + Events(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Load recent events for a particular workspace + * @return The call builder + */ + public GetWorkspaceEventsByTargetRequestBuilder getWorkspaceEventsByTarget() { + return new GetWorkspaceEventsByTargetRequestBuilder(this); + } + + /** + * Load recent events for a particular workspace + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetWorkspaceEventsByTargetResponse getWorkspaceEventsByTarget( + GetWorkspaceEventsByTargetRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetWorkspaceEventsByTargetRequest.class, + _baseUrl, + "/v1/workspace/{workspaceID}/events/targets/{targetID}/events", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + GetWorkspaceEventsByTargetRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getWorkspaceEventsByTarget", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getWorkspaceEventsByTarget", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getWorkspaceEventsByTarget", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getWorkspaceEventsByTarget", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetWorkspaceEventsByTargetResponse.Builder _resBuilder = + GetWorkspaceEventsByTargetResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetWorkspaceEventsByTargetResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withCliEventBatch(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Load targets for a particular workspace + * @return The call builder + */ + public GetWorkspaceTargetsRequestBuilder getWorkspaceTargets() { + return new GetWorkspaceTargetsRequestBuilder(this); + } + + /** + * Load targets for a particular workspace + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetWorkspaceTargetsResponse getWorkspaceTargets( + GetWorkspaceTargetsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetWorkspaceTargetsRequest.class, + _baseUrl, + "/v1/workspace/{workspaceID}/events/targets", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + GetWorkspaceTargetsRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getWorkspaceTargets", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getWorkspaceTargets", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getWorkspaceTargets", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getWorkspaceTargets", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetWorkspaceTargetsResponse.Builder _resBuilder = + GetWorkspaceTargetsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetWorkspaceTargetsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withTargetSDKList(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Post events for a specific workspace + * Sends an array of events to be stored for a particular workspace. + * @return The call builder + */ + public PostWorkspaceEventsRequestBuilder postWorkspaceEvents() { + return new PostWorkspaceEventsRequestBuilder(this); + } + + /** + * Post events for a specific workspace + * Sends an array of events to be stored for a particular workspace. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public PostWorkspaceEventsResponse postWorkspaceEvents( + PostWorkspaceEventsRequest request) throws Exception { + return postWorkspaceEvents(request, Optional.empty()); + } + + /** + * Post events for a specific workspace + * Sends an array of events to be stored for a particular workspace. + * @param request The request object containing all of the parameters for the API call. + * @param options additional options + * @return The response from the API call + * @throws Exception if the API call fails + */ + public PostWorkspaceEventsResponse postWorkspaceEvents( + PostWorkspaceEventsRequest request, + Optional options) throws Exception { + + if (options.isPresent()) { + options.get().validate(Arrays.asList(dev.speakeasyapi.javaclientsdk.utils.Options.Option.RETRY_CONFIG)); + } + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + PostWorkspaceEventsRequest.class, + _baseUrl, + "/v1/workspace/{workspaceID}/events", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "requestBody", + "json", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HTTPRequest _finalReq = _req; + RetryConfig _retryConfig; + if (options.isPresent() && options.get().retryConfig().isPresent()) { + _retryConfig = options.get().retryConfig().get(); + } else if (this.sdkConfiguration.retryConfig.isPresent()) { + _retryConfig = this.sdkConfiguration.retryConfig.get(); + } else { + _retryConfig = RetryConfig.builder() + .backoff(BackoffStrategy.builder() + .initialInterval(100, TimeUnit.MILLISECONDS) + .maxInterval(2000, TimeUnit.MILLISECONDS) + .baseFactor((double)(1.5)) + .maxElapsedTime(60000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build(); + } + List _statusCodes = new ArrayList<>(); + _statusCodes.add("408"); + _statusCodes.add("500"); + _statusCodes.add("502"); + _statusCodes.add("503"); + Retries _retries = Retries.builder() + .action(() -> { + HttpRequest _r = null; + try { + _r = sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "postWorkspaceEvents", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _finalReq.build()); + } catch (Exception _e) { + throw new NonRetryableException(_e); + } + try { + return _client.send(_r); + } catch (Exception _e) { + return sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "postWorkspaceEvents", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + }) + .retryConfig(_retryConfig) + .statusCodes(_statusCodes) + .build(); + HttpResponse _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "postWorkspaceEvents", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _retries.run()); + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + PostWorkspaceEventsResponse.Builder _resBuilder = + PostWorkspaceEventsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + PostWorkspaceEventsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "2XX")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Search events for a particular workspace by any field + * @return The call builder + */ + public SearchWorkspaceEventsRequestBuilder searchWorkspaceEvents() { + return new SearchWorkspaceEventsRequestBuilder(this); + } + + /** + * Search events for a particular workspace by any field + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SearchWorkspaceEventsResponse searchWorkspaceEvents( + SearchWorkspaceEventsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + SearchWorkspaceEventsRequest.class, + _baseUrl, + "/v1/workspace/{workspaceID}/events", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + SearchWorkspaceEventsRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "searchWorkspaceEvents", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "searchWorkspaceEvents", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "searchWorkspaceEvents", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "searchWorkspaceEvents", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SearchWorkspaceEventsResponse.Builder _resBuilder = + SearchWorkspaceEventsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + SearchWorkspaceEventsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withCliEventBatch(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "5XX")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + throw _out; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Github.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Github.java new file mode 100644 index 00000000..860960dc --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Github.java @@ -0,0 +1,1176 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.CheckAccessRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.CheckAccessRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.CheckAccessResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.ConfigureCodeSamplesRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.ConfigureCodeSamplesResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.ConfigureMintlifyRepoRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.ConfigureMintlifyRepoResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.ConfigureTargetRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.ConfigureTargetResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.FetchPublishingPRsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.FetchPublishingPRsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.FetchPublishingPRsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetActionRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetActionRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetActionResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingSecretsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingSecretsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingSecretsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GithubStorePublishingSecretsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GithubStorePublishingSecretsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.operations.TriggerActionRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.TriggerActionResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureCodeSamplesRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureCodeSamplesResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureMintlifyRepoRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureTargetRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubGetActionResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubMissingPublishingSecretsResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubPublishingPRResponse; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubStorePublishingSecretsRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubTriggerActionRequest; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.SerializedBody; +import dev.speakeasyapi.javaclientsdk.utils.Utils.JsonShape; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +public class Github implements + MethodCallCheckAccess, + MethodCallConfigureCodeSamples, + MethodCallConfigureMintlifyRepo, + MethodCallConfigureTarget, + MethodCallFetchPublishingPRs, + MethodCallGetAction, + MethodCallGithubCheckPublishingSecrets, + MethodCallGithubStorePublishingSecrets, + MethodCallTriggerAction { + + private final SDKConfiguration sdkConfiguration; + + Github(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + public CheckAccessRequestBuilder checkAccess() { + return new CheckAccessRequestBuilder(this); + } + + public CheckAccessResponse checkAccess( + CheckAccessRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/github/check_access"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + CheckAccessRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "checkAccess", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "checkAccess", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "checkAccess", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "checkAccess", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CheckAccessResponse.Builder _resBuilder = + CheckAccessResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + CheckAccessResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + public ConfigureCodeSamplesRequestBuilder configureCodeSamples() { + return new ConfigureCodeSamplesRequestBuilder(this); + } + + public ConfigureCodeSamplesResponse configureCodeSamples( + GithubConfigureCodeSamplesRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/github/configure_code_samples"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "request", + "json", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "configureCodeSamples", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "configureCodeSamples", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "configureCodeSamples", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "configureCodeSamples", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ConfigureCodeSamplesResponse.Builder _resBuilder = + ConfigureCodeSamplesResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + ConfigureCodeSamplesResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GithubConfigureCodeSamplesResponse _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withGithubConfigureCodeSamplesResponse(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + public ConfigureMintlifyRepoRequestBuilder configureMintlifyRepo() { + return new ConfigureMintlifyRepoRequestBuilder(this); + } + + public ConfigureMintlifyRepoResponse configureMintlifyRepo( + GithubConfigureMintlifyRepoRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/github/configure_mintlify_repo"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "request", + "json", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "configureMintlifyRepo", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "configureMintlifyRepo", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "configureMintlifyRepo", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "configureMintlifyRepo", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ConfigureMintlifyRepoResponse.Builder _resBuilder = + ConfigureMintlifyRepoResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + ConfigureMintlifyRepoResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + public ConfigureTargetRequestBuilder configureTarget() { + return new ConfigureTargetRequestBuilder(this); + } + + public ConfigureTargetResponse configureTarget( + GithubConfigureTargetRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/github/configure_target"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "request", + "json", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "configureTarget", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "configureTarget", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "configureTarget", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "configureTarget", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ConfigureTargetResponse.Builder _resBuilder = + ConfigureTargetResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + ConfigureTargetResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + public FetchPublishingPRsRequestBuilder fetchPublishingPRs() { + return new FetchPublishingPRsRequestBuilder(this); + } + + public FetchPublishingPRsResponse fetchPublishingPRs( + FetchPublishingPRsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/github/publishing_prs"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + FetchPublishingPRsRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "fetchPublishingPRs", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "fetchPublishingPRs", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "fetchPublishingPRs", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "fetchPublishingPRs", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + FetchPublishingPRsResponse.Builder _resBuilder = + FetchPublishingPRsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + FetchPublishingPRsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GithubPublishingPRResponse _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withGithubPublishingPRResponse(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + public GetActionRequestBuilder getAction() { + return new GetActionRequestBuilder(this); + } + + public GetActionResponse getAction( + GetActionRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/github/action"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + GetActionRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getAction", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getAction", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getAction", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getAction", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetActionResponse.Builder _resBuilder = + GetActionResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetActionResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GithubGetActionResponse _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withGithubGetActionResponse(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + public GithubCheckPublishingSecretsRequestBuilder githubCheckPublishingSecrets() { + return new GithubCheckPublishingSecretsRequestBuilder(this); + } + + public GithubCheckPublishingSecretsResponse githubCheckPublishingSecrets( + GithubCheckPublishingSecretsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/github/publishing_secrets"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + GithubCheckPublishingSecretsRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "githubCheckPublishingSecrets", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "githubCheckPublishingSecrets", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "githubCheckPublishingSecrets", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "githubCheckPublishingSecrets", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GithubCheckPublishingSecretsResponse.Builder _resBuilder = + GithubCheckPublishingSecretsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GithubCheckPublishingSecretsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GithubMissingPublishingSecretsResponse _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withGithubMissingPublishingSecretsResponse(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + public GithubStorePublishingSecretsRequestBuilder githubStorePublishingSecrets() { + return new GithubStorePublishingSecretsRequestBuilder(this); + } + + public GithubStorePublishingSecretsResponse githubStorePublishingSecrets( + GithubStorePublishingSecretsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/github/publishing_secrets"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "request", + "json", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "githubStorePublishingSecrets", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "githubStorePublishingSecrets", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "githubStorePublishingSecrets", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "githubStorePublishingSecrets", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GithubStorePublishingSecretsResponse.Builder _resBuilder = + GithubStorePublishingSecretsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GithubStorePublishingSecretsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + public TriggerActionRequestBuilder triggerAction() { + return new TriggerActionRequestBuilder(this); + } + + public TriggerActionResponse triggerAction( + GithubTriggerActionRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/github/trigger_action"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "request", + "json", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "triggerAction", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "triggerAction", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "triggerAction", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "triggerAction", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + TriggerActionResponse.Builder _resBuilder = + TriggerActionResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + TriggerActionResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Metadata.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Metadata.java new file mode 100644 index 00000000..179b7999 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Metadata.java @@ -0,0 +1,446 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteVersionMetadataRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteVersionMetadataRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteVersionMetadataResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetVersionMetadataRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetVersionMetadataRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetVersionMetadataResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.InsertVersionMetadataRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.InsertVersionMetadataRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.InsertVersionMetadataResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.shared.VersionMetadata; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.SerializedBody; +import dev.speakeasyapi.javaclientsdk.utils.Utils.JsonShape; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +/** + * REST APIs for managing Version Metadata entities + */ +public class Metadata implements + MethodCallDeleteVersionMetadata, + MethodCallGetVersionMetadata, + MethodCallInsertVersionMetadata { + + private final SDKConfiguration sdkConfiguration; + + Metadata(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Delete metadata for a particular apiID and versionID. + * @return The call builder + */ + public DeleteVersionMetadataRequestBuilder deleteVersionMetadata() { + return new DeleteVersionMetadataRequestBuilder(this); + } + + /** + * Delete metadata for a particular apiID and versionID. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteVersionMetadataResponse deleteVersionMetadata( + DeleteVersionMetadataRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + DeleteVersionMetadataRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/metadata/{metaKey}/{metaValue}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "DELETE"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "deleteVersionMetadata", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "deleteVersionMetadata", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "deleteVersionMetadata", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "deleteVersionMetadata", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteVersionMetadataResponse.Builder _resBuilder = + DeleteVersionMetadataResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + DeleteVersionMetadataResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get all metadata for a particular apiID and versionID. + * @return The call builder + */ + public GetVersionMetadataRequestBuilder getVersionMetadata() { + return new GetVersionMetadataRequestBuilder(this); + } + + /** + * Get all metadata for a particular apiID and versionID. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetVersionMetadataResponse getVersionMetadata( + GetVersionMetadataRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetVersionMetadataRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/metadata", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getVersionMetadata", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getVersionMetadata", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getVersionMetadata", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getVersionMetadata", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetVersionMetadataResponse.Builder _resBuilder = + GetVersionMetadataResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetVersionMetadataResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withVersionMetadata(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Insert metadata for a particular apiID and versionID. + * @return The call builder + */ + public InsertVersionMetadataRequestBuilder insertVersionMetadata() { + return new InsertVersionMetadataRequestBuilder(this); + } + + /** + * Insert metadata for a particular apiID and versionID. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public InsertVersionMetadataResponse insertVersionMetadata( + InsertVersionMetadataRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + InsertVersionMetadataRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/metadata", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "versionMetadata", + "json", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "insertVersionMetadata", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "insertVersionMetadata", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "insertVersionMetadata", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "insertVersionMetadata", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + InsertVersionMetadataResponse.Builder _resBuilder = + InsertVersionMetadataResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + InsertVersionMetadataResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + VersionMetadata _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withVersionMetadata(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Organizations.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Organizations.java new file mode 100644 index 00000000..4c6644a4 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Organizations.java @@ -0,0 +1,556 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.CreateFreeTrialRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.CreateFreeTrialResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationUsageRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationUsageResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.shared.Organization; +import dev.speakeasyapi.javaclientsdk.models.shared.OrganizationUsageResponse; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +public class Organizations implements + MethodCallCreateFreeTrial, + MethodCallGetOrganization, + MethodCallGetOrganizationUsage, + MethodCallGetOrganizations { + + private final SDKConfiguration sdkConfiguration; + + Organizations(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Create a free trial for an organization + * Creates a free trial for an organization + * @return The call builder + */ + public CreateFreeTrialRequestBuilder createFreeTrial() { + return new CreateFreeTrialRequestBuilder(this); + } + + /** + * Create a free trial for an organization + * Creates a free trial for an organization + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateFreeTrialResponse createFreeTrialDirect() throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/organization/free_trial"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "createFreeTrial", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "createFreeTrial", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "createFreeTrial", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "createFreeTrial", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateFreeTrialResponse.Builder _resBuilder = + CreateFreeTrialResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + CreateFreeTrialResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get organization + * Get information about a particular organization. + * @return The call builder + */ + public GetOrganizationRequestBuilder getOrganization() { + return new GetOrganizationRequestBuilder(this); + } + + /** + * Get organization + * Get information about a particular organization. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetOrganizationResponse getOrganization( + GetOrganizationRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetOrganizationRequest.class, + _baseUrl, + "/v1/organization/{organizationID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getOrganization", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getOrganization", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getOrganization", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getOrganization", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetOrganizationResponse.Builder _resBuilder = + GetOrganizationResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetOrganizationResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Organization _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withOrganization(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get billing usage summary for a particular organization + * Returns a billing usage summary by target languages for a particular organization + * @return The call builder + */ + public GetOrganizationUsageRequestBuilder getOrganizationUsage() { + return new GetOrganizationUsageRequestBuilder(this); + } + + /** + * Get billing usage summary for a particular organization + * Returns a billing usage summary by target languages for a particular organization + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetOrganizationUsageResponse getOrganizationUsageDirect() throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/organization/usage"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getOrganizationUsage", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getOrganizationUsage", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getOrganizationUsage", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getOrganizationUsage", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetOrganizationUsageResponse.Builder _resBuilder = + GetOrganizationUsageResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetOrganizationUsageResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + OrganizationUsageResponse _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withOrganizationUsageResponse(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get organizations for a user + * Returns a list of organizations a user has access too + * @return The call builder + */ + public GetOrganizationsRequestBuilder getOrganizations() { + return new GetOrganizationsRequestBuilder(this); + } + + /** + * Get organizations for a user + * Returns a list of organizations a user has access too + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetOrganizationsResponse getOrganizationsDirect() throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/organization"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getOrganizations", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getOrganizations", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getOrganizations", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getOrganizations", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetOrganizationsResponse.Builder _resBuilder = + GetOrganizationsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetOrganizationsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withOrganizations(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Reports.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Reports.java new file mode 100644 index 00000000..0be24405 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Reports.java @@ -0,0 +1,411 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetChangesReportSignedUrlRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetChangesReportSignedUrlRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetChangesReportSignedUrlResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetChangesReportSignedUrlSignedAccess; +import dev.speakeasyapi.javaclientsdk.models.operations.GetLintingReportSignedUrlRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetLintingReportSignedUrlRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetLintingReportSignedUrlResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetLintingReportSignedUrlSignedAccess; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.operations.UploadReportRequestBody; +import dev.speakeasyapi.javaclientsdk.models.operations.UploadReportRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.UploadReportResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.UploadReportUploadedReport; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.SerializedBody; +import dev.speakeasyapi.javaclientsdk.utils.Utils.JsonShape; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +/** + * REST APIs for managing reports + */ +public class Reports implements + MethodCallGetChangesReportSignedUrl, + MethodCallGetLintingReportSignedUrl, + MethodCallUploadReport { + + private final SDKConfiguration sdkConfiguration; + + Reports(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Get the signed access url for the change reports for a particular document. + * @return The call builder + */ + public GetChangesReportSignedUrlRequestBuilder getChangesReportSignedUrl() { + return new GetChangesReportSignedUrlRequestBuilder(this); + } + + /** + * Get the signed access url for the change reports for a particular document. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetChangesReportSignedUrlResponse getChangesReportSignedUrl( + GetChangesReportSignedUrlRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetChangesReportSignedUrlRequest.class, + _baseUrl, + "/v1/reports/changes/{documentChecksum}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getChangesReportSignedUrl", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getChangesReportSignedUrl", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getChangesReportSignedUrl", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getChangesReportSignedUrl", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetChangesReportSignedUrlResponse.Builder _resBuilder = + GetChangesReportSignedUrlResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetChangesReportSignedUrlResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetChangesReportSignedUrlSignedAccess _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withSignedAccess(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get the signed access url for the linting reports for a particular document. + * @return The call builder + */ + public GetLintingReportSignedUrlRequestBuilder getLintingReportSignedUrl() { + return new GetLintingReportSignedUrlRequestBuilder(this); + } + + /** + * Get the signed access url for the linting reports for a particular document. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetLintingReportSignedUrlResponse getLintingReportSignedUrl( + GetLintingReportSignedUrlRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetLintingReportSignedUrlRequest.class, + _baseUrl, + "/v1/reports/linting/{documentChecksum}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getLintingReportSignedUrl", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getLintingReportSignedUrl", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getLintingReportSignedUrl", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getLintingReportSignedUrl", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetLintingReportSignedUrlResponse.Builder _resBuilder = + GetLintingReportSignedUrlResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetLintingReportSignedUrlResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + GetLintingReportSignedUrlSignedAccess _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withSignedAccess(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Upload a report. + * @return The call builder + */ + public UploadReportRequestBuilder uploadReport() { + return new UploadReportRequestBuilder(this); + } + + /** + * Upload a report. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public UploadReportResponse uploadReport( + UploadReportRequestBody request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/reports"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "request", + "multipart", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "uploadReport", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "uploadReport", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "uploadReport", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "uploadReport", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + UploadReportResponse.Builder _resBuilder = + UploadReportResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + UploadReportResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + UploadReportUploadedReport _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withUploadedReport(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Requests.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Requests.java new file mode 100644 index 00000000..44365f5d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Requests.java @@ -0,0 +1,452 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateRequestPostmanCollectionRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateRequestPostmanCollectionRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GenerateRequestPostmanCollectionResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetRequestFromEventLogRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetRequestFromEventLogRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetRequestFromEventLogResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.QueryEventLogRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.QueryEventLogRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.QueryEventLogResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.shared.BoundedRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.UnboundedRequest; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +/** + * REST APIs for retrieving request information + */ +public class Requests implements + MethodCallGenerateRequestPostmanCollection, + MethodCallGetRequestFromEventLog, + MethodCallQueryEventLog { + + private final SDKConfiguration sdkConfiguration; + + Requests(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Generate a Postman collection for a particular request. + * Generates a Postman collection for a particular request. + * Allowing it to be replayed with the same inputs that were captured by the SDK. + * @return The call builder + */ + public GenerateRequestPostmanCollectionRequestBuilder generateRequestPostmanCollection() { + return new GenerateRequestPostmanCollectionRequestBuilder(this); + } + + /** + * Generate a Postman collection for a particular request. + * Generates a Postman collection for a particular request. + * Allowing it to be replayed with the same inputs that were captured by the SDK. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GenerateRequestPostmanCollectionResponse generateRequestPostmanCollection( + GenerateRequestPostmanCollectionRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GenerateRequestPostmanCollectionRequest.class, + _baseUrl, + "/v1/eventlog/{requestID}/generate/postman", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json;q=1, application/octet-stream;q=0") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "generateRequestPostmanCollection", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "generateRequestPostmanCollection", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "generateRequestPostmanCollection", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "generateRequestPostmanCollection", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GenerateRequestPostmanCollectionResponse.Builder _resBuilder = + GenerateRequestPostmanCollectionResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200") && Utils.contentTypeMatches(_contentType, "application/octet-stream")) { + _resBuilder.postmanCollection(_httpRes.body()); + } + + GenerateRequestPostmanCollectionResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/octet-stream")) { + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get information about a particular request. + * @return The call builder + */ + public GetRequestFromEventLogRequestBuilder getRequestFromEventLog() { + return new GetRequestFromEventLogRequestBuilder(this); + } + + /** + * Get information about a particular request. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetRequestFromEventLogResponse getRequestFromEventLog( + GetRequestFromEventLogRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetRequestFromEventLogRequest.class, + _baseUrl, + "/v1/eventlog/{requestID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getRequestFromEventLog", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getRequestFromEventLog", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getRequestFromEventLog", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getRequestFromEventLog", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetRequestFromEventLogResponse.Builder _resBuilder = + GetRequestFromEventLogResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetRequestFromEventLogResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + UnboundedRequest _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withUnboundedRequest(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Query the event log to retrieve a list of requests. + * Supports retrieving a list of request captured by the SDK for this workspace. + * Allows the filtering of requests on a number of criteria such as ApiID, VersionID, Path, Method, etc. + * @return The call builder + */ + public QueryEventLogRequestBuilder queryEventLog() { + return new QueryEventLogRequestBuilder(this); + } + + /** + * Query the event log to retrieve a list of requests. + * Supports retrieving a list of request captured by the SDK for this workspace. + * Allows the filtering of requests on a number of criteria such as ApiID, VersionID, Path, Method, etc. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public QueryEventLogResponse queryEventLog( + QueryEventLogRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/eventlog/query"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + QueryEventLogRequest.class, + request, + this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "queryEventLog", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "queryEventLog", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "queryEventLog", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "queryEventLog", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + QueryEventLogResponse.Builder _resBuilder = + QueryEventLogResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + QueryEventLogResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withBoundedRequests(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/SDK.java b/src/main/java/dev/speakeasyapi/javaclientsdk/SDK.java new file mode 100644 index 00000000..307c7d41 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/SDK.java @@ -0,0 +1,367 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.RetryConfig; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyHTTPClient; +import java.lang.String; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +/** + * Speakeasy API: The Speakeasy API allows teams to manage common operations with their APIs + * /docs - The Speakeasy Platform Documentation + */ +public class SDK { + + + /** + * AvailableServers contains identifiers for the servers available to the SDK. + */ + public enum AvailableServers { + PROD("prod"); + + private final String server; + + private AvailableServers(String server) { + this.server = server; + } + + public String server() { + return server; + } + } + + /** + * SERVERS contains the list of server urls available to the SDK. + */ + public static final Map SERVERS = new HashMap<>() { { + put(AvailableServers.PROD, "https://api.prod.speakeasyapi.dev"); + }}; + + /** + * REST APIs for managing Api entities + */ + private final Apis apis; + + /** + * REST APIs for managing ApiEndpoint entities + */ + private final ApiEndpoints apiEndpoints; + + /** + * REST APIs for managing Version Metadata entities + */ + private final Metadata metadata; + + /** + * REST APIs for managing Schema entities + */ + private final Schemas schemas; + + /** + * REST APIs for working with Registry artifacts + */ + private final Artifacts artifacts; + + /** + * REST APIs for managing Authentication + */ + private final Auth auth; + + /** + * REST APIs for retrieving request information + */ + private final Requests requests; + + private final Github github; + + private final Organizations organizations; + + /** + * REST APIs for managing reports + */ + private final Reports reports; + + /** + * REST APIs for managing short URLs + */ + private final ShortURLs shortURLs; + + /** + * REST APIs for managing LLM OAS suggestions + */ + private final Suggest suggest; + + /** + * REST APIs for managing embeds + */ + private final Embeds embeds; + + private final Workspaces workspaces; + + /** + * REST APIs for capturing event data + */ + private final Events events; + + /** + * REST APIs for managing Api entities + */ + public Apis apis() { + return apis; + } + + /** + * REST APIs for managing ApiEndpoint entities + */ + public ApiEndpoints apiEndpoints() { + return apiEndpoints; + } + + /** + * REST APIs for managing Version Metadata entities + */ + public Metadata metadata() { + return metadata; + } + + /** + * REST APIs for managing Schema entities + */ + public Schemas schemas() { + return schemas; + } + + /** + * REST APIs for working with Registry artifacts + */ + public Artifacts artifacts() { + return artifacts; + } + + /** + * REST APIs for managing Authentication + */ + public Auth auth() { + return auth; + } + + /** + * REST APIs for retrieving request information + */ + public Requests requests() { + return requests; + } + + public Github github() { + return github; + } + + public Organizations organizations() { + return organizations; + } + + /** + * REST APIs for managing reports + */ + public Reports reports() { + return reports; + } + + /** + * REST APIs for managing short URLs + */ + public ShortURLs shortURLs() { + return shortURLs; + } + + /** + * REST APIs for managing LLM OAS suggestions + */ + public Suggest suggest() { + return suggest; + } + + /** + * REST APIs for managing embeds + */ + public Embeds embeds() { + return embeds; + } + + public Workspaces workspaces() { + return workspaces; + } + + /** + * REST APIs for capturing event data + */ + public Events events() { + return events; + } + + private final SDKConfiguration sdkConfiguration; + + /** + * The Builder class allows the configuration of a new instance of the SDK. + */ + public static class Builder { + + private final SDKConfiguration sdkConfiguration = new SDKConfiguration(); + + private Builder() { + } + + /** + * Allows the default HTTP client to be overridden with a custom implementation. + * + * @param client The HTTP client to use for all requests. + * @return The builder instance. + */ + public Builder client(HTTPClient client) { + this.sdkConfiguration.defaultClient = client; + return this; + } + + /** + * Configures the SDK to use the provided security details. + * + * @param security The security details to use for all requests. + * @return The builder instance. + */ + public Builder security(dev.speakeasyapi.javaclientsdk.models.shared.Security security) { + this.sdkConfiguration.securitySource = SecuritySource.of(security); + return this; + } + + /** + * Configures the SDK to use a custom security source. + * @param securitySource The security source to use for all requests. + * @return The builder instance. + */ + public Builder securitySource(SecuritySource securitySource) { + this.sdkConfiguration.securitySource = securitySource; + return this; + } + + /** + * Overrides the default server URL. + * + * @param serverUrl The server URL to use for all requests. + * @return The builder instance. + */ + public Builder serverURL(String serverUrl) { + this.sdkConfiguration.serverUrl = serverUrl; + return this; + } + + /** + * Overrides the default server URL with a templated URL populated with the provided parameters. + * + * @param serverUrl The server URL to use for all requests. + * @param params The parameters to use when templating the URL. + * @return The builder instance. + */ + public Builder serverURL(String serverUrl, Map params) { + this.sdkConfiguration.serverUrl = dev.speakeasyapi.javaclientsdk.utils.Utils.templateUrl(serverUrl, params); + return this; + } + + /** + * Overrides the default server by name. + * + * @param server The server to use for all requests. + * @return The builder instance. + */ + public Builder server(AvailableServers server) { + this.sdkConfiguration.server = server.toString(); + this.sdkConfiguration.serverUrl = SERVERS.get(server); + return this; + } + + /** + * Overrides the default configuration for retries + * + * @param retryConfig The retry configuration to use for all requests. + * @return The builder instance. + */ + public Builder retryConfig(RetryConfig retryConfig) { + this.sdkConfiguration.retryConfig = Optional.of(retryConfig); + return this; + } + /** + * Allows setting the workspaceID parameter for all supported operations. + * + * @param workspaceID The value to set. + * @return The builder instance. + */ + public Builder workspaceID(String workspaceID) { + if (!this.sdkConfiguration.globals.get("parameters").containsKey("pathParam")) { + this.sdkConfiguration.globals.get("parameters").put("pathParam", new java.util.HashMap<>()); + } + + this.sdkConfiguration.globals.get("parameters").get("pathParam").put("workspaceID", workspaceID); + + return this; + } + + // Visible for testing, will be accessed via reflection + void _hooks(dev.speakeasyapi.javaclientsdk.utils.Hooks hooks) { + sdkConfiguration.setHooks(hooks); + } + + /** + * Builds a new instance of the SDK. + * @return The SDK instance. + */ + public SDK build() { + if (sdkConfiguration.defaultClient == null) { + sdkConfiguration.defaultClient = new SpeakeasyHTTPClient(); + } + if (sdkConfiguration.securitySource == null) { + sdkConfiguration.securitySource = SecuritySource.of(null); + } + if (sdkConfiguration.serverUrl == null || sdkConfiguration.serverUrl.isBlank()) { + sdkConfiguration.serverUrl = SERVERS.get(AvailableServers.PROD); + sdkConfiguration.server = AvailableServers.PROD.toString(); + } + if (sdkConfiguration.serverUrl.endsWith("/")) { + sdkConfiguration.serverUrl = sdkConfiguration.serverUrl.substring(0, sdkConfiguration.serverUrl.length() - 1); + } + return new SDK(sdkConfiguration); + } + } + + /** + * Get a new instance of the SDK builder to configure a new instance of the SDK. + * @return The SDK builder instance. + */ + public static Builder builder() { + return new Builder(); + } + + private SDK(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.apis = new Apis(sdkConfiguration); + this.apiEndpoints = new ApiEndpoints(sdkConfiguration); + this.metadata = new Metadata(sdkConfiguration); + this.schemas = new Schemas(sdkConfiguration); + this.artifacts = new Artifacts(sdkConfiguration); + this.auth = new Auth(sdkConfiguration); + this.requests = new Requests(sdkConfiguration); + this.github = new Github(sdkConfiguration); + this.organizations = new Organizations(sdkConfiguration); + this.reports = new Reports(sdkConfiguration); + this.shortURLs = new ShortURLs(sdkConfiguration); + this.suggest = new Suggest(sdkConfiguration); + this.embeds = new Embeds(sdkConfiguration); + this.workspaces = new Workspaces(sdkConfiguration); + this.events = new Events(sdkConfiguration); + this.sdkConfiguration.initialize(); + }} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/SDKConfiguration.java b/src/main/java/dev/speakeasyapi/javaclientsdk/SDKConfiguration.java new file mode 100644 index 00000000..b8a33d87 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/SDKConfiguration.java @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import dev.speakeasyapi.javaclientsdk.hooks.SDKHooks; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.Hook.SdkInitData; +import dev.speakeasyapi.javaclientsdk.utils.Hooks; +import dev.speakeasyapi.javaclientsdk.utils.RetryConfig; +import java.lang.Object; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +class SDKConfiguration { + public SecuritySource securitySource; + + public Optional securitySource() { + return Optional.ofNullable(securitySource); + } + public HTTPClient defaultClient; + public String serverUrl; + public String server; + public String language = "java"; + public String openapiDocVersion = "0.4.0 ."; + public String sdkVersion = "7.16.8"; + public String genVersion = "2.409.8"; + public String userAgent = "speakeasy-sdk/java 7.16.8 2.409.8 0.4.0 . dev.speakeasyapi.javaclientsdk"; + + private Hooks _hooks = createHooks(); + + private static Hooks createHooks() { + Hooks hooks = new Hooks(); + return hooks; + } + + public Hooks hooks() { + return _hooks; + } + + public void setHooks(Hooks hooks) { + this._hooks = hooks; + } + + /** + * Initializes state (for example hooks). + **/ + public void initialize() { + SDKHooks.initialize(_hooks); + // apply the sdk init hook immediately + SdkInitData data = _hooks.sdkInit(new SdkInitData(serverUrl, defaultClient)); + this.serverUrl = data.baseUrl(); + this.defaultClient = data.client(); + } + + @SuppressWarnings("serial") + public Map>> globals = new HashMap<>(){ { + put("parameters", new HashMap<>()); + } }; + + public Optional retryConfig = Optional.empty(); +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Schemas.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Schemas.java new file mode 100644 index 00000000..696860aa --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Schemas.java @@ -0,0 +1,1135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteSchemaRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteSchemaRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.DeleteSchemaResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRevisionRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRevisionRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRevisionResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaDiffRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaDiffRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaDiffResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRevisionRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRevisionRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRevisionResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemasRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemasRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetSchemasResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.RegisterSchemaRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.RegisterSchemaRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.RegisterSchemaResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.shared.Schema; +import dev.speakeasyapi.javaclientsdk.models.shared.SchemaDiff; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.SerializedBody; +import dev.speakeasyapi.javaclientsdk.utils.Utils.JsonShape; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +/** + * REST APIs for managing Schema entities + */ +public class Schemas implements + MethodCallDeleteSchema, + MethodCallDownloadSchema, + MethodCallDownloadSchemaRevision, + MethodCallGetSchema, + MethodCallGetSchemaDiff, + MethodCallGetSchemaRevision, + MethodCallGetSchemas, + MethodCallRegisterSchema { + + private final SDKConfiguration sdkConfiguration; + + Schemas(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Delete a particular schema revision for an Api. + * @return The call builder + */ + public DeleteSchemaRequestBuilder deleteSchema() { + return new DeleteSchemaRequestBuilder(this); + } + + /** + * Delete a particular schema revision for an Api. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DeleteSchemaResponse deleteSchema( + DeleteSchemaRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + DeleteSchemaRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "DELETE"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "deleteSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "deleteSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "deleteSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "deleteSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DeleteSchemaResponse.Builder _resBuilder = + DeleteSchemaResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + DeleteSchemaResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Download the latest schema for a particular apiID. + * @return The call builder + */ + public DownloadSchemaRequestBuilder downloadSchema() { + return new DownloadSchemaRequestBuilder(this); + } + + /** + * Download the latest schema for a particular apiID. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DownloadSchemaResponse downloadSchema( + DownloadSchemaRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + DownloadSchemaRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/schema/download", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json;q=1, application/x-yaml;q=0") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "downloadSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "downloadSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "downloadSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "downloadSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DownloadSchemaResponse.Builder _resBuilder = + DownloadSchemaResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200") && Utils.contentTypeMatches(_contentType, "application/json")) { + _resBuilder.twoHundredApplicationJsonSchema(_httpRes.body()); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200") && Utils.contentTypeMatches(_contentType, "application/x-yaml")) { + _resBuilder.twoHundredApplicationXYamlSchema(_httpRes.body()); + } + + DownloadSchemaResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + return _res; + } else if (Utils.contentTypeMatches(_contentType, "application/x-yaml")) { + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Download a particular schema revision for an Api. + * @return The call builder + */ + public DownloadSchemaRevisionRequestBuilder downloadSchemaRevision() { + return new DownloadSchemaRevisionRequestBuilder(this); + } + + /** + * Download a particular schema revision for an Api. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public DownloadSchemaRevisionResponse downloadSchemaRevision( + DownloadSchemaRevisionRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + DownloadSchemaRevisionRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}/download", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json;q=1, application/x-yaml;q=0") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "downloadSchemaRevision", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "downloadSchemaRevision", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "downloadSchemaRevision", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "downloadSchemaRevision", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + DownloadSchemaRevisionResponse.Builder _resBuilder = + DownloadSchemaRevisionResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200") && Utils.contentTypeMatches(_contentType, "application/json")) { + _resBuilder.twoHundredApplicationJsonSchema(_httpRes.body()); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200") && Utils.contentTypeMatches(_contentType, "application/x-yaml")) { + _resBuilder.twoHundredApplicationXYamlSchema(_httpRes.body()); + } + + DownloadSchemaRevisionResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + return _res; + } else if (Utils.contentTypeMatches(_contentType, "application/x-yaml")) { + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get information about the latest schema. + * Returns information about the last uploaded schema for a particular API version. + * This won't include the schema itself, that can be retrieved via the downloadSchema operation. + * @return The call builder + */ + public GetSchemaRequestBuilder getSchema() { + return new GetSchemaRequestBuilder(this); + } + + /** + * Get information about the latest schema. + * Returns information about the last uploaded schema for a particular API version. + * This won't include the schema itself, that can be retrieved via the downloadSchema operation. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSchemaResponse getSchema( + GetSchemaRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetSchemaRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/schema", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSchemaResponse.Builder _resBuilder = + GetSchemaResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetSchemaResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Schema _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withSchema(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get a diff of two schema revisions for an Api. + * @return The call builder + */ + public GetSchemaDiffRequestBuilder getSchemaDiff() { + return new GetSchemaDiffRequestBuilder(this); + } + + /** + * Get a diff of two schema revisions for an Api. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSchemaDiffResponse getSchemaDiff( + GetSchemaDiffRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetSchemaDiffRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/schema/{baseRevisionID}/diff/{targetRevisionID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getSchemaDiff", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getSchemaDiff", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getSchemaDiff", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getSchemaDiff", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSchemaDiffResponse.Builder _resBuilder = + GetSchemaDiffResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetSchemaDiffResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + SchemaDiff _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withSchemaDiff(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get information about a particular schema revision for an Api. + * Returns information about the last uploaded schema for a particular schema revision. + * This won't include the schema itself, that can be retrieved via the downloadSchema operation. + * @return The call builder + */ + public GetSchemaRevisionRequestBuilder getSchemaRevision() { + return new GetSchemaRevisionRequestBuilder(this); + } + + /** + * Get information about a particular schema revision for an Api. + * Returns information about the last uploaded schema for a particular schema revision. + * This won't include the schema itself, that can be retrieved via the downloadSchema operation. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSchemaRevisionResponse getSchemaRevision( + GetSchemaRevisionRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetSchemaRevisionRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getSchemaRevision", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getSchemaRevision", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getSchemaRevision", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getSchemaRevision", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSchemaRevisionResponse.Builder _resBuilder = + GetSchemaRevisionResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetSchemaRevisionResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Schema _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withSchema(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Get information about all schemas associated with a particular apiID. + * Returns information the schemas associated with a particular apiID. + * This won't include the schemas themselves, they can be retrieved via the downloadSchema operation. + * @return The call builder + */ + public GetSchemasRequestBuilder getSchemas() { + return new GetSchemasRequestBuilder(this); + } + + /** + * Get information about all schemas associated with a particular apiID. + * Returns information the schemas associated with a particular apiID. + * This won't include the schemas themselves, they can be retrieved via the downloadSchema operation. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetSchemasResponse getSchemas( + GetSchemasRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetSchemasRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/schemas", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getSchemas", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getSchemas", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getSchemas", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getSchemas", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetSchemasResponse.Builder _resBuilder = + GetSchemasResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetSchemasResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + List _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference>() {}); + _res.withClasses(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Register a schema. + * Allows uploading a schema for a particular API version. + * This will be used to populate ApiEndpoints and used as a base for any schema generation if present. + * @return The call builder + */ + public RegisterSchemaRequestBuilder registerSchema() { + return new RegisterSchemaRequestBuilder(this); + } + + /** + * Register a schema. + * Allows uploading a schema for a particular API version. + * This will be used to populate ApiEndpoints and used as a base for any schema generation if present. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public RegisterSchemaResponse registerSchema( + RegisterSchemaRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + RegisterSchemaRequest.class, + _baseUrl, + "/v1/apis/{apiID}/version/{versionID}/schema", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "requestBody", + "multipart", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "registerSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "registerSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "registerSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "registerSchema", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + RegisterSchemaResponse.Builder _resBuilder = + RegisterSchemaResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + RegisterSchemaResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/SecuritySource.java b/src/main/java/dev/speakeasyapi/javaclientsdk/SecuritySource.java new file mode 100644 index 00000000..2cc0752d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/SecuritySource.java @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import dev.speakeasyapi.javaclientsdk.models.shared.Security; + +public interface SecuritySource { + + Security getSecurity(); + + public static SecuritySource of(Security security) { + return new DefaultSecuritySource(security); + } + + public static class DefaultSecuritySource implements SecuritySource { + private Security security; + + public DefaultSecuritySource(Security security) { + this.security = security; + } + + public Security getSecurity() { + return security; + } + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/ShortURLs.java b/src/main/java/dev/speakeasyapi/javaclientsdk/ShortURLs.java new file mode 100644 index 00000000..4843fa50 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/ShortURLs.java @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.CreateRequestBody; +import dev.speakeasyapi.javaclientsdk.models.operations.CreateRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.CreateResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.shared.ShortURL; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.SerializedBody; +import dev.speakeasyapi.javaclientsdk.utils.Utils.JsonShape; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +/** + * REST APIs for managing short URLs + */ +public class ShortURLs implements + MethodCallCreate { + + private final SDKConfiguration sdkConfiguration; + + ShortURLs(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Shorten a URL. + * @return The call builder + */ + public CreateRequestBuilder create() { + return new CreateRequestBuilder(this); + } + + /** + * Shorten a URL. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public CreateResponse create( + CreateRequestBody request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/short_urls"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "request", + "json", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "create", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "create", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "create", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "create", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + CreateResponse.Builder _resBuilder = + CreateResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + CreateResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ShortURL _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withShortURL(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Suggest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Suggest.java new file mode 100644 index 00000000..dd345b8f --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Suggest.java @@ -0,0 +1,451 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.ApplyOperationIDsRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.ApplyOperationIDsRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.ApplyOperationIDsResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRegistryRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRegistryRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRegistryResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIResponse; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.SerializedBody; +import dev.speakeasyapi.javaclientsdk.utils.Utils.JsonShape; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +/** + * REST APIs for managing LLM OAS suggestions + */ +public class Suggest implements + MethodCallApplyOperationIDs, + MethodCallSuggestOpenAPI, + MethodCallSuggestOpenAPIRegistry { + + private final SDKConfiguration sdkConfiguration; + + Suggest(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Apply operation ID suggestions and download result. + * @return The call builder + */ + public ApplyOperationIDsRequestBuilder applyOperationIDs() { + return new ApplyOperationIDsRequestBuilder(this); + } + + /** + * Apply operation ID suggestions and download result. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public ApplyOperationIDsResponse applyOperationIDs( + ApplyOperationIDsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/suggest/operation_ids/apply"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "requestBody", + "json", + false); + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json;q=1, application/x-yaml;q=0") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "applyOperationIDs", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "applyOperationIDs", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "applyOperationIDs", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "applyOperationIDs", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + ApplyOperationIDsResponse.Builder _resBuilder = + ApplyOperationIDsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200") && Utils.contentTypeMatches(_contentType, "application/json")) { + _resBuilder.twoHundredApplicationJsonSchema(_httpRes.body()); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200") && Utils.contentTypeMatches(_contentType, "application/x-yaml")) { + _resBuilder.twoHundredApplicationXYamlSchema(_httpRes.body()); + } + + ApplyOperationIDsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + return _res; + } else if (Utils.contentTypeMatches(_contentType, "application/x-yaml")) { + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Generate suggestions for improving an OpenAPI document. + * Get suggestions from an LLM model for improving an OpenAPI document. + * @return The call builder + */ + public SuggestOpenAPIRequestBuilder suggestOpenAPI() { + return new SuggestOpenAPIRequestBuilder(this); + } + + /** + * Generate suggestions for improving an OpenAPI document. + * Get suggestions from an LLM model for improving an OpenAPI document. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SuggestOpenAPIResponse suggestOpenAPI( + SuggestOpenAPIRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/v1/suggest/openapi"); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "requestBody", + "multipart", + false); + if (_serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "suggestOpenAPI", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "suggestOpenAPI", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "suggestOpenAPI", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "suggestOpenAPI", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SuggestOpenAPIResponse.Builder _resBuilder = + SuggestOpenAPIResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200") && Utils.contentTypeMatches(_contentType, "application/json")) { + _resBuilder.schema(_httpRes.body()); + } + + SuggestOpenAPIResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + + + + /** + * Generate suggestions for improving an OpenAPI document stored in the registry. + * Get suggestions from an LLM model for improving an OpenAPI document stored in the registry. + * @return The call builder + */ + public SuggestOpenAPIRegistryRequestBuilder suggestOpenAPIRegistry() { + return new SuggestOpenAPIRegistryRequestBuilder(this); + } + + /** + * Generate suggestions for improving an OpenAPI document stored in the registry. + * Get suggestions from an LLM model for improving an OpenAPI document stored in the registry. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public SuggestOpenAPIRegistryResponse suggestOpenAPIRegistry( + SuggestOpenAPIRegistryRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + SuggestOpenAPIRegistryRequest.class, + _baseUrl, + "/v1/suggest/openapi/{namespace_name}/{revision_reference}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "POST"); + Object _convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, + "suggestOpts", + "json", + false); + _req.setBody(Optional.ofNullable(_serializedRequestBody)); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + _req.addHeaders(Utils.getHeadersFromMetadata(request, this.sdkConfiguration.globals)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "suggestOpenAPIRegistry", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "suggestOpenAPIRegistry", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "suggestOpenAPIRegistry", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "suggestOpenAPIRegistry", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SuggestOpenAPIRegistryResponse.Builder _resBuilder = + SuggestOpenAPIRegistryResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200") && Utils.contentTypeMatches(_contentType, "application/json")) { + _resBuilder.schema(_httpRes.body()); + } + + SuggestOpenAPIRegistryResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/Workspaces.java b/src/main/java/dev/speakeasyapi/javaclientsdk/Workspaces.java new file mode 100644 index 00000000..c18cd756 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/Workspaces.java @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk; + +import com.fasterxml.jackson.core.type.TypeReference; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.errors.SDKError; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceRequest; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceRequestBuilder; +import dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceResponse; +import dev.speakeasyapi.javaclientsdk.models.operations.SDKMethodInterfaces.*; +import dev.speakeasyapi.javaclientsdk.models.shared.Workspace; +import dev.speakeasyapi.javaclientsdk.utils.HTTPClient; +import dev.speakeasyapi.javaclientsdk.utils.HTTPRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContextImpl; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; + +public class Workspaces implements + MethodCallGetWorkspace { + + private final SDKConfiguration sdkConfiguration; + + Workspaces(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + + /** + * Get workspace + * Get information about a particular workspace. + * @return The call builder + */ + public GetWorkspaceRequestBuilder getWorkspace() { + return new GetWorkspaceRequestBuilder(this); + } + + /** + * Get workspace + * Get information about a particular workspace. + * @param request The request object containing all of the parameters for the API call. + * @return The response from the API call + * @throws Exception if the API call fails + */ + public GetWorkspaceResponse getWorkspace( + GetWorkspaceRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + GetWorkspaceRequest.class, + _baseUrl, + "/v1/workspace/{workspaceID}", + request, this.sdkConfiguration.globals); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl( + "getWorkspace", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getWorkspace", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl( + "getWorkspace", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl( + "getWorkspace", + Optional.of(List.of()), + sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetWorkspaceResponse.Builder _resBuilder = + GetWorkspaceResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + GetWorkspaceResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Workspace _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withWorkspace(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.extractByteArrayFromBody(_httpRes)); + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "default")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + Error _out = Utils.mapper().readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withError(Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.extractByteArrayFromBody(_httpRes)); + } + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.extractByteArrayFromBody(_httpRes)); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/hooks/SDKHooks.java b/src/main/java/dev/speakeasyapi/javaclientsdk/hooks/SDKHooks.java new file mode 100644 index 00000000..3b1339f2 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/hooks/SDKHooks.java @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.hooks; + +// +// This file is written once by speakeasy code generation and +// thereafter will not be overwritten by speakeasy updates. As a +// consequence any customization of this class will be preserved. +// + +public final class SDKHooks { + + private SDKHooks() { + // prevent instantiation + } + + public static final void initialize(dev.speakeasyapi.javaclientsdk.utils.Hooks hooks) { + // register hooks here + + // for more information see + // https://www.speakeasy.com/docs/additional-features/sdk-hooks + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/AuthException.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/AuthException.java new file mode 100644 index 00000000..56af5749 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/AuthException.java @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.errors; + +import java.util.Optional; + +/** + * An exception associated with Authentication or Authorization. + */ +@SuppressWarnings("serial") +public class AuthException extends RuntimeException { + + private final Optional statusCode; + + private AuthException(Optional statusCode, String message) { + super(message); + this.statusCode = statusCode; + } + + public AuthException(int statusCode, String message) { + this(Optional.of(statusCode), message); + } + + public AuthException(String message) { + this(Optional.empty(), message); + } + + public Optional statusCode() { + return statusCode; + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/Error.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/Error.java new file mode 100644 index 00000000..8325501d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/Error.java @@ -0,0 +1,140 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.errors; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * Error - The `Status` type defines a logical error model + */ +public class Error extends RuntimeException { + + /** + * A developer-facing error message. + */ + @JsonProperty("message") + private String message; + + /** + * The HTTP status code + */ + @JsonProperty("status_code") + private int statusCode; + + @JsonCreator + public Error( + @JsonProperty("message") String message, + @JsonProperty("status_code") int statusCode) { + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(statusCode, "statusCode"); + this.message = message; + this.statusCode = statusCode; + } + + /** + * A developer-facing error message. + */ + public String message(){ + return message; + } + + /** + * The HTTP status code + */ + public int statusCode(){ + return statusCode; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * A developer-facing error message. + */ + public Error withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + /** + * The HTTP status code + */ + public Error withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error other = (Error) o; + return + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.statusCode, other.statusCode); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + message, + statusCode); + } + + @Override + public String toString() { + return Utils.toString(Error.class, + "message", message, + "statusCode", statusCode); + } + + public final static class Builder { + + private String message; + + private Integer statusCode; + + private Builder() { + // force use of static builder() method + } + + /** + * A developer-facing error message. + */ + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + /** + * The HTTP status code + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + public Error build() { + return new Error( + message, + statusCode); + } + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/SDKError.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/SDKError.java new file mode 100644 index 00000000..82edb1ea --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/errors/SDKError.java @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.errors; + +import java.net.http.HttpResponse; +import java.io.InputStream; +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +/** + * Thrown by a service call when an error response occurs. Contains details about the response. + */ +@SuppressWarnings("serial") +public class SDKError extends Exception { + + private final HttpResponse rawResponse; + private final int code; + private final String message; + private final byte[] body; + + public SDKError( + HttpResponse rawResponse, + int code, + String message, + byte[] body) { + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(body, "body"); + this.rawResponse = rawResponse; + this.code = code; + this.message = message; + this.body = body; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDKError other = (SDKError) o; + return + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse) && + java.util.Objects.deepEquals(this.code, other.code) && + java.util.Objects.deepEquals(this.message, other.message) && + java.util.Objects.deepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + rawResponse, + code, + message, + body); + } + + @Override + public String toString() { + return Utils.toString(SDKError.class, + "rawResponse", rawResponse, + "code", code, + "message", message, + "body", body); + } + + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public int code() { + return this.code; + } + + public String message() { + return this.message; + } + + public byte[] body() { + return this.body; + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequest.java new file mode 100644 index 00000000..3b775751 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequest.java @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class ApplyOperationIDsRequest { + + /** + * Apply options + */ + @SpeakeasyMetadata("request:mediaType=application/json") + private Optional requestBody; + + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-session-id") + private String xSessionId; + + @JsonCreator + public ApplyOperationIDsRequest( + Optional requestBody, + String xSessionId) { + Utils.checkNotNull(requestBody, "requestBody"); + Utils.checkNotNull(xSessionId, "xSessionId"); + this.requestBody = requestBody; + this.xSessionId = xSessionId; + } + + public ApplyOperationIDsRequest( + String xSessionId) { + this(Optional.empty(), xSessionId); + } + + /** + * Apply options + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional requestBody() { + return (Optional) requestBody; + } + + @JsonIgnore + public String xSessionId() { + return xSessionId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Apply options + */ + public ApplyOperationIDsRequest withRequestBody(ApplyOperationIDsRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + /** + * Apply options + */ + public ApplyOperationIDsRequest withRequestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public ApplyOperationIDsRequest withXSessionId(String xSessionId) { + Utils.checkNotNull(xSessionId, "xSessionId"); + this.xSessionId = xSessionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplyOperationIDsRequest other = (ApplyOperationIDsRequest) o; + return + Objects.deepEquals(this.requestBody, other.requestBody) && + Objects.deepEquals(this.xSessionId, other.xSessionId); + } + + @Override + public int hashCode() { + return Objects.hash( + requestBody, + xSessionId); + } + + @Override + public String toString() { + return Utils.toString(ApplyOperationIDsRequest.class, + "requestBody", requestBody, + "xSessionId", xSessionId); + } + + public final static class Builder { + + private Optional requestBody = Optional.empty(); + + private String xSessionId; + + private Builder() { + // force use of static builder() method + } + + /** + * Apply options + */ + public Builder requestBody(ApplyOperationIDsRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = Optional.ofNullable(requestBody); + return this; + } + + /** + * Apply options + */ + public Builder requestBody(Optional requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public Builder xSessionId(String xSessionId) { + Utils.checkNotNull(xSessionId, "xSessionId"); + this.xSessionId = xSessionId; + return this; + } + + public ApplyOperationIDsRequest build() { + return new ApplyOperationIDsRequest( + requestBody, + xSessionId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequestBody.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequestBody.java new file mode 100644 index 00000000..62bdcc74 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequestBody.java @@ -0,0 +1,131 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * ApplyOperationIDsRequestBody - Apply options + */ + +public class ApplyOperationIDsRequestBody { + + /** + * Whether to apply the suggestions as an overlay or replace the existing operationIDs. Default: false + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("as_overlay") + private Optional asOverlay; + + @JsonCreator + public ApplyOperationIDsRequestBody( + @JsonProperty("as_overlay") Optional asOverlay) { + Utils.checkNotNull(asOverlay, "asOverlay"); + this.asOverlay = asOverlay; + } + + public ApplyOperationIDsRequestBody() { + this(Optional.empty()); + } + + /** + * Whether to apply the suggestions as an overlay or replace the existing operationIDs. Default: false + */ + @JsonIgnore + public Optional asOverlay() { + return asOverlay; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Whether to apply the suggestions as an overlay or replace the existing operationIDs. Default: false + */ + public ApplyOperationIDsRequestBody withAsOverlay(boolean asOverlay) { + Utils.checkNotNull(asOverlay, "asOverlay"); + this.asOverlay = Optional.ofNullable(asOverlay); + return this; + } + + /** + * Whether to apply the suggestions as an overlay or replace the existing operationIDs. Default: false + */ + public ApplyOperationIDsRequestBody withAsOverlay(Optional asOverlay) { + Utils.checkNotNull(asOverlay, "asOverlay"); + this.asOverlay = asOverlay; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplyOperationIDsRequestBody other = (ApplyOperationIDsRequestBody) o; + return + Objects.deepEquals(this.asOverlay, other.asOverlay); + } + + @Override + public int hashCode() { + return Objects.hash( + asOverlay); + } + + @Override + public String toString() { + return Utils.toString(ApplyOperationIDsRequestBody.class, + "asOverlay", asOverlay); + } + + public final static class Builder { + + private Optional asOverlay = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Whether to apply the suggestions as an overlay or replace the existing operationIDs. Default: false + */ + public Builder asOverlay(boolean asOverlay) { + Utils.checkNotNull(asOverlay, "asOverlay"); + this.asOverlay = Optional.ofNullable(asOverlay); + return this; + } + + /** + * Whether to apply the suggestions as an overlay or replace the existing operationIDs. Default: false + */ + public Builder asOverlay(Optional asOverlay) { + Utils.checkNotNull(asOverlay, "asOverlay"); + this.asOverlay = asOverlay; + return this; + } + + public ApplyOperationIDsRequestBody build() { + return new ApplyOperationIDsRequestBody( + asOverlay); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequestBuilder.java new file mode 100644 index 00000000..1a390fe9 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class ApplyOperationIDsRequestBuilder { + + private ApplyOperationIDsRequest request; + private final SDKMethodInterfaces.MethodCallApplyOperationIDs sdk; + + public ApplyOperationIDsRequestBuilder(SDKMethodInterfaces.MethodCallApplyOperationIDs sdk) { + this.sdk = sdk; + } + + public ApplyOperationIDsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.ApplyOperationIDsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ApplyOperationIDsResponse call() throws Exception { + + return sdk.applyOperationIDs( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsResponse.java new file mode 100644 index 00000000..c035e075 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ApplyOperationIDsResponse.java @@ -0,0 +1,370 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class ApplyOperationIDsResponse implements Response { + + /** + * OK + */ + private Optional twoHundredApplicationJsonSchema; + + /** + * OK + */ + private Optional twoHundredApplicationXYamlSchema; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public ApplyOperationIDsResponse( + Optional twoHundredApplicationJsonSchema, + Optional twoHundredApplicationXYamlSchema, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.twoHundredApplicationJsonSchema = twoHundredApplicationJsonSchema; + this.twoHundredApplicationXYamlSchema = twoHundredApplicationXYamlSchema; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public ApplyOperationIDsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredApplicationJsonSchema() { + return (Optional) twoHundredApplicationJsonSchema; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredApplicationXYamlSchema() { + return (Optional) twoHundredApplicationXYamlSchema; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public ApplyOperationIDsResponse withTwoHundredApplicationJsonSchema(InputStream twoHundredApplicationJsonSchema) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + this.twoHundredApplicationJsonSchema = Optional.ofNullable(twoHundredApplicationJsonSchema); + return this; + } + + /** + * OK + */ + public ApplyOperationIDsResponse withTwoHundredApplicationJsonSchema(Optional twoHundredApplicationJsonSchema) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + this.twoHundredApplicationJsonSchema = twoHundredApplicationJsonSchema; + return this; + } + + /** + * OK + */ + public ApplyOperationIDsResponse withTwoHundredApplicationXYamlSchema(InputStream twoHundredApplicationXYamlSchema) { + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + this.twoHundredApplicationXYamlSchema = Optional.ofNullable(twoHundredApplicationXYamlSchema); + return this; + } + + /** + * OK + */ + public ApplyOperationIDsResponse withTwoHundredApplicationXYamlSchema(Optional twoHundredApplicationXYamlSchema) { + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + this.twoHundredApplicationXYamlSchema = twoHundredApplicationXYamlSchema; + return this; + } + + /** + * HTTP response content type for this operation + */ + public ApplyOperationIDsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public ApplyOperationIDsResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public ApplyOperationIDsResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ApplyOperationIDsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ApplyOperationIDsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApplyOperationIDsResponse other = (ApplyOperationIDsResponse) o; + return + Objects.deepEquals(this.twoHundredApplicationJsonSchema, other.twoHundredApplicationJsonSchema) && + Objects.deepEquals(this.twoHundredApplicationXYamlSchema, other.twoHundredApplicationXYamlSchema) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + twoHundredApplicationJsonSchema, + twoHundredApplicationXYamlSchema, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(ApplyOperationIDsResponse.class, + "twoHundredApplicationJsonSchema", twoHundredApplicationJsonSchema, + "twoHundredApplicationXYamlSchema", twoHundredApplicationXYamlSchema, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional twoHundredApplicationJsonSchema = Optional.empty(); + + private Optional twoHundredApplicationXYamlSchema = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder twoHundredApplicationJsonSchema(InputStream twoHundredApplicationJsonSchema) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + this.twoHundredApplicationJsonSchema = Optional.ofNullable(twoHundredApplicationJsonSchema); + return this; + } + + /** + * OK + */ + public Builder twoHundredApplicationJsonSchema(Optional twoHundredApplicationJsonSchema) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + this.twoHundredApplicationJsonSchema = twoHundredApplicationJsonSchema; + return this; + } + + /** + * OK + */ + public Builder twoHundredApplicationXYamlSchema(InputStream twoHundredApplicationXYamlSchema) { + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + this.twoHundredApplicationXYamlSchema = Optional.ofNullable(twoHundredApplicationXYamlSchema); + return this; + } + + /** + * OK + */ + public Builder twoHundredApplicationXYamlSchema(Optional twoHundredApplicationXYamlSchema) { + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + this.twoHundredApplicationXYamlSchema = twoHundredApplicationXYamlSchema; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public ApplyOperationIDsResponse build() { + return new ApplyOperationIDsResponse( + twoHundredApplicationJsonSchema, + twoHundredApplicationXYamlSchema, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessRequest.java new file mode 100644 index 00000000..f599470e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessRequest.java @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class CheckAccessRequest { + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=org") + private String org; + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=repo") + private String repo; + + @JsonCreator + public CheckAccessRequest( + String org, + String repo) { + Utils.checkNotNull(org, "org"); + Utils.checkNotNull(repo, "repo"); + this.org = org; + this.repo = repo; + } + + @JsonIgnore + public String org() { + return org; + } + + @JsonIgnore + public String repo() { + return repo; + } + + public final static Builder builder() { + return new Builder(); + } + + public CheckAccessRequest withOrg(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + public CheckAccessRequest withRepo(String repo) { + Utils.checkNotNull(repo, "repo"); + this.repo = repo; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckAccessRequest other = (CheckAccessRequest) o; + return + Objects.deepEquals(this.org, other.org) && + Objects.deepEquals(this.repo, other.repo); + } + + @Override + public int hashCode() { + return Objects.hash( + org, + repo); + } + + @Override + public String toString() { + return Utils.toString(CheckAccessRequest.class, + "org", org, + "repo", repo); + } + + public final static class Builder { + + private String org; + + private String repo; + + private Builder() { + // force use of static builder() method + } + + public Builder org(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + public Builder repo(String repo) { + Utils.checkNotNull(repo, "repo"); + this.repo = repo; + return this; + } + + public CheckAccessRequest build() { + return new CheckAccessRequest( + org, + repo); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessRequestBuilder.java new file mode 100644 index 00000000..1c4d56bb --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class CheckAccessRequestBuilder { + + private CheckAccessRequest request; + private final SDKMethodInterfaces.MethodCallCheckAccess sdk; + + public CheckAccessRequestBuilder(SDKMethodInterfaces.MethodCallCheckAccess sdk) { + this.sdk = sdk; + } + + public CheckAccessRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.CheckAccessRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CheckAccessResponse call() throws Exception { + + return sdk.checkAccess( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessResponse.java new file mode 100644 index 00000000..9d4dc269 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CheckAccessResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class CheckAccessResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CheckAccessResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public CheckAccessResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public CheckAccessResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public CheckAccessResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public CheckAccessResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CheckAccessResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CheckAccessResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CheckAccessResponse other = (CheckAccessResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CheckAccessResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CheckAccessResponse build() { + return new CheckAccessResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureCodeSamplesRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureCodeSamplesRequestBuilder.java new file mode 100644 index 00000000..c3fa71b9 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureCodeSamplesRequestBuilder.java @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureCodeSamplesRequest; +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class ConfigureCodeSamplesRequestBuilder { + + private GithubConfigureCodeSamplesRequest request; + private final SDKMethodInterfaces.MethodCallConfigureCodeSamples sdk; + + public ConfigureCodeSamplesRequestBuilder(SDKMethodInterfaces.MethodCallConfigureCodeSamples sdk) { + this.sdk = sdk; + } + + public ConfigureCodeSamplesRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureCodeSamplesRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ConfigureCodeSamplesResponse call() throws Exception { + + return sdk.configureCodeSamples( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureCodeSamplesResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureCodeSamplesResponse.java new file mode 100644 index 00000000..949998d8 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureCodeSamplesResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureCodeSamplesResponse; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class ConfigureCodeSamplesResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional githubConfigureCodeSamplesResponse; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public ConfigureCodeSamplesResponse( + String contentType, + Optional error, + Optional githubConfigureCodeSamplesResponse, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(githubConfigureCodeSamplesResponse, "githubConfigureCodeSamplesResponse"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.githubConfigureCodeSamplesResponse = githubConfigureCodeSamplesResponse; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public ConfigureCodeSamplesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional githubConfigureCodeSamplesResponse() { + return (Optional) githubConfigureCodeSamplesResponse; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public ConfigureCodeSamplesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public ConfigureCodeSamplesResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public ConfigureCodeSamplesResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public ConfigureCodeSamplesResponse withGithubConfigureCodeSamplesResponse(GithubConfigureCodeSamplesResponse githubConfigureCodeSamplesResponse) { + Utils.checkNotNull(githubConfigureCodeSamplesResponse, "githubConfigureCodeSamplesResponse"); + this.githubConfigureCodeSamplesResponse = Optional.ofNullable(githubConfigureCodeSamplesResponse); + return this; + } + + /** + * OK + */ + public ConfigureCodeSamplesResponse withGithubConfigureCodeSamplesResponse(Optional githubConfigureCodeSamplesResponse) { + Utils.checkNotNull(githubConfigureCodeSamplesResponse, "githubConfigureCodeSamplesResponse"); + this.githubConfigureCodeSamplesResponse = githubConfigureCodeSamplesResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ConfigureCodeSamplesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ConfigureCodeSamplesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigureCodeSamplesResponse other = (ConfigureCodeSamplesResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.githubConfigureCodeSamplesResponse, other.githubConfigureCodeSamplesResponse) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + githubConfigureCodeSamplesResponse, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(ConfigureCodeSamplesResponse.class, + "contentType", contentType, + "error", error, + "githubConfigureCodeSamplesResponse", githubConfigureCodeSamplesResponse, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional githubConfigureCodeSamplesResponse = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder githubConfigureCodeSamplesResponse(GithubConfigureCodeSamplesResponse githubConfigureCodeSamplesResponse) { + Utils.checkNotNull(githubConfigureCodeSamplesResponse, "githubConfigureCodeSamplesResponse"); + this.githubConfigureCodeSamplesResponse = Optional.ofNullable(githubConfigureCodeSamplesResponse); + return this; + } + + /** + * OK + */ + public Builder githubConfigureCodeSamplesResponse(Optional githubConfigureCodeSamplesResponse) { + Utils.checkNotNull(githubConfigureCodeSamplesResponse, "githubConfigureCodeSamplesResponse"); + this.githubConfigureCodeSamplesResponse = githubConfigureCodeSamplesResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public ConfigureCodeSamplesResponse build() { + return new ConfigureCodeSamplesResponse( + contentType, + error, + githubConfigureCodeSamplesResponse, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureMintlifyRepoRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureMintlifyRepoRequestBuilder.java new file mode 100644 index 00000000..d7b4220a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureMintlifyRepoRequestBuilder.java @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureMintlifyRepoRequest; +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class ConfigureMintlifyRepoRequestBuilder { + + private GithubConfigureMintlifyRepoRequest request; + private final SDKMethodInterfaces.MethodCallConfigureMintlifyRepo sdk; + + public ConfigureMintlifyRepoRequestBuilder(SDKMethodInterfaces.MethodCallConfigureMintlifyRepo sdk) { + this.sdk = sdk; + } + + public ConfigureMintlifyRepoRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureMintlifyRepoRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ConfigureMintlifyRepoResponse call() throws Exception { + + return sdk.configureMintlifyRepo( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureMintlifyRepoResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureMintlifyRepoResponse.java new file mode 100644 index 00000000..a2edf6ce --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureMintlifyRepoResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class ConfigureMintlifyRepoResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public ConfigureMintlifyRepoResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public ConfigureMintlifyRepoResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public ConfigureMintlifyRepoResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public ConfigureMintlifyRepoResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public ConfigureMintlifyRepoResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ConfigureMintlifyRepoResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ConfigureMintlifyRepoResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigureMintlifyRepoResponse other = (ConfigureMintlifyRepoResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(ConfigureMintlifyRepoResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public ConfigureMintlifyRepoResponse build() { + return new ConfigureMintlifyRepoResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureTargetRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureTargetRequestBuilder.java new file mode 100644 index 00000000..0e5b8ff0 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureTargetRequestBuilder.java @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureTargetRequest; +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class ConfigureTargetRequestBuilder { + + private GithubConfigureTargetRequest request; + private final SDKMethodInterfaces.MethodCallConfigureTarget sdk; + + public ConfigureTargetRequestBuilder(SDKMethodInterfaces.MethodCallConfigureTarget sdk) { + this.sdk = sdk; + } + + public ConfigureTargetRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureTargetRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ConfigureTargetResponse call() throws Exception { + + return sdk.configureTarget( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureTargetResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureTargetResponse.java new file mode 100644 index 00000000..35b355fa --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ConfigureTargetResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class ConfigureTargetResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public ConfigureTargetResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public ConfigureTargetResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public ConfigureTargetResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public ConfigureTargetResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public ConfigureTargetResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ConfigureTargetResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ConfigureTargetResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConfigureTargetResponse other = (ConfigureTargetResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(ConfigureTargetResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public ConfigureTargetResponse build() { + return new ConfigureTargetResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateFreeTrialRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateFreeTrialRequestBuilder.java new file mode 100644 index 00000000..5ec3ab5e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateFreeTrialRequestBuilder.java @@ -0,0 +1,20 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +public class CreateFreeTrialRequestBuilder { + + private final SDKMethodInterfaces.MethodCallCreateFreeTrial sdk; + + public CreateFreeTrialRequestBuilder(SDKMethodInterfaces.MethodCallCreateFreeTrial sdk) { + this.sdk = sdk; + } + + public CreateFreeTrialResponse call() throws Exception { + + return sdk.createFreeTrialDirect(); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateFreeTrialResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateFreeTrialResponse.java new file mode 100644 index 00000000..280f967a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateFreeTrialResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class CreateFreeTrialResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CreateFreeTrialResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public CreateFreeTrialResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public CreateFreeTrialResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public CreateFreeTrialResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public CreateFreeTrialResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateFreeTrialResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateFreeTrialResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateFreeTrialResponse other = (CreateFreeTrialResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CreateFreeTrialResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CreateFreeTrialResponse build() { + return new CreateFreeTrialResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateRequestBody.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateRequestBody.java new file mode 100644 index 00000000..8ad44b6a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateRequestBody.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class CreateRequestBody { + + /** + * URL to shorten + */ + @JsonProperty("url") + private String url; + + @JsonCreator + public CreateRequestBody( + @JsonProperty("url") String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + } + + /** + * URL to shorten + */ + @JsonIgnore + public String url() { + return url; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * URL to shorten + */ + public CreateRequestBody withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRequestBody other = (CreateRequestBody) o; + return + Objects.deepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return Objects.hash( + url); + } + + @Override + public String toString() { + return Utils.toString(CreateRequestBody.class, + "url", url); + } + + public final static class Builder { + + private String url; + + private Builder() { + // force use of static builder() method + } + + /** + * URL to shorten + */ + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public CreateRequestBody build() { + return new CreateRequestBody( + url); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateRequestBuilder.java new file mode 100644 index 00000000..e1b4ead7 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class CreateRequestBuilder { + + private CreateRequestBody request; + private final SDKMethodInterfaces.MethodCallCreate sdk; + + public CreateRequestBuilder(SDKMethodInterfaces.MethodCallCreate sdk) { + this.sdk = sdk; + } + + public CreateRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.CreateRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public CreateResponse call() throws Exception { + + return sdk.create( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateResponse.java new file mode 100644 index 00000000..69a28aa0 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/CreateResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.ShortURL; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class CreateResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * OK + */ + private Optional shortURL; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public CreateResponse( + String contentType, + Optional shortURL, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(shortURL, "shortURL"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.shortURL = shortURL; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public CreateResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional shortURL() { + return (Optional) shortURL; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public CreateResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * OK + */ + public CreateResponse withShortURL(ShortURL shortURL) { + Utils.checkNotNull(shortURL, "shortURL"); + this.shortURL = Optional.ofNullable(shortURL); + return this; + } + + /** + * OK + */ + public CreateResponse withShortURL(Optional shortURL) { + Utils.checkNotNull(shortURL, "shortURL"); + this.shortURL = shortURL; + return this; + } + + /** + * HTTP response status code for this operation + */ + public CreateResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public CreateResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateResponse other = (CreateResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.shortURL, other.shortURL) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + shortURL, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(CreateResponse.class, + "contentType", contentType, + "shortURL", shortURL, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional shortURL = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * OK + */ + public Builder shortURL(ShortURL shortURL) { + Utils.checkNotNull(shortURL, "shortURL"); + this.shortURL = Optional.ofNullable(shortURL); + return this; + } + + /** + * OK + */ + public Builder shortURL(Optional shortURL) { + Utils.checkNotNull(shortURL, "shortURL"); + this.shortURL = shortURL; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public CreateResponse build() { + return new CreateResponse( + contentType, + shortURL, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointRequest.java new file mode 100644 index 00000000..37ff2500 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointRequest.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class DeleteApiEndpointRequest { + + /** + * The ID of the ApiEndpoint to delete. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiEndpointID") + private String apiEndpointID; + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public DeleteApiEndpointRequest( + String apiEndpointID, + String apiID, + String versionID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiEndpointID = apiEndpointID; + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The ID of the ApiEndpoint to delete. + */ + @JsonIgnore + public String apiEndpointID() { + return apiEndpointID; + } + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the ApiEndpoint to delete. + */ + public DeleteApiEndpointRequest withApiEndpointID(String apiEndpointID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + this.apiEndpointID = apiEndpointID; + return this; + } + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + public DeleteApiEndpointRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + public DeleteApiEndpointRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteApiEndpointRequest other = (DeleteApiEndpointRequest) o; + return + Objects.deepEquals(this.apiEndpointID, other.apiEndpointID) && + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpointID, + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(DeleteApiEndpointRequest.class, + "apiEndpointID", apiEndpointID, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiEndpointID; + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the ApiEndpoint to delete. + */ + public Builder apiEndpointID(String apiEndpointID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + this.apiEndpointID = apiEndpointID; + return this; + } + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public DeleteApiEndpointRequest build() { + return new DeleteApiEndpointRequest( + apiEndpointID, + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointRequestBuilder.java new file mode 100644 index 00000000..bcae86aa --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class DeleteApiEndpointRequestBuilder { + + private DeleteApiEndpointRequest request; + private final SDKMethodInterfaces.MethodCallDeleteApiEndpoint sdk; + + public DeleteApiEndpointRequestBuilder(SDKMethodInterfaces.MethodCallDeleteApiEndpoint sdk) { + this.sdk = sdk; + } + + public DeleteApiEndpointRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiEndpointRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteApiEndpointResponse call() throws Exception { + + return sdk.deleteApiEndpoint( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointResponse.java new file mode 100644 index 00000000..dad9460b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiEndpointResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class DeleteApiEndpointResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteApiEndpointResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public DeleteApiEndpointResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public DeleteApiEndpointResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public DeleteApiEndpointResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public DeleteApiEndpointResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteApiEndpointResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteApiEndpointResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteApiEndpointResponse other = (DeleteApiEndpointResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteApiEndpointResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteApiEndpointResponse build() { + return new DeleteApiEndpointResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiRequest.java new file mode 100644 index 00000000..9cce800c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiRequest.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class DeleteApiRequest { + + /** + * The ID of the Api to delete. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api to delete. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public DeleteApiRequest( + String apiID, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The ID of the Api to delete. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api to delete. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to delete. + */ + public DeleteApiRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to delete. + */ + public DeleteApiRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteApiRequest other = (DeleteApiRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(DeleteApiRequest.class, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to delete. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to delete. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public DeleteApiRequest build() { + return new DeleteApiRequest( + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiRequestBuilder.java new file mode 100644 index 00000000..c1e03a43 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class DeleteApiRequestBuilder { + + private DeleteApiRequest request; + private final SDKMethodInterfaces.MethodCallDeleteApi sdk; + + public DeleteApiRequestBuilder(SDKMethodInterfaces.MethodCallDeleteApi sdk) { + this.sdk = sdk; + } + + public DeleteApiRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteApiResponse call() throws Exception { + + return sdk.deleteApi( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiResponse.java new file mode 100644 index 00000000..0b19fd3a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteApiResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class DeleteApiResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteApiResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public DeleteApiResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public DeleteApiResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public DeleteApiResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public DeleteApiResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteApiResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteApiResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteApiResponse other = (DeleteApiResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteApiResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteApiResponse build() { + return new DeleteApiResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaRequest.java new file mode 100644 index 00000000..baf0f837 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaRequest.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class DeleteSchemaRequest { + + /** + * The ID of the Api to delete schemas for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The revision ID of the schema to delete. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=revisionID") + private String revisionID; + + /** + * The version ID of the Api to delete metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public DeleteSchemaRequest( + String apiID, + String revisionID, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(revisionID, "revisionID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.revisionID = revisionID; + this.versionID = versionID; + } + + /** + * The ID of the Api to delete schemas for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The revision ID of the schema to delete. + */ + @JsonIgnore + public String revisionID() { + return revisionID; + } + + /** + * The version ID of the Api to delete metadata for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to delete schemas for. + */ + public DeleteSchemaRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The revision ID of the schema to delete. + */ + public DeleteSchemaRequest withRevisionID(String revisionID) { + Utils.checkNotNull(revisionID, "revisionID"); + this.revisionID = revisionID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public DeleteSchemaRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteSchemaRequest other = (DeleteSchemaRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.revisionID, other.revisionID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + revisionID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(DeleteSchemaRequest.class, + "apiID", apiID, + "revisionID", revisionID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String revisionID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to delete schemas for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The revision ID of the schema to delete. + */ + public Builder revisionID(String revisionID) { + Utils.checkNotNull(revisionID, "revisionID"); + this.revisionID = revisionID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public DeleteSchemaRequest build() { + return new DeleteSchemaRequest( + apiID, + revisionID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaRequestBuilder.java new file mode 100644 index 00000000..b370b2a8 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class DeleteSchemaRequestBuilder { + + private DeleteSchemaRequest request; + private final SDKMethodInterfaces.MethodCallDeleteSchema sdk; + + public DeleteSchemaRequestBuilder(SDKMethodInterfaces.MethodCallDeleteSchema sdk) { + this.sdk = sdk; + } + + public DeleteSchemaRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.DeleteSchemaRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteSchemaResponse call() throws Exception { + + return sdk.deleteSchema( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaResponse.java new file mode 100644 index 00000000..7d5b1821 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteSchemaResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class DeleteSchemaResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteSchemaResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public DeleteSchemaResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public DeleteSchemaResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public DeleteSchemaResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public DeleteSchemaResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteSchemaResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteSchemaResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteSchemaResponse other = (DeleteSchemaResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteSchemaResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteSchemaResponse build() { + return new DeleteSchemaResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataRequest.java new file mode 100644 index 00000000..5a6a2384 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataRequest.java @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class DeleteVersionMetadataRequest { + + /** + * The ID of the Api to delete metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The key of the metadata to delete. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=metaKey") + private String metaKey; + + /** + * The value of the metadata to delete. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=metaValue") + private String metaValue; + + /** + * The version ID of the Api to delete metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public DeleteVersionMetadataRequest( + String apiID, + String metaKey, + String metaValue, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(metaKey, "metaKey"); + Utils.checkNotNull(metaValue, "metaValue"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.metaKey = metaKey; + this.metaValue = metaValue; + this.versionID = versionID; + } + + /** + * The ID of the Api to delete metadata for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The key of the metadata to delete. + */ + @JsonIgnore + public String metaKey() { + return metaKey; + } + + /** + * The value of the metadata to delete. + */ + @JsonIgnore + public String metaValue() { + return metaValue; + } + + /** + * The version ID of the Api to delete metadata for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to delete metadata for. + */ + public DeleteVersionMetadataRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The key of the metadata to delete. + */ + public DeleteVersionMetadataRequest withMetaKey(String metaKey) { + Utils.checkNotNull(metaKey, "metaKey"); + this.metaKey = metaKey; + return this; + } + + /** + * The value of the metadata to delete. + */ + public DeleteVersionMetadataRequest withMetaValue(String metaValue) { + Utils.checkNotNull(metaValue, "metaValue"); + this.metaValue = metaValue; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public DeleteVersionMetadataRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteVersionMetadataRequest other = (DeleteVersionMetadataRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.metaKey, other.metaKey) && + Objects.deepEquals(this.metaValue, other.metaValue) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + metaKey, + metaValue, + versionID); + } + + @Override + public String toString() { + return Utils.toString(DeleteVersionMetadataRequest.class, + "apiID", apiID, + "metaKey", metaKey, + "metaValue", metaValue, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String metaKey; + + private String metaValue; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to delete metadata for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The key of the metadata to delete. + */ + public Builder metaKey(String metaKey) { + Utils.checkNotNull(metaKey, "metaKey"); + this.metaKey = metaKey; + return this; + } + + /** + * The value of the metadata to delete. + */ + public Builder metaValue(String metaValue) { + Utils.checkNotNull(metaValue, "metaValue"); + this.metaValue = metaValue; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public DeleteVersionMetadataRequest build() { + return new DeleteVersionMetadataRequest( + apiID, + metaKey, + metaValue, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataRequestBuilder.java new file mode 100644 index 00000000..bbcff83b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class DeleteVersionMetadataRequestBuilder { + + private DeleteVersionMetadataRequest request; + private final SDKMethodInterfaces.MethodCallDeleteVersionMetadata sdk; + + public DeleteVersionMetadataRequestBuilder(SDKMethodInterfaces.MethodCallDeleteVersionMetadata sdk) { + this.sdk = sdk; + } + + public DeleteVersionMetadataRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.DeleteVersionMetadataRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeleteVersionMetadataResponse call() throws Exception { + + return sdk.deleteVersionMetadata( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataResponse.java new file mode 100644 index 00000000..0876456e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DeleteVersionMetadataResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class DeleteVersionMetadataResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DeleteVersionMetadataResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public DeleteVersionMetadataResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public DeleteVersionMetadataResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public DeleteVersionMetadataResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public DeleteVersionMetadataResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeleteVersionMetadataResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeleteVersionMetadataResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteVersionMetadataResponse other = (DeleteVersionMetadataResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeleteVersionMetadataResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DeleteVersionMetadataResponse build() { + return new DeleteVersionMetadataResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRequest.java new file mode 100644 index 00000000..fca9de32 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRequest.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class DownloadSchemaRequest { + + /** + * The ID of the Api to download the schema for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api to delete metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public DownloadSchemaRequest( + String apiID, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The ID of the Api to download the schema for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api to delete metadata for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to download the schema for. + */ + public DownloadSchemaRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public DownloadSchemaRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DownloadSchemaRequest other = (DownloadSchemaRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(DownloadSchemaRequest.class, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to download the schema for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public DownloadSchemaRequest build() { + return new DownloadSchemaRequest( + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRequestBuilder.java new file mode 100644 index 00000000..0830013c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class DownloadSchemaRequestBuilder { + + private DownloadSchemaRequest request; + private final SDKMethodInterfaces.MethodCallDownloadSchema sdk; + + public DownloadSchemaRequestBuilder(SDKMethodInterfaces.MethodCallDownloadSchema sdk) { + this.sdk = sdk; + } + + public DownloadSchemaRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DownloadSchemaResponse call() throws Exception { + + return sdk.downloadSchema( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaResponse.java new file mode 100644 index 00000000..40f9bf73 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaResponse.java @@ -0,0 +1,370 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class DownloadSchemaResponse implements Response { + + /** + * OK + */ + private Optional twoHundredApplicationJsonSchema; + + /** + * OK + */ + private Optional twoHundredApplicationXYamlSchema; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DownloadSchemaResponse( + Optional twoHundredApplicationJsonSchema, + Optional twoHundredApplicationXYamlSchema, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.twoHundredApplicationJsonSchema = twoHundredApplicationJsonSchema; + this.twoHundredApplicationXYamlSchema = twoHundredApplicationXYamlSchema; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public DownloadSchemaResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredApplicationJsonSchema() { + return (Optional) twoHundredApplicationJsonSchema; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredApplicationXYamlSchema() { + return (Optional) twoHundredApplicationXYamlSchema; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public DownloadSchemaResponse withTwoHundredApplicationJsonSchema(InputStream twoHundredApplicationJsonSchema) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + this.twoHundredApplicationJsonSchema = Optional.ofNullable(twoHundredApplicationJsonSchema); + return this; + } + + /** + * OK + */ + public DownloadSchemaResponse withTwoHundredApplicationJsonSchema(Optional twoHundredApplicationJsonSchema) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + this.twoHundredApplicationJsonSchema = twoHundredApplicationJsonSchema; + return this; + } + + /** + * OK + */ + public DownloadSchemaResponse withTwoHundredApplicationXYamlSchema(InputStream twoHundredApplicationXYamlSchema) { + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + this.twoHundredApplicationXYamlSchema = Optional.ofNullable(twoHundredApplicationXYamlSchema); + return this; + } + + /** + * OK + */ + public DownloadSchemaResponse withTwoHundredApplicationXYamlSchema(Optional twoHundredApplicationXYamlSchema) { + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + this.twoHundredApplicationXYamlSchema = twoHundredApplicationXYamlSchema; + return this; + } + + /** + * HTTP response content type for this operation + */ + public DownloadSchemaResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public DownloadSchemaResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public DownloadSchemaResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DownloadSchemaResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DownloadSchemaResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DownloadSchemaResponse other = (DownloadSchemaResponse) o; + return + Objects.deepEquals(this.twoHundredApplicationJsonSchema, other.twoHundredApplicationJsonSchema) && + Objects.deepEquals(this.twoHundredApplicationXYamlSchema, other.twoHundredApplicationXYamlSchema) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + twoHundredApplicationJsonSchema, + twoHundredApplicationXYamlSchema, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DownloadSchemaResponse.class, + "twoHundredApplicationJsonSchema", twoHundredApplicationJsonSchema, + "twoHundredApplicationXYamlSchema", twoHundredApplicationXYamlSchema, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional twoHundredApplicationJsonSchema = Optional.empty(); + + private Optional twoHundredApplicationXYamlSchema = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder twoHundredApplicationJsonSchema(InputStream twoHundredApplicationJsonSchema) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + this.twoHundredApplicationJsonSchema = Optional.ofNullable(twoHundredApplicationJsonSchema); + return this; + } + + /** + * OK + */ + public Builder twoHundredApplicationJsonSchema(Optional twoHundredApplicationJsonSchema) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + this.twoHundredApplicationJsonSchema = twoHundredApplicationJsonSchema; + return this; + } + + /** + * OK + */ + public Builder twoHundredApplicationXYamlSchema(InputStream twoHundredApplicationXYamlSchema) { + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + this.twoHundredApplicationXYamlSchema = Optional.ofNullable(twoHundredApplicationXYamlSchema); + return this; + } + + /** + * OK + */ + public Builder twoHundredApplicationXYamlSchema(Optional twoHundredApplicationXYamlSchema) { + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + this.twoHundredApplicationXYamlSchema = twoHundredApplicationXYamlSchema; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DownloadSchemaResponse build() { + return new DownloadSchemaResponse( + twoHundredApplicationJsonSchema, + twoHundredApplicationXYamlSchema, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionRequest.java new file mode 100644 index 00000000..b8b12de4 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionRequest.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class DownloadSchemaRevisionRequest { + + /** + * The ID of the Api to retrieve schemas for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The revision ID of the schema to retrieve. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=revisionID") + private String revisionID; + + /** + * The version ID of the Api to delete metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public DownloadSchemaRevisionRequest( + String apiID, + String revisionID, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(revisionID, "revisionID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.revisionID = revisionID; + this.versionID = versionID; + } + + /** + * The ID of the Api to retrieve schemas for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The revision ID of the schema to retrieve. + */ + @JsonIgnore + public String revisionID() { + return revisionID; + } + + /** + * The version ID of the Api to delete metadata for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to retrieve schemas for. + */ + public DownloadSchemaRevisionRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The revision ID of the schema to retrieve. + */ + public DownloadSchemaRevisionRequest withRevisionID(String revisionID) { + Utils.checkNotNull(revisionID, "revisionID"); + this.revisionID = revisionID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public DownloadSchemaRevisionRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DownloadSchemaRevisionRequest other = (DownloadSchemaRevisionRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.revisionID, other.revisionID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + revisionID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(DownloadSchemaRevisionRequest.class, + "apiID", apiID, + "revisionID", revisionID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String revisionID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to retrieve schemas for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The revision ID of the schema to retrieve. + */ + public Builder revisionID(String revisionID) { + Utils.checkNotNull(revisionID, "revisionID"); + this.revisionID = revisionID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public DownloadSchemaRevisionRequest build() { + return new DownloadSchemaRevisionRequest( + apiID, + revisionID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionRequestBuilder.java new file mode 100644 index 00000000..4aec1983 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class DownloadSchemaRevisionRequestBuilder { + + private DownloadSchemaRevisionRequest request; + private final SDKMethodInterfaces.MethodCallDownloadSchemaRevision sdk; + + public DownloadSchemaRevisionRequestBuilder(SDKMethodInterfaces.MethodCallDownloadSchemaRevision sdk) { + this.sdk = sdk; + } + + public DownloadSchemaRevisionRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRevisionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DownloadSchemaRevisionResponse call() throws Exception { + + return sdk.downloadSchemaRevision( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionResponse.java new file mode 100644 index 00000000..c45431c6 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/DownloadSchemaRevisionResponse.java @@ -0,0 +1,370 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class DownloadSchemaRevisionResponse implements Response { + + /** + * OK + */ + private Optional twoHundredApplicationJsonSchema; + + /** + * OK + */ + private Optional twoHundredApplicationXYamlSchema; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public DownloadSchemaRevisionResponse( + Optional twoHundredApplicationJsonSchema, + Optional twoHundredApplicationXYamlSchema, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.twoHundredApplicationJsonSchema = twoHundredApplicationJsonSchema; + this.twoHundredApplicationXYamlSchema = twoHundredApplicationXYamlSchema; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public DownloadSchemaRevisionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredApplicationJsonSchema() { + return (Optional) twoHundredApplicationJsonSchema; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional twoHundredApplicationXYamlSchema() { + return (Optional) twoHundredApplicationXYamlSchema; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public DownloadSchemaRevisionResponse withTwoHundredApplicationJsonSchema(InputStream twoHundredApplicationJsonSchema) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + this.twoHundredApplicationJsonSchema = Optional.ofNullable(twoHundredApplicationJsonSchema); + return this; + } + + /** + * OK + */ + public DownloadSchemaRevisionResponse withTwoHundredApplicationJsonSchema(Optional twoHundredApplicationJsonSchema) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + this.twoHundredApplicationJsonSchema = twoHundredApplicationJsonSchema; + return this; + } + + /** + * OK + */ + public DownloadSchemaRevisionResponse withTwoHundredApplicationXYamlSchema(InputStream twoHundredApplicationXYamlSchema) { + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + this.twoHundredApplicationXYamlSchema = Optional.ofNullable(twoHundredApplicationXYamlSchema); + return this; + } + + /** + * OK + */ + public DownloadSchemaRevisionResponse withTwoHundredApplicationXYamlSchema(Optional twoHundredApplicationXYamlSchema) { + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + this.twoHundredApplicationXYamlSchema = twoHundredApplicationXYamlSchema; + return this; + } + + /** + * HTTP response content type for this operation + */ + public DownloadSchemaRevisionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public DownloadSchemaRevisionResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public DownloadSchemaRevisionResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DownloadSchemaRevisionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DownloadSchemaRevisionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DownloadSchemaRevisionResponse other = (DownloadSchemaRevisionResponse) o; + return + Objects.deepEquals(this.twoHundredApplicationJsonSchema, other.twoHundredApplicationJsonSchema) && + Objects.deepEquals(this.twoHundredApplicationXYamlSchema, other.twoHundredApplicationXYamlSchema) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + twoHundredApplicationJsonSchema, + twoHundredApplicationXYamlSchema, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DownloadSchemaRevisionResponse.class, + "twoHundredApplicationJsonSchema", twoHundredApplicationJsonSchema, + "twoHundredApplicationXYamlSchema", twoHundredApplicationXYamlSchema, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional twoHundredApplicationJsonSchema = Optional.empty(); + + private Optional twoHundredApplicationXYamlSchema = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder twoHundredApplicationJsonSchema(InputStream twoHundredApplicationJsonSchema) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + this.twoHundredApplicationJsonSchema = Optional.ofNullable(twoHundredApplicationJsonSchema); + return this; + } + + /** + * OK + */ + public Builder twoHundredApplicationJsonSchema(Optional twoHundredApplicationJsonSchema) { + Utils.checkNotNull(twoHundredApplicationJsonSchema, "twoHundredApplicationJsonSchema"); + this.twoHundredApplicationJsonSchema = twoHundredApplicationJsonSchema; + return this; + } + + /** + * OK + */ + public Builder twoHundredApplicationXYamlSchema(InputStream twoHundredApplicationXYamlSchema) { + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + this.twoHundredApplicationXYamlSchema = Optional.ofNullable(twoHundredApplicationXYamlSchema); + return this; + } + + /** + * OK + */ + public Builder twoHundredApplicationXYamlSchema(Optional twoHundredApplicationXYamlSchema) { + Utils.checkNotNull(twoHundredApplicationXYamlSchema, "twoHundredApplicationXYamlSchema"); + this.twoHundredApplicationXYamlSchema = twoHundredApplicationXYamlSchema; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public DownloadSchemaRevisionResponse build() { + return new DownloadSchemaRevisionResponse( + twoHundredApplicationJsonSchema, + twoHundredApplicationXYamlSchema, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsRequest.java new file mode 100644 index 00000000..e0de418f --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsRequest.java @@ -0,0 +1,147 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class FetchPublishingPRsRequest { + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=generate_gen_lock_id") + private String generateGenLockId; + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=org") + private String org; + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=repo") + private String repo; + + @JsonCreator + public FetchPublishingPRsRequest( + String generateGenLockId, + String org, + String repo) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + Utils.checkNotNull(org, "org"); + Utils.checkNotNull(repo, "repo"); + this.generateGenLockId = generateGenLockId; + this.org = org; + this.repo = repo; + } + + @JsonIgnore + public String generateGenLockId() { + return generateGenLockId; + } + + @JsonIgnore + public String org() { + return org; + } + + @JsonIgnore + public String repo() { + return repo; + } + + public final static Builder builder() { + return new Builder(); + } + + public FetchPublishingPRsRequest withGenerateGenLockId(String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + return this; + } + + public FetchPublishingPRsRequest withOrg(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + public FetchPublishingPRsRequest withRepo(String repo) { + Utils.checkNotNull(repo, "repo"); + this.repo = repo; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchPublishingPRsRequest other = (FetchPublishingPRsRequest) o; + return + Objects.deepEquals(this.generateGenLockId, other.generateGenLockId) && + Objects.deepEquals(this.org, other.org) && + Objects.deepEquals(this.repo, other.repo); + } + + @Override + public int hashCode() { + return Objects.hash( + generateGenLockId, + org, + repo); + } + + @Override + public String toString() { + return Utils.toString(FetchPublishingPRsRequest.class, + "generateGenLockId", generateGenLockId, + "org", org, + "repo", repo); + } + + public final static class Builder { + + private String generateGenLockId; + + private String org; + + private String repo; + + private Builder() { + // force use of static builder() method + } + + public Builder generateGenLockId(String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + return this; + } + + public Builder org(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + public Builder repo(String repo) { + Utils.checkNotNull(repo, "repo"); + this.repo = repo; + return this; + } + + public FetchPublishingPRsRequest build() { + return new FetchPublishingPRsRequest( + generateGenLockId, + org, + repo); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsRequestBuilder.java new file mode 100644 index 00000000..2f0f5ea6 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class FetchPublishingPRsRequestBuilder { + + private FetchPublishingPRsRequest request; + private final SDKMethodInterfaces.MethodCallFetchPublishingPRs sdk; + + public FetchPublishingPRsRequestBuilder(SDKMethodInterfaces.MethodCallFetchPublishingPRs sdk) { + this.sdk = sdk; + } + + public FetchPublishingPRsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.FetchPublishingPRsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public FetchPublishingPRsResponse call() throws Exception { + + return sdk.fetchPublishingPRs( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsResponse.java new file mode 100644 index 00000000..8a32c667 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FetchPublishingPRsResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubPublishingPRResponse; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class FetchPublishingPRsResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional githubPublishingPRResponse; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public FetchPublishingPRsResponse( + String contentType, + Optional error, + Optional githubPublishingPRResponse, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(githubPublishingPRResponse, "githubPublishingPRResponse"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.githubPublishingPRResponse = githubPublishingPRResponse; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public FetchPublishingPRsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional githubPublishingPRResponse() { + return (Optional) githubPublishingPRResponse; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public FetchPublishingPRsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public FetchPublishingPRsResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public FetchPublishingPRsResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public FetchPublishingPRsResponse withGithubPublishingPRResponse(GithubPublishingPRResponse githubPublishingPRResponse) { + Utils.checkNotNull(githubPublishingPRResponse, "githubPublishingPRResponse"); + this.githubPublishingPRResponse = Optional.ofNullable(githubPublishingPRResponse); + return this; + } + + /** + * OK + */ + public FetchPublishingPRsResponse withGithubPublishingPRResponse(Optional githubPublishingPRResponse) { + Utils.checkNotNull(githubPublishingPRResponse, "githubPublishingPRResponse"); + this.githubPublishingPRResponse = githubPublishingPRResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public FetchPublishingPRsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public FetchPublishingPRsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FetchPublishingPRsResponse other = (FetchPublishingPRsResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.githubPublishingPRResponse, other.githubPublishingPRResponse) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + githubPublishingPRResponse, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(FetchPublishingPRsResponse.class, + "contentType", contentType, + "error", error, + "githubPublishingPRResponse", githubPublishingPRResponse, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional githubPublishingPRResponse = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder githubPublishingPRResponse(GithubPublishingPRResponse githubPublishingPRResponse) { + Utils.checkNotNull(githubPublishingPRResponse, "githubPublishingPRResponse"); + this.githubPublishingPRResponse = Optional.ofNullable(githubPublishingPRResponse); + return this; + } + + /** + * OK + */ + public Builder githubPublishingPRResponse(Optional githubPublishingPRResponse) { + Utils.checkNotNull(githubPublishingPRResponse, "githubPublishingPRResponse"); + this.githubPublishingPRResponse = githubPublishingPRResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public FetchPublishingPRsResponse build() { + return new FetchPublishingPRsResponse( + contentType, + error, + githubPublishingPRResponse, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/File.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/File.java new file mode 100644 index 00000000..bfe0f41e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/File.java @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class File { + + @SpeakeasyMetadata("multipartForm:content") + private byte[] content; + + @SpeakeasyMetadata("multipartForm:name=file") + private String fileName; + + @JsonCreator + public File( + byte[] content, + String fileName) { + Utils.checkNotNull(content, "content"); + Utils.checkNotNull(fileName, "fileName"); + this.content = content; + this.fileName = fileName; + } + + @JsonIgnore + public byte[] content() { + return content; + } + + @JsonIgnore + public String fileName() { + return fileName; + } + + public final static Builder builder() { + return new Builder(); + } + + public File withContent(byte[] content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public File withFileName(String fileName) { + Utils.checkNotNull(fileName, "fileName"); + this.fileName = fileName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + File other = (File) o; + return + Objects.deepEquals(this.content, other.content) && + Objects.deepEquals(this.fileName, other.fileName); + } + + @Override + public int hashCode() { + return Objects.hash( + content, + fileName); + } + + @Override + public String toString() { + return Utils.toString(File.class, + "content", content, + "fileName", fileName); + } + + public final static class Builder { + + private byte[] content; + + private String fileName; + + private Builder() { + // force use of static builder() method + } + + public Builder content(byte[] content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public Builder fileName(String fileName) { + Utils.checkNotNull(fileName, "fileName"); + this.fileName = fileName; + return this; + } + + public File build() { + return new File( + content, + fileName); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointRequest.java new file mode 100644 index 00000000..4926f837 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointRequest.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class FindApiEndpointRequest { + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The displayName of the ApiEndpoint to find (set by operationId from OpenAPI schema). + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=displayName") + private String displayName; + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public FindApiEndpointRequest( + String apiID, + String displayName, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(displayName, "displayName"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.displayName = displayName; + this.versionID = versionID; + } + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The displayName of the ApiEndpoint to find (set by operationId from OpenAPI schema). + */ + @JsonIgnore + public String displayName() { + return displayName; + } + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + public FindApiEndpointRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The displayName of the ApiEndpoint to find (set by operationId from OpenAPI schema). + */ + public FindApiEndpointRequest withDisplayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + public FindApiEndpointRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FindApiEndpointRequest other = (FindApiEndpointRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.displayName, other.displayName) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + displayName, + versionID); + } + + @Override + public String toString() { + return Utils.toString(FindApiEndpointRequest.class, + "apiID", apiID, + "displayName", displayName, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String displayName; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The displayName of the ApiEndpoint to find (set by operationId from OpenAPI schema). + */ + public Builder displayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public FindApiEndpointRequest build() { + return new FindApiEndpointRequest( + apiID, + displayName, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointRequestBuilder.java new file mode 100644 index 00000000..be5b5177 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class FindApiEndpointRequestBuilder { + + private FindApiEndpointRequest request; + private final SDKMethodInterfaces.MethodCallFindApiEndpoint sdk; + + public FindApiEndpointRequestBuilder(SDKMethodInterfaces.MethodCallFindApiEndpoint sdk) { + this.sdk = sdk; + } + + public FindApiEndpointRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.FindApiEndpointRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public FindApiEndpointResponse call() throws Exception { + + return sdk.findApiEndpoint( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointResponse.java new file mode 100644 index 00000000..8058c0f0 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/FindApiEndpointResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.ApiEndpoint; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class FindApiEndpointResponse implements Response { + + /** + * OK + */ + private Optional apiEndpoint; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public FindApiEndpointResponse( + Optional apiEndpoint, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.apiEndpoint = apiEndpoint; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public FindApiEndpointResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional apiEndpoint() { + return (Optional) apiEndpoint; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public FindApiEndpointResponse withApiEndpoint(ApiEndpoint apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = Optional.ofNullable(apiEndpoint); + return this; + } + + /** + * OK + */ + public FindApiEndpointResponse withApiEndpoint(Optional apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = apiEndpoint; + return this; + } + + /** + * HTTP response content type for this operation + */ + public FindApiEndpointResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public FindApiEndpointResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public FindApiEndpointResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public FindApiEndpointResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public FindApiEndpointResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FindApiEndpointResponse other = (FindApiEndpointResponse) o; + return + Objects.deepEquals(this.apiEndpoint, other.apiEndpoint) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpoint, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(FindApiEndpointResponse.class, + "apiEndpoint", apiEndpoint, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional apiEndpoint = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder apiEndpoint(ApiEndpoint apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = Optional.ofNullable(apiEndpoint); + return this; + } + + /** + * OK + */ + public Builder apiEndpoint(Optional apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = apiEndpoint; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public FindApiEndpointResponse build() { + return new FindApiEndpointResponse( + apiEndpoint, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointRequest.java new file mode 100644 index 00000000..fa006965 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointRequest.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GenerateOpenApiSpecForApiEndpointRequest { + + /** + * The ID of the ApiEndpoint to generate an OpenAPI specification for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiEndpointID") + private String apiEndpointID; + + /** + * The ID of the Api to generate an OpenAPI specification for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api to generate an OpenAPI specification for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public GenerateOpenApiSpecForApiEndpointRequest( + String apiEndpointID, + String apiID, + String versionID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiEndpointID = apiEndpointID; + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The ID of the ApiEndpoint to generate an OpenAPI specification for. + */ + @JsonIgnore + public String apiEndpointID() { + return apiEndpointID; + } + + /** + * The ID of the Api to generate an OpenAPI specification for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api to generate an OpenAPI specification for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the ApiEndpoint to generate an OpenAPI specification for. + */ + public GenerateOpenApiSpecForApiEndpointRequest withApiEndpointID(String apiEndpointID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + this.apiEndpointID = apiEndpointID; + return this; + } + + /** + * The ID of the Api to generate an OpenAPI specification for. + */ + public GenerateOpenApiSpecForApiEndpointRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to generate an OpenAPI specification for. + */ + public GenerateOpenApiSpecForApiEndpointRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenerateOpenApiSpecForApiEndpointRequest other = (GenerateOpenApiSpecForApiEndpointRequest) o; + return + Objects.deepEquals(this.apiEndpointID, other.apiEndpointID) && + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpointID, + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(GenerateOpenApiSpecForApiEndpointRequest.class, + "apiEndpointID", apiEndpointID, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiEndpointID; + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the ApiEndpoint to generate an OpenAPI specification for. + */ + public Builder apiEndpointID(String apiEndpointID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + this.apiEndpointID = apiEndpointID; + return this; + } + + /** + * The ID of the Api to generate an OpenAPI specification for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to generate an OpenAPI specification for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public GenerateOpenApiSpecForApiEndpointRequest build() { + return new GenerateOpenApiSpecForApiEndpointRequest( + apiEndpointID, + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointRequestBuilder.java new file mode 100644 index 00000000..eaadc757 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GenerateOpenApiSpecForApiEndpointRequestBuilder { + + private GenerateOpenApiSpecForApiEndpointRequest request; + private final SDKMethodInterfaces.MethodCallGenerateOpenApiSpecForApiEndpoint sdk; + + public GenerateOpenApiSpecForApiEndpointRequestBuilder(SDKMethodInterfaces.MethodCallGenerateOpenApiSpecForApiEndpoint sdk) { + this.sdk = sdk; + } + + public GenerateOpenApiSpecForApiEndpointRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GenerateOpenApiSpecForApiEndpointResponse call() throws Exception { + + return sdk.generateOpenApiSpecForApiEndpoint( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointResponse.java new file mode 100644 index 00000000..424f8ee1 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecForApiEndpointResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.GenerateOpenApiSpecDiff; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GenerateOpenApiSpecForApiEndpointResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional generateOpenApiSpecDiff; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GenerateOpenApiSpecForApiEndpointResponse( + String contentType, + Optional error, + Optional generateOpenApiSpecDiff, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(generateOpenApiSpecDiff, "generateOpenApiSpecDiff"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.generateOpenApiSpecDiff = generateOpenApiSpecDiff; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GenerateOpenApiSpecForApiEndpointResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional generateOpenApiSpecDiff() { + return (Optional) generateOpenApiSpecDiff; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GenerateOpenApiSpecForApiEndpointResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GenerateOpenApiSpecForApiEndpointResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GenerateOpenApiSpecForApiEndpointResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GenerateOpenApiSpecForApiEndpointResponse withGenerateOpenApiSpecDiff(GenerateOpenApiSpecDiff generateOpenApiSpecDiff) { + Utils.checkNotNull(generateOpenApiSpecDiff, "generateOpenApiSpecDiff"); + this.generateOpenApiSpecDiff = Optional.ofNullable(generateOpenApiSpecDiff); + return this; + } + + /** + * OK + */ + public GenerateOpenApiSpecForApiEndpointResponse withGenerateOpenApiSpecDiff(Optional generateOpenApiSpecDiff) { + Utils.checkNotNull(generateOpenApiSpecDiff, "generateOpenApiSpecDiff"); + this.generateOpenApiSpecDiff = generateOpenApiSpecDiff; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GenerateOpenApiSpecForApiEndpointResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GenerateOpenApiSpecForApiEndpointResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenerateOpenApiSpecForApiEndpointResponse other = (GenerateOpenApiSpecForApiEndpointResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.generateOpenApiSpecDiff, other.generateOpenApiSpecDiff) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + generateOpenApiSpecDiff, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GenerateOpenApiSpecForApiEndpointResponse.class, + "contentType", contentType, + "error", error, + "generateOpenApiSpecDiff", generateOpenApiSpecDiff, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional generateOpenApiSpecDiff = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder generateOpenApiSpecDiff(GenerateOpenApiSpecDiff generateOpenApiSpecDiff) { + Utils.checkNotNull(generateOpenApiSpecDiff, "generateOpenApiSpecDiff"); + this.generateOpenApiSpecDiff = Optional.ofNullable(generateOpenApiSpecDiff); + return this; + } + + /** + * OK + */ + public Builder generateOpenApiSpecDiff(Optional generateOpenApiSpecDiff) { + Utils.checkNotNull(generateOpenApiSpecDiff, "generateOpenApiSpecDiff"); + this.generateOpenApiSpecDiff = generateOpenApiSpecDiff; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GenerateOpenApiSpecForApiEndpointResponse build() { + return new GenerateOpenApiSpecForApiEndpointResponse( + contentType, + error, + generateOpenApiSpecDiff, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecRequest.java new file mode 100644 index 00000000..b24a284f --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecRequest.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GenerateOpenApiSpecRequest { + + /** + * The ID of the Api to generate an OpenAPI specification for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api to generate an OpenAPI specification for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public GenerateOpenApiSpecRequest( + String apiID, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The ID of the Api to generate an OpenAPI specification for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api to generate an OpenAPI specification for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to generate an OpenAPI specification for. + */ + public GenerateOpenApiSpecRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to generate an OpenAPI specification for. + */ + public GenerateOpenApiSpecRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenerateOpenApiSpecRequest other = (GenerateOpenApiSpecRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(GenerateOpenApiSpecRequest.class, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to generate an OpenAPI specification for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to generate an OpenAPI specification for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public GenerateOpenApiSpecRequest build() { + return new GenerateOpenApiSpecRequest( + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecRequestBuilder.java new file mode 100644 index 00000000..88b2745e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GenerateOpenApiSpecRequestBuilder { + + private GenerateOpenApiSpecRequest request; + private final SDKMethodInterfaces.MethodCallGenerateOpenApiSpec sdk; + + public GenerateOpenApiSpecRequestBuilder(SDKMethodInterfaces.MethodCallGenerateOpenApiSpec sdk) { + this.sdk = sdk; + } + + public GenerateOpenApiSpecRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GenerateOpenApiSpecResponse call() throws Exception { + + return sdk.generateOpenApiSpec( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecResponse.java new file mode 100644 index 00000000..5ccc23c5 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateOpenApiSpecResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.GenerateOpenApiSpecDiff; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GenerateOpenApiSpecResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional generateOpenApiSpecDiff; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GenerateOpenApiSpecResponse( + String contentType, + Optional error, + Optional generateOpenApiSpecDiff, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(generateOpenApiSpecDiff, "generateOpenApiSpecDiff"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.generateOpenApiSpecDiff = generateOpenApiSpecDiff; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GenerateOpenApiSpecResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional generateOpenApiSpecDiff() { + return (Optional) generateOpenApiSpecDiff; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GenerateOpenApiSpecResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GenerateOpenApiSpecResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GenerateOpenApiSpecResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GenerateOpenApiSpecResponse withGenerateOpenApiSpecDiff(GenerateOpenApiSpecDiff generateOpenApiSpecDiff) { + Utils.checkNotNull(generateOpenApiSpecDiff, "generateOpenApiSpecDiff"); + this.generateOpenApiSpecDiff = Optional.ofNullable(generateOpenApiSpecDiff); + return this; + } + + /** + * OK + */ + public GenerateOpenApiSpecResponse withGenerateOpenApiSpecDiff(Optional generateOpenApiSpecDiff) { + Utils.checkNotNull(generateOpenApiSpecDiff, "generateOpenApiSpecDiff"); + this.generateOpenApiSpecDiff = generateOpenApiSpecDiff; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GenerateOpenApiSpecResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GenerateOpenApiSpecResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenerateOpenApiSpecResponse other = (GenerateOpenApiSpecResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.generateOpenApiSpecDiff, other.generateOpenApiSpecDiff) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + generateOpenApiSpecDiff, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GenerateOpenApiSpecResponse.class, + "contentType", contentType, + "error", error, + "generateOpenApiSpecDiff", generateOpenApiSpecDiff, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional generateOpenApiSpecDiff = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder generateOpenApiSpecDiff(GenerateOpenApiSpecDiff generateOpenApiSpecDiff) { + Utils.checkNotNull(generateOpenApiSpecDiff, "generateOpenApiSpecDiff"); + this.generateOpenApiSpecDiff = Optional.ofNullable(generateOpenApiSpecDiff); + return this; + } + + /** + * OK + */ + public Builder generateOpenApiSpecDiff(Optional generateOpenApiSpecDiff) { + Utils.checkNotNull(generateOpenApiSpecDiff, "generateOpenApiSpecDiff"); + this.generateOpenApiSpecDiff = generateOpenApiSpecDiff; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GenerateOpenApiSpecResponse build() { + return new GenerateOpenApiSpecResponse( + contentType, + error, + generateOpenApiSpecDiff, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointRequest.java new file mode 100644 index 00000000..70bb4441 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointRequest.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GeneratePostmanCollectionForApiEndpointRequest { + + /** + * The ID of the ApiEndpoint to generate a Postman collection for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiEndpointID") + private String apiEndpointID; + + /** + * The ID of the Api to generate a Postman collection for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api to generate a Postman collection for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public GeneratePostmanCollectionForApiEndpointRequest( + String apiEndpointID, + String apiID, + String versionID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiEndpointID = apiEndpointID; + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The ID of the ApiEndpoint to generate a Postman collection for. + */ + @JsonIgnore + public String apiEndpointID() { + return apiEndpointID; + } + + /** + * The ID of the Api to generate a Postman collection for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api to generate a Postman collection for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the ApiEndpoint to generate a Postman collection for. + */ + public GeneratePostmanCollectionForApiEndpointRequest withApiEndpointID(String apiEndpointID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + this.apiEndpointID = apiEndpointID; + return this; + } + + /** + * The ID of the Api to generate a Postman collection for. + */ + public GeneratePostmanCollectionForApiEndpointRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to generate a Postman collection for. + */ + public GeneratePostmanCollectionForApiEndpointRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePostmanCollectionForApiEndpointRequest other = (GeneratePostmanCollectionForApiEndpointRequest) o; + return + Objects.deepEquals(this.apiEndpointID, other.apiEndpointID) && + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpointID, + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(GeneratePostmanCollectionForApiEndpointRequest.class, + "apiEndpointID", apiEndpointID, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiEndpointID; + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the ApiEndpoint to generate a Postman collection for. + */ + public Builder apiEndpointID(String apiEndpointID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + this.apiEndpointID = apiEndpointID; + return this; + } + + /** + * The ID of the Api to generate a Postman collection for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to generate a Postman collection for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public GeneratePostmanCollectionForApiEndpointRequest build() { + return new GeneratePostmanCollectionForApiEndpointRequest( + apiEndpointID, + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointRequestBuilder.java new file mode 100644 index 00000000..6621d30c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GeneratePostmanCollectionForApiEndpointRequestBuilder { + + private GeneratePostmanCollectionForApiEndpointRequest request; + private final SDKMethodInterfaces.MethodCallGeneratePostmanCollectionForApiEndpoint sdk; + + public GeneratePostmanCollectionForApiEndpointRequestBuilder(SDKMethodInterfaces.MethodCallGeneratePostmanCollectionForApiEndpoint sdk) { + this.sdk = sdk; + } + + public GeneratePostmanCollectionForApiEndpointRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GeneratePostmanCollectionForApiEndpointResponse call() throws Exception { + + return sdk.generatePostmanCollectionForApiEndpoint( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointResponse.java new file mode 100644 index 00000000..3f4f307d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionForApiEndpointResponse.java @@ -0,0 +1,311 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GeneratePostmanCollectionForApiEndpointResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional postmanCollection; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GeneratePostmanCollectionForApiEndpointResponse( + String contentType, + Optional error, + Optional postmanCollection, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(postmanCollection, "postmanCollection"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.postmanCollection = postmanCollection; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GeneratePostmanCollectionForApiEndpointResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional postmanCollection() { + return (Optional) postmanCollection; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GeneratePostmanCollectionForApiEndpointResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GeneratePostmanCollectionForApiEndpointResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GeneratePostmanCollectionForApiEndpointResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GeneratePostmanCollectionForApiEndpointResponse withPostmanCollection(InputStream postmanCollection) { + Utils.checkNotNull(postmanCollection, "postmanCollection"); + this.postmanCollection = Optional.ofNullable(postmanCollection); + return this; + } + + /** + * OK + */ + public GeneratePostmanCollectionForApiEndpointResponse withPostmanCollection(Optional postmanCollection) { + Utils.checkNotNull(postmanCollection, "postmanCollection"); + this.postmanCollection = postmanCollection; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GeneratePostmanCollectionForApiEndpointResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GeneratePostmanCollectionForApiEndpointResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePostmanCollectionForApiEndpointResponse other = (GeneratePostmanCollectionForApiEndpointResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.postmanCollection, other.postmanCollection) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + postmanCollection, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GeneratePostmanCollectionForApiEndpointResponse.class, + "contentType", contentType, + "error", error, + "postmanCollection", postmanCollection, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional postmanCollection = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder postmanCollection(InputStream postmanCollection) { + Utils.checkNotNull(postmanCollection, "postmanCollection"); + this.postmanCollection = Optional.ofNullable(postmanCollection); + return this; + } + + /** + * OK + */ + public Builder postmanCollection(Optional postmanCollection) { + Utils.checkNotNull(postmanCollection, "postmanCollection"); + this.postmanCollection = postmanCollection; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GeneratePostmanCollectionForApiEndpointResponse build() { + return new GeneratePostmanCollectionForApiEndpointResponse( + contentType, + error, + postmanCollection, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionRequest.java new file mode 100644 index 00000000..63e7970b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionRequest.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GeneratePostmanCollectionRequest { + + /** + * The ID of the Api to generate a Postman collection for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api to generate a Postman collection for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public GeneratePostmanCollectionRequest( + String apiID, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The ID of the Api to generate a Postman collection for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api to generate a Postman collection for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to generate a Postman collection for. + */ + public GeneratePostmanCollectionRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to generate a Postman collection for. + */ + public GeneratePostmanCollectionRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePostmanCollectionRequest other = (GeneratePostmanCollectionRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(GeneratePostmanCollectionRequest.class, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to generate a Postman collection for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to generate a Postman collection for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public GeneratePostmanCollectionRequest build() { + return new GeneratePostmanCollectionRequest( + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionRequestBuilder.java new file mode 100644 index 00000000..705c6e4b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GeneratePostmanCollectionRequestBuilder { + + private GeneratePostmanCollectionRequest request; + private final SDKMethodInterfaces.MethodCallGeneratePostmanCollection sdk; + + public GeneratePostmanCollectionRequestBuilder(SDKMethodInterfaces.MethodCallGeneratePostmanCollection sdk) { + this.sdk = sdk; + } + + public GeneratePostmanCollectionRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GeneratePostmanCollectionResponse call() throws Exception { + + return sdk.generatePostmanCollection( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionResponse.java new file mode 100644 index 00000000..aec87eb5 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GeneratePostmanCollectionResponse.java @@ -0,0 +1,311 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GeneratePostmanCollectionResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional postmanCollection; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GeneratePostmanCollectionResponse( + String contentType, + Optional error, + Optional postmanCollection, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(postmanCollection, "postmanCollection"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.postmanCollection = postmanCollection; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GeneratePostmanCollectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional postmanCollection() { + return (Optional) postmanCollection; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GeneratePostmanCollectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GeneratePostmanCollectionResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GeneratePostmanCollectionResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GeneratePostmanCollectionResponse withPostmanCollection(InputStream postmanCollection) { + Utils.checkNotNull(postmanCollection, "postmanCollection"); + this.postmanCollection = Optional.ofNullable(postmanCollection); + return this; + } + + /** + * OK + */ + public GeneratePostmanCollectionResponse withPostmanCollection(Optional postmanCollection) { + Utils.checkNotNull(postmanCollection, "postmanCollection"); + this.postmanCollection = postmanCollection; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GeneratePostmanCollectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GeneratePostmanCollectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePostmanCollectionResponse other = (GeneratePostmanCollectionResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.postmanCollection, other.postmanCollection) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + postmanCollection, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GeneratePostmanCollectionResponse.class, + "contentType", contentType, + "error", error, + "postmanCollection", postmanCollection, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional postmanCollection = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder postmanCollection(InputStream postmanCollection) { + Utils.checkNotNull(postmanCollection, "postmanCollection"); + this.postmanCollection = Optional.ofNullable(postmanCollection); + return this; + } + + /** + * OK + */ + public Builder postmanCollection(Optional postmanCollection) { + Utils.checkNotNull(postmanCollection, "postmanCollection"); + this.postmanCollection = postmanCollection; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GeneratePostmanCollectionResponse build() { + return new GeneratePostmanCollectionResponse( + contentType, + error, + postmanCollection, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionRequest.java new file mode 100644 index 00000000..547ea19d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionRequest.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GenerateRequestPostmanCollectionRequest { + + /** + * The ID of the request to retrieve. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=requestID") + private String requestID; + + @JsonCreator + public GenerateRequestPostmanCollectionRequest( + String requestID) { + Utils.checkNotNull(requestID, "requestID"); + this.requestID = requestID; + } + + /** + * The ID of the request to retrieve. + */ + @JsonIgnore + public String requestID() { + return requestID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the request to retrieve. + */ + public GenerateRequestPostmanCollectionRequest withRequestID(String requestID) { + Utils.checkNotNull(requestID, "requestID"); + this.requestID = requestID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenerateRequestPostmanCollectionRequest other = (GenerateRequestPostmanCollectionRequest) o; + return + Objects.deepEquals(this.requestID, other.requestID); + } + + @Override + public int hashCode() { + return Objects.hash( + requestID); + } + + @Override + public String toString() { + return Utils.toString(GenerateRequestPostmanCollectionRequest.class, + "requestID", requestID); + } + + public final static class Builder { + + private String requestID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the request to retrieve. + */ + public Builder requestID(String requestID) { + Utils.checkNotNull(requestID, "requestID"); + this.requestID = requestID; + return this; + } + + public GenerateRequestPostmanCollectionRequest build() { + return new GenerateRequestPostmanCollectionRequest( + requestID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionRequestBuilder.java new file mode 100644 index 00000000..6154e338 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GenerateRequestPostmanCollectionRequestBuilder { + + private GenerateRequestPostmanCollectionRequest request; + private final SDKMethodInterfaces.MethodCallGenerateRequestPostmanCollection sdk; + + public GenerateRequestPostmanCollectionRequestBuilder(SDKMethodInterfaces.MethodCallGenerateRequestPostmanCollection sdk) { + this.sdk = sdk; + } + + public GenerateRequestPostmanCollectionRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GenerateRequestPostmanCollectionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GenerateRequestPostmanCollectionResponse call() throws Exception { + + return sdk.generateRequestPostmanCollection( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionResponse.java new file mode 100644 index 00000000..cfed1d30 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GenerateRequestPostmanCollectionResponse.java @@ -0,0 +1,311 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GenerateRequestPostmanCollectionResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional postmanCollection; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GenerateRequestPostmanCollectionResponse( + String contentType, + Optional error, + Optional postmanCollection, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(postmanCollection, "postmanCollection"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.postmanCollection = postmanCollection; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GenerateRequestPostmanCollectionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional postmanCollection() { + return (Optional) postmanCollection; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GenerateRequestPostmanCollectionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GenerateRequestPostmanCollectionResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GenerateRequestPostmanCollectionResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GenerateRequestPostmanCollectionResponse withPostmanCollection(InputStream postmanCollection) { + Utils.checkNotNull(postmanCollection, "postmanCollection"); + this.postmanCollection = Optional.ofNullable(postmanCollection); + return this; + } + + /** + * OK + */ + public GenerateRequestPostmanCollectionResponse withPostmanCollection(Optional postmanCollection) { + Utils.checkNotNull(postmanCollection, "postmanCollection"); + this.postmanCollection = postmanCollection; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GenerateRequestPostmanCollectionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GenerateRequestPostmanCollectionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenerateRequestPostmanCollectionResponse other = (GenerateRequestPostmanCollectionResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.postmanCollection, other.postmanCollection) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + postmanCollection, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GenerateRequestPostmanCollectionResponse.class, + "contentType", contentType, + "error", error, + "postmanCollection", postmanCollection, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional postmanCollection = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder postmanCollection(InputStream postmanCollection) { + Utils.checkNotNull(postmanCollection, "postmanCollection"); + this.postmanCollection = Optional.ofNullable(postmanCollection); + return this; + } + + /** + * OK + */ + public Builder postmanCollection(Optional postmanCollection) { + Utils.checkNotNull(postmanCollection, "postmanCollection"); + this.postmanCollection = postmanCollection; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GenerateRequestPostmanCollectionResponse build() { + return new GenerateRequestPostmanCollectionResponse( + contentType, + error, + postmanCollection, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenRequest.java new file mode 100644 index 00000000..75045f27 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenRequest.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetAccessTokenRequest { + + /** + * The workspace ID + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=workspace_id") + private String workspaceId; + + @JsonCreator + public GetAccessTokenRequest( + String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + } + + /** + * The workspace ID + */ + @JsonIgnore + public String workspaceId() { + return workspaceId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The workspace ID + */ + public GetAccessTokenRequest withWorkspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAccessTokenRequest other = (GetAccessTokenRequest) o; + return + Objects.deepEquals(this.workspaceId, other.workspaceId); + } + + @Override + public int hashCode() { + return Objects.hash( + workspaceId); + } + + @Override + public String toString() { + return Utils.toString(GetAccessTokenRequest.class, + "workspaceId", workspaceId); + } + + public final static class Builder { + + private String workspaceId; + + private Builder() { + // force use of static builder() method + } + + /** + * The workspace ID + */ + public Builder workspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + public GetAccessTokenRequest build() { + return new GetAccessTokenRequest( + workspaceId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenRequestBuilder.java new file mode 100644 index 00000000..cb2530b6 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetAccessTokenRequestBuilder { + + private GetAccessTokenRequest request; + private final SDKMethodInterfaces.MethodCallGetAccessToken sdk; + + public GetAccessTokenRequestBuilder(SDKMethodInterfaces.MethodCallGetAccessToken sdk) { + this.sdk = sdk; + } + + public GetAccessTokenRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetAccessTokenRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetAccessTokenResponse call() throws Exception { + + return sdk.getAccessToken( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenResponse.java new file mode 100644 index 00000000..071f9918 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAccessTokenResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.AccessToken; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetAccessTokenResponse implements Response { + + /** + * OK + */ + private Optional accessToken; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetAccessTokenResponse( + Optional accessToken, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(accessToken, "accessToken"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.accessToken = accessToken; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetAccessTokenResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accessToken() { + return (Optional) accessToken; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public GetAccessTokenResponse withAccessToken(AccessToken accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = Optional.ofNullable(accessToken); + return this; + } + + /** + * OK + */ + public GetAccessTokenResponse withAccessToken(Optional accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; + return this; + } + + /** + * HTTP response content type for this operation + */ + public GetAccessTokenResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetAccessTokenResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetAccessTokenResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAccessTokenResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAccessTokenResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAccessTokenResponse other = (GetAccessTokenResponse) o; + return + Objects.deepEquals(this.accessToken, other.accessToken) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + accessToken, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetAccessTokenResponse.class, + "accessToken", accessToken, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional accessToken = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder accessToken(AccessToken accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = Optional.ofNullable(accessToken); + return this; + } + + /** + * OK + */ + public Builder accessToken(Optional accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetAccessTokenResponse build() { + return new GetAccessTokenResponse( + accessToken, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionRequest.java new file mode 100644 index 00000000..7c6abe39 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionRequest.java @@ -0,0 +1,184 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class GetActionRequest { + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=org") + private String org; + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=repo") + private String repo; + + /** + * The targetName of the workflow target. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=targetName") + private Optional targetName; + + @JsonCreator + public GetActionRequest( + String org, + String repo, + Optional targetName) { + Utils.checkNotNull(org, "org"); + Utils.checkNotNull(repo, "repo"); + Utils.checkNotNull(targetName, "targetName"); + this.org = org; + this.repo = repo; + this.targetName = targetName; + } + + public GetActionRequest( + String org, + String repo) { + this(org, repo, Optional.empty()); + } + + @JsonIgnore + public String org() { + return org; + } + + @JsonIgnore + public String repo() { + return repo; + } + + /** + * The targetName of the workflow target. + */ + @JsonIgnore + public Optional targetName() { + return targetName; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetActionRequest withOrg(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + public GetActionRequest withRepo(String repo) { + Utils.checkNotNull(repo, "repo"); + this.repo = repo; + return this; + } + + /** + * The targetName of the workflow target. + */ + public GetActionRequest withTargetName(String targetName) { + Utils.checkNotNull(targetName, "targetName"); + this.targetName = Optional.ofNullable(targetName); + return this; + } + + /** + * The targetName of the workflow target. + */ + public GetActionRequest withTargetName(Optional targetName) { + Utils.checkNotNull(targetName, "targetName"); + this.targetName = targetName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetActionRequest other = (GetActionRequest) o; + return + Objects.deepEquals(this.org, other.org) && + Objects.deepEquals(this.repo, other.repo) && + Objects.deepEquals(this.targetName, other.targetName); + } + + @Override + public int hashCode() { + return Objects.hash( + org, + repo, + targetName); + } + + @Override + public String toString() { + return Utils.toString(GetActionRequest.class, + "org", org, + "repo", repo, + "targetName", targetName); + } + + public final static class Builder { + + private String org; + + private String repo; + + private Optional targetName = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder org(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + public Builder repo(String repo) { + Utils.checkNotNull(repo, "repo"); + this.repo = repo; + return this; + } + + /** + * The targetName of the workflow target. + */ + public Builder targetName(String targetName) { + Utils.checkNotNull(targetName, "targetName"); + this.targetName = Optional.ofNullable(targetName); + return this; + } + + /** + * The targetName of the workflow target. + */ + public Builder targetName(Optional targetName) { + Utils.checkNotNull(targetName, "targetName"); + this.targetName = targetName; + return this; + } + + public GetActionRequest build() { + return new GetActionRequest( + org, + repo, + targetName); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionRequestBuilder.java new file mode 100644 index 00000000..b3ad0efc --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetActionRequestBuilder { + + private GetActionRequest request; + private final SDKMethodInterfaces.MethodCallGetAction sdk; + + public GetActionRequestBuilder(SDKMethodInterfaces.MethodCallGetAction sdk) { + this.sdk = sdk; + } + + public GetActionRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetActionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetActionResponse call() throws Exception { + + return sdk.getAction( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionResponse.java new file mode 100644 index 00000000..88e5a3ff --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetActionResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubGetActionResponse; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetActionResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional githubGetActionResponse; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetActionResponse( + String contentType, + Optional error, + Optional githubGetActionResponse, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(githubGetActionResponse, "githubGetActionResponse"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.githubGetActionResponse = githubGetActionResponse; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetActionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional githubGetActionResponse() { + return (Optional) githubGetActionResponse; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetActionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetActionResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetActionResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GetActionResponse withGithubGetActionResponse(GithubGetActionResponse githubGetActionResponse) { + Utils.checkNotNull(githubGetActionResponse, "githubGetActionResponse"); + this.githubGetActionResponse = Optional.ofNullable(githubGetActionResponse); + return this; + } + + /** + * OK + */ + public GetActionResponse withGithubGetActionResponse(Optional githubGetActionResponse) { + Utils.checkNotNull(githubGetActionResponse, "githubGetActionResponse"); + this.githubGetActionResponse = githubGetActionResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetActionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetActionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetActionResponse other = (GetActionResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.githubGetActionResponse, other.githubGetActionResponse) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + githubGetActionResponse, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetActionResponse.class, + "contentType", contentType, + "error", error, + "githubGetActionResponse", githubGetActionResponse, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional githubGetActionResponse = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder githubGetActionResponse(GithubGetActionResponse githubGetActionResponse) { + Utils.checkNotNull(githubGetActionResponse, "githubGetActionResponse"); + this.githubGetActionResponse = Optional.ofNullable(githubGetActionResponse); + return this; + } + + /** + * OK + */ + public Builder githubGetActionResponse(Optional githubGetActionResponse) { + Utils.checkNotNull(githubGetActionResponse, "githubGetActionResponse"); + this.githubGetActionResponse = githubGetActionResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetActionResponse build() { + return new GetActionResponse( + contentType, + error, + githubGetActionResponse, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsRequest.java new file mode 100644 index 00000000..eb249f7b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsRequest.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetAllApiEndpointsRequest { + + /** + * The ID of the Api to retrieve ApiEndpoints for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + @JsonCreator + public GetAllApiEndpointsRequest( + String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + } + + /** + * The ID of the Api to retrieve ApiEndpoints for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to retrieve ApiEndpoints for. + */ + public GetAllApiEndpointsRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllApiEndpointsRequest other = (GetAllApiEndpointsRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID); + } + + @Override + public String toString() { + return Utils.toString(GetAllApiEndpointsRequest.class, + "apiID", apiID); + } + + public final static class Builder { + + private String apiID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to retrieve ApiEndpoints for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + public GetAllApiEndpointsRequest build() { + return new GetAllApiEndpointsRequest( + apiID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsRequestBuilder.java new file mode 100644 index 00000000..dc6a44e1 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetAllApiEndpointsRequestBuilder { + + private GetAllApiEndpointsRequest request; + private final SDKMethodInterfaces.MethodCallGetAllApiEndpoints sdk; + + public GetAllApiEndpointsRequestBuilder(SDKMethodInterfaces.MethodCallGetAllApiEndpoints sdk) { + this.sdk = sdk; + } + + public GetAllApiEndpointsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiEndpointsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetAllApiEndpointsResponse call() throws Exception { + + return sdk.getAllApiEndpoints( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsResponse.java new file mode 100644 index 00000000..62876613 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiEndpointsResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.ApiEndpoint; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetAllApiEndpointsResponse implements Response { + + /** + * OK + */ + private Optional> apiEndpoints; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetAllApiEndpointsResponse( + Optional> apiEndpoints, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(apiEndpoints, "apiEndpoints"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.apiEndpoints = apiEndpoints; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetAllApiEndpointsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> apiEndpoints() { + return (Optional>) apiEndpoints; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public GetAllApiEndpointsResponse withApiEndpoints(List apiEndpoints) { + Utils.checkNotNull(apiEndpoints, "apiEndpoints"); + this.apiEndpoints = Optional.ofNullable(apiEndpoints); + return this; + } + + /** + * OK + */ + public GetAllApiEndpointsResponse withApiEndpoints(Optional> apiEndpoints) { + Utils.checkNotNull(apiEndpoints, "apiEndpoints"); + this.apiEndpoints = apiEndpoints; + return this; + } + + /** + * HTTP response content type for this operation + */ + public GetAllApiEndpointsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetAllApiEndpointsResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetAllApiEndpointsResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllApiEndpointsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllApiEndpointsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllApiEndpointsResponse other = (GetAllApiEndpointsResponse) o; + return + Objects.deepEquals(this.apiEndpoints, other.apiEndpoints) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpoints, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetAllApiEndpointsResponse.class, + "apiEndpoints", apiEndpoints, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> apiEndpoints = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder apiEndpoints(List apiEndpoints) { + Utils.checkNotNull(apiEndpoints, "apiEndpoints"); + this.apiEndpoints = Optional.ofNullable(apiEndpoints); + return this; + } + + /** + * OK + */ + public Builder apiEndpoints(Optional> apiEndpoints) { + Utils.checkNotNull(apiEndpoints, "apiEndpoints"); + this.apiEndpoints = apiEndpoints; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetAllApiEndpointsResponse build() { + return new GetAllApiEndpointsResponse( + apiEndpoints, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsRequest.java new file mode 100644 index 00000000..64a15e71 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsRequest.java @@ -0,0 +1,230 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + + +public class GetAllApiVersionsRequest { + + /** + * The ID of the Api to retrieve. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * Metadata to filter Apis on + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=metadata") + private Optional>> metadata; + + /** + * Configuration for filter operations + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=op") + private Optional op; + + @JsonCreator + public GetAllApiVersionsRequest( + String apiID, + Optional>> metadata, + Optional op) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(metadata, "metadata"); + Utils.checkNotNull(op, "op"); + this.apiID = apiID; + this.metadata = metadata; + this.op = op; + } + + public GetAllApiVersionsRequest( + String apiID) { + this(apiID, Optional.empty(), Optional.empty()); + } + + /** + * The ID of the Api to retrieve. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * Metadata to filter Apis on + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional>> metadata() { + return (Optional>>) metadata; + } + + /** + * Configuration for filter operations + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional op() { + return (Optional) op; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to retrieve. + */ + public GetAllApiVersionsRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * Metadata to filter Apis on + */ + public GetAllApiVersionsRequest withMetadata(Map> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + /** + * Metadata to filter Apis on + */ + public GetAllApiVersionsRequest withMetadata(Optional>> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + /** + * Configuration for filter operations + */ + public GetAllApiVersionsRequest withOp(Op op) { + Utils.checkNotNull(op, "op"); + this.op = Optional.ofNullable(op); + return this; + } + + /** + * Configuration for filter operations + */ + public GetAllApiVersionsRequest withOp(Optional op) { + Utils.checkNotNull(op, "op"); + this.op = op; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllApiVersionsRequest other = (GetAllApiVersionsRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.metadata, other.metadata) && + Objects.deepEquals(this.op, other.op); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + metadata, + op); + } + + @Override + public String toString() { + return Utils.toString(GetAllApiVersionsRequest.class, + "apiID", apiID, + "metadata", metadata, + "op", op); + } + + public final static class Builder { + + private String apiID; + + private Optional>> metadata = Optional.empty(); + + private Optional op = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to retrieve. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * Metadata to filter Apis on + */ + public Builder metadata(Map> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + /** + * Metadata to filter Apis on + */ + public Builder metadata(Optional>> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + /** + * Configuration for filter operations + */ + public Builder op(Op op) { + Utils.checkNotNull(op, "op"); + this.op = Optional.ofNullable(op); + return this; + } + + /** + * Configuration for filter operations + */ + public Builder op(Optional op) { + Utils.checkNotNull(op, "op"); + this.op = op; + return this; + } + + public GetAllApiVersionsRequest build() { + return new GetAllApiVersionsRequest( + apiID, + metadata, + op); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsRequestBuilder.java new file mode 100644 index 00000000..707f2ebd --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetAllApiVersionsRequestBuilder { + + private GetAllApiVersionsRequest request; + private final SDKMethodInterfaces.MethodCallGetAllApiVersions sdk; + + public GetAllApiVersionsRequestBuilder(SDKMethodInterfaces.MethodCallGetAllApiVersions sdk) { + this.sdk = sdk; + } + + public GetAllApiVersionsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiVersionsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetAllApiVersionsResponse call() throws Exception { + + return sdk.getAllApiVersions( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsResponse.java new file mode 100644 index 00000000..225853ab --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllApiVersionsResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.Api; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetAllApiVersionsResponse implements Response { + + /** + * OK + */ + private Optional> apis; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetAllApiVersionsResponse( + Optional> apis, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(apis, "apis"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.apis = apis; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetAllApiVersionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> apis() { + return (Optional>) apis; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public GetAllApiVersionsResponse withApis(List apis) { + Utils.checkNotNull(apis, "apis"); + this.apis = Optional.ofNullable(apis); + return this; + } + + /** + * OK + */ + public GetAllApiVersionsResponse withApis(Optional> apis) { + Utils.checkNotNull(apis, "apis"); + this.apis = apis; + return this; + } + + /** + * HTTP response content type for this operation + */ + public GetAllApiVersionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetAllApiVersionsResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetAllApiVersionsResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllApiVersionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllApiVersionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllApiVersionsResponse other = (GetAllApiVersionsResponse) o; + return + Objects.deepEquals(this.apis, other.apis) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + apis, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetAllApiVersionsResponse.class, + "apis", apis, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> apis = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder apis(List apis) { + Utils.checkNotNull(apis, "apis"); + this.apis = Optional.ofNullable(apis); + return this; + } + + /** + * OK + */ + public Builder apis(Optional> apis) { + Utils.checkNotNull(apis, "apis"); + this.apis = apis; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetAllApiVersionsResponse build() { + return new GetAllApiVersionsResponse( + apis, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsRequest.java new file mode 100644 index 00000000..8f53c7ea --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsRequest.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetAllForVersionApiEndpointsRequest { + + /** + * The ID of the Api to retrieve ApiEndpoints for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api to retrieve ApiEndpoints for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public GetAllForVersionApiEndpointsRequest( + String apiID, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The ID of the Api to retrieve ApiEndpoints for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api to retrieve ApiEndpoints for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to retrieve ApiEndpoints for. + */ + public GetAllForVersionApiEndpointsRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to retrieve ApiEndpoints for. + */ + public GetAllForVersionApiEndpointsRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllForVersionApiEndpointsRequest other = (GetAllForVersionApiEndpointsRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(GetAllForVersionApiEndpointsRequest.class, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to retrieve ApiEndpoints for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to retrieve ApiEndpoints for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public GetAllForVersionApiEndpointsRequest build() { + return new GetAllForVersionApiEndpointsRequest( + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsRequestBuilder.java new file mode 100644 index 00000000..6cc4532a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetAllForVersionApiEndpointsRequestBuilder { + + private GetAllForVersionApiEndpointsRequest request; + private final SDKMethodInterfaces.MethodCallGetAllForVersionApiEndpoints sdk; + + public GetAllForVersionApiEndpointsRequestBuilder(SDKMethodInterfaces.MethodCallGetAllForVersionApiEndpoints sdk) { + this.sdk = sdk; + } + + public GetAllForVersionApiEndpointsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetAllForVersionApiEndpointsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetAllForVersionApiEndpointsResponse call() throws Exception { + + return sdk.getAllForVersionApiEndpoints( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsResponse.java new file mode 100644 index 00000000..78827bbd --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetAllForVersionApiEndpointsResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.ApiEndpoint; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetAllForVersionApiEndpointsResponse implements Response { + + /** + * OK + */ + private Optional> apiEndpoints; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetAllForVersionApiEndpointsResponse( + Optional> apiEndpoints, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(apiEndpoints, "apiEndpoints"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.apiEndpoints = apiEndpoints; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetAllForVersionApiEndpointsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> apiEndpoints() { + return (Optional>) apiEndpoints; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public GetAllForVersionApiEndpointsResponse withAPIEndpoints(List apiEndpoints) { + Utils.checkNotNull(apiEndpoints, "apiEndpoints"); + this.apiEndpoints = Optional.ofNullable(apiEndpoints); + return this; + } + + /** + * OK + */ + public GetAllForVersionApiEndpointsResponse withAPIEndpoints(Optional> apiEndpoints) { + Utils.checkNotNull(apiEndpoints, "apiEndpoints"); + this.apiEndpoints = apiEndpoints; + return this; + } + + /** + * HTTP response content type for this operation + */ + public GetAllForVersionApiEndpointsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetAllForVersionApiEndpointsResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetAllForVersionApiEndpointsResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetAllForVersionApiEndpointsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetAllForVersionApiEndpointsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAllForVersionApiEndpointsResponse other = (GetAllForVersionApiEndpointsResponse) o; + return + Objects.deepEquals(this.apiEndpoints, other.apiEndpoints) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpoints, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetAllForVersionApiEndpointsResponse.class, + "apiEndpoints", apiEndpoints, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> apiEndpoints = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder apiEndpoints(List apiEndpoints) { + Utils.checkNotNull(apiEndpoints, "apiEndpoints"); + this.apiEndpoints = Optional.ofNullable(apiEndpoints); + return this; + } + + /** + * OK + */ + public Builder apiEndpoints(Optional> apiEndpoints) { + Utils.checkNotNull(apiEndpoints, "apiEndpoints"); + this.apiEndpoints = apiEndpoints; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetAllForVersionApiEndpointsResponse build() { + return new GetAllForVersionApiEndpointsResponse( + apiEndpoints, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointRequest.java new file mode 100644 index 00000000..082986b4 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointRequest.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetApiEndpointRequest { + + /** + * The ID of the ApiEndpoint to retrieve. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiEndpointID") + private String apiEndpointID; + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public GetApiEndpointRequest( + String apiEndpointID, + String apiID, + String versionID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiEndpointID = apiEndpointID; + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The ID of the ApiEndpoint to retrieve. + */ + @JsonIgnore + public String apiEndpointID() { + return apiEndpointID; + } + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the ApiEndpoint to retrieve. + */ + public GetApiEndpointRequest withApiEndpointID(String apiEndpointID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + this.apiEndpointID = apiEndpointID; + return this; + } + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + public GetApiEndpointRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + public GetApiEndpointRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiEndpointRequest other = (GetApiEndpointRequest) o; + return + Objects.deepEquals(this.apiEndpointID, other.apiEndpointID) && + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpointID, + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(GetApiEndpointRequest.class, + "apiEndpointID", apiEndpointID, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiEndpointID; + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the ApiEndpoint to retrieve. + */ + public Builder apiEndpointID(String apiEndpointID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + this.apiEndpointID = apiEndpointID; + return this; + } + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public GetApiEndpointRequest build() { + return new GetApiEndpointRequest( + apiEndpointID, + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointRequestBuilder.java new file mode 100644 index 00000000..c9a8bff2 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetApiEndpointRequestBuilder { + + private GetApiEndpointRequest request; + private final SDKMethodInterfaces.MethodCallGetApiEndpoint sdk; + + public GetApiEndpointRequestBuilder(SDKMethodInterfaces.MethodCallGetApiEndpoint sdk) { + this.sdk = sdk; + } + + public GetApiEndpointRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetApiEndpointRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetApiEndpointResponse call() throws Exception { + + return sdk.getApiEndpoint( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointResponse.java new file mode 100644 index 00000000..b231ce4b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApiEndpointResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.ApiEndpoint; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetApiEndpointResponse implements Response { + + /** + * OK + */ + private Optional apiEndpoint; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetApiEndpointResponse( + Optional apiEndpoint, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.apiEndpoint = apiEndpoint; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetApiEndpointResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional apiEndpoint() { + return (Optional) apiEndpoint; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public GetApiEndpointResponse withApiEndpoint(ApiEndpoint apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = Optional.ofNullable(apiEndpoint); + return this; + } + + /** + * OK + */ + public GetApiEndpointResponse withApiEndpoint(Optional apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = apiEndpoint; + return this; + } + + /** + * HTTP response content type for this operation + */ + public GetApiEndpointResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetApiEndpointResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetApiEndpointResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetApiEndpointResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetApiEndpointResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiEndpointResponse other = (GetApiEndpointResponse) o; + return + Objects.deepEquals(this.apiEndpoint, other.apiEndpoint) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpoint, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetApiEndpointResponse.class, + "apiEndpoint", apiEndpoint, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional apiEndpoint = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder apiEndpoint(ApiEndpoint apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = Optional.ofNullable(apiEndpoint); + return this; + } + + /** + * OK + */ + public Builder apiEndpoint(Optional apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = apiEndpoint; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetApiEndpointResponse build() { + return new GetApiEndpointResponse( + apiEndpoint, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisRequest.java new file mode 100644 index 00000000..2bebf945 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisRequest.java @@ -0,0 +1,188 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + + +public class GetApisRequest { + + /** + * Metadata to filter Apis on + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=metadata") + private Optional>> metadata; + + /** + * Configuration for filter operations + */ + @SpeakeasyMetadata("queryParam:style=deepObject,explode=true,name=op") + private Optional op; + + @JsonCreator + public GetApisRequest( + Optional>> metadata, + Optional op) { + Utils.checkNotNull(metadata, "metadata"); + Utils.checkNotNull(op, "op"); + this.metadata = metadata; + this.op = op; + } + + public GetApisRequest() { + this(Optional.empty(), Optional.empty()); + } + + /** + * Metadata to filter Apis on + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional>> metadata() { + return (Optional>>) metadata; + } + + /** + * Configuration for filter operations + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional op() { + return (Optional) op; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Metadata to filter Apis on + */ + public GetApisRequest withMetadata(Map> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + /** + * Metadata to filter Apis on + */ + public GetApisRequest withMetadata(Optional>> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + /** + * Configuration for filter operations + */ + public GetApisRequest withOp(QueryParamOp op) { + Utils.checkNotNull(op, "op"); + this.op = Optional.ofNullable(op); + return this; + } + + /** + * Configuration for filter operations + */ + public GetApisRequest withOp(Optional op) { + Utils.checkNotNull(op, "op"); + this.op = op; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApisRequest other = (GetApisRequest) o; + return + Objects.deepEquals(this.metadata, other.metadata) && + Objects.deepEquals(this.op, other.op); + } + + @Override + public int hashCode() { + return Objects.hash( + metadata, + op); + } + + @Override + public String toString() { + return Utils.toString(GetApisRequest.class, + "metadata", metadata, + "op", op); + } + + public final static class Builder { + + private Optional>> metadata = Optional.empty(); + + private Optional op = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Metadata to filter Apis on + */ + public Builder metadata(Map> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + /** + * Metadata to filter Apis on + */ + public Builder metadata(Optional>> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + /** + * Configuration for filter operations + */ + public Builder op(QueryParamOp op) { + Utils.checkNotNull(op, "op"); + this.op = Optional.ofNullable(op); + return this; + } + + /** + * Configuration for filter operations + */ + public Builder op(Optional op) { + Utils.checkNotNull(op, "op"); + this.op = op; + return this; + } + + public GetApisRequest build() { + return new GetApisRequest( + metadata, + op); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisRequestBuilder.java new file mode 100644 index 00000000..c634349a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetApisRequestBuilder { + + private GetApisRequest request; + private final SDKMethodInterfaces.MethodCallGetApis sdk; + + public GetApisRequestBuilder(SDKMethodInterfaces.MethodCallGetApis sdk) { + this.sdk = sdk; + } + + public GetApisRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetApisRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetApisResponse call() throws Exception { + + return sdk.getApis( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisResponse.java new file mode 100644 index 00000000..746e28fe --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetApisResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.Api; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetApisResponse implements Response { + + /** + * OK + */ + private Optional> apis; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetApisResponse( + Optional> apis, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(apis, "apis"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.apis = apis; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetApisResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> apis() { + return (Optional>) apis; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public GetApisResponse withApis(List apis) { + Utils.checkNotNull(apis, "apis"); + this.apis = Optional.ofNullable(apis); + return this; + } + + /** + * OK + */ + public GetApisResponse withApis(Optional> apis) { + Utils.checkNotNull(apis, "apis"); + this.apis = apis; + return this; + } + + /** + * HTTP response content type for this operation + */ + public GetApisResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetApisResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetApisResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetApisResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetApisResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApisResponse other = (GetApisResponse) o; + return + Objects.deepEquals(this.apis, other.apis) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + apis, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetApisResponse.class, + "apis", apis, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> apis = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder apis(List apis) { + Utils.checkNotNull(apis, "apis"); + this.apis = Optional.ofNullable(apis); + return this; + } + + /** + * OK + */ + public Builder apis(Optional> apis) { + Utils.checkNotNull(apis, "apis"); + this.apis = apis; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetApisResponse build() { + return new GetApisResponse( + apis, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobRequest.java new file mode 100644 index 00000000..19196e50 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobRequest.java @@ -0,0 +1,176 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetBlobRequest { + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=digest") + private String digest; + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name") + private String namespaceName; + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=organization_slug") + private String organizationSlug; + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=workspace_slug") + private String workspaceSlug; + + @JsonCreator + public GetBlobRequest( + String digest, + String namespaceName, + String organizationSlug, + String workspaceSlug) { + Utils.checkNotNull(digest, "digest"); + Utils.checkNotNull(namespaceName, "namespaceName"); + Utils.checkNotNull(organizationSlug, "organizationSlug"); + Utils.checkNotNull(workspaceSlug, "workspaceSlug"); + this.digest = digest; + this.namespaceName = namespaceName; + this.organizationSlug = organizationSlug; + this.workspaceSlug = workspaceSlug; + } + + @JsonIgnore + public String digest() { + return digest; + } + + @JsonIgnore + public String namespaceName() { + return namespaceName; + } + + @JsonIgnore + public String organizationSlug() { + return organizationSlug; + } + + @JsonIgnore + public String workspaceSlug() { + return workspaceSlug; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetBlobRequest withDigest(String digest) { + Utils.checkNotNull(digest, "digest"); + this.digest = digest; + return this; + } + + public GetBlobRequest withNamespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public GetBlobRequest withOrganizationSlug(String organizationSlug) { + Utils.checkNotNull(organizationSlug, "organizationSlug"); + this.organizationSlug = organizationSlug; + return this; + } + + public GetBlobRequest withWorkspaceSlug(String workspaceSlug) { + Utils.checkNotNull(workspaceSlug, "workspaceSlug"); + this.workspaceSlug = workspaceSlug; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetBlobRequest other = (GetBlobRequest) o; + return + Objects.deepEquals(this.digest, other.digest) && + Objects.deepEquals(this.namespaceName, other.namespaceName) && + Objects.deepEquals(this.organizationSlug, other.organizationSlug) && + Objects.deepEquals(this.workspaceSlug, other.workspaceSlug); + } + + @Override + public int hashCode() { + return Objects.hash( + digest, + namespaceName, + organizationSlug, + workspaceSlug); + } + + @Override + public String toString() { + return Utils.toString(GetBlobRequest.class, + "digest", digest, + "namespaceName", namespaceName, + "organizationSlug", organizationSlug, + "workspaceSlug", workspaceSlug); + } + + public final static class Builder { + + private String digest; + + private String namespaceName; + + private String organizationSlug; + + private String workspaceSlug; + + private Builder() { + // force use of static builder() method + } + + public Builder digest(String digest) { + Utils.checkNotNull(digest, "digest"); + this.digest = digest; + return this; + } + + public Builder namespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public Builder organizationSlug(String organizationSlug) { + Utils.checkNotNull(organizationSlug, "organizationSlug"); + this.organizationSlug = organizationSlug; + return this; + } + + public Builder workspaceSlug(String workspaceSlug) { + Utils.checkNotNull(workspaceSlug, "workspaceSlug"); + this.workspaceSlug = workspaceSlug; + return this; + } + + public GetBlobRequest build() { + return new GetBlobRequest( + digest, + namespaceName, + organizationSlug, + workspaceSlug); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobRequestBuilder.java new file mode 100644 index 00000000..abcec4a2 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetBlobRequestBuilder { + + private GetBlobRequest request; + private final SDKMethodInterfaces.MethodCallGetBlob sdk; + + public GetBlobRequestBuilder(SDKMethodInterfaces.MethodCallGetBlob sdk) { + this.sdk = sdk; + } + + public GetBlobRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetBlobRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetBlobResponse call() throws Exception { + + return sdk.getBlob( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobResponse.java new file mode 100644 index 00000000..04d97755 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetBlobResponse.java @@ -0,0 +1,311 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetBlobResponse implements Response { + + /** + * OK + */ + private Optional blob; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetBlobResponse( + Optional blob, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(blob, "blob"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.blob = blob; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetBlobResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional blob() { + return (Optional) blob; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public GetBlobResponse withBlob(InputStream blob) { + Utils.checkNotNull(blob, "blob"); + this.blob = Optional.ofNullable(blob); + return this; + } + + /** + * OK + */ + public GetBlobResponse withBlob(Optional blob) { + Utils.checkNotNull(blob, "blob"); + this.blob = blob; + return this; + } + + /** + * HTTP response content type for this operation + */ + public GetBlobResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetBlobResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetBlobResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetBlobResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetBlobResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetBlobResponse other = (GetBlobResponse) o; + return + Objects.deepEquals(this.blob, other.blob) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + blob, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetBlobResponse.class, + "blob", blob, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional blob = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder blob(InputStream blob) { + Utils.checkNotNull(blob, "blob"); + this.blob = Optional.ofNullable(blob); + return this; + } + + /** + * OK + */ + public Builder blob(Optional blob) { + Utils.checkNotNull(blob, "blob"); + this.blob = blob; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetBlobResponse build() { + return new GetBlobResponse( + blob, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlRequest.java new file mode 100644 index 00000000..be35887b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlRequest.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetChangesReportSignedUrlRequest { + + /** + * The checksum of the document to retrieve the signed access url for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=documentChecksum") + private String documentChecksum; + + @JsonCreator + public GetChangesReportSignedUrlRequest( + String documentChecksum) { + Utils.checkNotNull(documentChecksum, "documentChecksum"); + this.documentChecksum = documentChecksum; + } + + /** + * The checksum of the document to retrieve the signed access url for. + */ + @JsonIgnore + public String documentChecksum() { + return documentChecksum; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The checksum of the document to retrieve the signed access url for. + */ + public GetChangesReportSignedUrlRequest withDocumentChecksum(String documentChecksum) { + Utils.checkNotNull(documentChecksum, "documentChecksum"); + this.documentChecksum = documentChecksum; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChangesReportSignedUrlRequest other = (GetChangesReportSignedUrlRequest) o; + return + Objects.deepEquals(this.documentChecksum, other.documentChecksum); + } + + @Override + public int hashCode() { + return Objects.hash( + documentChecksum); + } + + @Override + public String toString() { + return Utils.toString(GetChangesReportSignedUrlRequest.class, + "documentChecksum", documentChecksum); + } + + public final static class Builder { + + private String documentChecksum; + + private Builder() { + // force use of static builder() method + } + + /** + * The checksum of the document to retrieve the signed access url for. + */ + public Builder documentChecksum(String documentChecksum) { + Utils.checkNotNull(documentChecksum, "documentChecksum"); + this.documentChecksum = documentChecksum; + return this; + } + + public GetChangesReportSignedUrlRequest build() { + return new GetChangesReportSignedUrlRequest( + documentChecksum); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlRequestBuilder.java new file mode 100644 index 00000000..1562bf42 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetChangesReportSignedUrlRequestBuilder { + + private GetChangesReportSignedUrlRequest request; + private final SDKMethodInterfaces.MethodCallGetChangesReportSignedUrl sdk; + + public GetChangesReportSignedUrlRequestBuilder(SDKMethodInterfaces.MethodCallGetChangesReportSignedUrl sdk) { + this.sdk = sdk; + } + + public GetChangesReportSignedUrlRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetChangesReportSignedUrlRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetChangesReportSignedUrlResponse call() throws Exception { + + return sdk.getChangesReportSignedUrl( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlResponse.java new file mode 100644 index 00000000..2914b116 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlResponse.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetChangesReportSignedUrlResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional signedAccess; + + @JsonCreator + public GetChangesReportSignedUrlResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional signedAccess) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(signedAccess, "signedAccess"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.signedAccess = signedAccess; + } + + public GetChangesReportSignedUrlResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional signedAccess() { + return (Optional) signedAccess; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetChangesReportSignedUrlResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetChangesReportSignedUrlResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetChangesReportSignedUrlResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetChangesReportSignedUrlResponse withSignedAccess(GetChangesReportSignedUrlSignedAccess signedAccess) { + Utils.checkNotNull(signedAccess, "signedAccess"); + this.signedAccess = Optional.ofNullable(signedAccess); + return this; + } + + /** + * OK + */ + public GetChangesReportSignedUrlResponse withSignedAccess(Optional signedAccess) { + Utils.checkNotNull(signedAccess, "signedAccess"); + this.signedAccess = signedAccess; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChangesReportSignedUrlResponse other = (GetChangesReportSignedUrlResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.signedAccess, other.signedAccess); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse, + signedAccess); + } + + @Override + public String toString() { + return Utils.toString(GetChangesReportSignedUrlResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "signedAccess", signedAccess); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional signedAccess = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public Builder signedAccess(GetChangesReportSignedUrlSignedAccess signedAccess) { + Utils.checkNotNull(signedAccess, "signedAccess"); + this.signedAccess = Optional.ofNullable(signedAccess); + return this; + } + + /** + * OK + */ + public Builder signedAccess(Optional signedAccess) { + Utils.checkNotNull(signedAccess, "signedAccess"); + this.signedAccess = signedAccess; + return this; + } + + public GetChangesReportSignedUrlResponse build() { + return new GetChangesReportSignedUrlResponse( + contentType, + statusCode, + rawResponse, + signedAccess); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlSignedAccess.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlSignedAccess.java new file mode 100644 index 00000000..b0e9e552 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetChangesReportSignedUrlSignedAccess.java @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * GetChangesReportSignedUrlSignedAccess - OK + */ + +public class GetChangesReportSignedUrlSignedAccess { + + @JsonProperty("url") + private String url; + + @JsonCreator + public GetChangesReportSignedUrlSignedAccess( + @JsonProperty("url") String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + } + + @JsonIgnore + public String url() { + return url; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetChangesReportSignedUrlSignedAccess withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetChangesReportSignedUrlSignedAccess other = (GetChangesReportSignedUrlSignedAccess) o; + return + Objects.deepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return Objects.hash( + url); + } + + @Override + public String toString() { + return Utils.toString(GetChangesReportSignedUrlSignedAccess.class, + "url", url); + } + + public final static class Builder { + + private String url; + + private Builder() { + // force use of static builder() method + } + + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public GetChangesReportSignedUrlSignedAccess build() { + return new GetChangesReportSignedUrlSignedAccess( + url); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenRequest.java new file mode 100644 index 00000000..7599fd04 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenRequest.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.Filters; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class GetEmbedAccessTokenRequest { + + /** + * The description of the embed access token. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=description") + private Optional description; + + /** + * The duration (in minutes) of the embed access token. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=duration") + private Optional duration; + + /** + * The filter to apply to the query. + */ + @SpeakeasyMetadata("queryParam:serialization=json,name=filters") + private Optional filters; + + @JsonCreator + public GetEmbedAccessTokenRequest( + Optional description, + Optional duration, + Optional filters) { + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(duration, "duration"); + Utils.checkNotNull(filters, "filters"); + this.description = description; + this.duration = duration; + this.filters = filters; + } + + public GetEmbedAccessTokenRequest() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The description of the embed access token. + */ + @JsonIgnore + public Optional description() { + return description; + } + + /** + * The duration (in minutes) of the embed access token. + */ + @JsonIgnore + public Optional duration() { + return duration; + } + + /** + * The filter to apply to the query. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional filters() { + return (Optional) filters; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The description of the embed access token. + */ + public GetEmbedAccessTokenRequest withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = Optional.ofNullable(description); + return this; + } + + /** + * The description of the embed access token. + */ + public GetEmbedAccessTokenRequest withDescription(Optional description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * The duration (in minutes) of the embed access token. + */ + public GetEmbedAccessTokenRequest withDuration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + * The duration (in minutes) of the embed access token. + */ + public GetEmbedAccessTokenRequest withDuration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * The filter to apply to the query. + */ + public GetEmbedAccessTokenRequest withFilters(Filters filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = Optional.ofNullable(filters); + return this; + } + + /** + * The filter to apply to the query. + */ + public GetEmbedAccessTokenRequest withFilters(Optional filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetEmbedAccessTokenRequest other = (GetEmbedAccessTokenRequest) o; + return + Objects.deepEquals(this.description, other.description) && + Objects.deepEquals(this.duration, other.duration) && + Objects.deepEquals(this.filters, other.filters); + } + + @Override + public int hashCode() { + return Objects.hash( + description, + duration, + filters); + } + + @Override + public String toString() { + return Utils.toString(GetEmbedAccessTokenRequest.class, + "description", description, + "duration", duration, + "filters", filters); + } + + public final static class Builder { + + private Optional description = Optional.empty(); + + private Optional duration = Optional.empty(); + + private Optional filters = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The description of the embed access token. + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = Optional.ofNullable(description); + return this; + } + + /** + * The description of the embed access token. + */ + public Builder description(Optional description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * The duration (in minutes) of the embed access token. + */ + public Builder duration(long duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = Optional.ofNullable(duration); + return this; + } + + /** + * The duration (in minutes) of the embed access token. + */ + public Builder duration(Optional duration) { + Utils.checkNotNull(duration, "duration"); + this.duration = duration; + return this; + } + + /** + * The filter to apply to the query. + */ + public Builder filters(Filters filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = Optional.ofNullable(filters); + return this; + } + + /** + * The filter to apply to the query. + */ + public Builder filters(Optional filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + public GetEmbedAccessTokenRequest build() { + return new GetEmbedAccessTokenRequest( + description, + duration, + filters); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenRequestBuilder.java new file mode 100644 index 00000000..c5c4f54d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetEmbedAccessTokenRequestBuilder { + + private GetEmbedAccessTokenRequest request; + private final SDKMethodInterfaces.MethodCallGetEmbedAccessToken sdk; + + public GetEmbedAccessTokenRequestBuilder(SDKMethodInterfaces.MethodCallGetEmbedAccessToken sdk) { + this.sdk = sdk; + } + + public GetEmbedAccessTokenRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetEmbedAccessTokenRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetEmbedAccessTokenResponse call() throws Exception { + + return sdk.getEmbedAccessToken( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenResponse.java new file mode 100644 index 00000000..d43750fa --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetEmbedAccessTokenResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.EmbedAccessTokenResponse; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetEmbedAccessTokenResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * OK + */ + private Optional embedAccessTokenResponse; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetEmbedAccessTokenResponse( + String contentType, + Optional embedAccessTokenResponse, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(embedAccessTokenResponse, "embedAccessTokenResponse"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.embedAccessTokenResponse = embedAccessTokenResponse; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetEmbedAccessTokenResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional embedAccessTokenResponse() { + return (Optional) embedAccessTokenResponse; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetEmbedAccessTokenResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * OK + */ + public GetEmbedAccessTokenResponse withEmbedAccessTokenResponse(EmbedAccessTokenResponse embedAccessTokenResponse) { + Utils.checkNotNull(embedAccessTokenResponse, "embedAccessTokenResponse"); + this.embedAccessTokenResponse = Optional.ofNullable(embedAccessTokenResponse); + return this; + } + + /** + * OK + */ + public GetEmbedAccessTokenResponse withEmbedAccessTokenResponse(Optional embedAccessTokenResponse) { + Utils.checkNotNull(embedAccessTokenResponse, "embedAccessTokenResponse"); + this.embedAccessTokenResponse = embedAccessTokenResponse; + return this; + } + + /** + * Default error response + */ + public GetEmbedAccessTokenResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetEmbedAccessTokenResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetEmbedAccessTokenResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetEmbedAccessTokenResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetEmbedAccessTokenResponse other = (GetEmbedAccessTokenResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.embedAccessTokenResponse, other.embedAccessTokenResponse) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + embedAccessTokenResponse, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetEmbedAccessTokenResponse.class, + "contentType", contentType, + "embedAccessTokenResponse", embedAccessTokenResponse, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional embedAccessTokenResponse = Optional.empty(); + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * OK + */ + public Builder embedAccessTokenResponse(EmbedAccessTokenResponse embedAccessTokenResponse) { + Utils.checkNotNull(embedAccessTokenResponse, "embedAccessTokenResponse"); + this.embedAccessTokenResponse = Optional.ofNullable(embedAccessTokenResponse); + return this; + } + + /** + * OK + */ + public Builder embedAccessTokenResponse(Optional embedAccessTokenResponse) { + Utils.checkNotNull(embedAccessTokenResponse, "embedAccessTokenResponse"); + this.embedAccessTokenResponse = embedAccessTokenResponse; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetEmbedAccessTokenResponse build() { + return new GetEmbedAccessTokenResponse( + contentType, + embedAccessTokenResponse, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlRequest.java new file mode 100644 index 00000000..4db0dac8 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlRequest.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetLintingReportSignedUrlRequest { + + /** + * The checksum of the document to retrieve the signed access url for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=documentChecksum") + private String documentChecksum; + + @JsonCreator + public GetLintingReportSignedUrlRequest( + String documentChecksum) { + Utils.checkNotNull(documentChecksum, "documentChecksum"); + this.documentChecksum = documentChecksum; + } + + /** + * The checksum of the document to retrieve the signed access url for. + */ + @JsonIgnore + public String documentChecksum() { + return documentChecksum; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The checksum of the document to retrieve the signed access url for. + */ + public GetLintingReportSignedUrlRequest withDocumentChecksum(String documentChecksum) { + Utils.checkNotNull(documentChecksum, "documentChecksum"); + this.documentChecksum = documentChecksum; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLintingReportSignedUrlRequest other = (GetLintingReportSignedUrlRequest) o; + return + Objects.deepEquals(this.documentChecksum, other.documentChecksum); + } + + @Override + public int hashCode() { + return Objects.hash( + documentChecksum); + } + + @Override + public String toString() { + return Utils.toString(GetLintingReportSignedUrlRequest.class, + "documentChecksum", documentChecksum); + } + + public final static class Builder { + + private String documentChecksum; + + private Builder() { + // force use of static builder() method + } + + /** + * The checksum of the document to retrieve the signed access url for. + */ + public Builder documentChecksum(String documentChecksum) { + Utils.checkNotNull(documentChecksum, "documentChecksum"); + this.documentChecksum = documentChecksum; + return this; + } + + public GetLintingReportSignedUrlRequest build() { + return new GetLintingReportSignedUrlRequest( + documentChecksum); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlRequestBuilder.java new file mode 100644 index 00000000..6866269a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetLintingReportSignedUrlRequestBuilder { + + private GetLintingReportSignedUrlRequest request; + private final SDKMethodInterfaces.MethodCallGetLintingReportSignedUrl sdk; + + public GetLintingReportSignedUrlRequestBuilder(SDKMethodInterfaces.MethodCallGetLintingReportSignedUrl sdk) { + this.sdk = sdk; + } + + public GetLintingReportSignedUrlRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetLintingReportSignedUrlRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetLintingReportSignedUrlResponse call() throws Exception { + + return sdk.getLintingReportSignedUrl( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlResponse.java new file mode 100644 index 00000000..77ac98e4 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlResponse.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetLintingReportSignedUrlResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional signedAccess; + + @JsonCreator + public GetLintingReportSignedUrlResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional signedAccess) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(signedAccess, "signedAccess"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.signedAccess = signedAccess; + } + + public GetLintingReportSignedUrlResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional signedAccess() { + return (Optional) signedAccess; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetLintingReportSignedUrlResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetLintingReportSignedUrlResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetLintingReportSignedUrlResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetLintingReportSignedUrlResponse withSignedAccess(GetLintingReportSignedUrlSignedAccess signedAccess) { + Utils.checkNotNull(signedAccess, "signedAccess"); + this.signedAccess = Optional.ofNullable(signedAccess); + return this; + } + + /** + * OK + */ + public GetLintingReportSignedUrlResponse withSignedAccess(Optional signedAccess) { + Utils.checkNotNull(signedAccess, "signedAccess"); + this.signedAccess = signedAccess; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLintingReportSignedUrlResponse other = (GetLintingReportSignedUrlResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.signedAccess, other.signedAccess); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse, + signedAccess); + } + + @Override + public String toString() { + return Utils.toString(GetLintingReportSignedUrlResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "signedAccess", signedAccess); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional signedAccess = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public Builder signedAccess(GetLintingReportSignedUrlSignedAccess signedAccess) { + Utils.checkNotNull(signedAccess, "signedAccess"); + this.signedAccess = Optional.ofNullable(signedAccess); + return this; + } + + /** + * OK + */ + public Builder signedAccess(Optional signedAccess) { + Utils.checkNotNull(signedAccess, "signedAccess"); + this.signedAccess = signedAccess; + return this; + } + + public GetLintingReportSignedUrlResponse build() { + return new GetLintingReportSignedUrlResponse( + contentType, + statusCode, + rawResponse, + signedAccess); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlSignedAccess.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlSignedAccess.java new file mode 100644 index 00000000..db520a1f --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetLintingReportSignedUrlSignedAccess.java @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * GetLintingReportSignedUrlSignedAccess - OK + */ + +public class GetLintingReportSignedUrlSignedAccess { + + @JsonProperty("url") + private String url; + + @JsonCreator + public GetLintingReportSignedUrlSignedAccess( + @JsonProperty("url") String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + } + + @JsonIgnore + public String url() { + return url; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetLintingReportSignedUrlSignedAccess withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetLintingReportSignedUrlSignedAccess other = (GetLintingReportSignedUrlSignedAccess) o; + return + Objects.deepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return Objects.hash( + url); + } + + @Override + public String toString() { + return Utils.toString(GetLintingReportSignedUrlSignedAccess.class, + "url", url); + } + + public final static class Builder { + + private String url; + + private Builder() { + // force use of static builder() method + } + + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public GetLintingReportSignedUrlSignedAccess build() { + return new GetLintingReportSignedUrlSignedAccess( + url); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestRequest.java new file mode 100644 index 00000000..f08652b2 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestRequest.java @@ -0,0 +1,188 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetManifestRequest { + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name") + private String namespaceName; + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=organization_slug") + private String organizationSlug; + + /** + * Tag or digest + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=revision_reference") + private String revisionReference; + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=workspace_slug") + private String workspaceSlug; + + @JsonCreator + public GetManifestRequest( + String namespaceName, + String organizationSlug, + String revisionReference, + String workspaceSlug) { + Utils.checkNotNull(namespaceName, "namespaceName"); + Utils.checkNotNull(organizationSlug, "organizationSlug"); + Utils.checkNotNull(revisionReference, "revisionReference"); + Utils.checkNotNull(workspaceSlug, "workspaceSlug"); + this.namespaceName = namespaceName; + this.organizationSlug = organizationSlug; + this.revisionReference = revisionReference; + this.workspaceSlug = workspaceSlug; + } + + @JsonIgnore + public String namespaceName() { + return namespaceName; + } + + @JsonIgnore + public String organizationSlug() { + return organizationSlug; + } + + /** + * Tag or digest + */ + @JsonIgnore + public String revisionReference() { + return revisionReference; + } + + @JsonIgnore + public String workspaceSlug() { + return workspaceSlug; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetManifestRequest withNamespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public GetManifestRequest withOrganizationSlug(String organizationSlug) { + Utils.checkNotNull(organizationSlug, "organizationSlug"); + this.organizationSlug = organizationSlug; + return this; + } + + /** + * Tag or digest + */ + public GetManifestRequest withRevisionReference(String revisionReference) { + Utils.checkNotNull(revisionReference, "revisionReference"); + this.revisionReference = revisionReference; + return this; + } + + public GetManifestRequest withWorkspaceSlug(String workspaceSlug) { + Utils.checkNotNull(workspaceSlug, "workspaceSlug"); + this.workspaceSlug = workspaceSlug; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetManifestRequest other = (GetManifestRequest) o; + return + Objects.deepEquals(this.namespaceName, other.namespaceName) && + Objects.deepEquals(this.organizationSlug, other.organizationSlug) && + Objects.deepEquals(this.revisionReference, other.revisionReference) && + Objects.deepEquals(this.workspaceSlug, other.workspaceSlug); + } + + @Override + public int hashCode() { + return Objects.hash( + namespaceName, + organizationSlug, + revisionReference, + workspaceSlug); + } + + @Override + public String toString() { + return Utils.toString(GetManifestRequest.class, + "namespaceName", namespaceName, + "organizationSlug", organizationSlug, + "revisionReference", revisionReference, + "workspaceSlug", workspaceSlug); + } + + public final static class Builder { + + private String namespaceName; + + private String organizationSlug; + + private String revisionReference; + + private String workspaceSlug; + + private Builder() { + // force use of static builder() method + } + + public Builder namespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public Builder organizationSlug(String organizationSlug) { + Utils.checkNotNull(organizationSlug, "organizationSlug"); + this.organizationSlug = organizationSlug; + return this; + } + + /** + * Tag or digest + */ + public Builder revisionReference(String revisionReference) { + Utils.checkNotNull(revisionReference, "revisionReference"); + this.revisionReference = revisionReference; + return this; + } + + public Builder workspaceSlug(String workspaceSlug) { + Utils.checkNotNull(workspaceSlug, "workspaceSlug"); + this.workspaceSlug = workspaceSlug; + return this; + } + + public GetManifestRequest build() { + return new GetManifestRequest( + namespaceName, + organizationSlug, + revisionReference, + workspaceSlug); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestRequestBuilder.java new file mode 100644 index 00000000..1555860d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetManifestRequestBuilder { + + private GetManifestRequest request; + private final SDKMethodInterfaces.MethodCallGetManifest sdk; + + public GetManifestRequestBuilder(SDKMethodInterfaces.MethodCallGetManifest sdk) { + this.sdk = sdk; + } + + public GetManifestRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetManifestRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetManifestResponse call() throws Exception { + + return sdk.getManifest( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestResponse.java new file mode 100644 index 00000000..9e6a22c2 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetManifestResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.Manifest; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetManifestResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional manifest; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetManifestResponse( + String contentType, + Optional error, + Optional manifest, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(manifest, "manifest"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.manifest = manifest; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetManifestResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional manifest() { + return (Optional) manifest; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetManifestResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetManifestResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetManifestResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GetManifestResponse withManifest(Manifest manifest) { + Utils.checkNotNull(manifest, "manifest"); + this.manifest = Optional.ofNullable(manifest); + return this; + } + + /** + * OK + */ + public GetManifestResponse withManifest(Optional manifest) { + Utils.checkNotNull(manifest, "manifest"); + this.manifest = manifest; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetManifestResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetManifestResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetManifestResponse other = (GetManifestResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.manifest, other.manifest) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + manifest, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetManifestResponse.class, + "contentType", contentType, + "error", error, + "manifest", manifest, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional manifest = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder manifest(Manifest manifest) { + Utils.checkNotNull(manifest, "manifest"); + this.manifest = Optional.ofNullable(manifest); + return this; + } + + /** + * OK + */ + public Builder manifest(Optional manifest) { + Utils.checkNotNull(manifest, "manifest"); + this.manifest = manifest; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetManifestResponse build() { + return new GetManifestResponse( + contentType, + error, + manifest, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetNamespacesRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetNamespacesRequestBuilder.java new file mode 100644 index 00000000..5d46cc3d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetNamespacesRequestBuilder.java @@ -0,0 +1,20 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +public class GetNamespacesRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetNamespaces sdk; + + public GetNamespacesRequestBuilder(SDKMethodInterfaces.MethodCallGetNamespaces sdk) { + this.sdk = sdk; + } + + public GetNamespacesResponse call() throws Exception { + + return sdk.getNamespacesDirect(); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetNamespacesResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetNamespacesResponse.java new file mode 100644 index 00000000..de5a0027 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetNamespacesResponse.java @@ -0,0 +1,311 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetNamespacesResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional getNamespacesResponse; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetNamespacesResponse( + String contentType, + Optional error, + Optional getNamespacesResponse, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(getNamespacesResponse, "getNamespacesResponse"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.getNamespacesResponse = getNamespacesResponse; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetNamespacesResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getNamespacesResponse() { + return (Optional) getNamespacesResponse; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetNamespacesResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetNamespacesResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetNamespacesResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GetNamespacesResponse withGetNamespacesResponse(dev.speakeasyapi.javaclientsdk.models.shared.GetNamespacesResponse getNamespacesResponse) { + Utils.checkNotNull(getNamespacesResponse, "getNamespacesResponse"); + this.getNamespacesResponse = Optional.ofNullable(getNamespacesResponse); + return this; + } + + /** + * OK + */ + public GetNamespacesResponse withGetNamespacesResponse(Optional getNamespacesResponse) { + Utils.checkNotNull(getNamespacesResponse, "getNamespacesResponse"); + this.getNamespacesResponse = getNamespacesResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetNamespacesResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetNamespacesResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNamespacesResponse other = (GetNamespacesResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.getNamespacesResponse, other.getNamespacesResponse) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + getNamespacesResponse, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetNamespacesResponse.class, + "contentType", contentType, + "error", error, + "getNamespacesResponse", getNamespacesResponse, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional getNamespacesResponse = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder getNamespacesResponse(dev.speakeasyapi.javaclientsdk.models.shared.GetNamespacesResponse getNamespacesResponse) { + Utils.checkNotNull(getNamespacesResponse, "getNamespacesResponse"); + this.getNamespacesResponse = Optional.ofNullable(getNamespacesResponse); + return this; + } + + /** + * OK + */ + public Builder getNamespacesResponse(Optional getNamespacesResponse) { + Utils.checkNotNull(getNamespacesResponse, "getNamespacesResponse"); + this.getNamespacesResponse = getNamespacesResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetNamespacesResponse build() { + return new GetNamespacesResponse( + contentType, + error, + getNamespacesResponse, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryRequest.java new file mode 100644 index 00000000..cfd69a95 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryRequest.java @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetOASSummaryRequest { + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name") + private String namespaceName; + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=revision_reference") + private String revisionReference; + + @JsonCreator + public GetOASSummaryRequest( + String namespaceName, + String revisionReference) { + Utils.checkNotNull(namespaceName, "namespaceName"); + Utils.checkNotNull(revisionReference, "revisionReference"); + this.namespaceName = namespaceName; + this.revisionReference = revisionReference; + } + + @JsonIgnore + public String namespaceName() { + return namespaceName; + } + + @JsonIgnore + public String revisionReference() { + return revisionReference; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetOASSummaryRequest withNamespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public GetOASSummaryRequest withRevisionReference(String revisionReference) { + Utils.checkNotNull(revisionReference, "revisionReference"); + this.revisionReference = revisionReference; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOASSummaryRequest other = (GetOASSummaryRequest) o; + return + Objects.deepEquals(this.namespaceName, other.namespaceName) && + Objects.deepEquals(this.revisionReference, other.revisionReference); + } + + @Override + public int hashCode() { + return Objects.hash( + namespaceName, + revisionReference); + } + + @Override + public String toString() { + return Utils.toString(GetOASSummaryRequest.class, + "namespaceName", namespaceName, + "revisionReference", revisionReference); + } + + public final static class Builder { + + private String namespaceName; + + private String revisionReference; + + private Builder() { + // force use of static builder() method + } + + public Builder namespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public Builder revisionReference(String revisionReference) { + Utils.checkNotNull(revisionReference, "revisionReference"); + this.revisionReference = revisionReference; + return this; + } + + public GetOASSummaryRequest build() { + return new GetOASSummaryRequest( + namespaceName, + revisionReference); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryRequestBuilder.java new file mode 100644 index 00000000..5d14151e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetOASSummaryRequestBuilder { + + private GetOASSummaryRequest request; + private final SDKMethodInterfaces.MethodCallGetOASSummary sdk; + + public GetOASSummaryRequestBuilder(SDKMethodInterfaces.MethodCallGetOASSummary sdk) { + this.sdk = sdk; + } + + public GetOASSummaryRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetOASSummaryRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetOASSummaryResponse call() throws Exception { + + return sdk.getOASSummary( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryResponse.java new file mode 100644 index 00000000..871c8374 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOASSummaryResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.OASSummary; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetOASSummaryResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional oasSummary; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetOASSummaryResponse( + String contentType, + Optional error, + Optional oasSummary, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(oasSummary, "oasSummary"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.oasSummary = oasSummary; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetOASSummaryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional oasSummary() { + return (Optional) oasSummary; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetOASSummaryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetOASSummaryResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetOASSummaryResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GetOASSummaryResponse withOASSummary(OASSummary oasSummary) { + Utils.checkNotNull(oasSummary, "oasSummary"); + this.oasSummary = Optional.ofNullable(oasSummary); + return this; + } + + /** + * OK + */ + public GetOASSummaryResponse withOASSummary(Optional oasSummary) { + Utils.checkNotNull(oasSummary, "oasSummary"); + this.oasSummary = oasSummary; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetOASSummaryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetOASSummaryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOASSummaryResponse other = (GetOASSummaryResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.oasSummary, other.oasSummary) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + oasSummary, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetOASSummaryResponse.class, + "contentType", contentType, + "error", error, + "oasSummary", oasSummary, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional oasSummary = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder oasSummary(OASSummary oasSummary) { + Utils.checkNotNull(oasSummary, "oasSummary"); + this.oasSummary = Optional.ofNullable(oasSummary); + return this; + } + + /** + * OK + */ + public Builder oasSummary(Optional oasSummary) { + Utils.checkNotNull(oasSummary, "oasSummary"); + this.oasSummary = oasSummary; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetOASSummaryResponse build() { + return new GetOASSummaryResponse( + contentType, + error, + oasSummary, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationRequest.java new file mode 100644 index 00000000..cec90836 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationRequest.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetOrganizationRequest { + + /** + * Unique identifier of the organization. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=organizationID") + private String organizationID; + + @JsonCreator + public GetOrganizationRequest( + String organizationID) { + Utils.checkNotNull(organizationID, "organizationID"); + this.organizationID = organizationID; + } + + /** + * Unique identifier of the organization. + */ + @JsonIgnore + public String organizationID() { + return organizationID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Unique identifier of the organization. + */ + public GetOrganizationRequest withOrganizationID(String organizationID) { + Utils.checkNotNull(organizationID, "organizationID"); + this.organizationID = organizationID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOrganizationRequest other = (GetOrganizationRequest) o; + return + Objects.deepEquals(this.organizationID, other.organizationID); + } + + @Override + public int hashCode() { + return Objects.hash( + organizationID); + } + + @Override + public String toString() { + return Utils.toString(GetOrganizationRequest.class, + "organizationID", organizationID); + } + + public final static class Builder { + + private String organizationID; + + private Builder() { + // force use of static builder() method + } + + /** + * Unique identifier of the organization. + */ + public Builder organizationID(String organizationID) { + Utils.checkNotNull(organizationID, "organizationID"); + this.organizationID = organizationID; + return this; + } + + public GetOrganizationRequest build() { + return new GetOrganizationRequest( + organizationID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationRequestBuilder.java new file mode 100644 index 00000000..97dca3cc --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetOrganizationRequestBuilder { + + private GetOrganizationRequest request; + private final SDKMethodInterfaces.MethodCallGetOrganization sdk; + + public GetOrganizationRequestBuilder(SDKMethodInterfaces.MethodCallGetOrganization sdk) { + this.sdk = sdk; + } + + public GetOrganizationRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetOrganizationResponse call() throws Exception { + + return sdk.getOrganization( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationResponse.java new file mode 100644 index 00000000..cb7923d7 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.Organization; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetOrganizationResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional organization; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetOrganizationResponse( + String contentType, + Optional error, + Optional organization, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(organization, "organization"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.organization = organization; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetOrganizationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional organization() { + return (Optional) organization; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetOrganizationResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetOrganizationResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetOrganizationResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GetOrganizationResponse withOrganization(Organization organization) { + Utils.checkNotNull(organization, "organization"); + this.organization = Optional.ofNullable(organization); + return this; + } + + /** + * OK + */ + public GetOrganizationResponse withOrganization(Optional organization) { + Utils.checkNotNull(organization, "organization"); + this.organization = organization; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetOrganizationResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetOrganizationResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOrganizationResponse other = (GetOrganizationResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.organization, other.organization) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + organization, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetOrganizationResponse.class, + "contentType", contentType, + "error", error, + "organization", organization, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional organization = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder organization(Organization organization) { + Utils.checkNotNull(organization, "organization"); + this.organization = Optional.ofNullable(organization); + return this; + } + + /** + * OK + */ + public Builder organization(Optional organization) { + Utils.checkNotNull(organization, "organization"); + this.organization = organization; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetOrganizationResponse build() { + return new GetOrganizationResponse( + contentType, + error, + organization, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationUsageRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationUsageRequestBuilder.java new file mode 100644 index 00000000..d679b1d7 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationUsageRequestBuilder.java @@ -0,0 +1,20 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +public class GetOrganizationUsageRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetOrganizationUsage sdk; + + public GetOrganizationUsageRequestBuilder(SDKMethodInterfaces.MethodCallGetOrganizationUsage sdk) { + this.sdk = sdk; + } + + public GetOrganizationUsageResponse call() throws Exception { + + return sdk.getOrganizationUsageDirect(); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationUsageResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationUsageResponse.java new file mode 100644 index 00000000..51d9f49a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationUsageResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.OrganizationUsageResponse; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetOrganizationUsageResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional organizationUsageResponse; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetOrganizationUsageResponse( + String contentType, + Optional error, + Optional organizationUsageResponse, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(organizationUsageResponse, "organizationUsageResponse"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.organizationUsageResponse = organizationUsageResponse; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetOrganizationUsageResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional organizationUsageResponse() { + return (Optional) organizationUsageResponse; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetOrganizationUsageResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetOrganizationUsageResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetOrganizationUsageResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GetOrganizationUsageResponse withOrganizationUsageResponse(OrganizationUsageResponse organizationUsageResponse) { + Utils.checkNotNull(organizationUsageResponse, "organizationUsageResponse"); + this.organizationUsageResponse = Optional.ofNullable(organizationUsageResponse); + return this; + } + + /** + * OK + */ + public GetOrganizationUsageResponse withOrganizationUsageResponse(Optional organizationUsageResponse) { + Utils.checkNotNull(organizationUsageResponse, "organizationUsageResponse"); + this.organizationUsageResponse = organizationUsageResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetOrganizationUsageResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetOrganizationUsageResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOrganizationUsageResponse other = (GetOrganizationUsageResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.organizationUsageResponse, other.organizationUsageResponse) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + organizationUsageResponse, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetOrganizationUsageResponse.class, + "contentType", contentType, + "error", error, + "organizationUsageResponse", organizationUsageResponse, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional organizationUsageResponse = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder organizationUsageResponse(OrganizationUsageResponse organizationUsageResponse) { + Utils.checkNotNull(organizationUsageResponse, "organizationUsageResponse"); + this.organizationUsageResponse = Optional.ofNullable(organizationUsageResponse); + return this; + } + + /** + * OK + */ + public Builder organizationUsageResponse(Optional organizationUsageResponse) { + Utils.checkNotNull(organizationUsageResponse, "organizationUsageResponse"); + this.organizationUsageResponse = organizationUsageResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetOrganizationUsageResponse build() { + return new GetOrganizationUsageResponse( + contentType, + error, + organizationUsageResponse, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationsRequestBuilder.java new file mode 100644 index 00000000..cea23862 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationsRequestBuilder.java @@ -0,0 +1,20 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +public class GetOrganizationsRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetOrganizations sdk; + + public GetOrganizationsRequestBuilder(SDKMethodInterfaces.MethodCallGetOrganizations sdk) { + this.sdk = sdk; + } + + public GetOrganizationsResponse call() throws Exception { + + return sdk.getOrganizationsDirect(); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationsResponse.java new file mode 100644 index 00000000..2128ba0b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetOrganizationsResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.Organization; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetOrganizationsResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional> organizations; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetOrganizationsResponse( + String contentType, + Optional error, + Optional> organizations, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(organizations, "organizations"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.organizations = organizations; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetOrganizationsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> organizations() { + return (Optional>) organizations; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetOrganizationsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetOrganizationsResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetOrganizationsResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GetOrganizationsResponse withOrganizations(List organizations) { + Utils.checkNotNull(organizations, "organizations"); + this.organizations = Optional.ofNullable(organizations); + return this; + } + + /** + * OK + */ + public GetOrganizationsResponse withOrganizations(Optional> organizations) { + Utils.checkNotNull(organizations, "organizations"); + this.organizations = organizations; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetOrganizationsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetOrganizationsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOrganizationsResponse other = (GetOrganizationsResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.organizations, other.organizations) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + organizations, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetOrganizationsResponse.class, + "contentType", contentType, + "error", error, + "organizations", organizations, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional> organizations = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder organizations(List organizations) { + Utils.checkNotNull(organizations, "organizations"); + this.organizations = Optional.ofNullable(organizations); + return this; + } + + /** + * OK + */ + public Builder organizations(Optional> organizations) { + Utils.checkNotNull(organizations, "organizations"); + this.organizations = organizations; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetOrganizationsResponse build() { + return new GetOrganizationsResponse( + contentType, + error, + organizations, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogRequest.java new file mode 100644 index 00000000..91148a39 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogRequest.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetRequestFromEventLogRequest { + + /** + * The ID of the request to retrieve. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=requestID") + private String requestID; + + @JsonCreator + public GetRequestFromEventLogRequest( + String requestID) { + Utils.checkNotNull(requestID, "requestID"); + this.requestID = requestID; + } + + /** + * The ID of the request to retrieve. + */ + @JsonIgnore + public String requestID() { + return requestID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the request to retrieve. + */ + public GetRequestFromEventLogRequest withRequestID(String requestID) { + Utils.checkNotNull(requestID, "requestID"); + this.requestID = requestID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRequestFromEventLogRequest other = (GetRequestFromEventLogRequest) o; + return + Objects.deepEquals(this.requestID, other.requestID); + } + + @Override + public int hashCode() { + return Objects.hash( + requestID); + } + + @Override + public String toString() { + return Utils.toString(GetRequestFromEventLogRequest.class, + "requestID", requestID); + } + + public final static class Builder { + + private String requestID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the request to retrieve. + */ + public Builder requestID(String requestID) { + Utils.checkNotNull(requestID, "requestID"); + this.requestID = requestID; + return this; + } + + public GetRequestFromEventLogRequest build() { + return new GetRequestFromEventLogRequest( + requestID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogRequestBuilder.java new file mode 100644 index 00000000..f8996a8e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetRequestFromEventLogRequestBuilder { + + private GetRequestFromEventLogRequest request; + private final SDKMethodInterfaces.MethodCallGetRequestFromEventLog sdk; + + public GetRequestFromEventLogRequestBuilder(SDKMethodInterfaces.MethodCallGetRequestFromEventLog sdk) { + this.sdk = sdk; + } + + public GetRequestFromEventLogRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetRequestFromEventLogRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetRequestFromEventLogResponse call() throws Exception { + + return sdk.getRequestFromEventLog( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogResponse.java new file mode 100644 index 00000000..399288a9 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRequestFromEventLogResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.UnboundedRequest; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetRequestFromEventLogResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional unboundedRequest; + + @JsonCreator + public GetRequestFromEventLogResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse, + Optional unboundedRequest) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(unboundedRequest, "unboundedRequest"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.unboundedRequest = unboundedRequest; + } + + public GetRequestFromEventLogResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional unboundedRequest() { + return (Optional) unboundedRequest; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetRequestFromEventLogResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetRequestFromEventLogResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetRequestFromEventLogResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetRequestFromEventLogResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetRequestFromEventLogResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetRequestFromEventLogResponse withUnboundedRequest(UnboundedRequest unboundedRequest) { + Utils.checkNotNull(unboundedRequest, "unboundedRequest"); + this.unboundedRequest = Optional.ofNullable(unboundedRequest); + return this; + } + + /** + * OK + */ + public GetRequestFromEventLogResponse withUnboundedRequest(Optional unboundedRequest) { + Utils.checkNotNull(unboundedRequest, "unboundedRequest"); + this.unboundedRequest = unboundedRequest; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRequestFromEventLogResponse other = (GetRequestFromEventLogResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.unboundedRequest, other.unboundedRequest); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse, + unboundedRequest); + } + + @Override + public String toString() { + return Utils.toString(GetRequestFromEventLogResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse, + "unboundedRequest", unboundedRequest); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional unboundedRequest = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public Builder unboundedRequest(UnboundedRequest unboundedRequest) { + Utils.checkNotNull(unboundedRequest, "unboundedRequest"); + this.unboundedRequest = Optional.ofNullable(unboundedRequest); + return this; + } + + /** + * OK + */ + public Builder unboundedRequest(Optional unboundedRequest) { + Utils.checkNotNull(unboundedRequest, "unboundedRequest"); + this.unboundedRequest = unboundedRequest; + return this; + } + + public GetRequestFromEventLogResponse build() { + return new GetRequestFromEventLogResponse( + contentType, + error, + statusCode, + rawResponse, + unboundedRequest); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsRequest.java new file mode 100644 index 00000000..9ff2cbb1 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsRequest.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class GetRevisionsRequest { + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name") + private String namespaceName; + + /** + * Token to retrieve the next page of results + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=next_page_token") + private Optional nextPageToken; + + @JsonCreator + public GetRevisionsRequest( + String namespaceName, + Optional nextPageToken) { + Utils.checkNotNull(namespaceName, "namespaceName"); + Utils.checkNotNull(nextPageToken, "nextPageToken"); + this.namespaceName = namespaceName; + this.nextPageToken = nextPageToken; + } + + public GetRevisionsRequest( + String namespaceName) { + this(namespaceName, Optional.empty()); + } + + @JsonIgnore + public String namespaceName() { + return namespaceName; + } + + /** + * Token to retrieve the next page of results + */ + @JsonIgnore + public Optional nextPageToken() { + return nextPageToken; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRevisionsRequest withNamespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + /** + * Token to retrieve the next page of results + */ + public GetRevisionsRequest withNextPageToken(String nextPageToken) { + Utils.checkNotNull(nextPageToken, "nextPageToken"); + this.nextPageToken = Optional.ofNullable(nextPageToken); + return this; + } + + /** + * Token to retrieve the next page of results + */ + public GetRevisionsRequest withNextPageToken(Optional nextPageToken) { + Utils.checkNotNull(nextPageToken, "nextPageToken"); + this.nextPageToken = nextPageToken; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRevisionsRequest other = (GetRevisionsRequest) o; + return + Objects.deepEquals(this.namespaceName, other.namespaceName) && + Objects.deepEquals(this.nextPageToken, other.nextPageToken); + } + + @Override + public int hashCode() { + return Objects.hash( + namespaceName, + nextPageToken); + } + + @Override + public String toString() { + return Utils.toString(GetRevisionsRequest.class, + "namespaceName", namespaceName, + "nextPageToken", nextPageToken); + } + + public final static class Builder { + + private String namespaceName; + + private Optional nextPageToken = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder namespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + /** + * Token to retrieve the next page of results + */ + public Builder nextPageToken(String nextPageToken) { + Utils.checkNotNull(nextPageToken, "nextPageToken"); + this.nextPageToken = Optional.ofNullable(nextPageToken); + return this; + } + + /** + * Token to retrieve the next page of results + */ + public Builder nextPageToken(Optional nextPageToken) { + Utils.checkNotNull(nextPageToken, "nextPageToken"); + this.nextPageToken = nextPageToken; + return this; + } + + public GetRevisionsRequest build() { + return new GetRevisionsRequest( + namespaceName, + nextPageToken); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsRequestBuilder.java new file mode 100644 index 00000000..ea80e303 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetRevisionsRequestBuilder { + + private GetRevisionsRequest request; + private final SDKMethodInterfaces.MethodCallGetRevisions sdk; + + public GetRevisionsRequestBuilder(SDKMethodInterfaces.MethodCallGetRevisions sdk) { + this.sdk = sdk; + } + + public GetRevisionsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetRevisionsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetRevisionsResponse call() throws Exception { + + return sdk.getRevisions( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsResponse.java new file mode 100644 index 00000000..59d6e8bd --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetRevisionsResponse.java @@ -0,0 +1,311 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetRevisionsResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional getRevisionsResponse; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetRevisionsResponse( + String contentType, + Optional error, + Optional getRevisionsResponse, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(getRevisionsResponse, "getRevisionsResponse"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.getRevisionsResponse = getRevisionsResponse; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetRevisionsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getRevisionsResponse() { + return (Optional) getRevisionsResponse; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetRevisionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetRevisionsResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetRevisionsResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GetRevisionsResponse withGetRevisionsResponse(dev.speakeasyapi.javaclientsdk.models.shared.GetRevisionsResponse getRevisionsResponse) { + Utils.checkNotNull(getRevisionsResponse, "getRevisionsResponse"); + this.getRevisionsResponse = Optional.ofNullable(getRevisionsResponse); + return this; + } + + /** + * OK + */ + public GetRevisionsResponse withGetRevisionsResponse(Optional getRevisionsResponse) { + Utils.checkNotNull(getRevisionsResponse, "getRevisionsResponse"); + this.getRevisionsResponse = getRevisionsResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetRevisionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetRevisionsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRevisionsResponse other = (GetRevisionsResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.getRevisionsResponse, other.getRevisionsResponse) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + getRevisionsResponse, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetRevisionsResponse.class, + "contentType", contentType, + "error", error, + "getRevisionsResponse", getRevisionsResponse, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional getRevisionsResponse = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder getRevisionsResponse(dev.speakeasyapi.javaclientsdk.models.shared.GetRevisionsResponse getRevisionsResponse) { + Utils.checkNotNull(getRevisionsResponse, "getRevisionsResponse"); + this.getRevisionsResponse = Optional.ofNullable(getRevisionsResponse); + return this; + } + + /** + * OK + */ + public Builder getRevisionsResponse(Optional getRevisionsResponse) { + Utils.checkNotNull(getRevisionsResponse, "getRevisionsResponse"); + this.getRevisionsResponse = getRevisionsResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetRevisionsResponse build() { + return new GetRevisionsResponse( + contentType, + error, + getRevisionsResponse, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffRequest.java new file mode 100644 index 00000000..409ea8c6 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffRequest.java @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetSchemaDiffRequest { + + /** + * The ID of the Api to retrieve schemas for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The base revision ID of the schema to retrieve. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=baseRevisionID") + private String baseRevisionID; + + /** + * The target revision ID of the schema to retrieve. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=targetRevisionID") + private String targetRevisionID; + + /** + * The version ID of the Api to delete metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public GetSchemaDiffRequest( + String apiID, + String baseRevisionID, + String targetRevisionID, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(baseRevisionID, "baseRevisionID"); + Utils.checkNotNull(targetRevisionID, "targetRevisionID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.baseRevisionID = baseRevisionID; + this.targetRevisionID = targetRevisionID; + this.versionID = versionID; + } + + /** + * The ID of the Api to retrieve schemas for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The base revision ID of the schema to retrieve. + */ + @JsonIgnore + public String baseRevisionID() { + return baseRevisionID; + } + + /** + * The target revision ID of the schema to retrieve. + */ + @JsonIgnore + public String targetRevisionID() { + return targetRevisionID; + } + + /** + * The version ID of the Api to delete metadata for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to retrieve schemas for. + */ + public GetSchemaDiffRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The base revision ID of the schema to retrieve. + */ + public GetSchemaDiffRequest withBaseRevisionID(String baseRevisionID) { + Utils.checkNotNull(baseRevisionID, "baseRevisionID"); + this.baseRevisionID = baseRevisionID; + return this; + } + + /** + * The target revision ID of the schema to retrieve. + */ + public GetSchemaDiffRequest withTargetRevisionID(String targetRevisionID) { + Utils.checkNotNull(targetRevisionID, "targetRevisionID"); + this.targetRevisionID = targetRevisionID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public GetSchemaDiffRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSchemaDiffRequest other = (GetSchemaDiffRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.baseRevisionID, other.baseRevisionID) && + Objects.deepEquals(this.targetRevisionID, other.targetRevisionID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + baseRevisionID, + targetRevisionID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(GetSchemaDiffRequest.class, + "apiID", apiID, + "baseRevisionID", baseRevisionID, + "targetRevisionID", targetRevisionID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String baseRevisionID; + + private String targetRevisionID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to retrieve schemas for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The base revision ID of the schema to retrieve. + */ + public Builder baseRevisionID(String baseRevisionID) { + Utils.checkNotNull(baseRevisionID, "baseRevisionID"); + this.baseRevisionID = baseRevisionID; + return this; + } + + /** + * The target revision ID of the schema to retrieve. + */ + public Builder targetRevisionID(String targetRevisionID) { + Utils.checkNotNull(targetRevisionID, "targetRevisionID"); + this.targetRevisionID = targetRevisionID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public GetSchemaDiffRequest build() { + return new GetSchemaDiffRequest( + apiID, + baseRevisionID, + targetRevisionID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffRequestBuilder.java new file mode 100644 index 00000000..85ff31ca --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetSchemaDiffRequestBuilder { + + private GetSchemaDiffRequest request; + private final SDKMethodInterfaces.MethodCallGetSchemaDiff sdk; + + public GetSchemaDiffRequestBuilder(SDKMethodInterfaces.MethodCallGetSchemaDiff sdk) { + this.sdk = sdk; + } + + public GetSchemaDiffRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaDiffRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSchemaDiffResponse call() throws Exception { + + return sdk.getSchemaDiff( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffResponse.java new file mode 100644 index 00000000..af68bc06 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaDiffResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.SchemaDiff; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetSchemaDiffResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional schemaDiff; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetSchemaDiffResponse( + String contentType, + Optional error, + Optional schemaDiff, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(schemaDiff, "schemaDiff"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.schemaDiff = schemaDiff; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetSchemaDiffResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional schemaDiff() { + return (Optional) schemaDiff; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetSchemaDiffResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetSchemaDiffResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetSchemaDiffResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GetSchemaDiffResponse withSchemaDiff(SchemaDiff schemaDiff) { + Utils.checkNotNull(schemaDiff, "schemaDiff"); + this.schemaDiff = Optional.ofNullable(schemaDiff); + return this; + } + + /** + * OK + */ + public GetSchemaDiffResponse withSchemaDiff(Optional schemaDiff) { + Utils.checkNotNull(schemaDiff, "schemaDiff"); + this.schemaDiff = schemaDiff; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSchemaDiffResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSchemaDiffResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSchemaDiffResponse other = (GetSchemaDiffResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.schemaDiff, other.schemaDiff) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + schemaDiff, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSchemaDiffResponse.class, + "contentType", contentType, + "error", error, + "schemaDiff", schemaDiff, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional schemaDiff = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder schemaDiff(SchemaDiff schemaDiff) { + Utils.checkNotNull(schemaDiff, "schemaDiff"); + this.schemaDiff = Optional.ofNullable(schemaDiff); + return this; + } + + /** + * OK + */ + public Builder schemaDiff(Optional schemaDiff) { + Utils.checkNotNull(schemaDiff, "schemaDiff"); + this.schemaDiff = schemaDiff; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetSchemaDiffResponse build() { + return new GetSchemaDiffResponse( + contentType, + error, + schemaDiff, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRequest.java new file mode 100644 index 00000000..e18b9326 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRequest.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetSchemaRequest { + + /** + * The ID of the Api to get the schema for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api to delete metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public GetSchemaRequest( + String apiID, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The ID of the Api to get the schema for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api to delete metadata for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to get the schema for. + */ + public GetSchemaRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public GetSchemaRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSchemaRequest other = (GetSchemaRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(GetSchemaRequest.class, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to get the schema for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public GetSchemaRequest build() { + return new GetSchemaRequest( + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRequestBuilder.java new file mode 100644 index 00000000..74aa1cf4 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetSchemaRequestBuilder { + + private GetSchemaRequest request; + private final SDKMethodInterfaces.MethodCallGetSchema sdk; + + public GetSchemaRequestBuilder(SDKMethodInterfaces.MethodCallGetSchema sdk) { + this.sdk = sdk; + } + + public GetSchemaRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSchemaResponse call() throws Exception { + + return sdk.getSchema( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaResponse.java new file mode 100644 index 00000000..edd7e63d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.Schema; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetSchemaResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional schema; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetSchemaResponse( + String contentType, + Optional error, + Optional schema, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(schema, "schema"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.schema = schema; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetSchemaResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional schema() { + return (Optional) schema; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetSchemaResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetSchemaResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetSchemaResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GetSchemaResponse withSchema(Schema schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = Optional.ofNullable(schema); + return this; + } + + /** + * OK + */ + public GetSchemaResponse withSchema(Optional schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = schema; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSchemaResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSchemaResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSchemaResponse other = (GetSchemaResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.schema, other.schema) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + schema, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSchemaResponse.class, + "contentType", contentType, + "error", error, + "schema", schema, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional schema = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder schema(Schema schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = Optional.ofNullable(schema); + return this; + } + + /** + * OK + */ + public Builder schema(Optional schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = schema; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetSchemaResponse build() { + return new GetSchemaResponse( + contentType, + error, + schema, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionRequest.java new file mode 100644 index 00000000..d64e89ed --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionRequest.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetSchemaRevisionRequest { + + /** + * The ID of the Api to retrieve schemas for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The revision ID of the schema to retrieve. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=revisionID") + private String revisionID; + + /** + * The version ID of the Api to delete metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public GetSchemaRevisionRequest( + String apiID, + String revisionID, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(revisionID, "revisionID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.revisionID = revisionID; + this.versionID = versionID; + } + + /** + * The ID of the Api to retrieve schemas for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The revision ID of the schema to retrieve. + */ + @JsonIgnore + public String revisionID() { + return revisionID; + } + + /** + * The version ID of the Api to delete metadata for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to retrieve schemas for. + */ + public GetSchemaRevisionRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The revision ID of the schema to retrieve. + */ + public GetSchemaRevisionRequest withRevisionID(String revisionID) { + Utils.checkNotNull(revisionID, "revisionID"); + this.revisionID = revisionID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public GetSchemaRevisionRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSchemaRevisionRequest other = (GetSchemaRevisionRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.revisionID, other.revisionID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + revisionID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(GetSchemaRevisionRequest.class, + "apiID", apiID, + "revisionID", revisionID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String revisionID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to retrieve schemas for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The revision ID of the schema to retrieve. + */ + public Builder revisionID(String revisionID) { + Utils.checkNotNull(revisionID, "revisionID"); + this.revisionID = revisionID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public GetSchemaRevisionRequest build() { + return new GetSchemaRevisionRequest( + apiID, + revisionID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionRequestBuilder.java new file mode 100644 index 00000000..aa945683 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetSchemaRevisionRequestBuilder { + + private GetSchemaRevisionRequest request; + private final SDKMethodInterfaces.MethodCallGetSchemaRevision sdk; + + public GetSchemaRevisionRequestBuilder(SDKMethodInterfaces.MethodCallGetSchemaRevision sdk) { + this.sdk = sdk; + } + + public GetSchemaRevisionRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRevisionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSchemaRevisionResponse call() throws Exception { + + return sdk.getSchemaRevision( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionResponse.java new file mode 100644 index 00000000..1ecfad27 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemaRevisionResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.Schema; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetSchemaRevisionResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional schema; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetSchemaRevisionResponse( + String contentType, + Optional error, + Optional schema, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(schema, "schema"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.schema = schema; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetSchemaRevisionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional schema() { + return (Optional) schema; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetSchemaRevisionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetSchemaRevisionResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetSchemaRevisionResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GetSchemaRevisionResponse withSchema(Schema schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = Optional.ofNullable(schema); + return this; + } + + /** + * OK + */ + public GetSchemaRevisionResponse withSchema(Optional schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = schema; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSchemaRevisionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSchemaRevisionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSchemaRevisionResponse other = (GetSchemaRevisionResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.schema, other.schema) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + schema, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetSchemaRevisionResponse.class, + "contentType", contentType, + "error", error, + "schema", schema, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional schema = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder schema(Schema schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = Optional.ofNullable(schema); + return this; + } + + /** + * OK + */ + public Builder schema(Optional schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = schema; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetSchemaRevisionResponse build() { + return new GetSchemaRevisionResponse( + contentType, + error, + schema, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasRequest.java new file mode 100644 index 00000000..a163ff6e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasRequest.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetSchemasRequest { + + /** + * The ID of the Api to retrieve schemas for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api to delete metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public GetSchemasRequest( + String apiID, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The ID of the Api to retrieve schemas for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api to delete metadata for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to retrieve schemas for. + */ + public GetSchemasRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public GetSchemasRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSchemasRequest other = (GetSchemasRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(GetSchemasRequest.class, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to retrieve schemas for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public GetSchemasRequest build() { + return new GetSchemasRequest( + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasRequestBuilder.java new file mode 100644 index 00000000..0f0386b0 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetSchemasRequestBuilder { + + private GetSchemasRequest request; + private final SDKMethodInterfaces.MethodCallGetSchemas sdk; + + public GetSchemasRequestBuilder(SDKMethodInterfaces.MethodCallGetSchemas sdk) { + this.sdk = sdk; + } + + public GetSchemasRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetSchemasRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetSchemasResponse call() throws Exception { + + return sdk.getSchemas( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasResponse.java new file mode 100644 index 00000000..ef8bc9a7 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetSchemasResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.Schema; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetSchemasResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional> classes; + + @JsonCreator + public GetSchemasResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse, + Optional> classes) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(classes, "classes"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.classes = classes; + } + + public GetSchemasResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> classes() { + return (Optional>) classes; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetSchemasResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetSchemasResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetSchemasResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetSchemasResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetSchemasResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetSchemasResponse withClasses(List classes) { + Utils.checkNotNull(classes, "classes"); + this.classes = Optional.ofNullable(classes); + return this; + } + + /** + * OK + */ + public GetSchemasResponse withClasses(Optional> classes) { + Utils.checkNotNull(classes, "classes"); + this.classes = classes; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSchemasResponse other = (GetSchemasResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.classes, other.classes); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse, + classes); + } + + @Override + public String toString() { + return Utils.toString(GetSchemasResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse, + "classes", classes); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional> classes = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public Builder classes(List classes) { + Utils.checkNotNull(classes, "classes"); + this.classes = Optional.ofNullable(classes); + return this; + } + + /** + * OK + */ + public Builder classes(Optional> classes) { + Utils.checkNotNull(classes, "classes"); + this.classes = classes; + return this; + } + + public GetSchemasResponse build() { + return new GetSchemasResponse( + contentType, + error, + statusCode, + rawResponse, + classes); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsRequest.java new file mode 100644 index 00000000..c64a797c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsRequest.java @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetTagsRequest { + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name") + private String namespaceName; + + @JsonCreator + public GetTagsRequest( + String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + } + + @JsonIgnore + public String namespaceName() { + return namespaceName; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetTagsRequest withNamespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTagsRequest other = (GetTagsRequest) o; + return + Objects.deepEquals(this.namespaceName, other.namespaceName); + } + + @Override + public int hashCode() { + return Objects.hash( + namespaceName); + } + + @Override + public String toString() { + return Utils.toString(GetTagsRequest.class, + "namespaceName", namespaceName); + } + + public final static class Builder { + + private String namespaceName; + + private Builder() { + // force use of static builder() method + } + + public Builder namespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public GetTagsRequest build() { + return new GetTagsRequest( + namespaceName); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsRequestBuilder.java new file mode 100644 index 00000000..48513975 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetTagsRequestBuilder { + + private GetTagsRequest request; + private final SDKMethodInterfaces.MethodCallGetTags sdk; + + public GetTagsRequestBuilder(SDKMethodInterfaces.MethodCallGetTags sdk) { + this.sdk = sdk; + } + + public GetTagsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetTagsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetTagsResponse call() throws Exception { + + return sdk.getTags( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsResponse.java new file mode 100644 index 00000000..c106d018 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetTagsResponse.java @@ -0,0 +1,311 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetTagsResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional getTagsResponse; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetTagsResponse( + String contentType, + Optional error, + Optional getTagsResponse, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(getTagsResponse, "getTagsResponse"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.getTagsResponse = getTagsResponse; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetTagsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional getTagsResponse() { + return (Optional) getTagsResponse; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetTagsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetTagsResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetTagsResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GetTagsResponse withGetTagsResponse(dev.speakeasyapi.javaclientsdk.models.shared.GetTagsResponse getTagsResponse) { + Utils.checkNotNull(getTagsResponse, "getTagsResponse"); + this.getTagsResponse = Optional.ofNullable(getTagsResponse); + return this; + } + + /** + * OK + */ + public GetTagsResponse withGetTagsResponse(Optional getTagsResponse) { + Utils.checkNotNull(getTagsResponse, "getTagsResponse"); + this.getTagsResponse = getTagsResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetTagsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetTagsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTagsResponse other = (GetTagsResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.getTagsResponse, other.getTagsResponse) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + getTagsResponse, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetTagsResponse.class, + "contentType", contentType, + "error", error, + "getTagsResponse", getTagsResponse, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional getTagsResponse = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder getTagsResponse(dev.speakeasyapi.javaclientsdk.models.shared.GetTagsResponse getTagsResponse) { + Utils.checkNotNull(getTagsResponse, "getTagsResponse"); + this.getTagsResponse = Optional.ofNullable(getTagsResponse); + return this; + } + + /** + * OK + */ + public Builder getTagsResponse(Optional getTagsResponse) { + Utils.checkNotNull(getTagsResponse, "getTagsResponse"); + this.getTagsResponse = getTagsResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetTagsResponse build() { + return new GetTagsResponse( + contentType, + error, + getTagsResponse, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetUserRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetUserRequestBuilder.java new file mode 100644 index 00000000..db465cff --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetUserRequestBuilder.java @@ -0,0 +1,20 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +public class GetUserRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetUser sdk; + + public GetUserRequestBuilder(SDKMethodInterfaces.MethodCallGetUser sdk) { + this.sdk = sdk; + } + + public GetUserResponse call() throws Exception { + + return sdk.getUserDirect(); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetUserResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetUserResponse.java new file mode 100644 index 00000000..b8578119 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetUserResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.User; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetUserResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional user; + + @JsonCreator + public GetUserResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse, + Optional user) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(user, "user"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.user = user; + } + + public GetUserResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional user() { + return (Optional) user; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetUserResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetUserResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetUserResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetUserResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetUserResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetUserResponse withUser(User user) { + Utils.checkNotNull(user, "user"); + this.user = Optional.ofNullable(user); + return this; + } + + /** + * OK + */ + public GetUserResponse withUser(Optional user) { + Utils.checkNotNull(user, "user"); + this.user = user; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUserResponse other = (GetUserResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.user, other.user); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse, + user); + } + + @Override + public String toString() { + return Utils.toString(GetUserResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse, + "user", user); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional user = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public Builder user(User user) { + Utils.checkNotNull(user, "user"); + this.user = Optional.ofNullable(user); + return this; + } + + /** + * OK + */ + public Builder user(Optional user) { + Utils.checkNotNull(user, "user"); + this.user = user; + return this; + } + + public GetUserResponse build() { + return new GetUserResponse( + contentType, + error, + statusCode, + rawResponse, + user); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetValidEmbedAccessTokensRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetValidEmbedAccessTokensRequestBuilder.java new file mode 100644 index 00000000..420faf42 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetValidEmbedAccessTokensRequestBuilder.java @@ -0,0 +1,20 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +public class GetValidEmbedAccessTokensRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetValidEmbedAccessTokens sdk; + + public GetValidEmbedAccessTokensRequestBuilder(SDKMethodInterfaces.MethodCallGetValidEmbedAccessTokens sdk) { + this.sdk = sdk; + } + + public GetValidEmbedAccessTokensResponse call() throws Exception { + + return sdk.getValidEmbedAccessTokensDirect(); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetValidEmbedAccessTokensResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetValidEmbedAccessTokensResponse.java new file mode 100644 index 00000000..b6792434 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetValidEmbedAccessTokensResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.EmbedToken; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetValidEmbedAccessTokensResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * OK + */ + private Optional> embedTokens; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetValidEmbedAccessTokensResponse( + String contentType, + Optional> embedTokens, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(embedTokens, "embedTokens"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.embedTokens = embedTokens; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetValidEmbedAccessTokensResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> embedTokens() { + return (Optional>) embedTokens; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetValidEmbedAccessTokensResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * OK + */ + public GetValidEmbedAccessTokensResponse withEmbedTokens(List embedTokens) { + Utils.checkNotNull(embedTokens, "embedTokens"); + this.embedTokens = Optional.ofNullable(embedTokens); + return this; + } + + /** + * OK + */ + public GetValidEmbedAccessTokensResponse withEmbedTokens(Optional> embedTokens) { + Utils.checkNotNull(embedTokens, "embedTokens"); + this.embedTokens = embedTokens; + return this; + } + + /** + * Default error response + */ + public GetValidEmbedAccessTokensResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetValidEmbedAccessTokensResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetValidEmbedAccessTokensResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetValidEmbedAccessTokensResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetValidEmbedAccessTokensResponse other = (GetValidEmbedAccessTokensResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.embedTokens, other.embedTokens) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + embedTokens, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetValidEmbedAccessTokensResponse.class, + "contentType", contentType, + "embedTokens", embedTokens, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional> embedTokens = Optional.empty(); + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * OK + */ + public Builder embedTokens(List embedTokens) { + Utils.checkNotNull(embedTokens, "embedTokens"); + this.embedTokens = Optional.ofNullable(embedTokens); + return this; + } + + /** + * OK + */ + public Builder embedTokens(Optional> embedTokens) { + Utils.checkNotNull(embedTokens, "embedTokens"); + this.embedTokens = embedTokens; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetValidEmbedAccessTokensResponse build() { + return new GetValidEmbedAccessTokensResponse( + contentType, + embedTokens, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataRequest.java new file mode 100644 index 00000000..f2865159 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataRequest.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GetVersionMetadataRequest { + + /** + * The ID of the Api to retrieve metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api to retrieve metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public GetVersionMetadataRequest( + String apiID, + String versionID) { + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The ID of the Api to retrieve metadata for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api to retrieve metadata for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api to retrieve metadata for. + */ + public GetVersionMetadataRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to retrieve metadata for. + */ + public GetVersionMetadataRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetVersionMetadataRequest other = (GetVersionMetadataRequest) o; + return + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(GetVersionMetadataRequest.class, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api to retrieve metadata for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to retrieve metadata for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public GetVersionMetadataRequest build() { + return new GetVersionMetadataRequest( + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataRequestBuilder.java new file mode 100644 index 00000000..1d230439 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetVersionMetadataRequestBuilder { + + private GetVersionMetadataRequest request; + private final SDKMethodInterfaces.MethodCallGetVersionMetadata sdk; + + public GetVersionMetadataRequestBuilder(SDKMethodInterfaces.MethodCallGetVersionMetadata sdk) { + this.sdk = sdk; + } + + public GetVersionMetadataRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetVersionMetadataRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetVersionMetadataResponse call() throws Exception { + + return sdk.getVersionMetadata( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataResponse.java new file mode 100644 index 00000000..d6fae6b7 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetVersionMetadataResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.VersionMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetVersionMetadataResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional> versionMetadata; + + @JsonCreator + public GetVersionMetadataResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse, + Optional> versionMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(versionMetadata, "versionMetadata"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.versionMetadata = versionMetadata; + } + + public GetVersionMetadataResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> versionMetadata() { + return (Optional>) versionMetadata; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetVersionMetadataResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetVersionMetadataResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetVersionMetadataResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetVersionMetadataResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetVersionMetadataResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetVersionMetadataResponse withVersionMetadata(List versionMetadata) { + Utils.checkNotNull(versionMetadata, "versionMetadata"); + this.versionMetadata = Optional.ofNullable(versionMetadata); + return this; + } + + /** + * OK + */ + public GetVersionMetadataResponse withVersionMetadata(Optional> versionMetadata) { + Utils.checkNotNull(versionMetadata, "versionMetadata"); + this.versionMetadata = versionMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetVersionMetadataResponse other = (GetVersionMetadataResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.versionMetadata, other.versionMetadata); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse, + versionMetadata); + } + + @Override + public String toString() { + return Utils.toString(GetVersionMetadataResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse, + "versionMetadata", versionMetadata); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional> versionMetadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public Builder versionMetadata(List versionMetadata) { + Utils.checkNotNull(versionMetadata, "versionMetadata"); + this.versionMetadata = Optional.ofNullable(versionMetadata); + return this; + } + + /** + * OK + */ + public Builder versionMetadata(Optional> versionMetadata) { + Utils.checkNotNull(versionMetadata, "versionMetadata"); + this.versionMetadata = versionMetadata; + return this; + } + + public GetVersionMetadataResponse build() { + return new GetVersionMetadataResponse( + contentType, + error, + statusCode, + rawResponse, + versionMetadata); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessRequest.java new file mode 100644 index 00000000..d8696aaa --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessRequest.java @@ -0,0 +1,243 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class GetWorkspaceAccessRequest { + + /** + * Unique identifier of the generation target. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=genLockId") + private Optional genLockId; + + /** + * Skip side-effects like incrementing metrics. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=passive") + private Optional passive; + + /** + * The type of the generated target. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=targetType") + private Optional targetType; + + @JsonCreator + public GetWorkspaceAccessRequest( + Optional genLockId, + Optional passive, + Optional targetType) { + Utils.checkNotNull(genLockId, "genLockId"); + Utils.checkNotNull(passive, "passive"); + Utils.checkNotNull(targetType, "targetType"); + this.genLockId = genLockId; + this.passive = passive; + this.targetType = targetType; + } + + public GetWorkspaceAccessRequest() { + this(Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Unique identifier of the generation target. + */ + @JsonIgnore + public Optional genLockId() { + return genLockId; + } + + /** + * Skip side-effects like incrementing metrics. + */ + @JsonIgnore + public Optional passive() { + return passive; + } + + /** + * The type of the generated target. + */ + @JsonIgnore + public Optional targetType() { + return targetType; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Unique identifier of the generation target. + */ + public GetWorkspaceAccessRequest withGenLockId(String genLockId) { + Utils.checkNotNull(genLockId, "genLockId"); + this.genLockId = Optional.ofNullable(genLockId); + return this; + } + + /** + * Unique identifier of the generation target. + */ + public GetWorkspaceAccessRequest withGenLockId(Optional genLockId) { + Utils.checkNotNull(genLockId, "genLockId"); + this.genLockId = genLockId; + return this; + } + + /** + * Skip side-effects like incrementing metrics. + */ + public GetWorkspaceAccessRequest withPassive(boolean passive) { + Utils.checkNotNull(passive, "passive"); + this.passive = Optional.ofNullable(passive); + return this; + } + + /** + * Skip side-effects like incrementing metrics. + */ + public GetWorkspaceAccessRequest withPassive(Optional passive) { + Utils.checkNotNull(passive, "passive"); + this.passive = passive; + return this; + } + + /** + * The type of the generated target. + */ + public GetWorkspaceAccessRequest withTargetType(String targetType) { + Utils.checkNotNull(targetType, "targetType"); + this.targetType = Optional.ofNullable(targetType); + return this; + } + + /** + * The type of the generated target. + */ + public GetWorkspaceAccessRequest withTargetType(Optional targetType) { + Utils.checkNotNull(targetType, "targetType"); + this.targetType = targetType; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWorkspaceAccessRequest other = (GetWorkspaceAccessRequest) o; + return + Objects.deepEquals(this.genLockId, other.genLockId) && + Objects.deepEquals(this.passive, other.passive) && + Objects.deepEquals(this.targetType, other.targetType); + } + + @Override + public int hashCode() { + return Objects.hash( + genLockId, + passive, + targetType); + } + + @Override + public String toString() { + return Utils.toString(GetWorkspaceAccessRequest.class, + "genLockId", genLockId, + "passive", passive, + "targetType", targetType); + } + + public final static class Builder { + + private Optional genLockId = Optional.empty(); + + private Optional passive = Optional.empty(); + + private Optional targetType = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Unique identifier of the generation target. + */ + public Builder genLockId(String genLockId) { + Utils.checkNotNull(genLockId, "genLockId"); + this.genLockId = Optional.ofNullable(genLockId); + return this; + } + + /** + * Unique identifier of the generation target. + */ + public Builder genLockId(Optional genLockId) { + Utils.checkNotNull(genLockId, "genLockId"); + this.genLockId = genLockId; + return this; + } + + /** + * Skip side-effects like incrementing metrics. + */ + public Builder passive(boolean passive) { + Utils.checkNotNull(passive, "passive"); + this.passive = Optional.ofNullable(passive); + return this; + } + + /** + * Skip side-effects like incrementing metrics. + */ + public Builder passive(Optional passive) { + Utils.checkNotNull(passive, "passive"); + this.passive = passive; + return this; + } + + /** + * The type of the generated target. + */ + public Builder targetType(String targetType) { + Utils.checkNotNull(targetType, "targetType"); + this.targetType = Optional.ofNullable(targetType); + return this; + } + + /** + * The type of the generated target. + */ + public Builder targetType(Optional targetType) { + Utils.checkNotNull(targetType, "targetType"); + this.targetType = targetType; + return this; + } + + public GetWorkspaceAccessRequest build() { + return new GetWorkspaceAccessRequest( + genLockId, + passive, + targetType); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessRequestBuilder.java new file mode 100644 index 00000000..c75fa31c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessRequestBuilder.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Options; +import dev.speakeasyapi.javaclientsdk.utils.RetryConfig; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.util.Optional; + +public class GetWorkspaceAccessRequestBuilder { + + private GetWorkspaceAccessRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKMethodInterfaces.MethodCallGetWorkspaceAccess sdk; + + public GetWorkspaceAccessRequestBuilder(SDKMethodInterfaces.MethodCallGetWorkspaceAccess sdk) { + this.sdk = sdk; + } + + public GetWorkspaceAccessRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetWorkspaceAccessRequestBuilder retryConfig(dev.speakeasyapi.javaclientsdk.utils.RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public GetWorkspaceAccessRequestBuilder retryConfig(java.util.Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public GetWorkspaceAccessResponse call() throws Exception { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + return sdk.getWorkspaceAccess( + request, + options); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessResponse.java new file mode 100644 index 00000000..b8d9cedc --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceAccessResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.AccessDetails; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetWorkspaceAccessResponse implements Response { + + /** + * OK + */ + private Optional accessDetails; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetWorkspaceAccessResponse( + Optional accessDetails, + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(accessDetails, "accessDetails"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.accessDetails = accessDetails; + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetWorkspaceAccessResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accessDetails() { + return (Optional) accessDetails; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public GetWorkspaceAccessResponse withAccessDetails(AccessDetails accessDetails) { + Utils.checkNotNull(accessDetails, "accessDetails"); + this.accessDetails = Optional.ofNullable(accessDetails); + return this; + } + + /** + * OK + */ + public GetWorkspaceAccessResponse withAccessDetails(Optional accessDetails) { + Utils.checkNotNull(accessDetails, "accessDetails"); + this.accessDetails = accessDetails; + return this; + } + + /** + * HTTP response content type for this operation + */ + public GetWorkspaceAccessResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetWorkspaceAccessResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetWorkspaceAccessResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWorkspaceAccessResponse other = (GetWorkspaceAccessResponse) o; + return + Objects.deepEquals(this.accessDetails, other.accessDetails) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + accessDetails, + contentType, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetWorkspaceAccessResponse.class, + "accessDetails", accessDetails, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional accessDetails = Optional.empty(); + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder accessDetails(AccessDetails accessDetails) { + Utils.checkNotNull(accessDetails, "accessDetails"); + this.accessDetails = Optional.ofNullable(accessDetails); + return this; + } + + /** + * OK + */ + public Builder accessDetails(Optional accessDetails) { + Utils.checkNotNull(accessDetails, "accessDetails"); + this.accessDetails = accessDetails; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetWorkspaceAccessResponse build() { + return new GetWorkspaceAccessResponse( + accessDetails, + contentType, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetRequest.java new file mode 100644 index 00000000..54d07582 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetRequest.java @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.Optional; + + +public class GetWorkspaceEventsByTargetRequest { + + /** + * Filter to only return events created after this timestamp + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=after_created_at") + private Optional afterCreatedAt; + + /** + * Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=targetID") + private String targetID; + + /** + * Unique identifier of the workspace. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=workspaceID") + private Optional workspaceID; + + @JsonCreator + public GetWorkspaceEventsByTargetRequest( + Optional afterCreatedAt, + String targetID, + Optional workspaceID) { + Utils.checkNotNull(afterCreatedAt, "afterCreatedAt"); + Utils.checkNotNull(targetID, "targetID"); + Utils.checkNotNull(workspaceID, "workspaceID"); + this.afterCreatedAt = afterCreatedAt; + this.targetID = targetID; + this.workspaceID = workspaceID; + } + + public GetWorkspaceEventsByTargetRequest( + String targetID) { + this(Optional.empty(), targetID, Optional.empty()); + } + + /** + * Filter to only return events created after this timestamp + */ + @JsonIgnore + public Optional afterCreatedAt() { + return afterCreatedAt; + } + + /** + * Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) + */ + @JsonIgnore + public String targetID() { + return targetID; + } + + /** + * Unique identifier of the workspace. + */ + @JsonIgnore + public Optional workspaceID() { + return workspaceID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Filter to only return events created after this timestamp + */ + public GetWorkspaceEventsByTargetRequest withAfterCreatedAt(OffsetDateTime afterCreatedAt) { + Utils.checkNotNull(afterCreatedAt, "afterCreatedAt"); + this.afterCreatedAt = Optional.ofNullable(afterCreatedAt); + return this; + } + + /** + * Filter to only return events created after this timestamp + */ + public GetWorkspaceEventsByTargetRequest withAfterCreatedAt(Optional afterCreatedAt) { + Utils.checkNotNull(afterCreatedAt, "afterCreatedAt"); + this.afterCreatedAt = afterCreatedAt; + return this; + } + + /** + * Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) + */ + public GetWorkspaceEventsByTargetRequest withTargetID(String targetID) { + Utils.checkNotNull(targetID, "targetID"); + this.targetID = targetID; + return this; + } + + /** + * Unique identifier of the workspace. + */ + public GetWorkspaceEventsByTargetRequest withWorkspaceID(String workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = Optional.ofNullable(workspaceID); + return this; + } + + /** + * Unique identifier of the workspace. + */ + public GetWorkspaceEventsByTargetRequest withWorkspaceID(Optional workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = workspaceID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWorkspaceEventsByTargetRequest other = (GetWorkspaceEventsByTargetRequest) o; + return + Objects.deepEquals(this.afterCreatedAt, other.afterCreatedAt) && + Objects.deepEquals(this.targetID, other.targetID) && + Objects.deepEquals(this.workspaceID, other.workspaceID); + } + + @Override + public int hashCode() { + return Objects.hash( + afterCreatedAt, + targetID, + workspaceID); + } + + @Override + public String toString() { + return Utils.toString(GetWorkspaceEventsByTargetRequest.class, + "afterCreatedAt", afterCreatedAt, + "targetID", targetID, + "workspaceID", workspaceID); + } + + public final static class Builder { + + private Optional afterCreatedAt = Optional.empty(); + + private String targetID; + + private Optional workspaceID = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Filter to only return events created after this timestamp + */ + public Builder afterCreatedAt(OffsetDateTime afterCreatedAt) { + Utils.checkNotNull(afterCreatedAt, "afterCreatedAt"); + this.afterCreatedAt = Optional.ofNullable(afterCreatedAt); + return this; + } + + /** + * Filter to only return events created after this timestamp + */ + public Builder afterCreatedAt(Optional afterCreatedAt) { + Utils.checkNotNull(afterCreatedAt, "afterCreatedAt"); + this.afterCreatedAt = afterCreatedAt; + return this; + } + + /** + * Filter to only return events corresponding to a particular gen_lock_id (gen_lock_id uniquely identifies a target) + */ + public Builder targetID(String targetID) { + Utils.checkNotNull(targetID, "targetID"); + this.targetID = targetID; + return this; + } + + /** + * Unique identifier of the workspace. + */ + public Builder workspaceID(String workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = Optional.ofNullable(workspaceID); + return this; + } + + /** + * Unique identifier of the workspace. + */ + public Builder workspaceID(Optional workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = workspaceID; + return this; + } + + public GetWorkspaceEventsByTargetRequest build() { + return new GetWorkspaceEventsByTargetRequest( + afterCreatedAt, + targetID, + workspaceID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetRequestBuilder.java new file mode 100644 index 00000000..42eccef7 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetWorkspaceEventsByTargetRequestBuilder { + + private GetWorkspaceEventsByTargetRequest request; + private final SDKMethodInterfaces.MethodCallGetWorkspaceEventsByTarget sdk; + + public GetWorkspaceEventsByTargetRequestBuilder(SDKMethodInterfaces.MethodCallGetWorkspaceEventsByTarget sdk) { + this.sdk = sdk; + } + + public GetWorkspaceEventsByTargetRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceEventsByTargetRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetWorkspaceEventsByTargetResponse call() throws Exception { + + return sdk.getWorkspaceEventsByTarget( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetResponse.java new file mode 100644 index 00000000..a00c732a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceEventsByTargetResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.CliEvent; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetWorkspaceEventsByTargetResponse implements Response { + + /** + * Success + */ + private Optional> cliEventBatch; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetWorkspaceEventsByTargetResponse( + Optional> cliEventBatch, + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(cliEventBatch, "cliEventBatch"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.cliEventBatch = cliEventBatch; + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetWorkspaceEventsByTargetResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, statusCode, rawResponse); + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> cliEventBatch() { + return (Optional>) cliEventBatch; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Success + */ + public GetWorkspaceEventsByTargetResponse withCliEventBatch(List cliEventBatch) { + Utils.checkNotNull(cliEventBatch, "cliEventBatch"); + this.cliEventBatch = Optional.ofNullable(cliEventBatch); + return this; + } + + /** + * Success + */ + public GetWorkspaceEventsByTargetResponse withCliEventBatch(Optional> cliEventBatch) { + Utils.checkNotNull(cliEventBatch, "cliEventBatch"); + this.cliEventBatch = cliEventBatch; + return this; + } + + /** + * HTTP response content type for this operation + */ + public GetWorkspaceEventsByTargetResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetWorkspaceEventsByTargetResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetWorkspaceEventsByTargetResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWorkspaceEventsByTargetResponse other = (GetWorkspaceEventsByTargetResponse) o; + return + Objects.deepEquals(this.cliEventBatch, other.cliEventBatch) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + cliEventBatch, + contentType, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetWorkspaceEventsByTargetResponse.class, + "cliEventBatch", cliEventBatch, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> cliEventBatch = Optional.empty(); + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * Success + */ + public Builder cliEventBatch(List cliEventBatch) { + Utils.checkNotNull(cliEventBatch, "cliEventBatch"); + this.cliEventBatch = Optional.ofNullable(cliEventBatch); + return this; + } + + /** + * Success + */ + public Builder cliEventBatch(Optional> cliEventBatch) { + Utils.checkNotNull(cliEventBatch, "cliEventBatch"); + this.cliEventBatch = cliEventBatch; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GetWorkspaceEventsByTargetResponse build() { + return new GetWorkspaceEventsByTargetResponse( + cliEventBatch, + contentType, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceRequest.java new file mode 100644 index 00000000..ba7999fd --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceRequest.java @@ -0,0 +1,124 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class GetWorkspaceRequest { + + /** + * Unique identifier of the workspace. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=workspaceID") + private Optional workspaceID; + + @JsonCreator + public GetWorkspaceRequest( + Optional workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = workspaceID; + } + + public GetWorkspaceRequest() { + this(Optional.empty()); + } + + /** + * Unique identifier of the workspace. + */ + @JsonIgnore + public Optional workspaceID() { + return workspaceID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Unique identifier of the workspace. + */ + public GetWorkspaceRequest withWorkspaceID(String workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = Optional.ofNullable(workspaceID); + return this; + } + + /** + * Unique identifier of the workspace. + */ + public GetWorkspaceRequest withWorkspaceID(Optional workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = workspaceID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWorkspaceRequest other = (GetWorkspaceRequest) o; + return + Objects.deepEquals(this.workspaceID, other.workspaceID); + } + + @Override + public int hashCode() { + return Objects.hash( + workspaceID); + } + + @Override + public String toString() { + return Utils.toString(GetWorkspaceRequest.class, + "workspaceID", workspaceID); + } + + public final static class Builder { + + private Optional workspaceID = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Unique identifier of the workspace. + */ + public Builder workspaceID(String workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = Optional.ofNullable(workspaceID); + return this; + } + + /** + * Unique identifier of the workspace. + */ + public Builder workspaceID(Optional workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = workspaceID; + return this; + } + + public GetWorkspaceRequest build() { + return new GetWorkspaceRequest( + workspaceID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceRequestBuilder.java new file mode 100644 index 00000000..12068c45 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetWorkspaceRequestBuilder { + + private GetWorkspaceRequest request; + private final SDKMethodInterfaces.MethodCallGetWorkspace sdk; + + public GetWorkspaceRequestBuilder(SDKMethodInterfaces.MethodCallGetWorkspace sdk) { + this.sdk = sdk; + } + + public GetWorkspaceRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetWorkspaceResponse call() throws Exception { + + return sdk.getWorkspace( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceResponse.java new file mode 100644 index 00000000..c2810303 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.Workspace; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GetWorkspaceResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional workspace; + + @JsonCreator + public GetWorkspaceResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse, + Optional workspace) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(workspace, "workspace"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.workspace = workspace; + } + + public GetWorkspaceResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional workspace() { + return (Optional) workspace; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetWorkspaceResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GetWorkspaceResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GetWorkspaceResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetWorkspaceResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetWorkspaceResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public GetWorkspaceResponse withWorkspace(Workspace workspace) { + Utils.checkNotNull(workspace, "workspace"); + this.workspace = Optional.ofNullable(workspace); + return this; + } + + /** + * OK + */ + public GetWorkspaceResponse withWorkspace(Optional workspace) { + Utils.checkNotNull(workspace, "workspace"); + this.workspace = workspace; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWorkspaceResponse other = (GetWorkspaceResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.workspace, other.workspace); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse, + workspace); + } + + @Override + public String toString() { + return Utils.toString(GetWorkspaceResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse, + "workspace", workspace); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional workspace = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public Builder workspace(Workspace workspace) { + Utils.checkNotNull(workspace, "workspace"); + this.workspace = Optional.ofNullable(workspace); + return this; + } + + /** + * OK + */ + public Builder workspace(Optional workspace) { + Utils.checkNotNull(workspace, "workspace"); + this.workspace = workspace; + return this; + } + + public GetWorkspaceResponse build() { + return new GetWorkspaceResponse( + contentType, + error, + statusCode, + rawResponse, + workspace); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsRequest.java new file mode 100644 index 00000000..880e23ea --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsRequest.java @@ -0,0 +1,184 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.Optional; + + +public class GetWorkspaceTargetsRequest { + + /** + * Filter to only return targets with events created after this timestamp + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=after_last_event_created_at") + private Optional afterLastEventCreatedAt; + + /** + * Unique identifier of the workspace. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=workspaceID") + private Optional workspaceID; + + @JsonCreator + public GetWorkspaceTargetsRequest( + Optional afterLastEventCreatedAt, + Optional workspaceID) { + Utils.checkNotNull(afterLastEventCreatedAt, "afterLastEventCreatedAt"); + Utils.checkNotNull(workspaceID, "workspaceID"); + this.afterLastEventCreatedAt = afterLastEventCreatedAt; + this.workspaceID = workspaceID; + } + + public GetWorkspaceTargetsRequest() { + this(Optional.empty(), Optional.empty()); + } + + /** + * Filter to only return targets with events created after this timestamp + */ + @JsonIgnore + public Optional afterLastEventCreatedAt() { + return afterLastEventCreatedAt; + } + + /** + * Unique identifier of the workspace. + */ + @JsonIgnore + public Optional workspaceID() { + return workspaceID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Filter to only return targets with events created after this timestamp + */ + public GetWorkspaceTargetsRequest withAfterLastEventCreatedAt(OffsetDateTime afterLastEventCreatedAt) { + Utils.checkNotNull(afterLastEventCreatedAt, "afterLastEventCreatedAt"); + this.afterLastEventCreatedAt = Optional.ofNullable(afterLastEventCreatedAt); + return this; + } + + /** + * Filter to only return targets with events created after this timestamp + */ + public GetWorkspaceTargetsRequest withAfterLastEventCreatedAt(Optional afterLastEventCreatedAt) { + Utils.checkNotNull(afterLastEventCreatedAt, "afterLastEventCreatedAt"); + this.afterLastEventCreatedAt = afterLastEventCreatedAt; + return this; + } + + /** + * Unique identifier of the workspace. + */ + public GetWorkspaceTargetsRequest withWorkspaceID(String workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = Optional.ofNullable(workspaceID); + return this; + } + + /** + * Unique identifier of the workspace. + */ + public GetWorkspaceTargetsRequest withWorkspaceID(Optional workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = workspaceID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWorkspaceTargetsRequest other = (GetWorkspaceTargetsRequest) o; + return + Objects.deepEquals(this.afterLastEventCreatedAt, other.afterLastEventCreatedAt) && + Objects.deepEquals(this.workspaceID, other.workspaceID); + } + + @Override + public int hashCode() { + return Objects.hash( + afterLastEventCreatedAt, + workspaceID); + } + + @Override + public String toString() { + return Utils.toString(GetWorkspaceTargetsRequest.class, + "afterLastEventCreatedAt", afterLastEventCreatedAt, + "workspaceID", workspaceID); + } + + public final static class Builder { + + private Optional afterLastEventCreatedAt = Optional.empty(); + + private Optional workspaceID = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Filter to only return targets with events created after this timestamp + */ + public Builder afterLastEventCreatedAt(OffsetDateTime afterLastEventCreatedAt) { + Utils.checkNotNull(afterLastEventCreatedAt, "afterLastEventCreatedAt"); + this.afterLastEventCreatedAt = Optional.ofNullable(afterLastEventCreatedAt); + return this; + } + + /** + * Filter to only return targets with events created after this timestamp + */ + public Builder afterLastEventCreatedAt(Optional afterLastEventCreatedAt) { + Utils.checkNotNull(afterLastEventCreatedAt, "afterLastEventCreatedAt"); + this.afterLastEventCreatedAt = afterLastEventCreatedAt; + return this; + } + + /** + * Unique identifier of the workspace. + */ + public Builder workspaceID(String workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = Optional.ofNullable(workspaceID); + return this; + } + + /** + * Unique identifier of the workspace. + */ + public Builder workspaceID(Optional workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = workspaceID; + return this; + } + + public GetWorkspaceTargetsRequest build() { + return new GetWorkspaceTargetsRequest( + afterLastEventCreatedAt, + workspaceID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsRequestBuilder.java new file mode 100644 index 00000000..d0ceca0a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GetWorkspaceTargetsRequestBuilder { + + private GetWorkspaceTargetsRequest request; + private final SDKMethodInterfaces.MethodCallGetWorkspaceTargets sdk; + + public GetWorkspaceTargetsRequestBuilder(SDKMethodInterfaces.MethodCallGetWorkspaceTargets sdk) { + this.sdk = sdk; + } + + public GetWorkspaceTargetsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceTargetsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetWorkspaceTargetsResponse call() throws Exception { + + return sdk.getWorkspaceTargets( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsResponse.java new file mode 100644 index 00000000..a27f41c3 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GetWorkspaceTargetsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.TargetSDK; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class GetWorkspaceTargetsResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Success + */ + private Optional> targetSDKList; + + @JsonCreator + public GetWorkspaceTargetsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional> targetSDKList) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(targetSDKList, "targetSDKList"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.targetSDKList = targetSDKList; + } + + public GetWorkspaceTargetsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> targetSDKList() { + return (Optional>) targetSDKList; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GetWorkspaceTargetsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetWorkspaceTargetsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetWorkspaceTargetsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public GetWorkspaceTargetsResponse withTargetSDKList(List targetSDKList) { + Utils.checkNotNull(targetSDKList, "targetSDKList"); + this.targetSDKList = Optional.ofNullable(targetSDKList); + return this; + } + + /** + * Success + */ + public GetWorkspaceTargetsResponse withTargetSDKList(Optional> targetSDKList) { + Utils.checkNotNull(targetSDKList, "targetSDKList"); + this.targetSDKList = targetSDKList; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetWorkspaceTargetsResponse other = (GetWorkspaceTargetsResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.targetSDKList, other.targetSDKList); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse, + targetSDKList); + } + + @Override + public String toString() { + return Utils.toString(GetWorkspaceTargetsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "targetSDKList", targetSDKList); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional> targetSDKList = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public Builder targetSDKList(List targetSDKList) { + Utils.checkNotNull(targetSDKList, "targetSDKList"); + this.targetSDKList = Optional.ofNullable(targetSDKList); + return this; + } + + /** + * Success + */ + public Builder targetSDKList(Optional> targetSDKList) { + Utils.checkNotNull(targetSDKList, "targetSDKList"); + this.targetSDKList = targetSDKList; + return this; + } + + public GetWorkspaceTargetsResponse build() { + return new GetWorkspaceTargetsResponse( + contentType, + statusCode, + rawResponse, + targetSDKList); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsRequest.java new file mode 100644 index 00000000..f161da84 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsRequest.java @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GithubCheckPublishingSecretsRequest { + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=generate_gen_lock_id") + private String generateGenLockId; + + @JsonCreator + public GithubCheckPublishingSecretsRequest( + String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + } + + @JsonIgnore + public String generateGenLockId() { + return generateGenLockId; + } + + public final static Builder builder() { + return new Builder(); + } + + public GithubCheckPublishingSecretsRequest withGenerateGenLockId(String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GithubCheckPublishingSecretsRequest other = (GithubCheckPublishingSecretsRequest) o; + return + Objects.deepEquals(this.generateGenLockId, other.generateGenLockId); + } + + @Override + public int hashCode() { + return Objects.hash( + generateGenLockId); + } + + @Override + public String toString() { + return Utils.toString(GithubCheckPublishingSecretsRequest.class, + "generateGenLockId", generateGenLockId); + } + + public final static class Builder { + + private String generateGenLockId; + + private Builder() { + // force use of static builder() method + } + + public Builder generateGenLockId(String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + return this; + } + + public GithubCheckPublishingSecretsRequest build() { + return new GithubCheckPublishingSecretsRequest( + generateGenLockId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsRequestBuilder.java new file mode 100644 index 00000000..9f7aa5cb --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GithubCheckPublishingSecretsRequestBuilder { + + private GithubCheckPublishingSecretsRequest request; + private final SDKMethodInterfaces.MethodCallGithubCheckPublishingSecrets sdk; + + public GithubCheckPublishingSecretsRequestBuilder(SDKMethodInterfaces.MethodCallGithubCheckPublishingSecrets sdk) { + this.sdk = sdk; + } + + public GithubCheckPublishingSecretsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingSecretsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GithubCheckPublishingSecretsResponse call() throws Exception { + + return sdk.githubCheckPublishingSecrets( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsResponse.java new file mode 100644 index 00000000..379e30a8 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubCheckPublishingSecretsResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubMissingPublishingSecretsResponse; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GithubCheckPublishingSecretsResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional githubMissingPublishingSecretsResponse; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GithubCheckPublishingSecretsResponse( + String contentType, + Optional error, + Optional githubMissingPublishingSecretsResponse, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(githubMissingPublishingSecretsResponse, "githubMissingPublishingSecretsResponse"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.githubMissingPublishingSecretsResponse = githubMissingPublishingSecretsResponse; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GithubCheckPublishingSecretsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional githubMissingPublishingSecretsResponse() { + return (Optional) githubMissingPublishingSecretsResponse; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GithubCheckPublishingSecretsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GithubCheckPublishingSecretsResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GithubCheckPublishingSecretsResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public GithubCheckPublishingSecretsResponse withGithubMissingPublishingSecretsResponse(GithubMissingPublishingSecretsResponse githubMissingPublishingSecretsResponse) { + Utils.checkNotNull(githubMissingPublishingSecretsResponse, "githubMissingPublishingSecretsResponse"); + this.githubMissingPublishingSecretsResponse = Optional.ofNullable(githubMissingPublishingSecretsResponse); + return this; + } + + /** + * OK + */ + public GithubCheckPublishingSecretsResponse withGithubMissingPublishingSecretsResponse(Optional githubMissingPublishingSecretsResponse) { + Utils.checkNotNull(githubMissingPublishingSecretsResponse, "githubMissingPublishingSecretsResponse"); + this.githubMissingPublishingSecretsResponse = githubMissingPublishingSecretsResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GithubCheckPublishingSecretsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GithubCheckPublishingSecretsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GithubCheckPublishingSecretsResponse other = (GithubCheckPublishingSecretsResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.githubMissingPublishingSecretsResponse, other.githubMissingPublishingSecretsResponse) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + githubMissingPublishingSecretsResponse, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GithubCheckPublishingSecretsResponse.class, + "contentType", contentType, + "error", error, + "githubMissingPublishingSecretsResponse", githubMissingPublishingSecretsResponse, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional githubMissingPublishingSecretsResponse = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder githubMissingPublishingSecretsResponse(GithubMissingPublishingSecretsResponse githubMissingPublishingSecretsResponse) { + Utils.checkNotNull(githubMissingPublishingSecretsResponse, "githubMissingPublishingSecretsResponse"); + this.githubMissingPublishingSecretsResponse = Optional.ofNullable(githubMissingPublishingSecretsResponse); + return this; + } + + /** + * OK + */ + public Builder githubMissingPublishingSecretsResponse(Optional githubMissingPublishingSecretsResponse) { + Utils.checkNotNull(githubMissingPublishingSecretsResponse, "githubMissingPublishingSecretsResponse"); + this.githubMissingPublishingSecretsResponse = githubMissingPublishingSecretsResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GithubCheckPublishingSecretsResponse build() { + return new GithubCheckPublishingSecretsResponse( + contentType, + error, + githubMissingPublishingSecretsResponse, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubStorePublishingSecretsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubStorePublishingSecretsRequestBuilder.java new file mode 100644 index 00000000..5fd59d02 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubStorePublishingSecretsRequestBuilder.java @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.models.shared.GithubStorePublishingSecretsRequest; +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class GithubStorePublishingSecretsRequestBuilder { + + private GithubStorePublishingSecretsRequest request; + private final SDKMethodInterfaces.MethodCallGithubStorePublishingSecrets sdk; + + public GithubStorePublishingSecretsRequestBuilder(SDKMethodInterfaces.MethodCallGithubStorePublishingSecrets sdk) { + this.sdk = sdk; + } + + public GithubStorePublishingSecretsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.shared.GithubStorePublishingSecretsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GithubStorePublishingSecretsResponse call() throws Exception { + + return sdk.githubStorePublishingSecrets( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubStorePublishingSecretsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubStorePublishingSecretsResponse.java new file mode 100644 index 00000000..0ed1ee1e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/GithubStorePublishingSecretsResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class GithubStorePublishingSecretsResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GithubStorePublishingSecretsResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GithubStorePublishingSecretsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public GithubStorePublishingSecretsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public GithubStorePublishingSecretsResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public GithubStorePublishingSecretsResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GithubStorePublishingSecretsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GithubStorePublishingSecretsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GithubStorePublishingSecretsResponse other = (GithubStorePublishingSecretsResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GithubStorePublishingSecretsResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public GithubStorePublishingSecretsResponse build() { + return new GithubStorePublishingSecretsResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataRequest.java new file mode 100644 index 00000000..d3b82d5c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataRequest.java @@ -0,0 +1,184 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.VersionMetadataInput; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class InsertVersionMetadataRequest { + + /** + * A JSON representation of the metadata to insert. + */ + @SpeakeasyMetadata("request:mediaType=application/json") + private VersionMetadataInput versionMetadata; + + /** + * The ID of the Api to insert metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api to insert metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public InsertVersionMetadataRequest( + VersionMetadataInput versionMetadata, + String apiID, + String versionID) { + Utils.checkNotNull(versionMetadata, "versionMetadata"); + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.versionMetadata = versionMetadata; + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * A JSON representation of the metadata to insert. + */ + @JsonIgnore + public VersionMetadataInput versionMetadata() { + return versionMetadata; + } + + /** + * The ID of the Api to insert metadata for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api to insert metadata for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * A JSON representation of the metadata to insert. + */ + public InsertVersionMetadataRequest withVersionMetadata(VersionMetadataInput versionMetadata) { + Utils.checkNotNull(versionMetadata, "versionMetadata"); + this.versionMetadata = versionMetadata; + return this; + } + + /** + * The ID of the Api to insert metadata for. + */ + public InsertVersionMetadataRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to insert metadata for. + */ + public InsertVersionMetadataRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InsertVersionMetadataRequest other = (InsertVersionMetadataRequest) o; + return + Objects.deepEquals(this.versionMetadata, other.versionMetadata) && + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + versionMetadata, + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(InsertVersionMetadataRequest.class, + "versionMetadata", versionMetadata, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private VersionMetadataInput versionMetadata; + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * A JSON representation of the metadata to insert. + */ + public Builder versionMetadata(VersionMetadataInput versionMetadata) { + Utils.checkNotNull(versionMetadata, "versionMetadata"); + this.versionMetadata = versionMetadata; + return this; + } + + /** + * The ID of the Api to insert metadata for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to insert metadata for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public InsertVersionMetadataRequest build() { + return new InsertVersionMetadataRequest( + versionMetadata, + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataRequestBuilder.java new file mode 100644 index 00000000..b1c7bf42 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class InsertVersionMetadataRequestBuilder { + + private InsertVersionMetadataRequest request; + private final SDKMethodInterfaces.MethodCallInsertVersionMetadata sdk; + + public InsertVersionMetadataRequestBuilder(SDKMethodInterfaces.MethodCallInsertVersionMetadata sdk) { + this.sdk = sdk; + } + + public InsertVersionMetadataRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.InsertVersionMetadataRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public InsertVersionMetadataResponse call() throws Exception { + + return sdk.insertVersionMetadata( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataResponse.java new file mode 100644 index 00000000..e9193b0c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/InsertVersionMetadataResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.VersionMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class InsertVersionMetadataResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional versionMetadata; + + @JsonCreator + public InsertVersionMetadataResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse, + Optional versionMetadata) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(versionMetadata, "versionMetadata"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.versionMetadata = versionMetadata; + } + + public InsertVersionMetadataResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional versionMetadata() { + return (Optional) versionMetadata; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public InsertVersionMetadataResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public InsertVersionMetadataResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public InsertVersionMetadataResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public InsertVersionMetadataResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public InsertVersionMetadataResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public InsertVersionMetadataResponse withVersionMetadata(VersionMetadata versionMetadata) { + Utils.checkNotNull(versionMetadata, "versionMetadata"); + this.versionMetadata = Optional.ofNullable(versionMetadata); + return this; + } + + /** + * OK + */ + public InsertVersionMetadataResponse withVersionMetadata(Optional versionMetadata) { + Utils.checkNotNull(versionMetadata, "versionMetadata"); + this.versionMetadata = versionMetadata; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InsertVersionMetadataResponse other = (InsertVersionMetadataResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.versionMetadata, other.versionMetadata); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse, + versionMetadata); + } + + @Override + public String toString() { + return Utils.toString(InsertVersionMetadataResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse, + "versionMetadata", versionMetadata); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional versionMetadata = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public Builder versionMetadata(VersionMetadata versionMetadata) { + Utils.checkNotNull(versionMetadata, "versionMetadata"); + this.versionMetadata = Optional.ofNullable(versionMetadata); + return this; + } + + /** + * OK + */ + public Builder versionMetadata(Optional versionMetadata) { + Utils.checkNotNull(versionMetadata, "versionMetadata"); + this.versionMetadata = versionMetadata; + return this; + } + + public InsertVersionMetadataResponse build() { + return new InsertVersionMetadataResponse( + contentType, + error, + statusCode, + rawResponse, + versionMetadata); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/Op.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/Op.java new file mode 100644 index 00000000..8535b30c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/Op.java @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * Op - Configuration for filter operations + */ + +public class Op { + + /** + * Whether to AND or OR the filters + */ + @SpeakeasyMetadata("queryParam:name=and") + private boolean and; + + @JsonCreator + public Op( + boolean and) { + Utils.checkNotNull(and, "and"); + this.and = and; + } + + /** + * Whether to AND or OR the filters + */ + @JsonIgnore + public boolean and() { + return and; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Whether to AND or OR the filters + */ + public Op withAnd(boolean and) { + Utils.checkNotNull(and, "and"); + this.and = and; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Op other = (Op) o; + return + Objects.deepEquals(this.and, other.and); + } + + @Override + public int hashCode() { + return Objects.hash( + and); + } + + @Override + public String toString() { + return Utils.toString(Op.class, + "and", and); + } + + public final static class Builder { + + private Boolean and; + + private Builder() { + // force use of static builder() method + } + + /** + * Whether to AND or OR the filters + */ + public Builder and(boolean and) { + Utils.checkNotNull(and, "and"); + this.and = and; + return this; + } + + public Op build() { + return new Op( + and); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsRequest.java new file mode 100644 index 00000000..3fb4cbcf --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsRequest.java @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.AddTags; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class PostTagsRequest { + + /** + * A JSON representation of the tags to add + */ + @SpeakeasyMetadata("request:mediaType=application/json") + private Optional addTags; + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name") + private String namespaceName; + + @JsonCreator + public PostTagsRequest( + Optional addTags, + String namespaceName) { + Utils.checkNotNull(addTags, "addTags"); + Utils.checkNotNull(namespaceName, "namespaceName"); + this.addTags = addTags; + this.namespaceName = namespaceName; + } + + public PostTagsRequest( + String namespaceName) { + this(Optional.empty(), namespaceName); + } + + /** + * A JSON representation of the tags to add + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional addTags() { + return (Optional) addTags; + } + + @JsonIgnore + public String namespaceName() { + return namespaceName; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * A JSON representation of the tags to add + */ + public PostTagsRequest withAddTags(AddTags addTags) { + Utils.checkNotNull(addTags, "addTags"); + this.addTags = Optional.ofNullable(addTags); + return this; + } + + /** + * A JSON representation of the tags to add + */ + public PostTagsRequest withAddTags(Optional addTags) { + Utils.checkNotNull(addTags, "addTags"); + this.addTags = addTags; + return this; + } + + public PostTagsRequest withNamespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostTagsRequest other = (PostTagsRequest) o; + return + Objects.deepEquals(this.addTags, other.addTags) && + Objects.deepEquals(this.namespaceName, other.namespaceName); + } + + @Override + public int hashCode() { + return Objects.hash( + addTags, + namespaceName); + } + + @Override + public String toString() { + return Utils.toString(PostTagsRequest.class, + "addTags", addTags, + "namespaceName", namespaceName); + } + + public final static class Builder { + + private Optional addTags = Optional.empty(); + + private String namespaceName; + + private Builder() { + // force use of static builder() method + } + + /** + * A JSON representation of the tags to add + */ + public Builder addTags(AddTags addTags) { + Utils.checkNotNull(addTags, "addTags"); + this.addTags = Optional.ofNullable(addTags); + return this; + } + + /** + * A JSON representation of the tags to add + */ + public Builder addTags(Optional addTags) { + Utils.checkNotNull(addTags, "addTags"); + this.addTags = addTags; + return this; + } + + public Builder namespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public PostTagsRequest build() { + return new PostTagsRequest( + addTags, + namespaceName); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsRequestBuilder.java new file mode 100644 index 00000000..a526708b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class PostTagsRequestBuilder { + + private PostTagsRequest request; + private final SDKMethodInterfaces.MethodCallPostTags sdk; + + public PostTagsRequestBuilder(SDKMethodInterfaces.MethodCallPostTags sdk) { + this.sdk = sdk; + } + + public PostTagsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.PostTagsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public PostTagsResponse call() throws Exception { + + return sdk.postTags( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsResponse.java new file mode 100644 index 00000000..268cfa09 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostTagsResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class PostTagsResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public PostTagsResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public PostTagsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public PostTagsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public PostTagsResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public PostTagsResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PostTagsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PostTagsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostTagsResponse other = (PostTagsResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(PostTagsResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public PostTagsResponse build() { + return new PostTagsResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsRequest.java new file mode 100644 index 00000000..178ef47f --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsRequest.java @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.CliEvent; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class PostWorkspaceEventsRequest { + + @SpeakeasyMetadata("request:mediaType=application/json") + private List requestBody; + + /** + * Unique identifier of the workspace. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=workspaceID") + private Optional workspaceID; + + @JsonCreator + public PostWorkspaceEventsRequest( + List requestBody, + Optional workspaceID) { + Utils.checkNotNull(requestBody, "requestBody"); + Utils.checkNotNull(workspaceID, "workspaceID"); + this.requestBody = requestBody; + this.workspaceID = workspaceID; + } + + public PostWorkspaceEventsRequest( + List requestBody) { + this(requestBody, Optional.empty()); + } + + @JsonIgnore + public List requestBody() { + return requestBody; + } + + /** + * Unique identifier of the workspace. + */ + @JsonIgnore + public Optional workspaceID() { + return workspaceID; + } + + public final static Builder builder() { + return new Builder(); + } + + public PostWorkspaceEventsRequest withRequestBody(List requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + /** + * Unique identifier of the workspace. + */ + public PostWorkspaceEventsRequest withWorkspaceID(String workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = Optional.ofNullable(workspaceID); + return this; + } + + /** + * Unique identifier of the workspace. + */ + public PostWorkspaceEventsRequest withWorkspaceID(Optional workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = workspaceID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostWorkspaceEventsRequest other = (PostWorkspaceEventsRequest) o; + return + Objects.deepEquals(this.requestBody, other.requestBody) && + Objects.deepEquals(this.workspaceID, other.workspaceID); + } + + @Override + public int hashCode() { + return Objects.hash( + requestBody, + workspaceID); + } + + @Override + public String toString() { + return Utils.toString(PostWorkspaceEventsRequest.class, + "requestBody", requestBody, + "workspaceID", workspaceID); + } + + public final static class Builder { + + private List requestBody; + + private Optional workspaceID = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder requestBody(List requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + /** + * Unique identifier of the workspace. + */ + public Builder workspaceID(String workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = Optional.ofNullable(workspaceID); + return this; + } + + /** + * Unique identifier of the workspace. + */ + public Builder workspaceID(Optional workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = workspaceID; + return this; + } + + public PostWorkspaceEventsRequest build() { + return new PostWorkspaceEventsRequest( + requestBody, + workspaceID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsRequestBuilder.java new file mode 100644 index 00000000..d3beb257 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsRequestBuilder.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Options; +import dev.speakeasyapi.javaclientsdk.utils.RetryConfig; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.util.Optional; + +public class PostWorkspaceEventsRequestBuilder { + + private PostWorkspaceEventsRequest request; + private Optional retryConfig = Optional.empty(); + private final SDKMethodInterfaces.MethodCallPostWorkspaceEvents sdk; + + public PostWorkspaceEventsRequestBuilder(SDKMethodInterfaces.MethodCallPostWorkspaceEvents sdk) { + this.sdk = sdk; + } + + public PostWorkspaceEventsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public PostWorkspaceEventsRequestBuilder retryConfig(dev.speakeasyapi.javaclientsdk.utils.RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public PostWorkspaceEventsRequestBuilder retryConfig(java.util.Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public PostWorkspaceEventsResponse call() throws Exception { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + return sdk.postWorkspaceEvents( + request, + options); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsResponse.java new file mode 100644 index 00000000..614dc8ac --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PostWorkspaceEventsResponse.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.Objects; + + +public class PostWorkspaceEventsResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public PostWorkspaceEventsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public PostWorkspaceEventsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PostWorkspaceEventsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PostWorkspaceEventsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostWorkspaceEventsResponse other = (PostWorkspaceEventsResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(PostWorkspaceEventsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public PostWorkspaceEventsResponse build() { + return new PostWorkspaceEventsResponse( + contentType, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PreflightRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PreflightRequestBuilder.java new file mode 100644 index 00000000..6f94416c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PreflightRequestBuilder.java @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.models.shared.PreflightRequest; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.util.Optional; + +public class PreflightRequestBuilder { + + private Optional request = Optional.empty(); + private final SDKMethodInterfaces.MethodCallPreflight sdk; + + public PreflightRequestBuilder(SDKMethodInterfaces.MethodCallPreflight sdk) { + this.sdk = sdk; + } + + public PreflightRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.shared.PreflightRequest request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public PreflightRequestBuilder request(java.util.Optional request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public PreflightResponse call() throws Exception { + + return sdk.preflight( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PreflightResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PreflightResponse.java new file mode 100644 index 00000000..505df432 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/PreflightResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.PreflightToken; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class PreflightResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * OK + */ + private Optional preflightToken; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public PreflightResponse( + String contentType, + Optional error, + Optional preflightToken, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(preflightToken, "preflightToken"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.preflightToken = preflightToken; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public PreflightResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional preflightToken() { + return (Optional) preflightToken; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public PreflightResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public PreflightResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public PreflightResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public PreflightResponse withPreflightToken(PreflightToken preflightToken) { + Utils.checkNotNull(preflightToken, "preflightToken"); + this.preflightToken = Optional.ofNullable(preflightToken); + return this; + } + + /** + * OK + */ + public PreflightResponse withPreflightToken(Optional preflightToken) { + Utils.checkNotNull(preflightToken, "preflightToken"); + this.preflightToken = preflightToken; + return this; + } + + /** + * HTTP response status code for this operation + */ + public PreflightResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public PreflightResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreflightResponse other = (PreflightResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.preflightToken, other.preflightToken) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + preflightToken, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(PreflightResponse.class, + "contentType", contentType, + "error", error, + "preflightToken", preflightToken, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Optional preflightToken = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * OK + */ + public Builder preflightToken(PreflightToken preflightToken) { + Utils.checkNotNull(preflightToken, "preflightToken"); + this.preflightToken = Optional.ofNullable(preflightToken); + return this; + } + + /** + * OK + */ + public Builder preflightToken(Optional preflightToken) { + Utils.checkNotNull(preflightToken, "preflightToken"); + this.preflightToken = preflightToken; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public PreflightResponse build() { + return new PreflightResponse( + contentType, + error, + preflightToken, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogRequest.java new file mode 100644 index 00000000..e6dad00e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogRequest.java @@ -0,0 +1,127 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.Filters; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class QueryEventLogRequest { + + /** + * The filter to apply to the query. + */ + @SpeakeasyMetadata("queryParam:serialization=json,name=filters") + private Optional filters; + + @JsonCreator + public QueryEventLogRequest( + Optional filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + } + + public QueryEventLogRequest() { + this(Optional.empty()); + } + + /** + * The filter to apply to the query. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional filters() { + return (Optional) filters; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The filter to apply to the query. + */ + public QueryEventLogRequest withFilters(Filters filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = Optional.ofNullable(filters); + return this; + } + + /** + * The filter to apply to the query. + */ + public QueryEventLogRequest withFilters(Optional filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryEventLogRequest other = (QueryEventLogRequest) o; + return + Objects.deepEquals(this.filters, other.filters); + } + + @Override + public int hashCode() { + return Objects.hash( + filters); + } + + @Override + public String toString() { + return Utils.toString(QueryEventLogRequest.class, + "filters", filters); + } + + public final static class Builder { + + private Optional filters = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The filter to apply to the query. + */ + public Builder filters(Filters filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = Optional.ofNullable(filters); + return this; + } + + /** + * The filter to apply to the query. + */ + public Builder filters(Optional filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + public QueryEventLogRequest build() { + return new QueryEventLogRequest( + filters); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogRequestBuilder.java new file mode 100644 index 00000000..1016cce0 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class QueryEventLogRequestBuilder { + + private QueryEventLogRequest request; + private final SDKMethodInterfaces.MethodCallQueryEventLog sdk; + + public QueryEventLogRequestBuilder(SDKMethodInterfaces.MethodCallQueryEventLog sdk) { + this.sdk = sdk; + } + + public QueryEventLogRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.QueryEventLogRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public QueryEventLogResponse call() throws Exception { + + return sdk.queryEventLog( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogResponse.java new file mode 100644 index 00000000..cf5b4c06 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryEventLogResponse.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.BoundedRequest; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class QueryEventLogResponse implements Response { + + /** + * OK + */ + private Optional> boundedRequests; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public QueryEventLogResponse( + Optional> boundedRequests, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(boundedRequests, "boundedRequests"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.boundedRequests = boundedRequests; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public QueryEventLogResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> boundedRequests() { + return (Optional>) boundedRequests; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public QueryEventLogResponse withBoundedRequests(List boundedRequests) { + Utils.checkNotNull(boundedRequests, "boundedRequests"); + this.boundedRequests = Optional.ofNullable(boundedRequests); + return this; + } + + /** + * OK + */ + public QueryEventLogResponse withBoundedRequests(Optional> boundedRequests) { + Utils.checkNotNull(boundedRequests, "boundedRequests"); + this.boundedRequests = boundedRequests; + return this; + } + + /** + * HTTP response content type for this operation + */ + public QueryEventLogResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public QueryEventLogResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public QueryEventLogResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public QueryEventLogResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public QueryEventLogResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryEventLogResponse other = (QueryEventLogResponse) o; + return + Objects.deepEquals(this.boundedRequests, other.boundedRequests) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + boundedRequests, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(QueryEventLogResponse.class, + "boundedRequests", boundedRequests, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> boundedRequests = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder boundedRequests(List boundedRequests) { + Utils.checkNotNull(boundedRequests, "boundedRequests"); + this.boundedRequests = Optional.ofNullable(boundedRequests); + return this; + } + + /** + * OK + */ + public Builder boundedRequests(Optional> boundedRequests) { + Utils.checkNotNull(boundedRequests, "boundedRequests"); + this.boundedRequests = boundedRequests; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public QueryEventLogResponse build() { + return new QueryEventLogResponse( + boundedRequests, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryParamOp.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryParamOp.java new file mode 100644 index 00000000..7e028ec3 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/QueryParamOp.java @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * QueryParamOp - Configuration for filter operations + */ + +public class QueryParamOp { + + /** + * Whether to AND or OR the filters + */ + @SpeakeasyMetadata("queryParam:name=and") + private boolean and; + + @JsonCreator + public QueryParamOp( + boolean and) { + Utils.checkNotNull(and, "and"); + this.and = and; + } + + /** + * Whether to AND or OR the filters + */ + @JsonIgnore + public boolean and() { + return and; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Whether to AND or OR the filters + */ + public QueryParamOp withAnd(boolean and) { + Utils.checkNotNull(and, "and"); + this.and = and; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryParamOp other = (QueryParamOp) o; + return + Objects.deepEquals(this.and, other.and); + } + + @Override + public int hashCode() { + return Objects.hash( + and); + } + + @Override + public String toString() { + return Utils.toString(QueryParamOp.class, + "and", and); + } + + public final static class Builder { + + private Boolean and; + + private Builder() { + // force use of static builder() method + } + + /** + * Whether to AND or OR the filters + */ + public Builder and(boolean and) { + Utils.checkNotNull(and, "and"); + this.and = and; + return this; + } + + public QueryParamOp build() { + return new QueryParamOp( + and); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaFile.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaFile.java new file mode 100644 index 00000000..9d2ce2ae --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaFile.java @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class RegisterSchemaFile { + + @SpeakeasyMetadata("multipartForm:content") + private byte[] content; + + @SpeakeasyMetadata("multipartForm:name=file") + private String fileName; + + @JsonCreator + public RegisterSchemaFile( + byte[] content, + String fileName) { + Utils.checkNotNull(content, "content"); + Utils.checkNotNull(fileName, "fileName"); + this.content = content; + this.fileName = fileName; + } + + @JsonIgnore + public byte[] content() { + return content; + } + + @JsonIgnore + public String fileName() { + return fileName; + } + + public final static Builder builder() { + return new Builder(); + } + + public RegisterSchemaFile withContent(byte[] content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public RegisterSchemaFile withFileName(String fileName) { + Utils.checkNotNull(fileName, "fileName"); + this.fileName = fileName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RegisterSchemaFile other = (RegisterSchemaFile) o; + return + Objects.deepEquals(this.content, other.content) && + Objects.deepEquals(this.fileName, other.fileName); + } + + @Override + public int hashCode() { + return Objects.hash( + content, + fileName); + } + + @Override + public String toString() { + return Utils.toString(RegisterSchemaFile.class, + "content", content, + "fileName", fileName); + } + + public final static class Builder { + + private byte[] content; + + private String fileName; + + private Builder() { + // force use of static builder() method + } + + public Builder content(byte[] content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public Builder fileName(String fileName) { + Utils.checkNotNull(fileName, "fileName"); + this.fileName = fileName; + return this; + } + + public RegisterSchemaFile build() { + return new RegisterSchemaFile( + content, + fileName); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequest.java new file mode 100644 index 00000000..81cd224b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequest.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class RegisterSchemaRequest { + + /** + * The schema file to upload provided as a multipart/form-data file segment. + */ + @SpeakeasyMetadata("request:mediaType=multipart/form-data") + private RegisterSchemaRequestBody requestBody; + + /** + * The ID of the Api to get the schema for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api to delete metadata for. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public RegisterSchemaRequest( + RegisterSchemaRequestBody requestBody, + String apiID, + String versionID) { + Utils.checkNotNull(requestBody, "requestBody"); + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.requestBody = requestBody; + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * The schema file to upload provided as a multipart/form-data file segment. + */ + @JsonIgnore + public RegisterSchemaRequestBody requestBody() { + return requestBody; + } + + /** + * The ID of the Api to get the schema for. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api to delete metadata for. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The schema file to upload provided as a multipart/form-data file segment. + */ + public RegisterSchemaRequest withRequestBody(RegisterSchemaRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + /** + * The ID of the Api to get the schema for. + */ + public RegisterSchemaRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public RegisterSchemaRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RegisterSchemaRequest other = (RegisterSchemaRequest) o; + return + Objects.deepEquals(this.requestBody, other.requestBody) && + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + requestBody, + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(RegisterSchemaRequest.class, + "requestBody", requestBody, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private RegisterSchemaRequestBody requestBody; + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * The schema file to upload provided as a multipart/form-data file segment. + */ + public Builder requestBody(RegisterSchemaRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + /** + * The ID of the Api to get the schema for. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api to delete metadata for. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public RegisterSchemaRequest build() { + return new RegisterSchemaRequest( + requestBody, + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequestBody.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequestBody.java new file mode 100644 index 00000000..c0e2f818 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequestBody.java @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * RegisterSchemaRequestBody - The schema file to upload provided as a multipart/form-data file segment. + */ + +public class RegisterSchemaRequestBody { + + @SpeakeasyMetadata("multipartForm:file") + private RegisterSchemaFile file; + + @JsonCreator + public RegisterSchemaRequestBody( + RegisterSchemaFile file) { + Utils.checkNotNull(file, "file"); + this.file = file; + } + + @JsonIgnore + public RegisterSchemaFile file() { + return file; + } + + public final static Builder builder() { + return new Builder(); + } + + public RegisterSchemaRequestBody withFile(RegisterSchemaFile file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RegisterSchemaRequestBody other = (RegisterSchemaRequestBody) o; + return + Objects.deepEquals(this.file, other.file); + } + + @Override + public int hashCode() { + return Objects.hash( + file); + } + + @Override + public String toString() { + return Utils.toString(RegisterSchemaRequestBody.class, + "file", file); + } + + public final static class Builder { + + private RegisterSchemaFile file; + + private Builder() { + // force use of static builder() method + } + + public Builder file(RegisterSchemaFile file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public RegisterSchemaRequestBody build() { + return new RegisterSchemaRequestBody( + file); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequestBuilder.java new file mode 100644 index 00000000..b84966a3 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class RegisterSchemaRequestBuilder { + + private RegisterSchemaRequest request; + private final SDKMethodInterfaces.MethodCallRegisterSchema sdk; + + public RegisterSchemaRequestBuilder(SDKMethodInterfaces.MethodCallRegisterSchema sdk) { + this.sdk = sdk; + } + + public RegisterSchemaRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.RegisterSchemaRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public RegisterSchemaResponse call() throws Exception { + + return sdk.registerSchema( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaResponse.java new file mode 100644 index 00000000..bb74ceb9 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RegisterSchemaResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class RegisterSchemaResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RegisterSchemaResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public RegisterSchemaResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public RegisterSchemaResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public RegisterSchemaResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public RegisterSchemaResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RegisterSchemaResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RegisterSchemaResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RegisterSchemaResponse other = (RegisterSchemaResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RegisterSchemaResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RegisterSchemaResponse build() { + return new RegisterSchemaResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenRequest.java new file mode 100644 index 00000000..e79fff8e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenRequest.java @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class RevokeEmbedAccessTokenRequest { + + /** + * The ID of the EmbedToken to revoke. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=tokenID") + private String tokenID; + + @JsonCreator + public RevokeEmbedAccessTokenRequest( + String tokenID) { + Utils.checkNotNull(tokenID, "tokenID"); + this.tokenID = tokenID; + } + + /** + * The ID of the EmbedToken to revoke. + */ + @JsonIgnore + public String tokenID() { + return tokenID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the EmbedToken to revoke. + */ + public RevokeEmbedAccessTokenRequest withTokenID(String tokenID) { + Utils.checkNotNull(tokenID, "tokenID"); + this.tokenID = tokenID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeEmbedAccessTokenRequest other = (RevokeEmbedAccessTokenRequest) o; + return + Objects.deepEquals(this.tokenID, other.tokenID); + } + + @Override + public int hashCode() { + return Objects.hash( + tokenID); + } + + @Override + public String toString() { + return Utils.toString(RevokeEmbedAccessTokenRequest.class, + "tokenID", tokenID); + } + + public final static class Builder { + + private String tokenID; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the EmbedToken to revoke. + */ + public Builder tokenID(String tokenID) { + Utils.checkNotNull(tokenID, "tokenID"); + this.tokenID = tokenID; + return this; + } + + public RevokeEmbedAccessTokenRequest build() { + return new RevokeEmbedAccessTokenRequest( + tokenID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenRequestBuilder.java new file mode 100644 index 00000000..7b8bbc06 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class RevokeEmbedAccessTokenRequestBuilder { + + private RevokeEmbedAccessTokenRequest request; + private final SDKMethodInterfaces.MethodCallRevokeEmbedAccessToken sdk; + + public RevokeEmbedAccessTokenRequestBuilder(SDKMethodInterfaces.MethodCallRevokeEmbedAccessToken sdk) { + this.sdk = sdk; + } + + public RevokeEmbedAccessTokenRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.RevokeEmbedAccessTokenRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public RevokeEmbedAccessTokenResponse call() throws Exception { + + return sdk.revokeEmbedAccessToken( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenResponse.java new file mode 100644 index 00000000..24f29908 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/RevokeEmbedAccessTokenResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class RevokeEmbedAccessTokenResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public RevokeEmbedAccessTokenResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public RevokeEmbedAccessTokenResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public RevokeEmbedAccessTokenResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public RevokeEmbedAccessTokenResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public RevokeEmbedAccessTokenResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public RevokeEmbedAccessTokenResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public RevokeEmbedAccessTokenResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RevokeEmbedAccessTokenResponse other = (RevokeEmbedAccessTokenResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(RevokeEmbedAccessTokenResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public RevokeEmbedAccessTokenResponse build() { + return new RevokeEmbedAccessTokenResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SDKMethodInterfaces.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SDKMethodInterfaces.java new file mode 100644 index 00000000..c000812c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SDKMethodInterfaces.java @@ -0,0 +1,422 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureCodeSamplesRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureMintlifyRepoRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubConfigureTargetRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubStorePublishingSecretsRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.GithubTriggerActionRequest; +import dev.speakeasyapi.javaclientsdk.models.shared.PreflightRequest; +import dev.speakeasyapi.javaclientsdk.utils.Options; +import java.util.Optional; + +public class SDKMethodInterfaces { + + + public interface MethodCallDeleteApi { + dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiResponse deleteApi( + DeleteApiRequest request) throws Exception; + } + + + public interface MethodCallGenerateOpenApiSpec { + dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecResponse generateOpenApiSpec( + GenerateOpenApiSpecRequest request) throws Exception; + } + + + public interface MethodCallGeneratePostmanCollection { + dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionResponse generatePostmanCollection( + GeneratePostmanCollectionRequest request) throws Exception; + } + + + public interface MethodCallGetAllApiVersions { + dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiVersionsResponse getAllApiVersions( + GetAllApiVersionsRequest request) throws Exception; + } + + + public interface MethodCallGetApis { + dev.speakeasyapi.javaclientsdk.models.operations.GetApisResponse getApis( + GetApisRequest request) throws Exception; + } + + + public interface MethodCallUpsertApi { + dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiResponse upsertApi( + UpsertApiRequest request) throws Exception; + } + + + public interface MethodCallDeleteApiEndpoint { + dev.speakeasyapi.javaclientsdk.models.operations.DeleteApiEndpointResponse deleteApiEndpoint( + DeleteApiEndpointRequest request) throws Exception; + } + + + public interface MethodCallFindApiEndpoint { + dev.speakeasyapi.javaclientsdk.models.operations.FindApiEndpointResponse findApiEndpoint( + FindApiEndpointRequest request) throws Exception; + } + + + public interface MethodCallGenerateOpenApiSpecForApiEndpoint { + dev.speakeasyapi.javaclientsdk.models.operations.GenerateOpenApiSpecForApiEndpointResponse generateOpenApiSpecForApiEndpoint( + GenerateOpenApiSpecForApiEndpointRequest request) throws Exception; + } + + + public interface MethodCallGeneratePostmanCollectionForApiEndpoint { + dev.speakeasyapi.javaclientsdk.models.operations.GeneratePostmanCollectionForApiEndpointResponse generatePostmanCollectionForApiEndpoint( + GeneratePostmanCollectionForApiEndpointRequest request) throws Exception; + } + + + public interface MethodCallGetAllApiEndpoints { + dev.speakeasyapi.javaclientsdk.models.operations.GetAllApiEndpointsResponse getAllApiEndpoints( + GetAllApiEndpointsRequest request) throws Exception; + } + + + public interface MethodCallGetAllForVersionApiEndpoints { + dev.speakeasyapi.javaclientsdk.models.operations.GetAllForVersionApiEndpointsResponse getAllForVersionApiEndpoints( + GetAllForVersionApiEndpointsRequest request) throws Exception; + } + + + public interface MethodCallGetApiEndpoint { + dev.speakeasyapi.javaclientsdk.models.operations.GetApiEndpointResponse getApiEndpoint( + GetApiEndpointRequest request) throws Exception; + } + + + public interface MethodCallUpsertApiEndpoint { + dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiEndpointResponse upsertApiEndpoint( + UpsertApiEndpointRequest request) throws Exception; + } + + + public interface MethodCallDeleteVersionMetadata { + dev.speakeasyapi.javaclientsdk.models.operations.DeleteVersionMetadataResponse deleteVersionMetadata( + DeleteVersionMetadataRequest request) throws Exception; + } + + + public interface MethodCallGetVersionMetadata { + dev.speakeasyapi.javaclientsdk.models.operations.GetVersionMetadataResponse getVersionMetadata( + GetVersionMetadataRequest request) throws Exception; + } + + + public interface MethodCallInsertVersionMetadata { + dev.speakeasyapi.javaclientsdk.models.operations.InsertVersionMetadataResponse insertVersionMetadata( + InsertVersionMetadataRequest request) throws Exception; + } + + + public interface MethodCallDeleteSchema { + dev.speakeasyapi.javaclientsdk.models.operations.DeleteSchemaResponse deleteSchema( + DeleteSchemaRequest request) throws Exception; + } + + + public interface MethodCallDownloadSchema { + dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaResponse downloadSchema( + DownloadSchemaRequest request) throws Exception; + } + + + public interface MethodCallDownloadSchemaRevision { + dev.speakeasyapi.javaclientsdk.models.operations.DownloadSchemaRevisionResponse downloadSchemaRevision( + DownloadSchemaRevisionRequest request) throws Exception; + } + + + public interface MethodCallGetSchema { + dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaResponse getSchema( + GetSchemaRequest request) throws Exception; + } + + + public interface MethodCallGetSchemaDiff { + dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaDiffResponse getSchemaDiff( + GetSchemaDiffRequest request) throws Exception; + } + + + public interface MethodCallGetSchemaRevision { + dev.speakeasyapi.javaclientsdk.models.operations.GetSchemaRevisionResponse getSchemaRevision( + GetSchemaRevisionRequest request) throws Exception; + } + + + public interface MethodCallGetSchemas { + dev.speakeasyapi.javaclientsdk.models.operations.GetSchemasResponse getSchemas( + GetSchemasRequest request) throws Exception; + } + + + public interface MethodCallRegisterSchema { + dev.speakeasyapi.javaclientsdk.models.operations.RegisterSchemaResponse registerSchema( + RegisterSchemaRequest request) throws Exception; + } + + + public interface MethodCallGetBlob { + dev.speakeasyapi.javaclientsdk.models.operations.GetBlobResponse getBlob( + GetBlobRequest request) throws Exception; + } + + + public interface MethodCallGetManifest { + dev.speakeasyapi.javaclientsdk.models.operations.GetManifestResponse getManifest( + GetManifestRequest request) throws Exception; + } + + + public interface MethodCallGetNamespaces { + dev.speakeasyapi.javaclientsdk.models.operations.GetNamespacesResponse getNamespacesDirect() throws Exception; + } + + + public interface MethodCallGetOASSummary { + dev.speakeasyapi.javaclientsdk.models.operations.GetOASSummaryResponse getOASSummary( + GetOASSummaryRequest request) throws Exception; + } + + + public interface MethodCallGetRevisions { + dev.speakeasyapi.javaclientsdk.models.operations.GetRevisionsResponse getRevisions( + GetRevisionsRequest request) throws Exception; + } + + + public interface MethodCallGetTags { + dev.speakeasyapi.javaclientsdk.models.operations.GetTagsResponse getTags( + GetTagsRequest request) throws Exception; + } + + + public interface MethodCallPostTags { + dev.speakeasyapi.javaclientsdk.models.operations.PostTagsResponse postTags( + PostTagsRequest request) throws Exception; + } + + + public interface MethodCallPreflight { + dev.speakeasyapi.javaclientsdk.models.operations.PreflightResponse preflight( + Optional request) throws Exception; + } + + + public interface MethodCallGetAccessToken { + dev.speakeasyapi.javaclientsdk.models.operations.GetAccessTokenResponse getAccessToken( + GetAccessTokenRequest request) throws Exception; + } + + + public interface MethodCallGetUser { + dev.speakeasyapi.javaclientsdk.models.operations.GetUserResponse getUserDirect() throws Exception; + } + + + public interface MethodCallGetWorkspaceAccess { + dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceAccessResponse getWorkspaceAccess( + GetWorkspaceAccessRequest request, + Optional options) throws Exception; + } + + + public interface MethodCallValidateApiKey { + dev.speakeasyapi.javaclientsdk.models.operations.ValidateApiKeyResponse validateApiKeyDirect() throws Exception; + } + + + public interface MethodCallGenerateRequestPostmanCollection { + dev.speakeasyapi.javaclientsdk.models.operations.GenerateRequestPostmanCollectionResponse generateRequestPostmanCollection( + GenerateRequestPostmanCollectionRequest request) throws Exception; + } + + + public interface MethodCallGetRequestFromEventLog { + dev.speakeasyapi.javaclientsdk.models.operations.GetRequestFromEventLogResponse getRequestFromEventLog( + GetRequestFromEventLogRequest request) throws Exception; + } + + + public interface MethodCallQueryEventLog { + dev.speakeasyapi.javaclientsdk.models.operations.QueryEventLogResponse queryEventLog( + QueryEventLogRequest request) throws Exception; + } + + + public interface MethodCallCheckAccess { + dev.speakeasyapi.javaclientsdk.models.operations.CheckAccessResponse checkAccess( + CheckAccessRequest request) throws Exception; + } + + + public interface MethodCallConfigureCodeSamples { + dev.speakeasyapi.javaclientsdk.models.operations.ConfigureCodeSamplesResponse configureCodeSamples( + GithubConfigureCodeSamplesRequest request) throws Exception; + } + + + public interface MethodCallConfigureMintlifyRepo { + dev.speakeasyapi.javaclientsdk.models.operations.ConfigureMintlifyRepoResponse configureMintlifyRepo( + GithubConfigureMintlifyRepoRequest request) throws Exception; + } + + + public interface MethodCallConfigureTarget { + dev.speakeasyapi.javaclientsdk.models.operations.ConfigureTargetResponse configureTarget( + GithubConfigureTargetRequest request) throws Exception; + } + + + public interface MethodCallFetchPublishingPRs { + dev.speakeasyapi.javaclientsdk.models.operations.FetchPublishingPRsResponse fetchPublishingPRs( + FetchPublishingPRsRequest request) throws Exception; + } + + + public interface MethodCallGetAction { + dev.speakeasyapi.javaclientsdk.models.operations.GetActionResponse getAction( + GetActionRequest request) throws Exception; + } + + + public interface MethodCallGithubCheckPublishingSecrets { + dev.speakeasyapi.javaclientsdk.models.operations.GithubCheckPublishingSecretsResponse githubCheckPublishingSecrets( + GithubCheckPublishingSecretsRequest request) throws Exception; + } + + + public interface MethodCallGithubStorePublishingSecrets { + dev.speakeasyapi.javaclientsdk.models.operations.GithubStorePublishingSecretsResponse githubStorePublishingSecrets( + GithubStorePublishingSecretsRequest request) throws Exception; + } + + + public interface MethodCallTriggerAction { + dev.speakeasyapi.javaclientsdk.models.operations.TriggerActionResponse triggerAction( + GithubTriggerActionRequest request) throws Exception; + } + + + public interface MethodCallCreateFreeTrial { + dev.speakeasyapi.javaclientsdk.models.operations.CreateFreeTrialResponse createFreeTrialDirect() throws Exception; + } + + + public interface MethodCallGetOrganization { + dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationResponse getOrganization( + GetOrganizationRequest request) throws Exception; + } + + + public interface MethodCallGetOrganizationUsage { + dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationUsageResponse getOrganizationUsageDirect() throws Exception; + } + + + public interface MethodCallGetOrganizations { + dev.speakeasyapi.javaclientsdk.models.operations.GetOrganizationsResponse getOrganizationsDirect() throws Exception; + } + + + public interface MethodCallGetChangesReportSignedUrl { + dev.speakeasyapi.javaclientsdk.models.operations.GetChangesReportSignedUrlResponse getChangesReportSignedUrl( + GetChangesReportSignedUrlRequest request) throws Exception; + } + + + public interface MethodCallGetLintingReportSignedUrl { + dev.speakeasyapi.javaclientsdk.models.operations.GetLintingReportSignedUrlResponse getLintingReportSignedUrl( + GetLintingReportSignedUrlRequest request) throws Exception; + } + + + public interface MethodCallUploadReport { + dev.speakeasyapi.javaclientsdk.models.operations.UploadReportResponse uploadReport( + UploadReportRequestBody request) throws Exception; + } + + + public interface MethodCallCreate { + dev.speakeasyapi.javaclientsdk.models.operations.CreateResponse create( + CreateRequestBody request) throws Exception; + } + + + public interface MethodCallApplyOperationIDs { + dev.speakeasyapi.javaclientsdk.models.operations.ApplyOperationIDsResponse applyOperationIDs( + ApplyOperationIDsRequest request) throws Exception; + } + + + public interface MethodCallSuggestOpenAPI { + dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIResponse suggestOpenAPI( + SuggestOpenAPIRequest request) throws Exception; + } + + + public interface MethodCallSuggestOpenAPIRegistry { + dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRegistryResponse suggestOpenAPIRegistry( + SuggestOpenAPIRegistryRequest request) throws Exception; + } + + + public interface MethodCallGetEmbedAccessToken { + dev.speakeasyapi.javaclientsdk.models.operations.GetEmbedAccessTokenResponse getEmbedAccessToken( + GetEmbedAccessTokenRequest request) throws Exception; + } + + + public interface MethodCallGetValidEmbedAccessTokens { + dev.speakeasyapi.javaclientsdk.models.operations.GetValidEmbedAccessTokensResponse getValidEmbedAccessTokensDirect() throws Exception; + } + + + public interface MethodCallRevokeEmbedAccessToken { + dev.speakeasyapi.javaclientsdk.models.operations.RevokeEmbedAccessTokenResponse revokeEmbedAccessToken( + RevokeEmbedAccessTokenRequest request) throws Exception; + } + + + public interface MethodCallGetWorkspace { + dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceResponse getWorkspace( + GetWorkspaceRequest request) throws Exception; + } + + + public interface MethodCallGetWorkspaceEventsByTarget { + dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceEventsByTargetResponse getWorkspaceEventsByTarget( + GetWorkspaceEventsByTargetRequest request) throws Exception; + } + + + public interface MethodCallGetWorkspaceTargets { + dev.speakeasyapi.javaclientsdk.models.operations.GetWorkspaceTargetsResponse getWorkspaceTargets( + GetWorkspaceTargetsRequest request) throws Exception; + } + + + public interface MethodCallPostWorkspaceEvents { + dev.speakeasyapi.javaclientsdk.models.operations.PostWorkspaceEventsResponse postWorkspaceEvents( + PostWorkspaceEventsRequest request, + Optional options) throws Exception; + } + + + public interface MethodCallSearchWorkspaceEvents { + dev.speakeasyapi.javaclientsdk.models.operations.SearchWorkspaceEventsResponse searchWorkspaceEvents( + SearchWorkspaceEventsRequest request) throws Exception; + } + + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/Schema.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/Schema.java new file mode 100644 index 00000000..dc269c6e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/Schema.java @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class Schema { + + @SpeakeasyMetadata("multipartForm:content") + private byte[] content; + + @SpeakeasyMetadata("multipartForm:name=schema") + private String fileName; + + @JsonCreator + public Schema( + byte[] content, + String fileName) { + Utils.checkNotNull(content, "content"); + Utils.checkNotNull(fileName, "fileName"); + this.content = content; + this.fileName = fileName; + } + + @JsonIgnore + public byte[] content() { + return content; + } + + @JsonIgnore + public String fileName() { + return fileName; + } + + public final static Builder builder() { + return new Builder(); + } + + public Schema withContent(byte[] content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public Schema withFileName(String fileName) { + Utils.checkNotNull(fileName, "fileName"); + this.fileName = fileName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Schema other = (Schema) o; + return + Objects.deepEquals(this.content, other.content) && + Objects.deepEquals(this.fileName, other.fileName); + } + + @Override + public int hashCode() { + return Objects.hash( + content, + fileName); + } + + @Override + public String toString() { + return Utils.toString(Schema.class, + "content", content, + "fileName", fileName); + } + + public final static class Builder { + + private byte[] content; + + private String fileName; + + private Builder() { + // force use of static builder() method + } + + public Builder content(byte[] content) { + Utils.checkNotNull(content, "content"); + this.content = content; + return this; + } + + public Builder fileName(String fileName) { + Utils.checkNotNull(fileName, "fileName"); + this.fileName = fileName; + return this; + } + + public Schema build() { + return new Schema( + content, + fileName); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsRequest.java new file mode 100644 index 00000000..b8be2acd --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsRequest.java @@ -0,0 +1,422 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.InteractionType; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class SearchWorkspaceEventsRequest { + + /** + * A specific gen lock ID for the events. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=generate_gen_lock_id") + private Optional generateGenLockId; + + /** + * Specified interaction type for events. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=interaction_type") + private Optional interactionType; + + /** + * Unique identifier of the lint report digest. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=lint_report_digest") + private Optional lintReportDigest; + + /** + * Unique identifier of the openapi diff report digest. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=openapi_diff_report_digest") + private Optional openapiDiffReportDigest; + + /** + * Unique identifier of the source revision digest. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=source_revision_digest") + private Optional sourceRevisionDigest; + + /** + * Unique identifier of the workspace. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=workspaceID") + private Optional workspaceID; + + @JsonCreator + public SearchWorkspaceEventsRequest( + Optional generateGenLockId, + Optional interactionType, + Optional lintReportDigest, + Optional openapiDiffReportDigest, + Optional sourceRevisionDigest, + Optional workspaceID) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + Utils.checkNotNull(interactionType, "interactionType"); + Utils.checkNotNull(lintReportDigest, "lintReportDigest"); + Utils.checkNotNull(openapiDiffReportDigest, "openapiDiffReportDigest"); + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + Utils.checkNotNull(workspaceID, "workspaceID"); + this.generateGenLockId = generateGenLockId; + this.interactionType = interactionType; + this.lintReportDigest = lintReportDigest; + this.openapiDiffReportDigest = openapiDiffReportDigest; + this.sourceRevisionDigest = sourceRevisionDigest; + this.workspaceID = workspaceID; + } + + public SearchWorkspaceEventsRequest() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * A specific gen lock ID for the events. + */ + @JsonIgnore + public Optional generateGenLockId() { + return generateGenLockId; + } + + /** + * Specified interaction type for events. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional interactionType() { + return (Optional) interactionType; + } + + /** + * Unique identifier of the lint report digest. + */ + @JsonIgnore + public Optional lintReportDigest() { + return lintReportDigest; + } + + /** + * Unique identifier of the openapi diff report digest. + */ + @JsonIgnore + public Optional openapiDiffReportDigest() { + return openapiDiffReportDigest; + } + + /** + * Unique identifier of the source revision digest. + */ + @JsonIgnore + public Optional sourceRevisionDigest() { + return sourceRevisionDigest; + } + + /** + * Unique identifier of the workspace. + */ + @JsonIgnore + public Optional workspaceID() { + return workspaceID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * A specific gen lock ID for the events. + */ + public SearchWorkspaceEventsRequest withGenerateGenLockId(String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = Optional.ofNullable(generateGenLockId); + return this; + } + + /** + * A specific gen lock ID for the events. + */ + public SearchWorkspaceEventsRequest withGenerateGenLockId(Optional generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + return this; + } + + /** + * Specified interaction type for events. + */ + public SearchWorkspaceEventsRequest withInteractionType(InteractionType interactionType) { + Utils.checkNotNull(interactionType, "interactionType"); + this.interactionType = Optional.ofNullable(interactionType); + return this; + } + + /** + * Specified interaction type for events. + */ + public SearchWorkspaceEventsRequest withInteractionType(Optional interactionType) { + Utils.checkNotNull(interactionType, "interactionType"); + this.interactionType = interactionType; + return this; + } + + /** + * Unique identifier of the lint report digest. + */ + public SearchWorkspaceEventsRequest withLintReportDigest(String lintReportDigest) { + Utils.checkNotNull(lintReportDigest, "lintReportDigest"); + this.lintReportDigest = Optional.ofNullable(lintReportDigest); + return this; + } + + /** + * Unique identifier of the lint report digest. + */ + public SearchWorkspaceEventsRequest withLintReportDigest(Optional lintReportDigest) { + Utils.checkNotNull(lintReportDigest, "lintReportDigest"); + this.lintReportDigest = lintReportDigest; + return this; + } + + /** + * Unique identifier of the openapi diff report digest. + */ + public SearchWorkspaceEventsRequest withOpenapiDiffReportDigest(String openapiDiffReportDigest) { + Utils.checkNotNull(openapiDiffReportDigest, "openapiDiffReportDigest"); + this.openapiDiffReportDigest = Optional.ofNullable(openapiDiffReportDigest); + return this; + } + + /** + * Unique identifier of the openapi diff report digest. + */ + public SearchWorkspaceEventsRequest withOpenapiDiffReportDigest(Optional openapiDiffReportDigest) { + Utils.checkNotNull(openapiDiffReportDigest, "openapiDiffReportDigest"); + this.openapiDiffReportDigest = openapiDiffReportDigest; + return this; + } + + /** + * Unique identifier of the source revision digest. + */ + public SearchWorkspaceEventsRequest withSourceRevisionDigest(String sourceRevisionDigest) { + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + this.sourceRevisionDigest = Optional.ofNullable(sourceRevisionDigest); + return this; + } + + /** + * Unique identifier of the source revision digest. + */ + public SearchWorkspaceEventsRequest withSourceRevisionDigest(Optional sourceRevisionDigest) { + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + this.sourceRevisionDigest = sourceRevisionDigest; + return this; + } + + /** + * Unique identifier of the workspace. + */ + public SearchWorkspaceEventsRequest withWorkspaceID(String workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = Optional.ofNullable(workspaceID); + return this; + } + + /** + * Unique identifier of the workspace. + */ + public SearchWorkspaceEventsRequest withWorkspaceID(Optional workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = workspaceID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchWorkspaceEventsRequest other = (SearchWorkspaceEventsRequest) o; + return + Objects.deepEquals(this.generateGenLockId, other.generateGenLockId) && + Objects.deepEquals(this.interactionType, other.interactionType) && + Objects.deepEquals(this.lintReportDigest, other.lintReportDigest) && + Objects.deepEquals(this.openapiDiffReportDigest, other.openapiDiffReportDigest) && + Objects.deepEquals(this.sourceRevisionDigest, other.sourceRevisionDigest) && + Objects.deepEquals(this.workspaceID, other.workspaceID); + } + + @Override + public int hashCode() { + return Objects.hash( + generateGenLockId, + interactionType, + lintReportDigest, + openapiDiffReportDigest, + sourceRevisionDigest, + workspaceID); + } + + @Override + public String toString() { + return Utils.toString(SearchWorkspaceEventsRequest.class, + "generateGenLockId", generateGenLockId, + "interactionType", interactionType, + "lintReportDigest", lintReportDigest, + "openapiDiffReportDigest", openapiDiffReportDigest, + "sourceRevisionDigest", sourceRevisionDigest, + "workspaceID", workspaceID); + } + + public final static class Builder { + + private Optional generateGenLockId = Optional.empty(); + + private Optional interactionType = Optional.empty(); + + private Optional lintReportDigest = Optional.empty(); + + private Optional openapiDiffReportDigest = Optional.empty(); + + private Optional sourceRevisionDigest = Optional.empty(); + + private Optional workspaceID = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * A specific gen lock ID for the events. + */ + public Builder generateGenLockId(String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = Optional.ofNullable(generateGenLockId); + return this; + } + + /** + * A specific gen lock ID for the events. + */ + public Builder generateGenLockId(Optional generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + return this; + } + + /** + * Specified interaction type for events. + */ + public Builder interactionType(InteractionType interactionType) { + Utils.checkNotNull(interactionType, "interactionType"); + this.interactionType = Optional.ofNullable(interactionType); + return this; + } + + /** + * Specified interaction type for events. + */ + public Builder interactionType(Optional interactionType) { + Utils.checkNotNull(interactionType, "interactionType"); + this.interactionType = interactionType; + return this; + } + + /** + * Unique identifier of the lint report digest. + */ + public Builder lintReportDigest(String lintReportDigest) { + Utils.checkNotNull(lintReportDigest, "lintReportDigest"); + this.lintReportDigest = Optional.ofNullable(lintReportDigest); + return this; + } + + /** + * Unique identifier of the lint report digest. + */ + public Builder lintReportDigest(Optional lintReportDigest) { + Utils.checkNotNull(lintReportDigest, "lintReportDigest"); + this.lintReportDigest = lintReportDigest; + return this; + } + + /** + * Unique identifier of the openapi diff report digest. + */ + public Builder openapiDiffReportDigest(String openapiDiffReportDigest) { + Utils.checkNotNull(openapiDiffReportDigest, "openapiDiffReportDigest"); + this.openapiDiffReportDigest = Optional.ofNullable(openapiDiffReportDigest); + return this; + } + + /** + * Unique identifier of the openapi diff report digest. + */ + public Builder openapiDiffReportDigest(Optional openapiDiffReportDigest) { + Utils.checkNotNull(openapiDiffReportDigest, "openapiDiffReportDigest"); + this.openapiDiffReportDigest = openapiDiffReportDigest; + return this; + } + + /** + * Unique identifier of the source revision digest. + */ + public Builder sourceRevisionDigest(String sourceRevisionDigest) { + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + this.sourceRevisionDigest = Optional.ofNullable(sourceRevisionDigest); + return this; + } + + /** + * Unique identifier of the source revision digest. + */ + public Builder sourceRevisionDigest(Optional sourceRevisionDigest) { + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + this.sourceRevisionDigest = sourceRevisionDigest; + return this; + } + + /** + * Unique identifier of the workspace. + */ + public Builder workspaceID(String workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = Optional.ofNullable(workspaceID); + return this; + } + + /** + * Unique identifier of the workspace. + */ + public Builder workspaceID(Optional workspaceID) { + Utils.checkNotNull(workspaceID, "workspaceID"); + this.workspaceID = workspaceID; + return this; + } + + public SearchWorkspaceEventsRequest build() { + return new SearchWorkspaceEventsRequest( + generateGenLockId, + interactionType, + lintReportDigest, + openapiDiffReportDigest, + sourceRevisionDigest, + workspaceID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsRequestBuilder.java new file mode 100644 index 00000000..ef254310 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class SearchWorkspaceEventsRequestBuilder { + + private SearchWorkspaceEventsRequest request; + private final SDKMethodInterfaces.MethodCallSearchWorkspaceEvents sdk; + + public SearchWorkspaceEventsRequestBuilder(SDKMethodInterfaces.MethodCallSearchWorkspaceEvents sdk) { + this.sdk = sdk; + } + + public SearchWorkspaceEventsRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.SearchWorkspaceEventsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SearchWorkspaceEventsResponse call() throws Exception { + + return sdk.searchWorkspaceEvents( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsResponse.java new file mode 100644 index 00000000..66f76e0b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SearchWorkspaceEventsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.CliEvent; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class SearchWorkspaceEventsResponse implements Response { + + /** + * Success + */ + private Optional> cliEventBatch; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SearchWorkspaceEventsResponse( + Optional> cliEventBatch, + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(cliEventBatch, "cliEventBatch"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.cliEventBatch = cliEventBatch; + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public SearchWorkspaceEventsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, statusCode, rawResponse); + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> cliEventBatch() { + return (Optional>) cliEventBatch; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Success + */ + public SearchWorkspaceEventsResponse withCliEventBatch(List cliEventBatch) { + Utils.checkNotNull(cliEventBatch, "cliEventBatch"); + this.cliEventBatch = Optional.ofNullable(cliEventBatch); + return this; + } + + /** + * Success + */ + public SearchWorkspaceEventsResponse withCliEventBatch(Optional> cliEventBatch) { + Utils.checkNotNull(cliEventBatch, "cliEventBatch"); + this.cliEventBatch = cliEventBatch; + return this; + } + + /** + * HTTP response content type for this operation + */ + public SearchWorkspaceEventsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SearchWorkspaceEventsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SearchWorkspaceEventsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchWorkspaceEventsResponse other = (SearchWorkspaceEventsResponse) o; + return + Objects.deepEquals(this.cliEventBatch, other.cliEventBatch) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + cliEventBatch, + contentType, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SearchWorkspaceEventsResponse.class, + "cliEventBatch", cliEventBatch, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional> cliEventBatch = Optional.empty(); + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * Success + */ + public Builder cliEventBatch(List cliEventBatch) { + Utils.checkNotNull(cliEventBatch, "cliEventBatch"); + this.cliEventBatch = Optional.ofNullable(cliEventBatch); + return this; + } + + /** + * Success + */ + public Builder cliEventBatch(Optional> cliEventBatch) { + Utils.checkNotNull(cliEventBatch, "cliEventBatch"); + this.cliEventBatch = cliEventBatch; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SearchWorkspaceEventsResponse build() { + return new SearchWorkspaceEventsResponse( + cliEventBatch, + contentType, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryRequest.java new file mode 100644 index 00000000..206ceee6 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryRequest.java @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.SuggestOpts; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class SuggestOpenAPIRegistryRequest { + + /** + * Suggest options + */ + @SpeakeasyMetadata("request:mediaType=application/json") + private Optional suggestOpts; + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=namespace_name") + private String namespaceName; + + /** + * Tag or digest + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=revision_reference") + private String revisionReference; + + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-session-id") + private String xSessionId; + + @JsonCreator + public SuggestOpenAPIRegistryRequest( + Optional suggestOpts, + String namespaceName, + String revisionReference, + String xSessionId) { + Utils.checkNotNull(suggestOpts, "suggestOpts"); + Utils.checkNotNull(namespaceName, "namespaceName"); + Utils.checkNotNull(revisionReference, "revisionReference"); + Utils.checkNotNull(xSessionId, "xSessionId"); + this.suggestOpts = suggestOpts; + this.namespaceName = namespaceName; + this.revisionReference = revisionReference; + this.xSessionId = xSessionId; + } + + public SuggestOpenAPIRegistryRequest( + String namespaceName, + String revisionReference, + String xSessionId) { + this(Optional.empty(), namespaceName, revisionReference, xSessionId); + } + + /** + * Suggest options + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional suggestOpts() { + return (Optional) suggestOpts; + } + + @JsonIgnore + public String namespaceName() { + return namespaceName; + } + + /** + * Tag or digest + */ + @JsonIgnore + public String revisionReference() { + return revisionReference; + } + + @JsonIgnore + public String xSessionId() { + return xSessionId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Suggest options + */ + public SuggestOpenAPIRegistryRequest withSuggestOpts(SuggestOpts suggestOpts) { + Utils.checkNotNull(suggestOpts, "suggestOpts"); + this.suggestOpts = Optional.ofNullable(suggestOpts); + return this; + } + + /** + * Suggest options + */ + public SuggestOpenAPIRegistryRequest withSuggestOpts(Optional suggestOpts) { + Utils.checkNotNull(suggestOpts, "suggestOpts"); + this.suggestOpts = suggestOpts; + return this; + } + + public SuggestOpenAPIRegistryRequest withNamespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + /** + * Tag or digest + */ + public SuggestOpenAPIRegistryRequest withRevisionReference(String revisionReference) { + Utils.checkNotNull(revisionReference, "revisionReference"); + this.revisionReference = revisionReference; + return this; + } + + public SuggestOpenAPIRegistryRequest withXSessionId(String xSessionId) { + Utils.checkNotNull(xSessionId, "xSessionId"); + this.xSessionId = xSessionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuggestOpenAPIRegistryRequest other = (SuggestOpenAPIRegistryRequest) o; + return + Objects.deepEquals(this.suggestOpts, other.suggestOpts) && + Objects.deepEquals(this.namespaceName, other.namespaceName) && + Objects.deepEquals(this.revisionReference, other.revisionReference) && + Objects.deepEquals(this.xSessionId, other.xSessionId); + } + + @Override + public int hashCode() { + return Objects.hash( + suggestOpts, + namespaceName, + revisionReference, + xSessionId); + } + + @Override + public String toString() { + return Utils.toString(SuggestOpenAPIRegistryRequest.class, + "suggestOpts", suggestOpts, + "namespaceName", namespaceName, + "revisionReference", revisionReference, + "xSessionId", xSessionId); + } + + public final static class Builder { + + private Optional suggestOpts = Optional.empty(); + + private String namespaceName; + + private String revisionReference; + + private String xSessionId; + + private Builder() { + // force use of static builder() method + } + + /** + * Suggest options + */ + public Builder suggestOpts(SuggestOpts suggestOpts) { + Utils.checkNotNull(suggestOpts, "suggestOpts"); + this.suggestOpts = Optional.ofNullable(suggestOpts); + return this; + } + + /** + * Suggest options + */ + public Builder suggestOpts(Optional suggestOpts) { + Utils.checkNotNull(suggestOpts, "suggestOpts"); + this.suggestOpts = suggestOpts; + return this; + } + + public Builder namespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + /** + * Tag or digest + */ + public Builder revisionReference(String revisionReference) { + Utils.checkNotNull(revisionReference, "revisionReference"); + this.revisionReference = revisionReference; + return this; + } + + public Builder xSessionId(String xSessionId) { + Utils.checkNotNull(xSessionId, "xSessionId"); + this.xSessionId = xSessionId; + return this; + } + + public SuggestOpenAPIRegistryRequest build() { + return new SuggestOpenAPIRegistryRequest( + suggestOpts, + namespaceName, + revisionReference, + xSessionId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryRequestBuilder.java new file mode 100644 index 00000000..7378044c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class SuggestOpenAPIRegistryRequestBuilder { + + private SuggestOpenAPIRegistryRequest request; + private final SDKMethodInterfaces.MethodCallSuggestOpenAPIRegistry sdk; + + public SuggestOpenAPIRegistryRequestBuilder(SDKMethodInterfaces.MethodCallSuggestOpenAPIRegistry sdk) { + this.sdk = sdk; + } + + public SuggestOpenAPIRegistryRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRegistryRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SuggestOpenAPIRegistryResponse call() throws Exception { + + return sdk.suggestOpenAPIRegistry( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryResponse.java new file mode 100644 index 00000000..ac615a12 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRegistryResponse.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class SuggestOpenAPIRegistryResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * An overlay containing the suggested spec modifications. + */ + private Optional schema; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SuggestOpenAPIRegistryResponse( + String contentType, + Optional schema, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(schema, "schema"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.schema = schema; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public SuggestOpenAPIRegistryResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * An overlay containing the suggested spec modifications. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional schema() { + return (Optional) schema; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public SuggestOpenAPIRegistryResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * An overlay containing the suggested spec modifications. + */ + public SuggestOpenAPIRegistryResponse withSchema(InputStream schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = Optional.ofNullable(schema); + return this; + } + + /** + * An overlay containing the suggested spec modifications. + */ + public SuggestOpenAPIRegistryResponse withSchema(Optional schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = schema; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SuggestOpenAPIRegistryResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SuggestOpenAPIRegistryResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuggestOpenAPIRegistryResponse other = (SuggestOpenAPIRegistryResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.schema, other.schema) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + schema, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SuggestOpenAPIRegistryResponse.class, + "contentType", contentType, + "schema", schema, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional schema = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * An overlay containing the suggested spec modifications. + */ + public Builder schema(InputStream schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = Optional.ofNullable(schema); + return this; + } + + /** + * An overlay containing the suggested spec modifications. + */ + public Builder schema(Optional schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = schema; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SuggestOpenAPIRegistryResponse build() { + return new SuggestOpenAPIRegistryResponse( + contentType, + schema, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequest.java new file mode 100644 index 00000000..ae9418d1 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequest.java @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class SuggestOpenAPIRequest { + + /** + * The schema file to upload provided as a multipart/form-data file segment. + */ + @SpeakeasyMetadata("request:mediaType=multipart/form-data") + private SuggestOpenAPIRequestBody requestBody; + + @SpeakeasyMetadata("header:style=simple,explode=false,name=x-session-id") + private String xSessionId; + + @JsonCreator + public SuggestOpenAPIRequest( + SuggestOpenAPIRequestBody requestBody, + String xSessionId) { + Utils.checkNotNull(requestBody, "requestBody"); + Utils.checkNotNull(xSessionId, "xSessionId"); + this.requestBody = requestBody; + this.xSessionId = xSessionId; + } + + /** + * The schema file to upload provided as a multipart/form-data file segment. + */ + @JsonIgnore + public SuggestOpenAPIRequestBody requestBody() { + return requestBody; + } + + @JsonIgnore + public String xSessionId() { + return xSessionId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The schema file to upload provided as a multipart/form-data file segment. + */ + public SuggestOpenAPIRequest withRequestBody(SuggestOpenAPIRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public SuggestOpenAPIRequest withXSessionId(String xSessionId) { + Utils.checkNotNull(xSessionId, "xSessionId"); + this.xSessionId = xSessionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuggestOpenAPIRequest other = (SuggestOpenAPIRequest) o; + return + Objects.deepEquals(this.requestBody, other.requestBody) && + Objects.deepEquals(this.xSessionId, other.xSessionId); + } + + @Override + public int hashCode() { + return Objects.hash( + requestBody, + xSessionId); + } + + @Override + public String toString() { + return Utils.toString(SuggestOpenAPIRequest.class, + "requestBody", requestBody, + "xSessionId", xSessionId); + } + + public final static class Builder { + + private SuggestOpenAPIRequestBody requestBody; + + private String xSessionId; + + private Builder() { + // force use of static builder() method + } + + /** + * The schema file to upload provided as a multipart/form-data file segment. + */ + public Builder requestBody(SuggestOpenAPIRequestBody requestBody) { + Utils.checkNotNull(requestBody, "requestBody"); + this.requestBody = requestBody; + return this; + } + + public Builder xSessionId(String xSessionId) { + Utils.checkNotNull(xSessionId, "xSessionId"); + this.xSessionId = xSessionId; + return this; + } + + public SuggestOpenAPIRequest build() { + return new SuggestOpenAPIRequest( + requestBody, + xSessionId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequestBody.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequestBody.java new file mode 100644 index 00000000..5e3d6cbb --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequestBody.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.SuggestOpts; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + +/** + * SuggestOpenAPIRequestBody - The schema file to upload provided as a multipart/form-data file segment. + */ + +public class SuggestOpenAPIRequestBody { + + @SpeakeasyMetadata("multipartForm:name=opts,json") + private Optional opts; + + @SpeakeasyMetadata("multipartForm:file") + private Schema schema; + + @JsonCreator + public SuggestOpenAPIRequestBody( + Optional opts, + Schema schema) { + Utils.checkNotNull(opts, "opts"); + Utils.checkNotNull(schema, "schema"); + this.opts = opts; + this.schema = schema; + } + + public SuggestOpenAPIRequestBody( + Schema schema) { + this(Optional.empty(), schema); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional opts() { + return (Optional) opts; + } + + @JsonIgnore + public Schema schema() { + return schema; + } + + public final static Builder builder() { + return new Builder(); + } + + public SuggestOpenAPIRequestBody withOpts(SuggestOpts opts) { + Utils.checkNotNull(opts, "opts"); + this.opts = Optional.ofNullable(opts); + return this; + } + + public SuggestOpenAPIRequestBody withOpts(Optional opts) { + Utils.checkNotNull(opts, "opts"); + this.opts = opts; + return this; + } + + public SuggestOpenAPIRequestBody withSchema(Schema schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = schema; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuggestOpenAPIRequestBody other = (SuggestOpenAPIRequestBody) o; + return + Objects.deepEquals(this.opts, other.opts) && + Objects.deepEquals(this.schema, other.schema); + } + + @Override + public int hashCode() { + return Objects.hash( + opts, + schema); + } + + @Override + public String toString() { + return Utils.toString(SuggestOpenAPIRequestBody.class, + "opts", opts, + "schema", schema); + } + + public final static class Builder { + + private Optional opts = Optional.empty(); + + private Schema schema; + + private Builder() { + // force use of static builder() method + } + + public Builder opts(SuggestOpts opts) { + Utils.checkNotNull(opts, "opts"); + this.opts = Optional.ofNullable(opts); + return this; + } + + public Builder opts(Optional opts) { + Utils.checkNotNull(opts, "opts"); + this.opts = opts; + return this; + } + + public Builder schema(Schema schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = schema; + return this; + } + + public SuggestOpenAPIRequestBody build() { + return new SuggestOpenAPIRequestBody( + opts, + schema); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequestBuilder.java new file mode 100644 index 00000000..21dbe1bc --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class SuggestOpenAPIRequestBuilder { + + private SuggestOpenAPIRequest request; + private final SDKMethodInterfaces.MethodCallSuggestOpenAPI sdk; + + public SuggestOpenAPIRequestBuilder(SDKMethodInterfaces.MethodCallSuggestOpenAPI sdk) { + this.sdk = sdk; + } + + public SuggestOpenAPIRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.SuggestOpenAPIRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public SuggestOpenAPIResponse call() throws Exception { + + return sdk.suggestOpenAPI( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIResponse.java new file mode 100644 index 00000000..4567601c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/SuggestOpenAPIResponse.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class SuggestOpenAPIResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * An overlay containing the suggested spec modifications. + */ + private Optional schema; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public SuggestOpenAPIResponse( + String contentType, + Optional schema, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(schema, "schema"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.schema = schema; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public SuggestOpenAPIResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * An overlay containing the suggested spec modifications. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional schema() { + return (Optional) schema; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public SuggestOpenAPIResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * An overlay containing the suggested spec modifications. + */ + public SuggestOpenAPIResponse withSchema(InputStream schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = Optional.ofNullable(schema); + return this; + } + + /** + * An overlay containing the suggested spec modifications. + */ + public SuggestOpenAPIResponse withSchema(Optional schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = schema; + return this; + } + + /** + * HTTP response status code for this operation + */ + public SuggestOpenAPIResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SuggestOpenAPIResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuggestOpenAPIResponse other = (SuggestOpenAPIResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.schema, other.schema) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + schema, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(SuggestOpenAPIResponse.class, + "contentType", contentType, + "schema", schema, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional schema = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * An overlay containing the suggested spec modifications. + */ + public Builder schema(InputStream schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = Optional.ofNullable(schema); + return this; + } + + /** + * An overlay containing the suggested spec modifications. + */ + public Builder schema(Optional schema) { + Utils.checkNotNull(schema, "schema"); + this.schema = schema; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public SuggestOpenAPIResponse build() { + return new SuggestOpenAPIResponse( + contentType, + schema, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/TriggerActionRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/TriggerActionRequestBuilder.java new file mode 100644 index 00000000..97dcba41 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/TriggerActionRequestBuilder.java @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.models.shared.GithubTriggerActionRequest; +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class TriggerActionRequestBuilder { + + private GithubTriggerActionRequest request; + private final SDKMethodInterfaces.MethodCallTriggerAction sdk; + + public TriggerActionRequestBuilder(SDKMethodInterfaces.MethodCallTriggerAction sdk) { + this.sdk = sdk; + } + + public TriggerActionRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.shared.GithubTriggerActionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public TriggerActionResponse call() throws Exception { + + return sdk.triggerAction( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/TriggerActionResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/TriggerActionResponse.java new file mode 100644 index 00000000..65bc2dec --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/TriggerActionResponse.java @@ -0,0 +1,252 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class TriggerActionResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public TriggerActionResponse( + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public TriggerActionResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public TriggerActionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public TriggerActionResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public TriggerActionResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public TriggerActionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public TriggerActionResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TriggerActionResponse other = (TriggerActionResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(TriggerActionResponse.class, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public TriggerActionResponse build() { + return new TriggerActionResponse( + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportRequestBody.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportRequestBody.java new file mode 100644 index 00000000..a27cfef2 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportRequestBody.java @@ -0,0 +1,122 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.Report; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * UploadReportRequestBody - The report file to upload provided as a multipart/form-data file segment. + */ + +public class UploadReportRequestBody { + + @SpeakeasyMetadata("multipartForm:name=data,json") + private Report data; + + @SpeakeasyMetadata("multipartForm:file") + private File file; + + @JsonCreator + public UploadReportRequestBody( + Report data, + File file) { + Utils.checkNotNull(data, "data"); + Utils.checkNotNull(file, "file"); + this.data = data; + this.file = file; + } + + @JsonIgnore + public Report data() { + return data; + } + + @JsonIgnore + public File file() { + return file; + } + + public final static Builder builder() { + return new Builder(); + } + + public UploadReportRequestBody withData(Report data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + public UploadReportRequestBody withFile(File file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UploadReportRequestBody other = (UploadReportRequestBody) o; + return + Objects.deepEquals(this.data, other.data) && + Objects.deepEquals(this.file, other.file); + } + + @Override + public int hashCode() { + return Objects.hash( + data, + file); + } + + @Override + public String toString() { + return Utils.toString(UploadReportRequestBody.class, + "data", data, + "file", file); + } + + public final static class Builder { + + private Report data; + + private File file; + + private Builder() { + // force use of static builder() method + } + + public Builder data(Report data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + public Builder file(File file) { + Utils.checkNotNull(file, "file"); + this.file = file; + return this; + } + + public UploadReportRequestBody build() { + return new UploadReportRequestBody( + data, + file); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportRequestBuilder.java new file mode 100644 index 00000000..b78abd1a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class UploadReportRequestBuilder { + + private UploadReportRequestBody request; + private final SDKMethodInterfaces.MethodCallUploadReport sdk; + + public UploadReportRequestBuilder(SDKMethodInterfaces.MethodCallUploadReport sdk) { + this.sdk = sdk; + } + + public UploadReportRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.UploadReportRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public UploadReportResponse call() throws Exception { + + return sdk.uploadReport( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportResponse.java new file mode 100644 index 00000000..d24aa54c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportResponse.java @@ -0,0 +1,251 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class UploadReportResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private Optional uploadedReport; + + @JsonCreator + public UploadReportResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional uploadedReport) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(uploadedReport, "uploadedReport"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.uploadedReport = uploadedReport; + } + + public UploadReportResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional uploadedReport() { + return (Optional) uploadedReport; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public UploadReportResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UploadReportResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UploadReportResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public UploadReportResponse withUploadedReport(UploadReportUploadedReport uploadedReport) { + Utils.checkNotNull(uploadedReport, "uploadedReport"); + this.uploadedReport = Optional.ofNullable(uploadedReport); + return this; + } + + /** + * OK + */ + public UploadReportResponse withUploadedReport(Optional uploadedReport) { + Utils.checkNotNull(uploadedReport, "uploadedReport"); + this.uploadedReport = uploadedReport; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UploadReportResponse other = (UploadReportResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse) && + Objects.deepEquals(this.uploadedReport, other.uploadedReport); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse, + uploadedReport); + } + + @Override + public String toString() { + return Utils.toString(UploadReportResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "uploadedReport", uploadedReport); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional uploadedReport = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * OK + */ + public Builder uploadedReport(UploadReportUploadedReport uploadedReport) { + Utils.checkNotNull(uploadedReport, "uploadedReport"); + this.uploadedReport = Optional.ofNullable(uploadedReport); + return this; + } + + /** + * OK + */ + public Builder uploadedReport(Optional uploadedReport) { + Utils.checkNotNull(uploadedReport, "uploadedReport"); + this.uploadedReport = uploadedReport; + return this; + } + + public UploadReportResponse build() { + return new UploadReportResponse( + contentType, + statusCode, + rawResponse, + uploadedReport); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportUploadedReport.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportUploadedReport.java new file mode 100644 index 00000000..26ffa800 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UploadReportUploadedReport.java @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * UploadReportUploadedReport - OK + */ + +public class UploadReportUploadedReport { + + @JsonProperty("url") + private String url; + + @JsonCreator + public UploadReportUploadedReport( + @JsonProperty("url") String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + } + + @JsonIgnore + public String url() { + return url; + } + + public final static Builder builder() { + return new Builder(); + } + + public UploadReportUploadedReport withUrl(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UploadReportUploadedReport other = (UploadReportUploadedReport) o; + return + Objects.deepEquals(this.url, other.url); + } + + @Override + public int hashCode() { + return Objects.hash( + url); + } + + @Override + public String toString() { + return Utils.toString(UploadReportUploadedReport.class, + "url", url); + } + + public final static class Builder { + + private String url; + + private Builder() { + // force use of static builder() method + } + + public Builder url(String url) { + Utils.checkNotNull(url, "url"); + this.url = url; + return this; + } + + public UploadReportUploadedReport build() { + return new UploadReportUploadedReport( + url); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointRequest.java new file mode 100644 index 00000000..1369f7ec --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointRequest.java @@ -0,0 +1,225 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.ApiEndpointInput; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class UpsertApiEndpointRequest { + + /** + * A JSON representation of the ApiEndpoint to upsert. + */ + @SpeakeasyMetadata("request:mediaType=application/json") + private ApiEndpointInput apiEndpoint; + + /** + * The ID of the ApiEndpoint to upsert. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiEndpointID") + private String apiEndpointID; + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=versionID") + private String versionID; + + @JsonCreator + public UpsertApiEndpointRequest( + ApiEndpointInput apiEndpoint, + String apiEndpointID, + String apiID, + String versionID) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + Utils.checkNotNull(apiID, "apiID"); + Utils.checkNotNull(versionID, "versionID"); + this.apiEndpoint = apiEndpoint; + this.apiEndpointID = apiEndpointID; + this.apiID = apiID; + this.versionID = versionID; + } + + /** + * A JSON representation of the ApiEndpoint to upsert. + */ + @JsonIgnore + public ApiEndpointInput apiEndpoint() { + return apiEndpoint; + } + + /** + * The ID of the ApiEndpoint to upsert. + */ + @JsonIgnore + public String apiEndpointID() { + return apiEndpointID; + } + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + @JsonIgnore + public String versionID() { + return versionID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * A JSON representation of the ApiEndpoint to upsert. + */ + public UpsertApiEndpointRequest withApiEndpoint(ApiEndpointInput apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = apiEndpoint; + return this; + } + + /** + * The ID of the ApiEndpoint to upsert. + */ + public UpsertApiEndpointRequest withApiEndpointID(String apiEndpointID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + this.apiEndpointID = apiEndpointID; + return this; + } + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + public UpsertApiEndpointRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + public UpsertApiEndpointRequest withVersionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertApiEndpointRequest other = (UpsertApiEndpointRequest) o; + return + Objects.deepEquals(this.apiEndpoint, other.apiEndpoint) && + Objects.deepEquals(this.apiEndpointID, other.apiEndpointID) && + Objects.deepEquals(this.apiID, other.apiID) && + Objects.deepEquals(this.versionID, other.versionID); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpoint, + apiEndpointID, + apiID, + versionID); + } + + @Override + public String toString() { + return Utils.toString(UpsertApiEndpointRequest.class, + "apiEndpoint", apiEndpoint, + "apiEndpointID", apiEndpointID, + "apiID", apiID, + "versionID", versionID); + } + + public final static class Builder { + + private ApiEndpointInput apiEndpoint; + + private String apiEndpointID; + + private String apiID; + + private String versionID; + + private Builder() { + // force use of static builder() method + } + + /** + * A JSON representation of the ApiEndpoint to upsert. + */ + public Builder apiEndpoint(ApiEndpointInput apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = apiEndpoint; + return this; + } + + /** + * The ID of the ApiEndpoint to upsert. + */ + public Builder apiEndpointID(String apiEndpointID) { + Utils.checkNotNull(apiEndpointID, "apiEndpointID"); + this.apiEndpointID = apiEndpointID; + return this; + } + + /** + * The ID of the Api the ApiEndpoint belongs to. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + /** + * The version ID of the Api the ApiEndpoint belongs to. + */ + public Builder versionID(String versionID) { + Utils.checkNotNull(versionID, "versionID"); + this.versionID = versionID; + return this; + } + + public UpsertApiEndpointRequest build() { + return new UpsertApiEndpointRequest( + apiEndpoint, + apiEndpointID, + apiID, + versionID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointRequestBuilder.java new file mode 100644 index 00000000..1a487363 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class UpsertApiEndpointRequestBuilder { + + private UpsertApiEndpointRequest request; + private final SDKMethodInterfaces.MethodCallUpsertApiEndpoint sdk; + + public UpsertApiEndpointRequestBuilder(SDKMethodInterfaces.MethodCallUpsertApiEndpoint sdk) { + this.sdk = sdk; + } + + public UpsertApiEndpointRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiEndpointRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public UpsertApiEndpointResponse call() throws Exception { + + return sdk.upsertApiEndpoint( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointResponse.java new file mode 100644 index 00000000..15a61918 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiEndpointResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.ApiEndpoint; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class UpsertApiEndpointResponse implements Response { + + /** + * OK + */ + private Optional apiEndpoint; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UpsertApiEndpointResponse( + Optional apiEndpoint, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.apiEndpoint = apiEndpoint; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public UpsertApiEndpointResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional apiEndpoint() { + return (Optional) apiEndpoint; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public UpsertApiEndpointResponse withApiEndpoint(ApiEndpoint apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = Optional.ofNullable(apiEndpoint); + return this; + } + + /** + * OK + */ + public UpsertApiEndpointResponse withApiEndpoint(Optional apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = apiEndpoint; + return this; + } + + /** + * HTTP response content type for this operation + */ + public UpsertApiEndpointResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public UpsertApiEndpointResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public UpsertApiEndpointResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpsertApiEndpointResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpsertApiEndpointResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertApiEndpointResponse other = (UpsertApiEndpointResponse) o; + return + Objects.deepEquals(this.apiEndpoint, other.apiEndpoint) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpoint, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UpsertApiEndpointResponse.class, + "apiEndpoint", apiEndpoint, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional apiEndpoint = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder apiEndpoint(ApiEndpoint apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = Optional.ofNullable(apiEndpoint); + return this; + } + + /** + * OK + */ + public Builder apiEndpoint(Optional apiEndpoint) { + Utils.checkNotNull(apiEndpoint, "apiEndpoint"); + this.apiEndpoint = apiEndpoint; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public UpsertApiEndpointResponse build() { + return new UpsertApiEndpointResponse( + apiEndpoint, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiRequest.java new file mode 100644 index 00000000..6b9a8072 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiRequest.java @@ -0,0 +1,143 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.shared.ApiInput; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class UpsertApiRequest { + + /** + * A JSON representation of the Api to upsert + */ + @SpeakeasyMetadata("request:mediaType=application/json") + private ApiInput api; + + /** + * The ID of the Api to upsert. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=apiID") + private String apiID; + + @JsonCreator + public UpsertApiRequest( + ApiInput api, + String apiID) { + Utils.checkNotNull(api, "api"); + Utils.checkNotNull(apiID, "apiID"); + this.api = api; + this.apiID = apiID; + } + + /** + * A JSON representation of the Api to upsert + */ + @JsonIgnore + public ApiInput api() { + return api; + } + + /** + * The ID of the Api to upsert. + */ + @JsonIgnore + public String apiID() { + return apiID; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * A JSON representation of the Api to upsert + */ + public UpsertApiRequest withApi(ApiInput api) { + Utils.checkNotNull(api, "api"); + this.api = api; + return this; + } + + /** + * The ID of the Api to upsert. + */ + public UpsertApiRequest withApiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertApiRequest other = (UpsertApiRequest) o; + return + Objects.deepEquals(this.api, other.api) && + Objects.deepEquals(this.apiID, other.apiID); + } + + @Override + public int hashCode() { + return Objects.hash( + api, + apiID); + } + + @Override + public String toString() { + return Utils.toString(UpsertApiRequest.class, + "api", api, + "apiID", apiID); + } + + public final static class Builder { + + private ApiInput api; + + private String apiID; + + private Builder() { + // force use of static builder() method + } + + /** + * A JSON representation of the Api to upsert + */ + public Builder api(ApiInput api) { + Utils.checkNotNull(api, "api"); + this.api = api; + return this; + } + + /** + * The ID of the Api to upsert. + */ + public Builder apiID(String apiID) { + Utils.checkNotNull(apiID, "apiID"); + this.apiID = apiID; + return this; + } + + public UpsertApiRequest build() { + return new UpsertApiRequest( + api, + apiID); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiRequestBuilder.java new file mode 100644 index 00000000..c086a237 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiRequestBuilder.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + +import dev.speakeasyapi.javaclientsdk.utils.Utils; + +public class UpsertApiRequestBuilder { + + private UpsertApiRequest request; + private final SDKMethodInterfaces.MethodCallUpsertApi sdk; + + public UpsertApiRequestBuilder(SDKMethodInterfaces.MethodCallUpsertApi sdk) { + this.sdk = sdk; + } + + public UpsertApiRequestBuilder request(dev.speakeasyapi.javaclientsdk.models.operations.UpsertApiRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public UpsertApiResponse call() throws Exception { + + return sdk.upsertApi( + request); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiResponse.java new file mode 100644 index 00000000..abc0642c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/UpsertApiResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.Api; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class UpsertApiResponse implements Response { + + /** + * OK + */ + private Optional api; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UpsertApiResponse( + Optional api, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(api, "api"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.api = api; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public UpsertApiResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional api() { + return (Optional) api; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public UpsertApiResponse withApi(Api api) { + Utils.checkNotNull(api, "api"); + this.api = Optional.ofNullable(api); + return this; + } + + /** + * OK + */ + public UpsertApiResponse withApi(Optional api) { + Utils.checkNotNull(api, "api"); + this.api = api; + return this; + } + + /** + * HTTP response content type for this operation + */ + public UpsertApiResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public UpsertApiResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public UpsertApiResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpsertApiResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpsertApiResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertApiResponse other = (UpsertApiResponse) o; + return + Objects.deepEquals(this.api, other.api) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + api, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UpsertApiResponse.class, + "api", api, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional api = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder api(Api api) { + Utils.checkNotNull(api, "api"); + this.api = Optional.ofNullable(api); + return this; + } + + /** + * OK + */ + public Builder api(Optional api) { + Utils.checkNotNull(api, "api"); + this.api = api; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public UpsertApiResponse build() { + return new UpsertApiResponse( + api, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ValidateApiKeyRequestBuilder.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ValidateApiKeyRequestBuilder.java new file mode 100644 index 00000000..b15b5c5a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ValidateApiKeyRequestBuilder.java @@ -0,0 +1,20 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +public class ValidateApiKeyRequestBuilder { + + private final SDKMethodInterfaces.MethodCallValidateApiKey sdk; + + public ValidateApiKeyRequestBuilder(SDKMethodInterfaces.MethodCallValidateApiKey sdk) { + this.sdk = sdk; + } + + public ValidateApiKeyResponse call() throws Exception { + + return sdk.validateApiKeyDirect(); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ValidateApiKeyResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ValidateApiKeyResponse.java new file mode 100644 index 00000000..a148a8f1 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/operations/ValidateApiKeyResponse.java @@ -0,0 +1,312 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.operations; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.models.errors.Error; +import dev.speakeasyapi.javaclientsdk.models.shared.ApiKeyDetails; +import dev.speakeasyapi.javaclientsdk.utils.Response; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Objects; +import java.util.Optional; + + +public class ValidateApiKeyResponse implements Response { + + /** + * OK + */ + private Optional apiKeyDetails; + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Default error response + */ + private Optional error; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public ValidateApiKeyResponse( + Optional apiKeyDetails, + String contentType, + Optional error, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(apiKeyDetails, "apiKeyDetails"); + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.apiKeyDetails = apiKeyDetails; + this.contentType = contentType; + this.error = error; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public ValidateApiKeyResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(Optional.empty(), contentType, Optional.empty(), statusCode, rawResponse); + } + + /** + * OK + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional apiKeyDetails() { + return (Optional) apiKeyDetails; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * Default error response + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional error() { + return (Optional) error; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * OK + */ + public ValidateApiKeyResponse withApiKeyDetails(ApiKeyDetails apiKeyDetails) { + Utils.checkNotNull(apiKeyDetails, "apiKeyDetails"); + this.apiKeyDetails = Optional.ofNullable(apiKeyDetails); + return this; + } + + /** + * OK + */ + public ValidateApiKeyResponse withApiKeyDetails(Optional apiKeyDetails) { + Utils.checkNotNull(apiKeyDetails, "apiKeyDetails"); + this.apiKeyDetails = apiKeyDetails; + return this; + } + + /** + * HTTP response content type for this operation + */ + public ValidateApiKeyResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public ValidateApiKeyResponse withError(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public ValidateApiKeyResponse withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ValidateApiKeyResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ValidateApiKeyResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidateApiKeyResponse other = (ValidateApiKeyResponse) o; + return + Objects.deepEquals(this.apiKeyDetails, other.apiKeyDetails) && + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + apiKeyDetails, + contentType, + error, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(ValidateApiKeyResponse.class, + "apiKeyDetails", apiKeyDetails, + "contentType", contentType, + "error", error, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private Optional apiKeyDetails = Optional.empty(); + + private String contentType; + + private Optional error = Optional.empty(); + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * OK + */ + public Builder apiKeyDetails(ApiKeyDetails apiKeyDetails) { + Utils.checkNotNull(apiKeyDetails, "apiKeyDetails"); + this.apiKeyDetails = Optional.ofNullable(apiKeyDetails); + return this; + } + + /** + * OK + */ + public Builder apiKeyDetails(Optional apiKeyDetails) { + Utils.checkNotNull(apiKeyDetails, "apiKeyDetails"); + this.apiKeyDetails = apiKeyDetails; + return this; + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Default error response + */ + public Builder error(Error error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Default error response + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public ValidateApiKeyResponse build() { + return new ValidateApiKeyResponse( + apiKeyDetails, + contentType, + error, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessDetails.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessDetails.java new file mode 100644 index 00000000..cb1d4441 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessDetails.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class AccessDetails { + + @JsonProperty("generation_allowed") + private boolean generationAllowed; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("level") + private Optional level; + + @JsonProperty("message") + private String message; + + @JsonCreator + public AccessDetails( + @JsonProperty("generation_allowed") boolean generationAllowed, + @JsonProperty("level") Optional level, + @JsonProperty("message") String message) { + Utils.checkNotNull(generationAllowed, "generationAllowed"); + Utils.checkNotNull(level, "level"); + Utils.checkNotNull(message, "message"); + this.generationAllowed = generationAllowed; + this.level = level; + this.message = message; + } + + public AccessDetails( + boolean generationAllowed, + String message) { + this(generationAllowed, Optional.empty(), message); + } + + @JsonIgnore + public boolean generationAllowed() { + return generationAllowed; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional level() { + return (Optional) level; + } + + @JsonIgnore + public String message() { + return message; + } + + public final static Builder builder() { + return new Builder(); + } + + public AccessDetails withGenerationAllowed(boolean generationAllowed) { + Utils.checkNotNull(generationAllowed, "generationAllowed"); + this.generationAllowed = generationAllowed; + return this; + } + + public AccessDetails withLevel(Level level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + public AccessDetails withLevel(Optional level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + public AccessDetails withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccessDetails other = (AccessDetails) o; + return + Objects.deepEquals(this.generationAllowed, other.generationAllowed) && + Objects.deepEquals(this.level, other.level) && + Objects.deepEquals(this.message, other.message); + } + + @Override + public int hashCode() { + return Objects.hash( + generationAllowed, + level, + message); + } + + @Override + public String toString() { + return Utils.toString(AccessDetails.class, + "generationAllowed", generationAllowed, + "level", level, + "message", message); + } + + public final static class Builder { + + private Boolean generationAllowed; + + private Optional level = Optional.empty(); + + private String message; + + private Builder() { + // force use of static builder() method + } + + public Builder generationAllowed(boolean generationAllowed) { + Utils.checkNotNull(generationAllowed, "generationAllowed"); + this.generationAllowed = generationAllowed; + return this; + } + + public Builder level(Level level) { + Utils.checkNotNull(level, "level"); + this.level = Optional.ofNullable(level); + return this; + } + + public Builder level(Optional level) { + Utils.checkNotNull(level, "level"); + this.level = level; + return this; + } + + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + public AccessDetails build() { + return new AccessDetails( + generationAllowed, + level, + message); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessToken.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessToken.java new file mode 100644 index 00000000..02c96cf6 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessToken.java @@ -0,0 +1,248 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * AccessToken - An AccessToken is a token that can be used to authenticate with the Speakeasy API. + */ + +public class AccessToken { + + @JsonProperty("access_token") + private String accessToken; + + @JsonProperty("claims") + private Claims claims; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("feature_flags") + private Optional> featureFlags; + + @JsonProperty("user") + private AccessTokenUser user; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("workspaces") + private Optional> workspaces; + + @JsonCreator + public AccessToken( + @JsonProperty("access_token") String accessToken, + @JsonProperty("claims") Claims claims, + @JsonProperty("feature_flags") Optional> featureFlags, + @JsonProperty("user") AccessTokenUser user, + @JsonProperty("workspaces") Optional> workspaces) { + Utils.checkNotNull(accessToken, "accessToken"); + Utils.checkNotNull(claims, "claims"); + Utils.checkNotNull(featureFlags, "featureFlags"); + Utils.checkNotNull(user, "user"); + Utils.checkNotNull(workspaces, "workspaces"); + this.accessToken = accessToken; + this.claims = claims; + this.featureFlags = featureFlags; + this.user = user; + this.workspaces = workspaces; + } + + public AccessToken( + String accessToken, + Claims claims, + AccessTokenUser user) { + this(accessToken, claims, Optional.empty(), user, Optional.empty()); + } + + @JsonIgnore + public String accessToken() { + return accessToken; + } + + @JsonIgnore + public Claims claims() { + return claims; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> featureFlags() { + return (Optional>) featureFlags; + } + + @JsonIgnore + public AccessTokenUser user() { + return user; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> workspaces() { + return (Optional>) workspaces; + } + + public final static Builder builder() { + return new Builder(); + } + + public AccessToken withAccessToken(String accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; + return this; + } + + public AccessToken withClaims(Claims claims) { + Utils.checkNotNull(claims, "claims"); + this.claims = claims; + return this; + } + + public AccessToken withFeatureFlags(List featureFlags) { + Utils.checkNotNull(featureFlags, "featureFlags"); + this.featureFlags = Optional.ofNullable(featureFlags); + return this; + } + + public AccessToken withFeatureFlags(Optional> featureFlags) { + Utils.checkNotNull(featureFlags, "featureFlags"); + this.featureFlags = featureFlags; + return this; + } + + public AccessToken withUser(AccessTokenUser user) { + Utils.checkNotNull(user, "user"); + this.user = user; + return this; + } + + public AccessToken withWorkspaces(List workspaces) { + Utils.checkNotNull(workspaces, "workspaces"); + this.workspaces = Optional.ofNullable(workspaces); + return this; + } + + public AccessToken withWorkspaces(Optional> workspaces) { + Utils.checkNotNull(workspaces, "workspaces"); + this.workspaces = workspaces; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccessToken other = (AccessToken) o; + return + Objects.deepEquals(this.accessToken, other.accessToken) && + Objects.deepEquals(this.claims, other.claims) && + Objects.deepEquals(this.featureFlags, other.featureFlags) && + Objects.deepEquals(this.user, other.user) && + Objects.deepEquals(this.workspaces, other.workspaces); + } + + @Override + public int hashCode() { + return Objects.hash( + accessToken, + claims, + featureFlags, + user, + workspaces); + } + + @Override + public String toString() { + return Utils.toString(AccessToken.class, + "accessToken", accessToken, + "claims", claims, + "featureFlags", featureFlags, + "user", user, + "workspaces", workspaces); + } + + public final static class Builder { + + private String accessToken; + + private Claims claims; + + private Optional> featureFlags = Optional.empty(); + + private AccessTokenUser user; + + private Optional> workspaces = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder accessToken(String accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; + return this; + } + + public Builder claims(Claims claims) { + Utils.checkNotNull(claims, "claims"); + this.claims = claims; + return this; + } + + public Builder featureFlags(List featureFlags) { + Utils.checkNotNull(featureFlags, "featureFlags"); + this.featureFlags = Optional.ofNullable(featureFlags); + return this; + } + + public Builder featureFlags(Optional> featureFlags) { + Utils.checkNotNull(featureFlags, "featureFlags"); + this.featureFlags = featureFlags; + return this; + } + + public Builder user(AccessTokenUser user) { + Utils.checkNotNull(user, "user"); + this.user = user; + return this; + } + + public Builder workspaces(List workspaces) { + Utils.checkNotNull(workspaces, "workspaces"); + this.workspaces = Optional.ofNullable(workspaces); + return this; + } + + public Builder workspaces(Optional> workspaces) { + Utils.checkNotNull(workspaces, "workspaces"); + this.workspaces = workspaces; + return this; + } + + public AccessToken build() { + return new AccessToken( + accessToken, + claims, + featureFlags, + user, + workspaces); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessTokenUser.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessTokenUser.java new file mode 100644 index 00000000..ac00720c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccessTokenUser.java @@ -0,0 +1,321 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.Optional; + + +public class AccessTokenUser { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("admin") + private Optional admin; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("created_at") + private Optional createdAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("display_name") + private Optional displayName; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("email") + private Optional email; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("email_verified") + private Optional emailVerified; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonCreator + public AccessTokenUser( + @JsonProperty("admin") Optional admin, + @JsonProperty("created_at") Optional createdAt, + @JsonProperty("display_name") Optional displayName, + @JsonProperty("email") Optional email, + @JsonProperty("email_verified") Optional emailVerified, + @JsonProperty("id") Optional id) { + Utils.checkNotNull(admin, "admin"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(displayName, "displayName"); + Utils.checkNotNull(email, "email"); + Utils.checkNotNull(emailVerified, "emailVerified"); + Utils.checkNotNull(id, "id"); + this.admin = admin; + this.createdAt = createdAt; + this.displayName = displayName; + this.email = email; + this.emailVerified = emailVerified; + this.id = id; + } + + public AccessTokenUser() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional admin() { + return admin; + } + + @JsonIgnore + public Optional createdAt() { + return createdAt; + } + + @JsonIgnore + public Optional displayName() { + return displayName; + } + + @JsonIgnore + public Optional email() { + return email; + } + + @JsonIgnore + public Optional emailVerified() { + return emailVerified; + } + + @JsonIgnore + public Optional id() { + return id; + } + + public final static Builder builder() { + return new Builder(); + } + + public AccessTokenUser withAdmin(boolean admin) { + Utils.checkNotNull(admin, "admin"); + this.admin = Optional.ofNullable(admin); + return this; + } + + public AccessTokenUser withAdmin(Optional admin) { + Utils.checkNotNull(admin, "admin"); + this.admin = admin; + return this; + } + + public AccessTokenUser withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public AccessTokenUser withCreatedAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public AccessTokenUser withDisplayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = Optional.ofNullable(displayName); + return this; + } + + public AccessTokenUser withDisplayName(Optional displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + public AccessTokenUser withEmail(String email) { + Utils.checkNotNull(email, "email"); + this.email = Optional.ofNullable(email); + return this; + } + + public AccessTokenUser withEmail(Optional email) { + Utils.checkNotNull(email, "email"); + this.email = email; + return this; + } + + public AccessTokenUser withEmailVerified(boolean emailVerified) { + Utils.checkNotNull(emailVerified, "emailVerified"); + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + public AccessTokenUser withEmailVerified(Optional emailVerified) { + Utils.checkNotNull(emailVerified, "emailVerified"); + this.emailVerified = emailVerified; + return this; + } + + public AccessTokenUser withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public AccessTokenUser withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccessTokenUser other = (AccessTokenUser) o; + return + Objects.deepEquals(this.admin, other.admin) && + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.displayName, other.displayName) && + Objects.deepEquals(this.email, other.email) && + Objects.deepEquals(this.emailVerified, other.emailVerified) && + Objects.deepEquals(this.id, other.id); + } + + @Override + public int hashCode() { + return Objects.hash( + admin, + createdAt, + displayName, + email, + emailVerified, + id); + } + + @Override + public String toString() { + return Utils.toString(AccessTokenUser.class, + "admin", admin, + "createdAt", createdAt, + "displayName", displayName, + "email", email, + "emailVerified", emailVerified, + "id", id); + } + + public final static class Builder { + + private Optional admin = Optional.empty(); + + private Optional createdAt = Optional.empty(); + + private Optional displayName = Optional.empty(); + + private Optional email = Optional.empty(); + + private Optional emailVerified = Optional.empty(); + + private Optional id = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder admin(boolean admin) { + Utils.checkNotNull(admin, "admin"); + this.admin = Optional.ofNullable(admin); + return this; + } + + public Builder admin(Optional admin) { + Utils.checkNotNull(admin, "admin"); + this.admin = admin; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public Builder displayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = Optional.ofNullable(displayName); + return this; + } + + public Builder displayName(Optional displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + public Builder email(String email) { + Utils.checkNotNull(email, "email"); + this.email = Optional.ofNullable(email); + return this; + } + + public Builder email(Optional email) { + Utils.checkNotNull(email, "email"); + this.email = email; + return this; + } + + public Builder emailVerified(boolean emailVerified) { + Utils.checkNotNull(emailVerified, "emailVerified"); + this.emailVerified = Optional.ofNullable(emailVerified); + return this; + } + + public Builder emailVerified(Optional emailVerified) { + Utils.checkNotNull(emailVerified, "emailVerified"); + this.emailVerified = emailVerified; + return this; + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public AccessTokenUser build() { + return new AccessTokenUser( + admin, + createdAt, + displayName, + email, + emailVerified, + id); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccountType.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccountType.java new file mode 100644 index 00000000..8236f8fc --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AccountType.java @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; + +public enum AccountType { + FREE("free"), + SCALE_UP("scale-up"), + BUSINESS("business"), + ENTERPRISE("enterprise"); + + @JsonValue + private final String value; + + private AccountType(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AddTags.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AddTags.java new file mode 100644 index 00000000..82076e0c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/AddTags.java @@ -0,0 +1,146 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +/** + * AddTags - Request body of tags to add to a revision + */ + +public class AddTags { + + /** + * revision digest to add tags too sha256:... + */ + @JsonProperty("revision_digest") + private String revisionDigest; + + /** + * string tags to add to the revision + */ + @JsonProperty("tags") + private List tags; + + @JsonCreator + public AddTags( + @JsonProperty("revision_digest") String revisionDigest, + @JsonProperty("tags") List tags) { + Utils.checkNotNull(revisionDigest, "revisionDigest"); + Utils.checkNotNull(tags, "tags"); + this.revisionDigest = revisionDigest; + this.tags = tags; + } + + /** + * revision digest to add tags too sha256:... + */ + @JsonIgnore + public String revisionDigest() { + return revisionDigest; + } + + /** + * string tags to add to the revision + */ + @JsonIgnore + public List tags() { + return tags; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * revision digest to add tags too sha256:... + */ + public AddTags withRevisionDigest(String revisionDigest) { + Utils.checkNotNull(revisionDigest, "revisionDigest"); + this.revisionDigest = revisionDigest; + return this; + } + + /** + * string tags to add to the revision + */ + public AddTags withTags(List tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = tags; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddTags other = (AddTags) o; + return + Objects.deepEquals(this.revisionDigest, other.revisionDigest) && + Objects.deepEquals(this.tags, other.tags); + } + + @Override + public int hashCode() { + return Objects.hash( + revisionDigest, + tags); + } + + @Override + public String toString() { + return Utils.toString(AddTags.class, + "revisionDigest", revisionDigest, + "tags", tags); + } + + public final static class Builder { + + private String revisionDigest; + + private List tags; + + private Builder() { + // force use of static builder() method + } + + /** + * revision digest to add tags too sha256:... + */ + public Builder revisionDigest(String revisionDigest) { + Utils.checkNotNull(revisionDigest, "revisionDigest"); + this.revisionDigest = revisionDigest; + return this; + } + + /** + * string tags to add to the revision + */ + public Builder tags(List tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = tags; + return this; + } + + public AddTags build() { + return new AddTags( + revisionDigest, + tags); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Annotations.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Annotations.java new file mode 100644 index 00000000..4ddbde16 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Annotations.java @@ -0,0 +1,772 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * Annotations - Annotations + */ + +public class Annotations { + + /** + * The authors of the image + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("org.opencontainers.image.authors") + private Optional orgOpencontainersImageAuthors; + + /** + * The time the image was created + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("org.opencontainers.image.created") + private Optional orgOpencontainersImageCreated; + + /** + * Human-readable description of the software packaged in the image + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("org.opencontainers.image.description") + private Optional orgOpencontainersImageDescription; + + /** + * The documentation URL of the image + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("org.opencontainers.image.documentation") + private Optional orgOpencontainersImageDocumentation; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("org.opencontainers.image.licenses") + private Optional orgOpencontainersImageLicenses; + + /** + * Name of the reference for a target + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("org.opencontainers.image.ref.name") + private Optional orgOpencontainersImageRefName; + + /** + * Source control revision identifier + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("org.opencontainers.image.revision") + private Optional orgOpencontainersImageRevision; + + /** + * The URL to get source code for building the image + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("org.opencontainers.image.source") + private Optional orgOpencontainersImageSource; + + /** + * Human-readable title of the image + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("org.opencontainers.image.title") + private Optional orgOpencontainersImageTitle; + + /** + * The URL of the image + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("org.opencontainers.image.url") + private Optional orgOpencontainersImageUrl; + + /** + * Name of the distributing entity, organization or individual. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("org.opencontainers.image.vendor") + private Optional orgOpencontainersImageVendor; + + /** + * The version of the packaged software + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("org.opencontainers.image.version") + private Optional orgOpencontainersImageVersion; + + @JsonCreator + public Annotations( + @JsonProperty("org.opencontainers.image.authors") Optional orgOpencontainersImageAuthors, + @JsonProperty("org.opencontainers.image.created") Optional orgOpencontainersImageCreated, + @JsonProperty("org.opencontainers.image.description") Optional orgOpencontainersImageDescription, + @JsonProperty("org.opencontainers.image.documentation") Optional orgOpencontainersImageDocumentation, + @JsonProperty("org.opencontainers.image.licenses") Optional orgOpencontainersImageLicenses, + @JsonProperty("org.opencontainers.image.ref.name") Optional orgOpencontainersImageRefName, + @JsonProperty("org.opencontainers.image.revision") Optional orgOpencontainersImageRevision, + @JsonProperty("org.opencontainers.image.source") Optional orgOpencontainersImageSource, + @JsonProperty("org.opencontainers.image.title") Optional orgOpencontainersImageTitle, + @JsonProperty("org.opencontainers.image.url") Optional orgOpencontainersImageUrl, + @JsonProperty("org.opencontainers.image.vendor") Optional orgOpencontainersImageVendor, + @JsonProperty("org.opencontainers.image.version") Optional orgOpencontainersImageVersion) { + Utils.checkNotNull(orgOpencontainersImageAuthors, "orgOpencontainersImageAuthors"); + Utils.checkNotNull(orgOpencontainersImageCreated, "orgOpencontainersImageCreated"); + Utils.checkNotNull(orgOpencontainersImageDescription, "orgOpencontainersImageDescription"); + Utils.checkNotNull(orgOpencontainersImageDocumentation, "orgOpencontainersImageDocumentation"); + Utils.checkNotNull(orgOpencontainersImageLicenses, "orgOpencontainersImageLicenses"); + Utils.checkNotNull(orgOpencontainersImageRefName, "orgOpencontainersImageRefName"); + Utils.checkNotNull(orgOpencontainersImageRevision, "orgOpencontainersImageRevision"); + Utils.checkNotNull(orgOpencontainersImageSource, "orgOpencontainersImageSource"); + Utils.checkNotNull(orgOpencontainersImageTitle, "orgOpencontainersImageTitle"); + Utils.checkNotNull(orgOpencontainersImageUrl, "orgOpencontainersImageUrl"); + Utils.checkNotNull(orgOpencontainersImageVendor, "orgOpencontainersImageVendor"); + Utils.checkNotNull(orgOpencontainersImageVersion, "orgOpencontainersImageVersion"); + this.orgOpencontainersImageAuthors = orgOpencontainersImageAuthors; + this.orgOpencontainersImageCreated = orgOpencontainersImageCreated; + this.orgOpencontainersImageDescription = orgOpencontainersImageDescription; + this.orgOpencontainersImageDocumentation = orgOpencontainersImageDocumentation; + this.orgOpencontainersImageLicenses = orgOpencontainersImageLicenses; + this.orgOpencontainersImageRefName = orgOpencontainersImageRefName; + this.orgOpencontainersImageRevision = orgOpencontainersImageRevision; + this.orgOpencontainersImageSource = orgOpencontainersImageSource; + this.orgOpencontainersImageTitle = orgOpencontainersImageTitle; + this.orgOpencontainersImageUrl = orgOpencontainersImageUrl; + this.orgOpencontainersImageVendor = orgOpencontainersImageVendor; + this.orgOpencontainersImageVersion = orgOpencontainersImageVersion; + } + + public Annotations() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The authors of the image + */ + @JsonIgnore + public Optional orgOpencontainersImageAuthors() { + return orgOpencontainersImageAuthors; + } + + /** + * The time the image was created + */ + @JsonIgnore + public Optional orgOpencontainersImageCreated() { + return orgOpencontainersImageCreated; + } + + /** + * Human-readable description of the software packaged in the image + */ + @JsonIgnore + public Optional orgOpencontainersImageDescription() { + return orgOpencontainersImageDescription; + } + + /** + * The documentation URL of the image + */ + @JsonIgnore + public Optional orgOpencontainersImageDocumentation() { + return orgOpencontainersImageDocumentation; + } + + @JsonIgnore + public Optional orgOpencontainersImageLicenses() { + return orgOpencontainersImageLicenses; + } + + /** + * Name of the reference for a target + */ + @JsonIgnore + public Optional orgOpencontainersImageRefName() { + return orgOpencontainersImageRefName; + } + + /** + * Source control revision identifier + */ + @JsonIgnore + public Optional orgOpencontainersImageRevision() { + return orgOpencontainersImageRevision; + } + + /** + * The URL to get source code for building the image + */ + @JsonIgnore + public Optional orgOpencontainersImageSource() { + return orgOpencontainersImageSource; + } + + /** + * Human-readable title of the image + */ + @JsonIgnore + public Optional orgOpencontainersImageTitle() { + return orgOpencontainersImageTitle; + } + + /** + * The URL of the image + */ + @JsonIgnore + public Optional orgOpencontainersImageUrl() { + return orgOpencontainersImageUrl; + } + + /** + * Name of the distributing entity, organization or individual. + */ + @JsonIgnore + public Optional orgOpencontainersImageVendor() { + return orgOpencontainersImageVendor; + } + + /** + * The version of the packaged software + */ + @JsonIgnore + public Optional orgOpencontainersImageVersion() { + return orgOpencontainersImageVersion; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The authors of the image + */ + public Annotations withOrgOpencontainersImageAuthors(String orgOpencontainersImageAuthors) { + Utils.checkNotNull(orgOpencontainersImageAuthors, "orgOpencontainersImageAuthors"); + this.orgOpencontainersImageAuthors = Optional.ofNullable(orgOpencontainersImageAuthors); + return this; + } + + /** + * The authors of the image + */ + public Annotations withOrgOpencontainersImageAuthors(Optional orgOpencontainersImageAuthors) { + Utils.checkNotNull(orgOpencontainersImageAuthors, "orgOpencontainersImageAuthors"); + this.orgOpencontainersImageAuthors = orgOpencontainersImageAuthors; + return this; + } + + /** + * The time the image was created + */ + public Annotations withOrgOpencontainersImageCreated(String orgOpencontainersImageCreated) { + Utils.checkNotNull(orgOpencontainersImageCreated, "orgOpencontainersImageCreated"); + this.orgOpencontainersImageCreated = Optional.ofNullable(orgOpencontainersImageCreated); + return this; + } + + /** + * The time the image was created + */ + public Annotations withOrgOpencontainersImageCreated(Optional orgOpencontainersImageCreated) { + Utils.checkNotNull(orgOpencontainersImageCreated, "orgOpencontainersImageCreated"); + this.orgOpencontainersImageCreated = orgOpencontainersImageCreated; + return this; + } + + /** + * Human-readable description of the software packaged in the image + */ + public Annotations withOrgOpencontainersImageDescription(String orgOpencontainersImageDescription) { + Utils.checkNotNull(orgOpencontainersImageDescription, "orgOpencontainersImageDescription"); + this.orgOpencontainersImageDescription = Optional.ofNullable(orgOpencontainersImageDescription); + return this; + } + + /** + * Human-readable description of the software packaged in the image + */ + public Annotations withOrgOpencontainersImageDescription(Optional orgOpencontainersImageDescription) { + Utils.checkNotNull(orgOpencontainersImageDescription, "orgOpencontainersImageDescription"); + this.orgOpencontainersImageDescription = orgOpencontainersImageDescription; + return this; + } + + /** + * The documentation URL of the image + */ + public Annotations withOrgOpencontainersImageDocumentation(String orgOpencontainersImageDocumentation) { + Utils.checkNotNull(orgOpencontainersImageDocumentation, "orgOpencontainersImageDocumentation"); + this.orgOpencontainersImageDocumentation = Optional.ofNullable(orgOpencontainersImageDocumentation); + return this; + } + + /** + * The documentation URL of the image + */ + public Annotations withOrgOpencontainersImageDocumentation(Optional orgOpencontainersImageDocumentation) { + Utils.checkNotNull(orgOpencontainersImageDocumentation, "orgOpencontainersImageDocumentation"); + this.orgOpencontainersImageDocumentation = orgOpencontainersImageDocumentation; + return this; + } + + public Annotations withOrgOpencontainersImageLicenses(String orgOpencontainersImageLicenses) { + Utils.checkNotNull(orgOpencontainersImageLicenses, "orgOpencontainersImageLicenses"); + this.orgOpencontainersImageLicenses = Optional.ofNullable(orgOpencontainersImageLicenses); + return this; + } + + public Annotations withOrgOpencontainersImageLicenses(Optional orgOpencontainersImageLicenses) { + Utils.checkNotNull(orgOpencontainersImageLicenses, "orgOpencontainersImageLicenses"); + this.orgOpencontainersImageLicenses = orgOpencontainersImageLicenses; + return this; + } + + /** + * Name of the reference for a target + */ + public Annotations withOrgOpencontainersImageRefName(String orgOpencontainersImageRefName) { + Utils.checkNotNull(orgOpencontainersImageRefName, "orgOpencontainersImageRefName"); + this.orgOpencontainersImageRefName = Optional.ofNullable(orgOpencontainersImageRefName); + return this; + } + + /** + * Name of the reference for a target + */ + public Annotations withOrgOpencontainersImageRefName(Optional orgOpencontainersImageRefName) { + Utils.checkNotNull(orgOpencontainersImageRefName, "orgOpencontainersImageRefName"); + this.orgOpencontainersImageRefName = orgOpencontainersImageRefName; + return this; + } + + /** + * Source control revision identifier + */ + public Annotations withOrgOpencontainersImageRevision(String orgOpencontainersImageRevision) { + Utils.checkNotNull(orgOpencontainersImageRevision, "orgOpencontainersImageRevision"); + this.orgOpencontainersImageRevision = Optional.ofNullable(orgOpencontainersImageRevision); + return this; + } + + /** + * Source control revision identifier + */ + public Annotations withOrgOpencontainersImageRevision(Optional orgOpencontainersImageRevision) { + Utils.checkNotNull(orgOpencontainersImageRevision, "orgOpencontainersImageRevision"); + this.orgOpencontainersImageRevision = orgOpencontainersImageRevision; + return this; + } + + /** + * The URL to get source code for building the image + */ + public Annotations withOrgOpencontainersImageSource(String orgOpencontainersImageSource) { + Utils.checkNotNull(orgOpencontainersImageSource, "orgOpencontainersImageSource"); + this.orgOpencontainersImageSource = Optional.ofNullable(orgOpencontainersImageSource); + return this; + } + + /** + * The URL to get source code for building the image + */ + public Annotations withOrgOpencontainersImageSource(Optional orgOpencontainersImageSource) { + Utils.checkNotNull(orgOpencontainersImageSource, "orgOpencontainersImageSource"); + this.orgOpencontainersImageSource = orgOpencontainersImageSource; + return this; + } + + /** + * Human-readable title of the image + */ + public Annotations withOrgOpencontainersImageTitle(String orgOpencontainersImageTitle) { + Utils.checkNotNull(orgOpencontainersImageTitle, "orgOpencontainersImageTitle"); + this.orgOpencontainersImageTitle = Optional.ofNullable(orgOpencontainersImageTitle); + return this; + } + + /** + * Human-readable title of the image + */ + public Annotations withOrgOpencontainersImageTitle(Optional orgOpencontainersImageTitle) { + Utils.checkNotNull(orgOpencontainersImageTitle, "orgOpencontainersImageTitle"); + this.orgOpencontainersImageTitle = orgOpencontainersImageTitle; + return this; + } + + /** + * The URL of the image + */ + public Annotations withOrgOpencontainersImageUrl(String orgOpencontainersImageUrl) { + Utils.checkNotNull(orgOpencontainersImageUrl, "orgOpencontainersImageUrl"); + this.orgOpencontainersImageUrl = Optional.ofNullable(orgOpencontainersImageUrl); + return this; + } + + /** + * The URL of the image + */ + public Annotations withOrgOpencontainersImageUrl(Optional orgOpencontainersImageUrl) { + Utils.checkNotNull(orgOpencontainersImageUrl, "orgOpencontainersImageUrl"); + this.orgOpencontainersImageUrl = orgOpencontainersImageUrl; + return this; + } + + /** + * Name of the distributing entity, organization or individual. + */ + public Annotations withOrgOpencontainersImageVendor(String orgOpencontainersImageVendor) { + Utils.checkNotNull(orgOpencontainersImageVendor, "orgOpencontainersImageVendor"); + this.orgOpencontainersImageVendor = Optional.ofNullable(orgOpencontainersImageVendor); + return this; + } + + /** + * Name of the distributing entity, organization or individual. + */ + public Annotations withOrgOpencontainersImageVendor(Optional orgOpencontainersImageVendor) { + Utils.checkNotNull(orgOpencontainersImageVendor, "orgOpencontainersImageVendor"); + this.orgOpencontainersImageVendor = orgOpencontainersImageVendor; + return this; + } + + /** + * The version of the packaged software + */ + public Annotations withOrgOpencontainersImageVersion(String orgOpencontainersImageVersion) { + Utils.checkNotNull(orgOpencontainersImageVersion, "orgOpencontainersImageVersion"); + this.orgOpencontainersImageVersion = Optional.ofNullable(orgOpencontainersImageVersion); + return this; + } + + /** + * The version of the packaged software + */ + public Annotations withOrgOpencontainersImageVersion(Optional orgOpencontainersImageVersion) { + Utils.checkNotNull(orgOpencontainersImageVersion, "orgOpencontainersImageVersion"); + this.orgOpencontainersImageVersion = orgOpencontainersImageVersion; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Annotations other = (Annotations) o; + return + Objects.deepEquals(this.orgOpencontainersImageAuthors, other.orgOpencontainersImageAuthors) && + Objects.deepEquals(this.orgOpencontainersImageCreated, other.orgOpencontainersImageCreated) && + Objects.deepEquals(this.orgOpencontainersImageDescription, other.orgOpencontainersImageDescription) && + Objects.deepEquals(this.orgOpencontainersImageDocumentation, other.orgOpencontainersImageDocumentation) && + Objects.deepEquals(this.orgOpencontainersImageLicenses, other.orgOpencontainersImageLicenses) && + Objects.deepEquals(this.orgOpencontainersImageRefName, other.orgOpencontainersImageRefName) && + Objects.deepEquals(this.orgOpencontainersImageRevision, other.orgOpencontainersImageRevision) && + Objects.deepEquals(this.orgOpencontainersImageSource, other.orgOpencontainersImageSource) && + Objects.deepEquals(this.orgOpencontainersImageTitle, other.orgOpencontainersImageTitle) && + Objects.deepEquals(this.orgOpencontainersImageUrl, other.orgOpencontainersImageUrl) && + Objects.deepEquals(this.orgOpencontainersImageVendor, other.orgOpencontainersImageVendor) && + Objects.deepEquals(this.orgOpencontainersImageVersion, other.orgOpencontainersImageVersion); + } + + @Override + public int hashCode() { + return Objects.hash( + orgOpencontainersImageAuthors, + orgOpencontainersImageCreated, + orgOpencontainersImageDescription, + orgOpencontainersImageDocumentation, + orgOpencontainersImageLicenses, + orgOpencontainersImageRefName, + orgOpencontainersImageRevision, + orgOpencontainersImageSource, + orgOpencontainersImageTitle, + orgOpencontainersImageUrl, + orgOpencontainersImageVendor, + orgOpencontainersImageVersion); + } + + @Override + public String toString() { + return Utils.toString(Annotations.class, + "orgOpencontainersImageAuthors", orgOpencontainersImageAuthors, + "orgOpencontainersImageCreated", orgOpencontainersImageCreated, + "orgOpencontainersImageDescription", orgOpencontainersImageDescription, + "orgOpencontainersImageDocumentation", orgOpencontainersImageDocumentation, + "orgOpencontainersImageLicenses", orgOpencontainersImageLicenses, + "orgOpencontainersImageRefName", orgOpencontainersImageRefName, + "orgOpencontainersImageRevision", orgOpencontainersImageRevision, + "orgOpencontainersImageSource", orgOpencontainersImageSource, + "orgOpencontainersImageTitle", orgOpencontainersImageTitle, + "orgOpencontainersImageUrl", orgOpencontainersImageUrl, + "orgOpencontainersImageVendor", orgOpencontainersImageVendor, + "orgOpencontainersImageVersion", orgOpencontainersImageVersion); + } + + public final static class Builder { + + private Optional orgOpencontainersImageAuthors = Optional.empty(); + + private Optional orgOpencontainersImageCreated = Optional.empty(); + + private Optional orgOpencontainersImageDescription = Optional.empty(); + + private Optional orgOpencontainersImageDocumentation = Optional.empty(); + + private Optional orgOpencontainersImageLicenses = Optional.empty(); + + private Optional orgOpencontainersImageRefName = Optional.empty(); + + private Optional orgOpencontainersImageRevision = Optional.empty(); + + private Optional orgOpencontainersImageSource = Optional.empty(); + + private Optional orgOpencontainersImageTitle = Optional.empty(); + + private Optional orgOpencontainersImageUrl = Optional.empty(); + + private Optional orgOpencontainersImageVendor = Optional.empty(); + + private Optional orgOpencontainersImageVersion = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The authors of the image + */ + public Builder orgOpencontainersImageAuthors(String orgOpencontainersImageAuthors) { + Utils.checkNotNull(orgOpencontainersImageAuthors, "orgOpencontainersImageAuthors"); + this.orgOpencontainersImageAuthors = Optional.ofNullable(orgOpencontainersImageAuthors); + return this; + } + + /** + * The authors of the image + */ + public Builder orgOpencontainersImageAuthors(Optional orgOpencontainersImageAuthors) { + Utils.checkNotNull(orgOpencontainersImageAuthors, "orgOpencontainersImageAuthors"); + this.orgOpencontainersImageAuthors = orgOpencontainersImageAuthors; + return this; + } + + /** + * The time the image was created + */ + public Builder orgOpencontainersImageCreated(String orgOpencontainersImageCreated) { + Utils.checkNotNull(orgOpencontainersImageCreated, "orgOpencontainersImageCreated"); + this.orgOpencontainersImageCreated = Optional.ofNullable(orgOpencontainersImageCreated); + return this; + } + + /** + * The time the image was created + */ + public Builder orgOpencontainersImageCreated(Optional orgOpencontainersImageCreated) { + Utils.checkNotNull(orgOpencontainersImageCreated, "orgOpencontainersImageCreated"); + this.orgOpencontainersImageCreated = orgOpencontainersImageCreated; + return this; + } + + /** + * Human-readable description of the software packaged in the image + */ + public Builder orgOpencontainersImageDescription(String orgOpencontainersImageDescription) { + Utils.checkNotNull(orgOpencontainersImageDescription, "orgOpencontainersImageDescription"); + this.orgOpencontainersImageDescription = Optional.ofNullable(orgOpencontainersImageDescription); + return this; + } + + /** + * Human-readable description of the software packaged in the image + */ + public Builder orgOpencontainersImageDescription(Optional orgOpencontainersImageDescription) { + Utils.checkNotNull(orgOpencontainersImageDescription, "orgOpencontainersImageDescription"); + this.orgOpencontainersImageDescription = orgOpencontainersImageDescription; + return this; + } + + /** + * The documentation URL of the image + */ + public Builder orgOpencontainersImageDocumentation(String orgOpencontainersImageDocumentation) { + Utils.checkNotNull(orgOpencontainersImageDocumentation, "orgOpencontainersImageDocumentation"); + this.orgOpencontainersImageDocumentation = Optional.ofNullable(orgOpencontainersImageDocumentation); + return this; + } + + /** + * The documentation URL of the image + */ + public Builder orgOpencontainersImageDocumentation(Optional orgOpencontainersImageDocumentation) { + Utils.checkNotNull(orgOpencontainersImageDocumentation, "orgOpencontainersImageDocumentation"); + this.orgOpencontainersImageDocumentation = orgOpencontainersImageDocumentation; + return this; + } + + public Builder orgOpencontainersImageLicenses(String orgOpencontainersImageLicenses) { + Utils.checkNotNull(orgOpencontainersImageLicenses, "orgOpencontainersImageLicenses"); + this.orgOpencontainersImageLicenses = Optional.ofNullable(orgOpencontainersImageLicenses); + return this; + } + + public Builder orgOpencontainersImageLicenses(Optional orgOpencontainersImageLicenses) { + Utils.checkNotNull(orgOpencontainersImageLicenses, "orgOpencontainersImageLicenses"); + this.orgOpencontainersImageLicenses = orgOpencontainersImageLicenses; + return this; + } + + /** + * Name of the reference for a target + */ + public Builder orgOpencontainersImageRefName(String orgOpencontainersImageRefName) { + Utils.checkNotNull(orgOpencontainersImageRefName, "orgOpencontainersImageRefName"); + this.orgOpencontainersImageRefName = Optional.ofNullable(orgOpencontainersImageRefName); + return this; + } + + /** + * Name of the reference for a target + */ + public Builder orgOpencontainersImageRefName(Optional orgOpencontainersImageRefName) { + Utils.checkNotNull(orgOpencontainersImageRefName, "orgOpencontainersImageRefName"); + this.orgOpencontainersImageRefName = orgOpencontainersImageRefName; + return this; + } + + /** + * Source control revision identifier + */ + public Builder orgOpencontainersImageRevision(String orgOpencontainersImageRevision) { + Utils.checkNotNull(orgOpencontainersImageRevision, "orgOpencontainersImageRevision"); + this.orgOpencontainersImageRevision = Optional.ofNullable(orgOpencontainersImageRevision); + return this; + } + + /** + * Source control revision identifier + */ + public Builder orgOpencontainersImageRevision(Optional orgOpencontainersImageRevision) { + Utils.checkNotNull(orgOpencontainersImageRevision, "orgOpencontainersImageRevision"); + this.orgOpencontainersImageRevision = orgOpencontainersImageRevision; + return this; + } + + /** + * The URL to get source code for building the image + */ + public Builder orgOpencontainersImageSource(String orgOpencontainersImageSource) { + Utils.checkNotNull(orgOpencontainersImageSource, "orgOpencontainersImageSource"); + this.orgOpencontainersImageSource = Optional.ofNullable(orgOpencontainersImageSource); + return this; + } + + /** + * The URL to get source code for building the image + */ + public Builder orgOpencontainersImageSource(Optional orgOpencontainersImageSource) { + Utils.checkNotNull(orgOpencontainersImageSource, "orgOpencontainersImageSource"); + this.orgOpencontainersImageSource = orgOpencontainersImageSource; + return this; + } + + /** + * Human-readable title of the image + */ + public Builder orgOpencontainersImageTitle(String orgOpencontainersImageTitle) { + Utils.checkNotNull(orgOpencontainersImageTitle, "orgOpencontainersImageTitle"); + this.orgOpencontainersImageTitle = Optional.ofNullable(orgOpencontainersImageTitle); + return this; + } + + /** + * Human-readable title of the image + */ + public Builder orgOpencontainersImageTitle(Optional orgOpencontainersImageTitle) { + Utils.checkNotNull(orgOpencontainersImageTitle, "orgOpencontainersImageTitle"); + this.orgOpencontainersImageTitle = orgOpencontainersImageTitle; + return this; + } + + /** + * The URL of the image + */ + public Builder orgOpencontainersImageUrl(String orgOpencontainersImageUrl) { + Utils.checkNotNull(orgOpencontainersImageUrl, "orgOpencontainersImageUrl"); + this.orgOpencontainersImageUrl = Optional.ofNullable(orgOpencontainersImageUrl); + return this; + } + + /** + * The URL of the image + */ + public Builder orgOpencontainersImageUrl(Optional orgOpencontainersImageUrl) { + Utils.checkNotNull(orgOpencontainersImageUrl, "orgOpencontainersImageUrl"); + this.orgOpencontainersImageUrl = orgOpencontainersImageUrl; + return this; + } + + /** + * Name of the distributing entity, organization or individual. + */ + public Builder orgOpencontainersImageVendor(String orgOpencontainersImageVendor) { + Utils.checkNotNull(orgOpencontainersImageVendor, "orgOpencontainersImageVendor"); + this.orgOpencontainersImageVendor = Optional.ofNullable(orgOpencontainersImageVendor); + return this; + } + + /** + * Name of the distributing entity, organization or individual. + */ + public Builder orgOpencontainersImageVendor(Optional orgOpencontainersImageVendor) { + Utils.checkNotNull(orgOpencontainersImageVendor, "orgOpencontainersImageVendor"); + this.orgOpencontainersImageVendor = orgOpencontainersImageVendor; + return this; + } + + /** + * The version of the packaged software + */ + public Builder orgOpencontainersImageVersion(String orgOpencontainersImageVersion) { + Utils.checkNotNull(orgOpencontainersImageVersion, "orgOpencontainersImageVersion"); + this.orgOpencontainersImageVersion = Optional.ofNullable(orgOpencontainersImageVersion); + return this; + } + + /** + * The version of the packaged software + */ + public Builder orgOpencontainersImageVersion(Optional orgOpencontainersImageVersion) { + Utils.checkNotNull(orgOpencontainersImageVersion, "orgOpencontainersImageVersion"); + this.orgOpencontainersImageVersion = orgOpencontainersImageVersion; + return this; + } + + public Annotations build() { + return new Annotations( + orgOpencontainersImageAuthors, + orgOpencontainersImageCreated, + orgOpencontainersImageDescription, + orgOpencontainersImageDocumentation, + orgOpencontainersImageLicenses, + orgOpencontainersImageRefName, + orgOpencontainersImageRevision, + orgOpencontainersImageSource, + orgOpencontainersImageTitle, + orgOpencontainersImageUrl, + orgOpencontainersImageVendor, + orgOpencontainersImageVersion); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Api.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Api.java new file mode 100644 index 00000000..d8652265 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Api.java @@ -0,0 +1,448 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Api - An Api is representation of a API (a collection of API Endpoints) within the Speakeasy Platform. + */ + +public class Api { + + /** + * The ID of this Api. This is a human-readable name (subject to change). + */ + @JsonProperty("api_id") + private String apiId; + + /** + * Creation timestamp. + */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * A detailed description of the Api. + */ + @JsonProperty("description") + private String description; + + /** + * Determines if all the endpoints within the Api are found in the OpenAPI spec associated with the Api. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("matched") + private Optional matched; + + /** + * A set of values associated with a meta_data key. This field is only set on get requests. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("meta_data") + private Optional>> metaData; + + /** + * Last update timestamp. + */ + @JsonProperty("updated_at") + private OffsetDateTime updatedAt; + + /** + * The version ID of this Api. This is semantic version identifier. + */ + @JsonProperty("version_id") + private String versionId; + + /** + * The workspace ID this Api belongs to. + */ + @JsonProperty("workspace_id") + private String workspaceId; + + @JsonCreator + public Api( + @JsonProperty("api_id") String apiId, + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("description") String description, + @JsonProperty("matched") Optional matched, + @JsonProperty("meta_data") Optional>> metaData, + @JsonProperty("updated_at") OffsetDateTime updatedAt, + @JsonProperty("version_id") String versionId, + @JsonProperty("workspace_id") String workspaceId) { + Utils.checkNotNull(apiId, "apiId"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(matched, "matched"); + Utils.checkNotNull(metaData, "metaData"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(versionId, "versionId"); + Utils.checkNotNull(workspaceId, "workspaceId"); + this.apiId = apiId; + this.createdAt = createdAt; + this.description = description; + this.matched = matched; + this.metaData = metaData; + this.updatedAt = updatedAt; + this.versionId = versionId; + this.workspaceId = workspaceId; + } + + public Api( + String apiId, + OffsetDateTime createdAt, + String description, + OffsetDateTime updatedAt, + String versionId, + String workspaceId) { + this(apiId, createdAt, description, Optional.empty(), Optional.empty(), updatedAt, versionId, workspaceId); + } + + /** + * The ID of this Api. This is a human-readable name (subject to change). + */ + @JsonIgnore + public String apiId() { + return apiId; + } + + /** + * Creation timestamp. + */ + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + /** + * A detailed description of the Api. + */ + @JsonIgnore + public String description() { + return description; + } + + /** + * Determines if all the endpoints within the Api are found in the OpenAPI spec associated with the Api. + */ + @JsonIgnore + public Optional matched() { + return matched; + } + + /** + * A set of values associated with a meta_data key. This field is only set on get requests. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional>> metaData() { + return (Optional>>) metaData; + } + + /** + * Last update timestamp. + */ + @JsonIgnore + public OffsetDateTime updatedAt() { + return updatedAt; + } + + /** + * The version ID of this Api. This is semantic version identifier. + */ + @JsonIgnore + public String versionId() { + return versionId; + } + + /** + * The workspace ID this Api belongs to. + */ + @JsonIgnore + public String workspaceId() { + return workspaceId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of this Api. This is a human-readable name (subject to change). + */ + public Api withApiId(String apiId) { + Utils.checkNotNull(apiId, "apiId"); + this.apiId = apiId; + return this; + } + + /** + * Creation timestamp. + */ + public Api withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * A detailed description of the Api. + */ + public Api withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * Determines if all the endpoints within the Api are found in the OpenAPI spec associated with the Api. + */ + public Api withMatched(boolean matched) { + Utils.checkNotNull(matched, "matched"); + this.matched = Optional.ofNullable(matched); + return this; + } + + /** + * Determines if all the endpoints within the Api are found in the OpenAPI spec associated with the Api. + */ + public Api withMatched(Optional matched) { + Utils.checkNotNull(matched, "matched"); + this.matched = matched; + return this; + } + + /** + * A set of values associated with a meta_data key. This field is only set on get requests. + */ + public Api withMetaData(Map> metaData) { + Utils.checkNotNull(metaData, "metaData"); + this.metaData = Optional.ofNullable(metaData); + return this; + } + + /** + * A set of values associated with a meta_data key. This field is only set on get requests. + */ + public Api withMetaData(Optional>> metaData) { + Utils.checkNotNull(metaData, "metaData"); + this.metaData = metaData; + return this; + } + + /** + * Last update timestamp. + */ + public Api withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * The version ID of this Api. This is semantic version identifier. + */ + public Api withVersionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + /** + * The workspace ID this Api belongs to. + */ + public Api withWorkspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Api other = (Api) o; + return + Objects.deepEquals(this.apiId, other.apiId) && + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.description, other.description) && + Objects.deepEquals(this.matched, other.matched) && + Objects.deepEquals(this.metaData, other.metaData) && + Objects.deepEquals(this.updatedAt, other.updatedAt) && + Objects.deepEquals(this.versionId, other.versionId) && + Objects.deepEquals(this.workspaceId, other.workspaceId); + } + + @Override + public int hashCode() { + return Objects.hash( + apiId, + createdAt, + description, + matched, + metaData, + updatedAt, + versionId, + workspaceId); + } + + @Override + public String toString() { + return Utils.toString(Api.class, + "apiId", apiId, + "createdAt", createdAt, + "description", description, + "matched", matched, + "metaData", metaData, + "updatedAt", updatedAt, + "versionId", versionId, + "workspaceId", workspaceId); + } + + public final static class Builder { + + private String apiId; + + private OffsetDateTime createdAt; + + private String description; + + private Optional matched = Optional.empty(); + + private Optional>> metaData = Optional.empty(); + + private OffsetDateTime updatedAt; + + private String versionId; + + private String workspaceId; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of this Api. This is a human-readable name (subject to change). + */ + public Builder apiId(String apiId) { + Utils.checkNotNull(apiId, "apiId"); + this.apiId = apiId; + return this; + } + + /** + * Creation timestamp. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * A detailed description of the Api. + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * Determines if all the endpoints within the Api are found in the OpenAPI spec associated with the Api. + */ + public Builder matched(boolean matched) { + Utils.checkNotNull(matched, "matched"); + this.matched = Optional.ofNullable(matched); + return this; + } + + /** + * Determines if all the endpoints within the Api are found in the OpenAPI spec associated with the Api. + */ + public Builder matched(Optional matched) { + Utils.checkNotNull(matched, "matched"); + this.matched = matched; + return this; + } + + /** + * A set of values associated with a meta_data key. This field is only set on get requests. + */ + public Builder metaData(Map> metaData) { + Utils.checkNotNull(metaData, "metaData"); + this.metaData = Optional.ofNullable(metaData); + return this; + } + + /** + * A set of values associated with a meta_data key. This field is only set on get requests. + */ + public Builder metaData(Optional>> metaData) { + Utils.checkNotNull(metaData, "metaData"); + this.metaData = metaData; + return this; + } + + /** + * Last update timestamp. + */ + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * The version ID of this Api. This is semantic version identifier. + */ + public Builder versionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + /** + * The workspace ID this Api belongs to. + */ + public Builder workspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + public Api build() { + return new Api( + apiId, + createdAt, + description, + matched, + metaData, + updatedAt, + versionId, + workspaceId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiEndpoint.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiEndpoint.java new file mode 100644 index 00000000..a5a9e2fc --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiEndpoint.java @@ -0,0 +1,552 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.Optional; + +/** + * ApiEndpoint - An ApiEndpoint is a description of an Endpoint for an API. + */ + +public class ApiEndpoint { + + /** + * The ID of this ApiEndpoint. This is a hash of the method and path. + */ + @JsonProperty("api_endpoint_id") + private String apiEndpointId; + + /** + * The ID of the Api this ApiEndpoint belongs to. + */ + @JsonProperty("api_id") + private String apiId; + + /** + * Creation timestamp. + */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * A detailed description of the ApiEndpoint. + */ + @JsonProperty("description") + private String description; + + /** + * A human-readable name for the ApiEndpoint. + */ + @JsonProperty("display_name") + private String displayName; + + /** + * Determines if the endpoint was found in the OpenAPI spec associated with the parent Api. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("matched") + private Optional matched; + + /** + * HTTP verb. + */ + @JsonProperty("method") + private String method; + + /** + * Path that handles this Api. + */ + @JsonProperty("path") + private String path; + + /** + * Last update timestamp. + */ + @JsonProperty("updated_at") + private OffsetDateTime updatedAt; + + /** + * The version ID of the Api this ApiEndpoint belongs to. + */ + @JsonProperty("version_id") + private String versionId; + + /** + * The workspace ID this ApiEndpoint belongs to. + */ + @JsonProperty("workspace_id") + private String workspaceId; + + @JsonCreator + public ApiEndpoint( + @JsonProperty("api_endpoint_id") String apiEndpointId, + @JsonProperty("api_id") String apiId, + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("description") String description, + @JsonProperty("display_name") String displayName, + @JsonProperty("matched") Optional matched, + @JsonProperty("method") String method, + @JsonProperty("path") String path, + @JsonProperty("updated_at") OffsetDateTime updatedAt, + @JsonProperty("version_id") String versionId, + @JsonProperty("workspace_id") String workspaceId) { + Utils.checkNotNull(apiEndpointId, "apiEndpointId"); + Utils.checkNotNull(apiId, "apiId"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(displayName, "displayName"); + Utils.checkNotNull(matched, "matched"); + Utils.checkNotNull(method, "method"); + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(versionId, "versionId"); + Utils.checkNotNull(workspaceId, "workspaceId"); + this.apiEndpointId = apiEndpointId; + this.apiId = apiId; + this.createdAt = createdAt; + this.description = description; + this.displayName = displayName; + this.matched = matched; + this.method = method; + this.path = path; + this.updatedAt = updatedAt; + this.versionId = versionId; + this.workspaceId = workspaceId; + } + + public ApiEndpoint( + String apiEndpointId, + String apiId, + OffsetDateTime createdAt, + String description, + String displayName, + String method, + String path, + OffsetDateTime updatedAt, + String versionId, + String workspaceId) { + this(apiEndpointId, apiId, createdAt, description, displayName, Optional.empty(), method, path, updatedAt, versionId, workspaceId); + } + + /** + * The ID of this ApiEndpoint. This is a hash of the method and path. + */ + @JsonIgnore + public String apiEndpointId() { + return apiEndpointId; + } + + /** + * The ID of the Api this ApiEndpoint belongs to. + */ + @JsonIgnore + public String apiId() { + return apiId; + } + + /** + * Creation timestamp. + */ + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + /** + * A detailed description of the ApiEndpoint. + */ + @JsonIgnore + public String description() { + return description; + } + + /** + * A human-readable name for the ApiEndpoint. + */ + @JsonIgnore + public String displayName() { + return displayName; + } + + /** + * Determines if the endpoint was found in the OpenAPI spec associated with the parent Api. + */ + @JsonIgnore + public Optional matched() { + return matched; + } + + /** + * HTTP verb. + */ + @JsonIgnore + public String method() { + return method; + } + + /** + * Path that handles this Api. + */ + @JsonIgnore + public String path() { + return path; + } + + /** + * Last update timestamp. + */ + @JsonIgnore + public OffsetDateTime updatedAt() { + return updatedAt; + } + + /** + * The version ID of the Api this ApiEndpoint belongs to. + */ + @JsonIgnore + public String versionId() { + return versionId; + } + + /** + * The workspace ID this ApiEndpoint belongs to. + */ + @JsonIgnore + public String workspaceId() { + return workspaceId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of this ApiEndpoint. This is a hash of the method and path. + */ + public ApiEndpoint withApiEndpointId(String apiEndpointId) { + Utils.checkNotNull(apiEndpointId, "apiEndpointId"); + this.apiEndpointId = apiEndpointId; + return this; + } + + /** + * The ID of the Api this ApiEndpoint belongs to. + */ + public ApiEndpoint withApiId(String apiId) { + Utils.checkNotNull(apiId, "apiId"); + this.apiId = apiId; + return this; + } + + /** + * Creation timestamp. + */ + public ApiEndpoint withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * A detailed description of the ApiEndpoint. + */ + public ApiEndpoint withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * A human-readable name for the ApiEndpoint. + */ + public ApiEndpoint withDisplayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + /** + * Determines if the endpoint was found in the OpenAPI spec associated with the parent Api. + */ + public ApiEndpoint withMatched(boolean matched) { + Utils.checkNotNull(matched, "matched"); + this.matched = Optional.ofNullable(matched); + return this; + } + + /** + * Determines if the endpoint was found in the OpenAPI spec associated with the parent Api. + */ + public ApiEndpoint withMatched(Optional matched) { + Utils.checkNotNull(matched, "matched"); + this.matched = matched; + return this; + } + + /** + * HTTP verb. + */ + public ApiEndpoint withMethod(String method) { + Utils.checkNotNull(method, "method"); + this.method = method; + return this; + } + + /** + * Path that handles this Api. + */ + public ApiEndpoint withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * Last update timestamp. + */ + public ApiEndpoint withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * The version ID of the Api this ApiEndpoint belongs to. + */ + public ApiEndpoint withVersionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + /** + * The workspace ID this ApiEndpoint belongs to. + */ + public ApiEndpoint withWorkspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiEndpoint other = (ApiEndpoint) o; + return + Objects.deepEquals(this.apiEndpointId, other.apiEndpointId) && + Objects.deepEquals(this.apiId, other.apiId) && + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.description, other.description) && + Objects.deepEquals(this.displayName, other.displayName) && + Objects.deepEquals(this.matched, other.matched) && + Objects.deepEquals(this.method, other.method) && + Objects.deepEquals(this.path, other.path) && + Objects.deepEquals(this.updatedAt, other.updatedAt) && + Objects.deepEquals(this.versionId, other.versionId) && + Objects.deepEquals(this.workspaceId, other.workspaceId); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpointId, + apiId, + createdAt, + description, + displayName, + matched, + method, + path, + updatedAt, + versionId, + workspaceId); + } + + @Override + public String toString() { + return Utils.toString(ApiEndpoint.class, + "apiEndpointId", apiEndpointId, + "apiId", apiId, + "createdAt", createdAt, + "description", description, + "displayName", displayName, + "matched", matched, + "method", method, + "path", path, + "updatedAt", updatedAt, + "versionId", versionId, + "workspaceId", workspaceId); + } + + public final static class Builder { + + private String apiEndpointId; + + private String apiId; + + private OffsetDateTime createdAt; + + private String description; + + private String displayName; + + private Optional matched = Optional.empty(); + + private String method; + + private String path; + + private OffsetDateTime updatedAt; + + private String versionId; + + private String workspaceId; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of this ApiEndpoint. This is a hash of the method and path. + */ + public Builder apiEndpointId(String apiEndpointId) { + Utils.checkNotNull(apiEndpointId, "apiEndpointId"); + this.apiEndpointId = apiEndpointId; + return this; + } + + /** + * The ID of the Api this ApiEndpoint belongs to. + */ + public Builder apiId(String apiId) { + Utils.checkNotNull(apiId, "apiId"); + this.apiId = apiId; + return this; + } + + /** + * Creation timestamp. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * A detailed description of the ApiEndpoint. + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * A human-readable name for the ApiEndpoint. + */ + public Builder displayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + /** + * Determines if the endpoint was found in the OpenAPI spec associated with the parent Api. + */ + public Builder matched(boolean matched) { + Utils.checkNotNull(matched, "matched"); + this.matched = Optional.ofNullable(matched); + return this; + } + + /** + * Determines if the endpoint was found in the OpenAPI spec associated with the parent Api. + */ + public Builder matched(Optional matched) { + Utils.checkNotNull(matched, "matched"); + this.matched = matched; + return this; + } + + /** + * HTTP verb. + */ + public Builder method(String method) { + Utils.checkNotNull(method, "method"); + this.method = method; + return this; + } + + /** + * Path that handles this Api. + */ + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * Last update timestamp. + */ + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * The version ID of the Api this ApiEndpoint belongs to. + */ + public Builder versionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + /** + * The workspace ID this ApiEndpoint belongs to. + */ + public Builder workspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + public ApiEndpoint build() { + return new ApiEndpoint( + apiEndpointId, + apiId, + createdAt, + description, + displayName, + matched, + method, + path, + updatedAt, + versionId, + workspaceId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiEndpointInput.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiEndpointInput.java new file mode 100644 index 00000000..83e7d104 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiEndpointInput.java @@ -0,0 +1,309 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * ApiEndpointInput - An ApiEndpoint is a description of an Endpoint for an API. + */ + +public class ApiEndpointInput { + + /** + * The ID of this ApiEndpoint. This is a hash of the method and path. + */ + @JsonProperty("api_endpoint_id") + private String apiEndpointId; + + /** + * A detailed description of the ApiEndpoint. + */ + @JsonProperty("description") + private String description; + + /** + * A human-readable name for the ApiEndpoint. + */ + @JsonProperty("display_name") + private String displayName; + + /** + * HTTP verb. + */ + @JsonProperty("method") + private String method; + + /** + * Path that handles this Api. + */ + @JsonProperty("path") + private String path; + + /** + * The version ID of the Api this ApiEndpoint belongs to. + */ + @JsonProperty("version_id") + private String versionId; + + @JsonCreator + public ApiEndpointInput( + @JsonProperty("api_endpoint_id") String apiEndpointId, + @JsonProperty("description") String description, + @JsonProperty("display_name") String displayName, + @JsonProperty("method") String method, + @JsonProperty("path") String path, + @JsonProperty("version_id") String versionId) { + Utils.checkNotNull(apiEndpointId, "apiEndpointId"); + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(displayName, "displayName"); + Utils.checkNotNull(method, "method"); + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(versionId, "versionId"); + this.apiEndpointId = apiEndpointId; + this.description = description; + this.displayName = displayName; + this.method = method; + this.path = path; + this.versionId = versionId; + } + + /** + * The ID of this ApiEndpoint. This is a hash of the method and path. + */ + @JsonIgnore + public String apiEndpointId() { + return apiEndpointId; + } + + /** + * A detailed description of the ApiEndpoint. + */ + @JsonIgnore + public String description() { + return description; + } + + /** + * A human-readable name for the ApiEndpoint. + */ + @JsonIgnore + public String displayName() { + return displayName; + } + + /** + * HTTP verb. + */ + @JsonIgnore + public String method() { + return method; + } + + /** + * Path that handles this Api. + */ + @JsonIgnore + public String path() { + return path; + } + + /** + * The version ID of the Api this ApiEndpoint belongs to. + */ + @JsonIgnore + public String versionId() { + return versionId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of this ApiEndpoint. This is a hash of the method and path. + */ + public ApiEndpointInput withApiEndpointId(String apiEndpointId) { + Utils.checkNotNull(apiEndpointId, "apiEndpointId"); + this.apiEndpointId = apiEndpointId; + return this; + } + + /** + * A detailed description of the ApiEndpoint. + */ + public ApiEndpointInput withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * A human-readable name for the ApiEndpoint. + */ + public ApiEndpointInput withDisplayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + /** + * HTTP verb. + */ + public ApiEndpointInput withMethod(String method) { + Utils.checkNotNull(method, "method"); + this.method = method; + return this; + } + + /** + * Path that handles this Api. + */ + public ApiEndpointInput withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * The version ID of the Api this ApiEndpoint belongs to. + */ + public ApiEndpointInput withVersionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiEndpointInput other = (ApiEndpointInput) o; + return + Objects.deepEquals(this.apiEndpointId, other.apiEndpointId) && + Objects.deepEquals(this.description, other.description) && + Objects.deepEquals(this.displayName, other.displayName) && + Objects.deepEquals(this.method, other.method) && + Objects.deepEquals(this.path, other.path) && + Objects.deepEquals(this.versionId, other.versionId); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpointId, + description, + displayName, + method, + path, + versionId); + } + + @Override + public String toString() { + return Utils.toString(ApiEndpointInput.class, + "apiEndpointId", apiEndpointId, + "description", description, + "displayName", displayName, + "method", method, + "path", path, + "versionId", versionId); + } + + public final static class Builder { + + private String apiEndpointId; + + private String description; + + private String displayName; + + private String method; + + private String path; + + private String versionId; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of this ApiEndpoint. This is a hash of the method and path. + */ + public Builder apiEndpointId(String apiEndpointId) { + Utils.checkNotNull(apiEndpointId, "apiEndpointId"); + this.apiEndpointId = apiEndpointId; + return this; + } + + /** + * A detailed description of the ApiEndpoint. + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * A human-readable name for the ApiEndpoint. + */ + public Builder displayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + /** + * HTTP verb. + */ + public Builder method(String method) { + Utils.checkNotNull(method, "method"); + this.method = method; + return this; + } + + /** + * Path that handles this Api. + */ + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * The version ID of the Api this ApiEndpoint belongs to. + */ + public Builder versionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + public ApiEndpointInput build() { + return new ApiEndpointInput( + apiEndpointId, + description, + displayName, + method, + path, + versionId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiInput.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiInput.java new file mode 100644 index 00000000..f1292265 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiInput.java @@ -0,0 +1,260 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * ApiInput - An Api is representation of a API (a collection of API Endpoints) within the Speakeasy Platform. + */ + +public class ApiInput { + + /** + * The ID of this Api. This is a human-readable name (subject to change). + */ + @JsonProperty("api_id") + private String apiId; + + /** + * A detailed description of the Api. + */ + @JsonProperty("description") + private String description; + + /** + * A set of values associated with a meta_data key. This field is only set on get requests. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("meta_data") + private Optional>> metaData; + + /** + * The version ID of this Api. This is semantic version identifier. + */ + @JsonProperty("version_id") + private String versionId; + + @JsonCreator + public ApiInput( + @JsonProperty("api_id") String apiId, + @JsonProperty("description") String description, + @JsonProperty("meta_data") Optional>> metaData, + @JsonProperty("version_id") String versionId) { + Utils.checkNotNull(apiId, "apiId"); + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(metaData, "metaData"); + Utils.checkNotNull(versionId, "versionId"); + this.apiId = apiId; + this.description = description; + this.metaData = metaData; + this.versionId = versionId; + } + + public ApiInput( + String apiId, + String description, + String versionId) { + this(apiId, description, Optional.empty(), versionId); + } + + /** + * The ID of this Api. This is a human-readable name (subject to change). + */ + @JsonIgnore + public String apiId() { + return apiId; + } + + /** + * A detailed description of the Api. + */ + @JsonIgnore + public String description() { + return description; + } + + /** + * A set of values associated with a meta_data key. This field is only set on get requests. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional>> metaData() { + return (Optional>>) metaData; + } + + /** + * The version ID of this Api. This is semantic version identifier. + */ + @JsonIgnore + public String versionId() { + return versionId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of this Api. This is a human-readable name (subject to change). + */ + public ApiInput withApiId(String apiId) { + Utils.checkNotNull(apiId, "apiId"); + this.apiId = apiId; + return this; + } + + /** + * A detailed description of the Api. + */ + public ApiInput withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * A set of values associated with a meta_data key. This field is only set on get requests. + */ + public ApiInput withMetaData(Map> metaData) { + Utils.checkNotNull(metaData, "metaData"); + this.metaData = Optional.ofNullable(metaData); + return this; + } + + /** + * A set of values associated with a meta_data key. This field is only set on get requests. + */ + public ApiInput withMetaData(Optional>> metaData) { + Utils.checkNotNull(metaData, "metaData"); + this.metaData = metaData; + return this; + } + + /** + * The version ID of this Api. This is semantic version identifier. + */ + public ApiInput withVersionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiInput other = (ApiInput) o; + return + Objects.deepEquals(this.apiId, other.apiId) && + Objects.deepEquals(this.description, other.description) && + Objects.deepEquals(this.metaData, other.metaData) && + Objects.deepEquals(this.versionId, other.versionId); + } + + @Override + public int hashCode() { + return Objects.hash( + apiId, + description, + metaData, + versionId); + } + + @Override + public String toString() { + return Utils.toString(ApiInput.class, + "apiId", apiId, + "description", description, + "metaData", metaData, + "versionId", versionId); + } + + public final static class Builder { + + private String apiId; + + private String description; + + private Optional>> metaData = Optional.empty(); + + private String versionId; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of this Api. This is a human-readable name (subject to change). + */ + public Builder apiId(String apiId) { + Utils.checkNotNull(apiId, "apiId"); + this.apiId = apiId; + return this; + } + + /** + * A detailed description of the Api. + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * A set of values associated with a meta_data key. This field is only set on get requests. + */ + public Builder metaData(Map> metaData) { + Utils.checkNotNull(metaData, "metaData"); + this.metaData = Optional.ofNullable(metaData); + return this; + } + + /** + * A set of values associated with a meta_data key. This field is only set on get requests. + */ + public Builder metaData(Optional>> metaData) { + Utils.checkNotNull(metaData, "metaData"); + this.metaData = metaData; + return this; + } + + /** + * The version ID of this Api. This is semantic version identifier. + */ + public Builder versionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + public ApiInput build() { + return new ApiInput( + apiId, + description, + metaData, + versionId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiKeyDetails.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiKeyDetails.java new file mode 100644 index 00000000..a7bd888a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ApiKeyDetails.java @@ -0,0 +1,361 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Deprecated; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class ApiKeyDetails { + + @JsonProperty("account_type_v2") + private AccountType accountTypeV2; + + @JsonProperty("enabled_features") + private List enabledFeatures; + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("feature_flags") + @Deprecated + private Optional> featureFlags; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generation_access_unlimited") + private Optional generationAccessUnlimited; + + @JsonProperty("org_slug") + private String orgSlug; + + @JsonProperty("telemetry_disabled") + private boolean telemetryDisabled; + + @JsonProperty("workspace_id") + private String workspaceId; + + @JsonProperty("workspace_slug") + private String workspaceSlug; + + @JsonCreator + public ApiKeyDetails( + @JsonProperty("account_type_v2") AccountType accountTypeV2, + @JsonProperty("enabled_features") List enabledFeatures, + @JsonProperty("feature_flags") Optional> featureFlags, + @JsonProperty("generation_access_unlimited") Optional generationAccessUnlimited, + @JsonProperty("org_slug") String orgSlug, + @JsonProperty("telemetry_disabled") boolean telemetryDisabled, + @JsonProperty("workspace_id") String workspaceId, + @JsonProperty("workspace_slug") String workspaceSlug) { + Utils.checkNotNull(accountTypeV2, "accountTypeV2"); + Utils.checkNotNull(enabledFeatures, "enabledFeatures"); + Utils.checkNotNull(featureFlags, "featureFlags"); + Utils.checkNotNull(generationAccessUnlimited, "generationAccessUnlimited"); + Utils.checkNotNull(orgSlug, "orgSlug"); + Utils.checkNotNull(telemetryDisabled, "telemetryDisabled"); + Utils.checkNotNull(workspaceId, "workspaceId"); + Utils.checkNotNull(workspaceSlug, "workspaceSlug"); + this.accountTypeV2 = accountTypeV2; + this.enabledFeatures = enabledFeatures; + this.featureFlags = featureFlags; + this.generationAccessUnlimited = generationAccessUnlimited; + this.orgSlug = orgSlug; + this.telemetryDisabled = telemetryDisabled; + this.workspaceId = workspaceId; + this.workspaceSlug = workspaceSlug; + } + + public ApiKeyDetails( + AccountType accountTypeV2, + List enabledFeatures, + String orgSlug, + boolean telemetryDisabled, + String workspaceId, + String workspaceSlug) { + this(accountTypeV2, enabledFeatures, Optional.empty(), Optional.empty(), orgSlug, telemetryDisabled, workspaceId, workspaceSlug); + } + + @JsonIgnore + public AccountType accountTypeV2() { + return accountTypeV2; + } + + @JsonIgnore + public List enabledFeatures() { + return enabledFeatures; + } + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> featureFlags() { + return (Optional>) featureFlags; + } + + @JsonIgnore + public Optional generationAccessUnlimited() { + return generationAccessUnlimited; + } + + @JsonIgnore + public String orgSlug() { + return orgSlug; + } + + @JsonIgnore + public boolean telemetryDisabled() { + return telemetryDisabled; + } + + @JsonIgnore + public String workspaceId() { + return workspaceId; + } + + @JsonIgnore + public String workspaceSlug() { + return workspaceSlug; + } + + public final static Builder builder() { + return new Builder(); + } + + public ApiKeyDetails withAccountTypeV2(AccountType accountTypeV2) { + Utils.checkNotNull(accountTypeV2, "accountTypeV2"); + this.accountTypeV2 = accountTypeV2; + return this; + } + + public ApiKeyDetails withEnabledFeatures(List enabledFeatures) { + Utils.checkNotNull(enabledFeatures, "enabledFeatures"); + this.enabledFeatures = enabledFeatures; + return this; + } + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public ApiKeyDetails withFeatureFlags(List featureFlags) { + Utils.checkNotNull(featureFlags, "featureFlags"); + this.featureFlags = Optional.ofNullable(featureFlags); + return this; + } + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public ApiKeyDetails withFeatureFlags(Optional> featureFlags) { + Utils.checkNotNull(featureFlags, "featureFlags"); + this.featureFlags = featureFlags; + return this; + } + + public ApiKeyDetails withGenerationAccessUnlimited(boolean generationAccessUnlimited) { + Utils.checkNotNull(generationAccessUnlimited, "generationAccessUnlimited"); + this.generationAccessUnlimited = Optional.ofNullable(generationAccessUnlimited); + return this; + } + + public ApiKeyDetails withGenerationAccessUnlimited(Optional generationAccessUnlimited) { + Utils.checkNotNull(generationAccessUnlimited, "generationAccessUnlimited"); + this.generationAccessUnlimited = generationAccessUnlimited; + return this; + } + + public ApiKeyDetails withOrgSlug(String orgSlug) { + Utils.checkNotNull(orgSlug, "orgSlug"); + this.orgSlug = orgSlug; + return this; + } + + public ApiKeyDetails withTelemetryDisabled(boolean telemetryDisabled) { + Utils.checkNotNull(telemetryDisabled, "telemetryDisabled"); + this.telemetryDisabled = telemetryDisabled; + return this; + } + + public ApiKeyDetails withWorkspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + public ApiKeyDetails withWorkspaceSlug(String workspaceSlug) { + Utils.checkNotNull(workspaceSlug, "workspaceSlug"); + this.workspaceSlug = workspaceSlug; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiKeyDetails other = (ApiKeyDetails) o; + return + Objects.deepEquals(this.accountTypeV2, other.accountTypeV2) && + Objects.deepEquals(this.enabledFeatures, other.enabledFeatures) && + Objects.deepEquals(this.featureFlags, other.featureFlags) && + Objects.deepEquals(this.generationAccessUnlimited, other.generationAccessUnlimited) && + Objects.deepEquals(this.orgSlug, other.orgSlug) && + Objects.deepEquals(this.telemetryDisabled, other.telemetryDisabled) && + Objects.deepEquals(this.workspaceId, other.workspaceId) && + Objects.deepEquals(this.workspaceSlug, other.workspaceSlug); + } + + @Override + public int hashCode() { + return Objects.hash( + accountTypeV2, + enabledFeatures, + featureFlags, + generationAccessUnlimited, + orgSlug, + telemetryDisabled, + workspaceId, + workspaceSlug); + } + + @Override + public String toString() { + return Utils.toString(ApiKeyDetails.class, + "accountTypeV2", accountTypeV2, + "enabledFeatures", enabledFeatures, + "featureFlags", featureFlags, + "generationAccessUnlimited", generationAccessUnlimited, + "orgSlug", orgSlug, + "telemetryDisabled", telemetryDisabled, + "workspaceId", workspaceId, + "workspaceSlug", workspaceSlug); + } + + public final static class Builder { + + private AccountType accountTypeV2; + + private List enabledFeatures; + + @Deprecated + private Optional> featureFlags = Optional.empty(); + + private Optional generationAccessUnlimited = Optional.empty(); + + private String orgSlug; + + private Boolean telemetryDisabled; + + private String workspaceId; + + private String workspaceSlug; + + private Builder() { + // force use of static builder() method + } + + public Builder accountTypeV2(AccountType accountTypeV2) { + Utils.checkNotNull(accountTypeV2, "accountTypeV2"); + this.accountTypeV2 = accountTypeV2; + return this; + } + + public Builder enabledFeatures(List enabledFeatures) { + Utils.checkNotNull(enabledFeatures, "enabledFeatures"); + this.enabledFeatures = enabledFeatures; + return this; + } + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Builder featureFlags(List featureFlags) { + Utils.checkNotNull(featureFlags, "featureFlags"); + this.featureFlags = Optional.ofNullable(featureFlags); + return this; + } + + /** + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + @Deprecated + public Builder featureFlags(Optional> featureFlags) { + Utils.checkNotNull(featureFlags, "featureFlags"); + this.featureFlags = featureFlags; + return this; + } + + public Builder generationAccessUnlimited(boolean generationAccessUnlimited) { + Utils.checkNotNull(generationAccessUnlimited, "generationAccessUnlimited"); + this.generationAccessUnlimited = Optional.ofNullable(generationAccessUnlimited); + return this; + } + + public Builder generationAccessUnlimited(Optional generationAccessUnlimited) { + Utils.checkNotNull(generationAccessUnlimited, "generationAccessUnlimited"); + this.generationAccessUnlimited = generationAccessUnlimited; + return this; + } + + public Builder orgSlug(String orgSlug) { + Utils.checkNotNull(orgSlug, "orgSlug"); + this.orgSlug = orgSlug; + return this; + } + + public Builder telemetryDisabled(boolean telemetryDisabled) { + Utils.checkNotNull(telemetryDisabled, "telemetryDisabled"); + this.telemetryDisabled = telemetryDisabled; + return this; + } + + public Builder workspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + public Builder workspaceSlug(String workspaceSlug) { + Utils.checkNotNull(workspaceSlug, "workspaceSlug"); + this.workspaceSlug = workspaceSlug; + return this; + } + + public ApiKeyDetails build() { + return new ApiKeyDetails( + accountTypeV2, + enabledFeatures, + featureFlags, + generationAccessUnlimited, + orgSlug, + telemetryDisabled, + workspaceId, + workspaceSlug); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Auth.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Auth.java new file mode 100644 index 00000000..c78d5010 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Auth.java @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class Auth { + + @JsonProperty("header") + private String header; + + @JsonProperty("secret") + private String secret; + + @JsonCreator + public Auth( + @JsonProperty("header") String header, + @JsonProperty("secret") String secret) { + Utils.checkNotNull(header, "header"); + Utils.checkNotNull(secret, "secret"); + this.header = header; + this.secret = secret; + } + + @JsonIgnore + public String header() { + return header; + } + + @JsonIgnore + public String secret() { + return secret; + } + + public final static Builder builder() { + return new Builder(); + } + + public Auth withHeader(String header) { + Utils.checkNotNull(header, "header"); + this.header = header; + return this; + } + + public Auth withSecret(String secret) { + Utils.checkNotNull(secret, "secret"); + this.secret = secret; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Auth other = (Auth) o; + return + Objects.deepEquals(this.header, other.header) && + Objects.deepEquals(this.secret, other.secret); + } + + @Override + public int hashCode() { + return Objects.hash( + header, + secret); + } + + @Override + public String toString() { + return Utils.toString(Auth.class, + "header", header, + "secret", secret); + } + + public final static class Builder { + + private String header; + + private String secret; + + private Builder() { + // force use of static builder() method + } + + public Builder header(String header) { + Utils.checkNotNull(header, "header"); + this.header = header; + return this; + } + + public Builder secret(String secret) { + Utils.checkNotNull(secret, "secret"); + this.secret = secret; + return this; + } + + public Auth build() { + return new Auth( + header, + secret); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/BoundedRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/BoundedRequest.java new file mode 100644 index 00000000..cd3fd587 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/BoundedRequest.java @@ -0,0 +1,681 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * BoundedRequest - A BoundedRequest is a request that has been logged by the Speakeasy without the contents of the request. + */ + +public class BoundedRequest { + + /** + * The ID of the ApiEndpoint this request was made to. + */ + @JsonProperty("api_endpoint_id") + private String apiEndpointId; + + /** + * The ID of the Api this request was made to. + */ + @JsonProperty("api_id") + private String apiId; + + /** + * Creation timestamp. + */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * The ID of the customer that made this request. + */ + @JsonProperty("customer_id") + private String customerId; + + /** + * The latency of the request. + */ + @JsonProperty("latency") + private long latency; + + /** + * Metadata associated with this request + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("metadata") + private Optional> metadata; + + /** + * HTTP verb. + */ + @JsonProperty("method") + private String method; + + /** + * The path of the request. + */ + @JsonProperty("path") + private String path; + + /** + * The time the request finished. + */ + @JsonProperty("request_finish_time") + private OffsetDateTime requestFinishTime; + + /** + * The ID of this request. + */ + @JsonProperty("request_id") + private String requestId; + + /** + * The time the request was made. + */ + @JsonProperty("request_start_time") + private OffsetDateTime requestStartTime; + + /** + * The status code of the request. + */ + @JsonProperty("status") + private long status; + + /** + * The version ID of the Api this request was made to. + */ + @JsonProperty("version_id") + private String versionId; + + /** + * The workspace ID this request was made to. + */ + @JsonProperty("workspace_id") + private String workspaceId; + + @JsonCreator + public BoundedRequest( + @JsonProperty("api_endpoint_id") String apiEndpointId, + @JsonProperty("api_id") String apiId, + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("customer_id") String customerId, + @JsonProperty("latency") long latency, + @JsonProperty("metadata") Optional> metadata, + @JsonProperty("method") String method, + @JsonProperty("path") String path, + @JsonProperty("request_finish_time") OffsetDateTime requestFinishTime, + @JsonProperty("request_id") String requestId, + @JsonProperty("request_start_time") OffsetDateTime requestStartTime, + @JsonProperty("status") long status, + @JsonProperty("version_id") String versionId, + @JsonProperty("workspace_id") String workspaceId) { + Utils.checkNotNull(apiEndpointId, "apiEndpointId"); + Utils.checkNotNull(apiId, "apiId"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(customerId, "customerId"); + Utils.checkNotNull(latency, "latency"); + Utils.checkNotNull(metadata, "metadata"); + Utils.checkNotNull(method, "method"); + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(requestFinishTime, "requestFinishTime"); + Utils.checkNotNull(requestId, "requestId"); + Utils.checkNotNull(requestStartTime, "requestStartTime"); + Utils.checkNotNull(status, "status"); + Utils.checkNotNull(versionId, "versionId"); + Utils.checkNotNull(workspaceId, "workspaceId"); + this.apiEndpointId = apiEndpointId; + this.apiId = apiId; + this.createdAt = createdAt; + this.customerId = customerId; + this.latency = latency; + this.metadata = metadata; + this.method = method; + this.path = path; + this.requestFinishTime = requestFinishTime; + this.requestId = requestId; + this.requestStartTime = requestStartTime; + this.status = status; + this.versionId = versionId; + this.workspaceId = workspaceId; + } + + public BoundedRequest( + String apiEndpointId, + String apiId, + OffsetDateTime createdAt, + String customerId, + long latency, + String method, + String path, + OffsetDateTime requestFinishTime, + String requestId, + OffsetDateTime requestStartTime, + long status, + String versionId, + String workspaceId) { + this(apiEndpointId, apiId, createdAt, customerId, latency, Optional.empty(), method, path, requestFinishTime, requestId, requestStartTime, status, versionId, workspaceId); + } + + /** + * The ID of the ApiEndpoint this request was made to. + */ + @JsonIgnore + public String apiEndpointId() { + return apiEndpointId; + } + + /** + * The ID of the Api this request was made to. + */ + @JsonIgnore + public String apiId() { + return apiId; + } + + /** + * Creation timestamp. + */ + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + /** + * The ID of the customer that made this request. + */ + @JsonIgnore + public String customerId() { + return customerId; + } + + /** + * The latency of the request. + */ + @JsonIgnore + public long latency() { + return latency; + } + + /** + * Metadata associated with this request + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadata() { + return (Optional>) metadata; + } + + /** + * HTTP verb. + */ + @JsonIgnore + public String method() { + return method; + } + + /** + * The path of the request. + */ + @JsonIgnore + public String path() { + return path; + } + + /** + * The time the request finished. + */ + @JsonIgnore + public OffsetDateTime requestFinishTime() { + return requestFinishTime; + } + + /** + * The ID of this request. + */ + @JsonIgnore + public String requestId() { + return requestId; + } + + /** + * The time the request was made. + */ + @JsonIgnore + public OffsetDateTime requestStartTime() { + return requestStartTime; + } + + /** + * The status code of the request. + */ + @JsonIgnore + public long status() { + return status; + } + + /** + * The version ID of the Api this request was made to. + */ + @JsonIgnore + public String versionId() { + return versionId; + } + + /** + * The workspace ID this request was made to. + */ + @JsonIgnore + public String workspaceId() { + return workspaceId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the ApiEndpoint this request was made to. + */ + public BoundedRequest withApiEndpointId(String apiEndpointId) { + Utils.checkNotNull(apiEndpointId, "apiEndpointId"); + this.apiEndpointId = apiEndpointId; + return this; + } + + /** + * The ID of the Api this request was made to. + */ + public BoundedRequest withApiId(String apiId) { + Utils.checkNotNull(apiId, "apiId"); + this.apiId = apiId; + return this; + } + + /** + * Creation timestamp. + */ + public BoundedRequest withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * The ID of the customer that made this request. + */ + public BoundedRequest withCustomerId(String customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = customerId; + return this; + } + + /** + * The latency of the request. + */ + public BoundedRequest withLatency(long latency) { + Utils.checkNotNull(latency, "latency"); + this.latency = latency; + return this; + } + + /** + * Metadata associated with this request + */ + public BoundedRequest withMetadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + /** + * Metadata associated with this request + */ + public BoundedRequest withMetadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + /** + * HTTP verb. + */ + public BoundedRequest withMethod(String method) { + Utils.checkNotNull(method, "method"); + this.method = method; + return this; + } + + /** + * The path of the request. + */ + public BoundedRequest withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * The time the request finished. + */ + public BoundedRequest withRequestFinishTime(OffsetDateTime requestFinishTime) { + Utils.checkNotNull(requestFinishTime, "requestFinishTime"); + this.requestFinishTime = requestFinishTime; + return this; + } + + /** + * The ID of this request. + */ + public BoundedRequest withRequestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + /** + * The time the request was made. + */ + public BoundedRequest withRequestStartTime(OffsetDateTime requestStartTime) { + Utils.checkNotNull(requestStartTime, "requestStartTime"); + this.requestStartTime = requestStartTime; + return this; + } + + /** + * The status code of the request. + */ + public BoundedRequest withStatus(long status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * The version ID of the Api this request was made to. + */ + public BoundedRequest withVersionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + /** + * The workspace ID this request was made to. + */ + public BoundedRequest withWorkspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BoundedRequest other = (BoundedRequest) o; + return + Objects.deepEquals(this.apiEndpointId, other.apiEndpointId) && + Objects.deepEquals(this.apiId, other.apiId) && + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.customerId, other.customerId) && + Objects.deepEquals(this.latency, other.latency) && + Objects.deepEquals(this.metadata, other.metadata) && + Objects.deepEquals(this.method, other.method) && + Objects.deepEquals(this.path, other.path) && + Objects.deepEquals(this.requestFinishTime, other.requestFinishTime) && + Objects.deepEquals(this.requestId, other.requestId) && + Objects.deepEquals(this.requestStartTime, other.requestStartTime) && + Objects.deepEquals(this.status, other.status) && + Objects.deepEquals(this.versionId, other.versionId) && + Objects.deepEquals(this.workspaceId, other.workspaceId); + } + + @Override + public int hashCode() { + return Objects.hash( + apiEndpointId, + apiId, + createdAt, + customerId, + latency, + metadata, + method, + path, + requestFinishTime, + requestId, + requestStartTime, + status, + versionId, + workspaceId); + } + + @Override + public String toString() { + return Utils.toString(BoundedRequest.class, + "apiEndpointId", apiEndpointId, + "apiId", apiId, + "createdAt", createdAt, + "customerId", customerId, + "latency", latency, + "metadata", metadata, + "method", method, + "path", path, + "requestFinishTime", requestFinishTime, + "requestId", requestId, + "requestStartTime", requestStartTime, + "status", status, + "versionId", versionId, + "workspaceId", workspaceId); + } + + public final static class Builder { + + private String apiEndpointId; + + private String apiId; + + private OffsetDateTime createdAt; + + private String customerId; + + private Long latency; + + private Optional> metadata = Optional.empty(); + + private String method; + + private String path; + + private OffsetDateTime requestFinishTime; + + private String requestId; + + private OffsetDateTime requestStartTime; + + private Long status; + + private String versionId; + + private String workspaceId; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the ApiEndpoint this request was made to. + */ + public Builder apiEndpointId(String apiEndpointId) { + Utils.checkNotNull(apiEndpointId, "apiEndpointId"); + this.apiEndpointId = apiEndpointId; + return this; + } + + /** + * The ID of the Api this request was made to. + */ + public Builder apiId(String apiId) { + Utils.checkNotNull(apiId, "apiId"); + this.apiId = apiId; + return this; + } + + /** + * Creation timestamp. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * The ID of the customer that made this request. + */ + public Builder customerId(String customerId) { + Utils.checkNotNull(customerId, "customerId"); + this.customerId = customerId; + return this; + } + + /** + * The latency of the request. + */ + public Builder latency(long latency) { + Utils.checkNotNull(latency, "latency"); + this.latency = latency; + return this; + } + + /** + * Metadata associated with this request + */ + public Builder metadata(List metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = Optional.ofNullable(metadata); + return this; + } + + /** + * Metadata associated with this request + */ + public Builder metadata(Optional> metadata) { + Utils.checkNotNull(metadata, "metadata"); + this.metadata = metadata; + return this; + } + + /** + * HTTP verb. + */ + public Builder method(String method) { + Utils.checkNotNull(method, "method"); + this.method = method; + return this; + } + + /** + * The path of the request. + */ + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * The time the request finished. + */ + public Builder requestFinishTime(OffsetDateTime requestFinishTime) { + Utils.checkNotNull(requestFinishTime, "requestFinishTime"); + this.requestFinishTime = requestFinishTime; + return this; + } + + /** + * The ID of this request. + */ + public Builder requestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + /** + * The time the request was made. + */ + public Builder requestStartTime(OffsetDateTime requestStartTime) { + Utils.checkNotNull(requestStartTime, "requestStartTime"); + this.requestStartTime = requestStartTime; + return this; + } + + /** + * The status code of the request. + */ + public Builder status(long status) { + Utils.checkNotNull(status, "status"); + this.status = status; + return this; + } + + /** + * The version ID of the Api this request was made to. + */ + public Builder versionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + /** + * The workspace ID this request was made to. + */ + public Builder workspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + public BoundedRequest build() { + return new BoundedRequest( + apiEndpointId, + apiId, + createdAt, + customerId, + latency, + metadata, + method, + path, + requestFinishTime, + requestId, + requestStartTime, + status, + versionId, + workspaceId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Claims.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Claims.java new file mode 100644 index 00000000..0d28475a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Claims.java @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class Claims { + + @JsonCreator + public Claims() { + + + } + + public final static Builder builder() { + return new Builder(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Objects.hash( + ); + } + + @Override + public String toString() { + return Utils.toString(Claims.class); + } + + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public Claims build() { + return new Claims( + ); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/CliEvent.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/CliEvent.java new file mode 100644 index 00000000..afcb679b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/CliEvent.java @@ -0,0 +1,4591 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.Optional; + + +public class CliEvent { + + /** + * Remote commit ID. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("commit_head") + private Optional commitHead; + + /** + * Name of the CI environment. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("continuous_integration_environment") + private Optional continuousIntegrationEnvironment; + + /** + * Timestamp when the event was created in the database. + */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * Duration of the event in milliseconds. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("duration_ms") + private Optional durationMs; + + /** + * Error message if the event was not successful. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private Optional error; + + /** + * Unique identifier for each execution of the CLI. + */ + @JsonProperty("execution_id") + private String executionId; + + /** + * Bump type of the lock file (calculated semver delta, custom change (manual release), or prerelease/graduate) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_bump_type") + private Optional generateBumpType; + + /** + * Checksum of the configuration file (post generation) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_config_post_checksum") + private Optional generateConfigPostChecksum; + + /** + * Rendered configuration file (post generation) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_config_post_raw") + private Optional generateConfigPostRaw; + + /** + * The version of the customer's SDK that we just generated + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_config_post_version") + private Optional generateConfigPostVersion; + + /** + * Checksum of the configuration file (prior to generation) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_config_pre_checksum") + private Optional generateConfigPreChecksum; + + /** + * Rendered configuration file (prior to generation) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_config_pre_raw") + private Optional generateConfigPreRaw; + + /** + * The version of the customer's SDK before we generated + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_config_pre_version") + private Optional generateConfigPreVersion; + + /** + * Eligible feature set during generation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_eligible_features") + private Optional generateEligibleFeatures; + + /** + * gen.lock ID (expected to be a uuid). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_gen_lock_id") + private Optional generateGenLockId; + + /** + * Features post generation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_gen_lock_post_features") + private Optional generateGenLockPostFeatures; + + /** + * Blob digest of the Previous Generation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_gen_lock_pre_blob_digest") + private Optional generateGenLockPreBlobDigest; + + /** + * Checksum of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_gen_lock_pre_doc_checksum") + private Optional generateGenLockPreDocChecksum; + + /** + * info.Version of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_gen_lock_pre_doc_version") + private Optional generateGenLockPreDocVersion; + + /** + * Features prior to generation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_gen_lock_pre_features") + private Optional generateGenLockPreFeatures; + + /** + * Namespace name of the Previous Generation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_gen_lock_pre_namespace_name") + private Optional generateGenLockPreNamespaceName; + + /** + * Revision digest of the Previous Generation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_gen_lock_pre_revision_digest") + private Optional generateGenLockPreRevisionDigest; + + /** + * Artifact version for the Previous Generation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_gen_lock_pre_version") + private Optional generateGenLockPreVersion; + + /** + * The number of operations ignored in generation. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_number_of_operations_ignored") + private Optional generateNumberOfOperationsIgnored; + + /** + * The number of operations used in generation. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_number_of_operations_used") + private Optional generateNumberOfOperationsUsed; + + /** + * Indicates whether tests were output. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_output_tests") + private Optional generateOutputTests; + + /** + * Indicates whether the target was considered published. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_published") + private Optional generatePublished; + + /** + * Expected Repo URL, for use in documentation generation. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_repo_url") + private Optional generateRepoUrl; + + /** + * The target of the event. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_target") + private Optional generateTarget; + + /** + * The workflow name of the target. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_target_name") + private Optional generateTargetName; + + /** + * The version of the target. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_target_version") + private Optional generateTargetVersion; + + /** + * Version of the generation logic used. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_version") + private Optional generateVersion; + + /** + * GitHub organization of the action. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("gh_action_organization") + private Optional ghActionOrganization; + + /** + * GitHub Action ref value. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("gh_action_ref") + private Optional ghActionRef; + + /** + * GitHub repository of the action. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("gh_action_repository") + private Optional ghActionRepository; + + /** + * Link to the GitHub action run. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("gh_action_run_link") + private Optional ghActionRunLink; + + /** + * Version of the GitHub action. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("gh_action_version") + private Optional ghActionVersion; + + /** + * Current working directory relative to the git root. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("git_relative_cwd") + private Optional gitRelativeCwd; + + /** + * Default owner for git remote. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("git_remote_default_owner") + private Optional gitRemoteDefaultOwner; + + /** + * Default repository name for git remote. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("git_remote_default_repo") + private Optional gitRemoteDefaultRepo; + + /** + * User email from git configuration. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("git_user_email") + private Optional gitUserEmail; + + /** + * User's name from git configuration. (not GitHub username) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("git_user_name") + private Optional gitUserName; + + /** + * Remote hostname. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hostname") + private Optional hostname; + + /** + * Unique identifier for each event. + */ + @JsonProperty("id") + private String id; + + /** + * Type of interaction. + */ + @JsonProperty("interaction_type") + private InteractionType interactionType; + + /** + * The last step of the event. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("last_step") + private Optional lastStep; + + /** + * The checksum of the lint report. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lint_report_digest") + private Optional lintReportDigest; + + /** + * The number of errors in the lint report. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lint_report_error_count") + private Optional lintReportErrorCount; + + /** + * The number of info messages in the lint report. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lint_report_info_count") + private Optional lintReportInfoCount; + + /** + * The number of warnings in the lint report. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lint_report_warning_count") + private Optional lintReportWarningCount; + + /** + * Timestamp when the event completed, in local time. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("local_completed_at") + private Optional localCompletedAt; + + /** + * Timestamp when the event started, in local time. + */ + @JsonProperty("local_started_at") + private OffsetDateTime localStartedAt; + + /** + * Checksum of the currently Rendered OpenAPI document. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("management_doc_checksum") + private Optional managementDocChecksum; + + /** + * Version taken from info.version field of the Rendered OpenAPI document. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("management_doc_version") + private Optional managementDocVersion; + + /** + * Mermaid diagram + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mermaid_diagram") + private Optional mermaidDiagram; + + /** + * The blob digest of the base source. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("openapi_diff_base_source_blob_digest") + private Optional openapiDiffBaseSourceBlobDigest; + + /** + * The namespace name of the base source. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("openapi_diff_base_source_namespace_name") + private Optional openapiDiffBaseSourceNamespaceName; + + /** + * The revision digest of the base source. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("openapi_diff_base_source_revision_digest") + private Optional openapiDiffBaseSourceRevisionDigest; + + /** + * The number of breaking changes in the openapi diff report. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("openapi_diff_breaking_changes_count") + private Optional openapiDiffBreakingChangesCount; + + /** + * Bump type of the lock file (calculated semver delta, or a custom change (manual release)) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("openapi_diff_bump_type") + private Optional openapiDiffBumpType; + + /** + * The checksum of the openapi diff report. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("openapi_diff_report_digest") + private Optional openapiDiffReportDigest; + + /** + * Name of the published package. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("publish_package_name") + private Optional publishPackageName; + + /** + * Name of the registry where the package was published. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("publish_package_registry_name") + private Optional publishPackageRegistryName; + + /** + * URL of the published package. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("publish_package_url") + private Optional publishPackageUrl; + + /** + * Version of the published package. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("publish_package_version") + private Optional publishPackageVersion; + + /** + * Full CLI command. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("raw_command") + private Optional rawCommand; + + /** + * Label of the git repository. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("repo_label") + private Optional repoLabel; + + /** + * The blob digest of the source. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_blob_digest") + private Optional sourceBlobDigest; + + /** + * The namespace name of the source. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_namespace_name") + private Optional sourceNamespaceName; + + /** + * The revision digest of the source. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_revision_digest") + private Optional sourceRevisionDigest; + + /** + * Identifier of the Speakeasy API key. + */ + @JsonProperty("speakeasy_api_key_name") + private String speakeasyApiKeyName; + + /** + * Version of the Speakeasy CLI. + */ + @JsonProperty("speakeasy_version") + private String speakeasyVersion; + + /** + * Indicates whether the event was successful. + */ + @JsonProperty("success") + private boolean success; + + /** + * Workflow lock file (post execution) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("workflow_lock_post_raw") + private Optional workflowLockPostRaw; + + /** + * Workflow lock file (prior to execution) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("workflow_lock_pre_raw") + private Optional workflowLockPreRaw; + + /** + * Workflow file (post execution) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("workflow_post_raw") + private Optional workflowPostRaw; + + /** + * Workflow file (prior to execution) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("workflow_pre_raw") + private Optional workflowPreRaw; + + /** + * Identifier of the workspace. + */ + @JsonProperty("workspace_id") + private String workspaceId; + + @JsonCreator + public CliEvent( + @JsonProperty("commit_head") Optional commitHead, + @JsonProperty("continuous_integration_environment") Optional continuousIntegrationEnvironment, + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("duration_ms") Optional durationMs, + @JsonProperty("error") Optional error, + @JsonProperty("execution_id") String executionId, + @JsonProperty("generate_bump_type") Optional generateBumpType, + @JsonProperty("generate_config_post_checksum") Optional generateConfigPostChecksum, + @JsonProperty("generate_config_post_raw") Optional generateConfigPostRaw, + @JsonProperty("generate_config_post_version") Optional generateConfigPostVersion, + @JsonProperty("generate_config_pre_checksum") Optional generateConfigPreChecksum, + @JsonProperty("generate_config_pre_raw") Optional generateConfigPreRaw, + @JsonProperty("generate_config_pre_version") Optional generateConfigPreVersion, + @JsonProperty("generate_eligible_features") Optional generateEligibleFeatures, + @JsonProperty("generate_gen_lock_id") Optional generateGenLockId, + @JsonProperty("generate_gen_lock_post_features") Optional generateGenLockPostFeatures, + @JsonProperty("generate_gen_lock_pre_blob_digest") Optional generateGenLockPreBlobDigest, + @JsonProperty("generate_gen_lock_pre_doc_checksum") Optional generateGenLockPreDocChecksum, + @JsonProperty("generate_gen_lock_pre_doc_version") Optional generateGenLockPreDocVersion, + @JsonProperty("generate_gen_lock_pre_features") Optional generateGenLockPreFeatures, + @JsonProperty("generate_gen_lock_pre_namespace_name") Optional generateGenLockPreNamespaceName, + @JsonProperty("generate_gen_lock_pre_revision_digest") Optional generateGenLockPreRevisionDigest, + @JsonProperty("generate_gen_lock_pre_version") Optional generateGenLockPreVersion, + @JsonProperty("generate_number_of_operations_ignored") Optional generateNumberOfOperationsIgnored, + @JsonProperty("generate_number_of_operations_used") Optional generateNumberOfOperationsUsed, + @JsonProperty("generate_output_tests") Optional generateOutputTests, + @JsonProperty("generate_published") Optional generatePublished, + @JsonProperty("generate_repo_url") Optional generateRepoUrl, + @JsonProperty("generate_target") Optional generateTarget, + @JsonProperty("generate_target_name") Optional generateTargetName, + @JsonProperty("generate_target_version") Optional generateTargetVersion, + @JsonProperty("generate_version") Optional generateVersion, + @JsonProperty("gh_action_organization") Optional ghActionOrganization, + @JsonProperty("gh_action_ref") Optional ghActionRef, + @JsonProperty("gh_action_repository") Optional ghActionRepository, + @JsonProperty("gh_action_run_link") Optional ghActionRunLink, + @JsonProperty("gh_action_version") Optional ghActionVersion, + @JsonProperty("git_relative_cwd") Optional gitRelativeCwd, + @JsonProperty("git_remote_default_owner") Optional gitRemoteDefaultOwner, + @JsonProperty("git_remote_default_repo") Optional gitRemoteDefaultRepo, + @JsonProperty("git_user_email") Optional gitUserEmail, + @JsonProperty("git_user_name") Optional gitUserName, + @JsonProperty("hostname") Optional hostname, + @JsonProperty("id") String id, + @JsonProperty("interaction_type") InteractionType interactionType, + @JsonProperty("last_step") Optional lastStep, + @JsonProperty("lint_report_digest") Optional lintReportDigest, + @JsonProperty("lint_report_error_count") Optional lintReportErrorCount, + @JsonProperty("lint_report_info_count") Optional lintReportInfoCount, + @JsonProperty("lint_report_warning_count") Optional lintReportWarningCount, + @JsonProperty("local_completed_at") Optional localCompletedAt, + @JsonProperty("local_started_at") OffsetDateTime localStartedAt, + @JsonProperty("management_doc_checksum") Optional managementDocChecksum, + @JsonProperty("management_doc_version") Optional managementDocVersion, + @JsonProperty("mermaid_diagram") Optional mermaidDiagram, + @JsonProperty("openapi_diff_base_source_blob_digest") Optional openapiDiffBaseSourceBlobDigest, + @JsonProperty("openapi_diff_base_source_namespace_name") Optional openapiDiffBaseSourceNamespaceName, + @JsonProperty("openapi_diff_base_source_revision_digest") Optional openapiDiffBaseSourceRevisionDigest, + @JsonProperty("openapi_diff_breaking_changes_count") Optional openapiDiffBreakingChangesCount, + @JsonProperty("openapi_diff_bump_type") Optional openapiDiffBumpType, + @JsonProperty("openapi_diff_report_digest") Optional openapiDiffReportDigest, + @JsonProperty("publish_package_name") Optional publishPackageName, + @JsonProperty("publish_package_registry_name") Optional publishPackageRegistryName, + @JsonProperty("publish_package_url") Optional publishPackageUrl, + @JsonProperty("publish_package_version") Optional publishPackageVersion, + @JsonProperty("raw_command") Optional rawCommand, + @JsonProperty("repo_label") Optional repoLabel, + @JsonProperty("source_blob_digest") Optional sourceBlobDigest, + @JsonProperty("source_namespace_name") Optional sourceNamespaceName, + @JsonProperty("source_revision_digest") Optional sourceRevisionDigest, + @JsonProperty("speakeasy_api_key_name") String speakeasyApiKeyName, + @JsonProperty("speakeasy_version") String speakeasyVersion, + @JsonProperty("success") boolean success, + @JsonProperty("workflow_lock_post_raw") Optional workflowLockPostRaw, + @JsonProperty("workflow_lock_pre_raw") Optional workflowLockPreRaw, + @JsonProperty("workflow_post_raw") Optional workflowPostRaw, + @JsonProperty("workflow_pre_raw") Optional workflowPreRaw, + @JsonProperty("workspace_id") String workspaceId) { + Utils.checkNotNull(commitHead, "commitHead"); + Utils.checkNotNull(continuousIntegrationEnvironment, "continuousIntegrationEnvironment"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(durationMs, "durationMs"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(executionId, "executionId"); + Utils.checkNotNull(generateBumpType, "generateBumpType"); + Utils.checkNotNull(generateConfigPostChecksum, "generateConfigPostChecksum"); + Utils.checkNotNull(generateConfigPostRaw, "generateConfigPostRaw"); + Utils.checkNotNull(generateConfigPostVersion, "generateConfigPostVersion"); + Utils.checkNotNull(generateConfigPreChecksum, "generateConfigPreChecksum"); + Utils.checkNotNull(generateConfigPreRaw, "generateConfigPreRaw"); + Utils.checkNotNull(generateConfigPreVersion, "generateConfigPreVersion"); + Utils.checkNotNull(generateEligibleFeatures, "generateEligibleFeatures"); + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + Utils.checkNotNull(generateGenLockPostFeatures, "generateGenLockPostFeatures"); + Utils.checkNotNull(generateGenLockPreBlobDigest, "generateGenLockPreBlobDigest"); + Utils.checkNotNull(generateGenLockPreDocChecksum, "generateGenLockPreDocChecksum"); + Utils.checkNotNull(generateGenLockPreDocVersion, "generateGenLockPreDocVersion"); + Utils.checkNotNull(generateGenLockPreFeatures, "generateGenLockPreFeatures"); + Utils.checkNotNull(generateGenLockPreNamespaceName, "generateGenLockPreNamespaceName"); + Utils.checkNotNull(generateGenLockPreRevisionDigest, "generateGenLockPreRevisionDigest"); + Utils.checkNotNull(generateGenLockPreVersion, "generateGenLockPreVersion"); + Utils.checkNotNull(generateNumberOfOperationsIgnored, "generateNumberOfOperationsIgnored"); + Utils.checkNotNull(generateNumberOfOperationsUsed, "generateNumberOfOperationsUsed"); + Utils.checkNotNull(generateOutputTests, "generateOutputTests"); + Utils.checkNotNull(generatePublished, "generatePublished"); + Utils.checkNotNull(generateRepoUrl, "generateRepoUrl"); + Utils.checkNotNull(generateTarget, "generateTarget"); + Utils.checkNotNull(generateTargetName, "generateTargetName"); + Utils.checkNotNull(generateTargetVersion, "generateTargetVersion"); + Utils.checkNotNull(generateVersion, "generateVersion"); + Utils.checkNotNull(ghActionOrganization, "ghActionOrganization"); + Utils.checkNotNull(ghActionRef, "ghActionRef"); + Utils.checkNotNull(ghActionRepository, "ghActionRepository"); + Utils.checkNotNull(ghActionRunLink, "ghActionRunLink"); + Utils.checkNotNull(ghActionVersion, "ghActionVersion"); + Utils.checkNotNull(gitRelativeCwd, "gitRelativeCwd"); + Utils.checkNotNull(gitRemoteDefaultOwner, "gitRemoteDefaultOwner"); + Utils.checkNotNull(gitRemoteDefaultRepo, "gitRemoteDefaultRepo"); + Utils.checkNotNull(gitUserEmail, "gitUserEmail"); + Utils.checkNotNull(gitUserName, "gitUserName"); + Utils.checkNotNull(hostname, "hostname"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(interactionType, "interactionType"); + Utils.checkNotNull(lastStep, "lastStep"); + Utils.checkNotNull(lintReportDigest, "lintReportDigest"); + Utils.checkNotNull(lintReportErrorCount, "lintReportErrorCount"); + Utils.checkNotNull(lintReportInfoCount, "lintReportInfoCount"); + Utils.checkNotNull(lintReportWarningCount, "lintReportWarningCount"); + Utils.checkNotNull(localCompletedAt, "localCompletedAt"); + Utils.checkNotNull(localStartedAt, "localStartedAt"); + Utils.checkNotNull(managementDocChecksum, "managementDocChecksum"); + Utils.checkNotNull(managementDocVersion, "managementDocVersion"); + Utils.checkNotNull(mermaidDiagram, "mermaidDiagram"); + Utils.checkNotNull(openapiDiffBaseSourceBlobDigest, "openapiDiffBaseSourceBlobDigest"); + Utils.checkNotNull(openapiDiffBaseSourceNamespaceName, "openapiDiffBaseSourceNamespaceName"); + Utils.checkNotNull(openapiDiffBaseSourceRevisionDigest, "openapiDiffBaseSourceRevisionDigest"); + Utils.checkNotNull(openapiDiffBreakingChangesCount, "openapiDiffBreakingChangesCount"); + Utils.checkNotNull(openapiDiffBumpType, "openapiDiffBumpType"); + Utils.checkNotNull(openapiDiffReportDigest, "openapiDiffReportDigest"); + Utils.checkNotNull(publishPackageName, "publishPackageName"); + Utils.checkNotNull(publishPackageRegistryName, "publishPackageRegistryName"); + Utils.checkNotNull(publishPackageUrl, "publishPackageUrl"); + Utils.checkNotNull(publishPackageVersion, "publishPackageVersion"); + Utils.checkNotNull(rawCommand, "rawCommand"); + Utils.checkNotNull(repoLabel, "repoLabel"); + Utils.checkNotNull(sourceBlobDigest, "sourceBlobDigest"); + Utils.checkNotNull(sourceNamespaceName, "sourceNamespaceName"); + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + Utils.checkNotNull(speakeasyApiKeyName, "speakeasyApiKeyName"); + Utils.checkNotNull(speakeasyVersion, "speakeasyVersion"); + Utils.checkNotNull(success, "success"); + Utils.checkNotNull(workflowLockPostRaw, "workflowLockPostRaw"); + Utils.checkNotNull(workflowLockPreRaw, "workflowLockPreRaw"); + Utils.checkNotNull(workflowPostRaw, "workflowPostRaw"); + Utils.checkNotNull(workflowPreRaw, "workflowPreRaw"); + Utils.checkNotNull(workspaceId, "workspaceId"); + this.commitHead = commitHead; + this.continuousIntegrationEnvironment = continuousIntegrationEnvironment; + this.createdAt = createdAt; + this.durationMs = durationMs; + this.error = error; + this.executionId = executionId; + this.generateBumpType = generateBumpType; + this.generateConfigPostChecksum = generateConfigPostChecksum; + this.generateConfigPostRaw = generateConfigPostRaw; + this.generateConfigPostVersion = generateConfigPostVersion; + this.generateConfigPreChecksum = generateConfigPreChecksum; + this.generateConfigPreRaw = generateConfigPreRaw; + this.generateConfigPreVersion = generateConfigPreVersion; + this.generateEligibleFeatures = generateEligibleFeatures; + this.generateGenLockId = generateGenLockId; + this.generateGenLockPostFeatures = generateGenLockPostFeatures; + this.generateGenLockPreBlobDigest = generateGenLockPreBlobDigest; + this.generateGenLockPreDocChecksum = generateGenLockPreDocChecksum; + this.generateGenLockPreDocVersion = generateGenLockPreDocVersion; + this.generateGenLockPreFeatures = generateGenLockPreFeatures; + this.generateGenLockPreNamespaceName = generateGenLockPreNamespaceName; + this.generateGenLockPreRevisionDigest = generateGenLockPreRevisionDigest; + this.generateGenLockPreVersion = generateGenLockPreVersion; + this.generateNumberOfOperationsIgnored = generateNumberOfOperationsIgnored; + this.generateNumberOfOperationsUsed = generateNumberOfOperationsUsed; + this.generateOutputTests = generateOutputTests; + this.generatePublished = generatePublished; + this.generateRepoUrl = generateRepoUrl; + this.generateTarget = generateTarget; + this.generateTargetName = generateTargetName; + this.generateTargetVersion = generateTargetVersion; + this.generateVersion = generateVersion; + this.ghActionOrganization = ghActionOrganization; + this.ghActionRef = ghActionRef; + this.ghActionRepository = ghActionRepository; + this.ghActionRunLink = ghActionRunLink; + this.ghActionVersion = ghActionVersion; + this.gitRelativeCwd = gitRelativeCwd; + this.gitRemoteDefaultOwner = gitRemoteDefaultOwner; + this.gitRemoteDefaultRepo = gitRemoteDefaultRepo; + this.gitUserEmail = gitUserEmail; + this.gitUserName = gitUserName; + this.hostname = hostname; + this.id = id; + this.interactionType = interactionType; + this.lastStep = lastStep; + this.lintReportDigest = lintReportDigest; + this.lintReportErrorCount = lintReportErrorCount; + this.lintReportInfoCount = lintReportInfoCount; + this.lintReportWarningCount = lintReportWarningCount; + this.localCompletedAt = localCompletedAt; + this.localStartedAt = localStartedAt; + this.managementDocChecksum = managementDocChecksum; + this.managementDocVersion = managementDocVersion; + this.mermaidDiagram = mermaidDiagram; + this.openapiDiffBaseSourceBlobDigest = openapiDiffBaseSourceBlobDigest; + this.openapiDiffBaseSourceNamespaceName = openapiDiffBaseSourceNamespaceName; + this.openapiDiffBaseSourceRevisionDigest = openapiDiffBaseSourceRevisionDigest; + this.openapiDiffBreakingChangesCount = openapiDiffBreakingChangesCount; + this.openapiDiffBumpType = openapiDiffBumpType; + this.openapiDiffReportDigest = openapiDiffReportDigest; + this.publishPackageName = publishPackageName; + this.publishPackageRegistryName = publishPackageRegistryName; + this.publishPackageUrl = publishPackageUrl; + this.publishPackageVersion = publishPackageVersion; + this.rawCommand = rawCommand; + this.repoLabel = repoLabel; + this.sourceBlobDigest = sourceBlobDigest; + this.sourceNamespaceName = sourceNamespaceName; + this.sourceRevisionDigest = sourceRevisionDigest; + this.speakeasyApiKeyName = speakeasyApiKeyName; + this.speakeasyVersion = speakeasyVersion; + this.success = success; + this.workflowLockPostRaw = workflowLockPostRaw; + this.workflowLockPreRaw = workflowLockPreRaw; + this.workflowPostRaw = workflowPostRaw; + this.workflowPreRaw = workflowPreRaw; + this.workspaceId = workspaceId; + } + + public CliEvent( + OffsetDateTime createdAt, + String executionId, + String id, + InteractionType interactionType, + OffsetDateTime localStartedAt, + String speakeasyApiKeyName, + String speakeasyVersion, + boolean success, + String workspaceId) { + this(Optional.empty(), Optional.empty(), createdAt, Optional.empty(), Optional.empty(), executionId, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), id, interactionType, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), localStartedAt, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), speakeasyApiKeyName, speakeasyVersion, success, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), workspaceId); + } + + /** + * Remote commit ID. + */ + @JsonIgnore + public Optional commitHead() { + return commitHead; + } + + /** + * Name of the CI environment. + */ + @JsonIgnore + public Optional continuousIntegrationEnvironment() { + return continuousIntegrationEnvironment; + } + + /** + * Timestamp when the event was created in the database. + */ + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + /** + * Duration of the event in milliseconds. + */ + @JsonIgnore + public Optional durationMs() { + return durationMs; + } + + /** + * Error message if the event was not successful. + */ + @JsonIgnore + public Optional error() { + return error; + } + + /** + * Unique identifier for each execution of the CLI. + */ + @JsonIgnore + public String executionId() { + return executionId; + } + + /** + * Bump type of the lock file (calculated semver delta, custom change (manual release), or prerelease/graduate) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional generateBumpType() { + return (Optional) generateBumpType; + } + + /** + * Checksum of the configuration file (post generation) + */ + @JsonIgnore + public Optional generateConfigPostChecksum() { + return generateConfigPostChecksum; + } + + /** + * Rendered configuration file (post generation) + */ + @JsonIgnore + public Optional generateConfigPostRaw() { + return generateConfigPostRaw; + } + + /** + * The version of the customer's SDK that we just generated + */ + @JsonIgnore + public Optional generateConfigPostVersion() { + return generateConfigPostVersion; + } + + /** + * Checksum of the configuration file (prior to generation) + */ + @JsonIgnore + public Optional generateConfigPreChecksum() { + return generateConfigPreChecksum; + } + + /** + * Rendered configuration file (prior to generation) + */ + @JsonIgnore + public Optional generateConfigPreRaw() { + return generateConfigPreRaw; + } + + /** + * The version of the customer's SDK before we generated + */ + @JsonIgnore + public Optional generateConfigPreVersion() { + return generateConfigPreVersion; + } + + /** + * Eligible feature set during generation + */ + @JsonIgnore + public Optional generateEligibleFeatures() { + return generateEligibleFeatures; + } + + /** + * gen.lock ID (expected to be a uuid). + */ + @JsonIgnore + public Optional generateGenLockId() { + return generateGenLockId; + } + + /** + * Features post generation + */ + @JsonIgnore + public Optional generateGenLockPostFeatures() { + return generateGenLockPostFeatures; + } + + /** + * Blob digest of the Previous Generation + */ + @JsonIgnore + public Optional generateGenLockPreBlobDigest() { + return generateGenLockPreBlobDigest; + } + + /** + * Checksum of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + */ + @JsonIgnore + public Optional generateGenLockPreDocChecksum() { + return generateGenLockPreDocChecksum; + } + + /** + * info.Version of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + */ + @JsonIgnore + public Optional generateGenLockPreDocVersion() { + return generateGenLockPreDocVersion; + } + + /** + * Features prior to generation + */ + @JsonIgnore + public Optional generateGenLockPreFeatures() { + return generateGenLockPreFeatures; + } + + /** + * Namespace name of the Previous Generation + */ + @JsonIgnore + public Optional generateGenLockPreNamespaceName() { + return generateGenLockPreNamespaceName; + } + + /** + * Revision digest of the Previous Generation + */ + @JsonIgnore + public Optional generateGenLockPreRevisionDigest() { + return generateGenLockPreRevisionDigest; + } + + /** + * Artifact version for the Previous Generation + */ + @JsonIgnore + public Optional generateGenLockPreVersion() { + return generateGenLockPreVersion; + } + + /** + * The number of operations ignored in generation. + */ + @JsonIgnore + public Optional generateNumberOfOperationsIgnored() { + return generateNumberOfOperationsIgnored; + } + + /** + * The number of operations used in generation. + */ + @JsonIgnore + public Optional generateNumberOfOperationsUsed() { + return generateNumberOfOperationsUsed; + } + + /** + * Indicates whether tests were output. + */ + @JsonIgnore + public Optional generateOutputTests() { + return generateOutputTests; + } + + /** + * Indicates whether the target was considered published. + */ + @JsonIgnore + public Optional generatePublished() { + return generatePublished; + } + + /** + * Expected Repo URL, for use in documentation generation. + */ + @JsonIgnore + public Optional generateRepoUrl() { + return generateRepoUrl; + } + + /** + * The target of the event. + */ + @JsonIgnore + public Optional generateTarget() { + return generateTarget; + } + + /** + * The workflow name of the target. + */ + @JsonIgnore + public Optional generateTargetName() { + return generateTargetName; + } + + /** + * The version of the target. + */ + @JsonIgnore + public Optional generateTargetVersion() { + return generateTargetVersion; + } + + /** + * Version of the generation logic used. + */ + @JsonIgnore + public Optional generateVersion() { + return generateVersion; + } + + /** + * GitHub organization of the action. + */ + @JsonIgnore + public Optional ghActionOrganization() { + return ghActionOrganization; + } + + /** + * GitHub Action ref value. + */ + @JsonIgnore + public Optional ghActionRef() { + return ghActionRef; + } + + /** + * GitHub repository of the action. + */ + @JsonIgnore + public Optional ghActionRepository() { + return ghActionRepository; + } + + /** + * Link to the GitHub action run. + */ + @JsonIgnore + public Optional ghActionRunLink() { + return ghActionRunLink; + } + + /** + * Version of the GitHub action. + */ + @JsonIgnore + public Optional ghActionVersion() { + return ghActionVersion; + } + + /** + * Current working directory relative to the git root. + */ + @JsonIgnore + public Optional gitRelativeCwd() { + return gitRelativeCwd; + } + + /** + * Default owner for git remote. + */ + @JsonIgnore + public Optional gitRemoteDefaultOwner() { + return gitRemoteDefaultOwner; + } + + /** + * Default repository name for git remote. + */ + @JsonIgnore + public Optional gitRemoteDefaultRepo() { + return gitRemoteDefaultRepo; + } + + /** + * User email from git configuration. + */ + @JsonIgnore + public Optional gitUserEmail() { + return gitUserEmail; + } + + /** + * User's name from git configuration. (not GitHub username) + */ + @JsonIgnore + public Optional gitUserName() { + return gitUserName; + } + + /** + * Remote hostname. + */ + @JsonIgnore + public Optional hostname() { + return hostname; + } + + /** + * Unique identifier for each event. + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * Type of interaction. + */ + @JsonIgnore + public InteractionType interactionType() { + return interactionType; + } + + /** + * The last step of the event. + */ + @JsonIgnore + public Optional lastStep() { + return lastStep; + } + + /** + * The checksum of the lint report. + */ + @JsonIgnore + public Optional lintReportDigest() { + return lintReportDigest; + } + + /** + * The number of errors in the lint report. + */ + @JsonIgnore + public Optional lintReportErrorCount() { + return lintReportErrorCount; + } + + /** + * The number of info messages in the lint report. + */ + @JsonIgnore + public Optional lintReportInfoCount() { + return lintReportInfoCount; + } + + /** + * The number of warnings in the lint report. + */ + @JsonIgnore + public Optional lintReportWarningCount() { + return lintReportWarningCount; + } + + /** + * Timestamp when the event completed, in local time. + */ + @JsonIgnore + public Optional localCompletedAt() { + return localCompletedAt; + } + + /** + * Timestamp when the event started, in local time. + */ + @JsonIgnore + public OffsetDateTime localStartedAt() { + return localStartedAt; + } + + /** + * Checksum of the currently Rendered OpenAPI document. + */ + @JsonIgnore + public Optional managementDocChecksum() { + return managementDocChecksum; + } + + /** + * Version taken from info.version field of the Rendered OpenAPI document. + */ + @JsonIgnore + public Optional managementDocVersion() { + return managementDocVersion; + } + + /** + * Mermaid diagram + */ + @JsonIgnore + public Optional mermaidDiagram() { + return mermaidDiagram; + } + + /** + * The blob digest of the base source. + */ + @JsonIgnore + public Optional openapiDiffBaseSourceBlobDigest() { + return openapiDiffBaseSourceBlobDigest; + } + + /** + * The namespace name of the base source. + */ + @JsonIgnore + public Optional openapiDiffBaseSourceNamespaceName() { + return openapiDiffBaseSourceNamespaceName; + } + + /** + * The revision digest of the base source. + */ + @JsonIgnore + public Optional openapiDiffBaseSourceRevisionDigest() { + return openapiDiffBaseSourceRevisionDigest; + } + + /** + * The number of breaking changes in the openapi diff report. + */ + @JsonIgnore + public Optional openapiDiffBreakingChangesCount() { + return openapiDiffBreakingChangesCount; + } + + /** + * Bump type of the lock file (calculated semver delta, or a custom change (manual release)) + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional openapiDiffBumpType() { + return (Optional) openapiDiffBumpType; + } + + /** + * The checksum of the openapi diff report. + */ + @JsonIgnore + public Optional openapiDiffReportDigest() { + return openapiDiffReportDigest; + } + + /** + * Name of the published package. + */ + @JsonIgnore + public Optional publishPackageName() { + return publishPackageName; + } + + /** + * Name of the registry where the package was published. + */ + @JsonIgnore + public Optional publishPackageRegistryName() { + return publishPackageRegistryName; + } + + /** + * URL of the published package. + */ + @JsonIgnore + public Optional publishPackageUrl() { + return publishPackageUrl; + } + + /** + * Version of the published package. + */ + @JsonIgnore + public Optional publishPackageVersion() { + return publishPackageVersion; + } + + /** + * Full CLI command. + */ + @JsonIgnore + public Optional rawCommand() { + return rawCommand; + } + + /** + * Label of the git repository. + */ + @JsonIgnore + public Optional repoLabel() { + return repoLabel; + } + + /** + * The blob digest of the source. + */ + @JsonIgnore + public Optional sourceBlobDigest() { + return sourceBlobDigest; + } + + /** + * The namespace name of the source. + */ + @JsonIgnore + public Optional sourceNamespaceName() { + return sourceNamespaceName; + } + + /** + * The revision digest of the source. + */ + @JsonIgnore + public Optional sourceRevisionDigest() { + return sourceRevisionDigest; + } + + /** + * Identifier of the Speakeasy API key. + */ + @JsonIgnore + public String speakeasyApiKeyName() { + return speakeasyApiKeyName; + } + + /** + * Version of the Speakeasy CLI. + */ + @JsonIgnore + public String speakeasyVersion() { + return speakeasyVersion; + } + + /** + * Indicates whether the event was successful. + */ + @JsonIgnore + public boolean success() { + return success; + } + + /** + * Workflow lock file (post execution) + */ + @JsonIgnore + public Optional workflowLockPostRaw() { + return workflowLockPostRaw; + } + + /** + * Workflow lock file (prior to execution) + */ + @JsonIgnore + public Optional workflowLockPreRaw() { + return workflowLockPreRaw; + } + + /** + * Workflow file (post execution) + */ + @JsonIgnore + public Optional workflowPostRaw() { + return workflowPostRaw; + } + + /** + * Workflow file (prior to execution) + */ + @JsonIgnore + public Optional workflowPreRaw() { + return workflowPreRaw; + } + + /** + * Identifier of the workspace. + */ + @JsonIgnore + public String workspaceId() { + return workspaceId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Remote commit ID. + */ + public CliEvent withCommitHead(String commitHead) { + Utils.checkNotNull(commitHead, "commitHead"); + this.commitHead = Optional.ofNullable(commitHead); + return this; + } + + /** + * Remote commit ID. + */ + public CliEvent withCommitHead(Optional commitHead) { + Utils.checkNotNull(commitHead, "commitHead"); + this.commitHead = commitHead; + return this; + } + + /** + * Name of the CI environment. + */ + public CliEvent withContinuousIntegrationEnvironment(String continuousIntegrationEnvironment) { + Utils.checkNotNull(continuousIntegrationEnvironment, "continuousIntegrationEnvironment"); + this.continuousIntegrationEnvironment = Optional.ofNullable(continuousIntegrationEnvironment); + return this; + } + + /** + * Name of the CI environment. + */ + public CliEvent withContinuousIntegrationEnvironment(Optional continuousIntegrationEnvironment) { + Utils.checkNotNull(continuousIntegrationEnvironment, "continuousIntegrationEnvironment"); + this.continuousIntegrationEnvironment = continuousIntegrationEnvironment; + return this; + } + + /** + * Timestamp when the event was created in the database. + */ + public CliEvent withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * Duration of the event in milliseconds. + */ + public CliEvent withDurationMs(long durationMs) { + Utils.checkNotNull(durationMs, "durationMs"); + this.durationMs = Optional.ofNullable(durationMs); + return this; + } + + /** + * Duration of the event in milliseconds. + */ + public CliEvent withDurationMs(Optional durationMs) { + Utils.checkNotNull(durationMs, "durationMs"); + this.durationMs = durationMs; + return this; + } + + /** + * Error message if the event was not successful. + */ + public CliEvent withError(String error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Error message if the event was not successful. + */ + public CliEvent withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * Unique identifier for each execution of the CLI. + */ + public CliEvent withExecutionId(String executionId) { + Utils.checkNotNull(executionId, "executionId"); + this.executionId = executionId; + return this; + } + + /** + * Bump type of the lock file (calculated semver delta, custom change (manual release), or prerelease/graduate) + */ + public CliEvent withGenerateBumpType(GenerateBumpType generateBumpType) { + Utils.checkNotNull(generateBumpType, "generateBumpType"); + this.generateBumpType = Optional.ofNullable(generateBumpType); + return this; + } + + /** + * Bump type of the lock file (calculated semver delta, custom change (manual release), or prerelease/graduate) + */ + public CliEvent withGenerateBumpType(Optional generateBumpType) { + Utils.checkNotNull(generateBumpType, "generateBumpType"); + this.generateBumpType = generateBumpType; + return this; + } + + /** + * Checksum of the configuration file (post generation) + */ + public CliEvent withGenerateConfigPostChecksum(String generateConfigPostChecksum) { + Utils.checkNotNull(generateConfigPostChecksum, "generateConfigPostChecksum"); + this.generateConfigPostChecksum = Optional.ofNullable(generateConfigPostChecksum); + return this; + } + + /** + * Checksum of the configuration file (post generation) + */ + public CliEvent withGenerateConfigPostChecksum(Optional generateConfigPostChecksum) { + Utils.checkNotNull(generateConfigPostChecksum, "generateConfigPostChecksum"); + this.generateConfigPostChecksum = generateConfigPostChecksum; + return this; + } + + /** + * Rendered configuration file (post generation) + */ + public CliEvent withGenerateConfigPostRaw(String generateConfigPostRaw) { + Utils.checkNotNull(generateConfigPostRaw, "generateConfigPostRaw"); + this.generateConfigPostRaw = Optional.ofNullable(generateConfigPostRaw); + return this; + } + + /** + * Rendered configuration file (post generation) + */ + public CliEvent withGenerateConfigPostRaw(Optional generateConfigPostRaw) { + Utils.checkNotNull(generateConfigPostRaw, "generateConfigPostRaw"); + this.generateConfigPostRaw = generateConfigPostRaw; + return this; + } + + /** + * The version of the customer's SDK that we just generated + */ + public CliEvent withGenerateConfigPostVersion(String generateConfigPostVersion) { + Utils.checkNotNull(generateConfigPostVersion, "generateConfigPostVersion"); + this.generateConfigPostVersion = Optional.ofNullable(generateConfigPostVersion); + return this; + } + + /** + * The version of the customer's SDK that we just generated + */ + public CliEvent withGenerateConfigPostVersion(Optional generateConfigPostVersion) { + Utils.checkNotNull(generateConfigPostVersion, "generateConfigPostVersion"); + this.generateConfigPostVersion = generateConfigPostVersion; + return this; + } + + /** + * Checksum of the configuration file (prior to generation) + */ + public CliEvent withGenerateConfigPreChecksum(String generateConfigPreChecksum) { + Utils.checkNotNull(generateConfigPreChecksum, "generateConfigPreChecksum"); + this.generateConfigPreChecksum = Optional.ofNullable(generateConfigPreChecksum); + return this; + } + + /** + * Checksum of the configuration file (prior to generation) + */ + public CliEvent withGenerateConfigPreChecksum(Optional generateConfigPreChecksum) { + Utils.checkNotNull(generateConfigPreChecksum, "generateConfigPreChecksum"); + this.generateConfigPreChecksum = generateConfigPreChecksum; + return this; + } + + /** + * Rendered configuration file (prior to generation) + */ + public CliEvent withGenerateConfigPreRaw(String generateConfigPreRaw) { + Utils.checkNotNull(generateConfigPreRaw, "generateConfigPreRaw"); + this.generateConfigPreRaw = Optional.ofNullable(generateConfigPreRaw); + return this; + } + + /** + * Rendered configuration file (prior to generation) + */ + public CliEvent withGenerateConfigPreRaw(Optional generateConfigPreRaw) { + Utils.checkNotNull(generateConfigPreRaw, "generateConfigPreRaw"); + this.generateConfigPreRaw = generateConfigPreRaw; + return this; + } + + /** + * The version of the customer's SDK before we generated + */ + public CliEvent withGenerateConfigPreVersion(String generateConfigPreVersion) { + Utils.checkNotNull(generateConfigPreVersion, "generateConfigPreVersion"); + this.generateConfigPreVersion = Optional.ofNullable(generateConfigPreVersion); + return this; + } + + /** + * The version of the customer's SDK before we generated + */ + public CliEvent withGenerateConfigPreVersion(Optional generateConfigPreVersion) { + Utils.checkNotNull(generateConfigPreVersion, "generateConfigPreVersion"); + this.generateConfigPreVersion = generateConfigPreVersion; + return this; + } + + /** + * Eligible feature set during generation + */ + public CliEvent withGenerateEligibleFeatures(String generateEligibleFeatures) { + Utils.checkNotNull(generateEligibleFeatures, "generateEligibleFeatures"); + this.generateEligibleFeatures = Optional.ofNullable(generateEligibleFeatures); + return this; + } + + /** + * Eligible feature set during generation + */ + public CliEvent withGenerateEligibleFeatures(Optional generateEligibleFeatures) { + Utils.checkNotNull(generateEligibleFeatures, "generateEligibleFeatures"); + this.generateEligibleFeatures = generateEligibleFeatures; + return this; + } + + /** + * gen.lock ID (expected to be a uuid). + */ + public CliEvent withGenerateGenLockId(String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = Optional.ofNullable(generateGenLockId); + return this; + } + + /** + * gen.lock ID (expected to be a uuid). + */ + public CliEvent withGenerateGenLockId(Optional generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + return this; + } + + /** + * Features post generation + */ + public CliEvent withGenerateGenLockPostFeatures(String generateGenLockPostFeatures) { + Utils.checkNotNull(generateGenLockPostFeatures, "generateGenLockPostFeatures"); + this.generateGenLockPostFeatures = Optional.ofNullable(generateGenLockPostFeatures); + return this; + } + + /** + * Features post generation + */ + public CliEvent withGenerateGenLockPostFeatures(Optional generateGenLockPostFeatures) { + Utils.checkNotNull(generateGenLockPostFeatures, "generateGenLockPostFeatures"); + this.generateGenLockPostFeatures = generateGenLockPostFeatures; + return this; + } + + /** + * Blob digest of the Previous Generation + */ + public CliEvent withGenerateGenLockPreBlobDigest(String generateGenLockPreBlobDigest) { + Utils.checkNotNull(generateGenLockPreBlobDigest, "generateGenLockPreBlobDigest"); + this.generateGenLockPreBlobDigest = Optional.ofNullable(generateGenLockPreBlobDigest); + return this; + } + + /** + * Blob digest of the Previous Generation + */ + public CliEvent withGenerateGenLockPreBlobDigest(Optional generateGenLockPreBlobDigest) { + Utils.checkNotNull(generateGenLockPreBlobDigest, "generateGenLockPreBlobDigest"); + this.generateGenLockPreBlobDigest = generateGenLockPreBlobDigest; + return this; + } + + /** + * Checksum of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + */ + public CliEvent withGenerateGenLockPreDocChecksum(String generateGenLockPreDocChecksum) { + Utils.checkNotNull(generateGenLockPreDocChecksum, "generateGenLockPreDocChecksum"); + this.generateGenLockPreDocChecksum = Optional.ofNullable(generateGenLockPreDocChecksum); + return this; + } + + /** + * Checksum of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + */ + public CliEvent withGenerateGenLockPreDocChecksum(Optional generateGenLockPreDocChecksum) { + Utils.checkNotNull(generateGenLockPreDocChecksum, "generateGenLockPreDocChecksum"); + this.generateGenLockPreDocChecksum = generateGenLockPreDocChecksum; + return this; + } + + /** + * info.Version of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + */ + public CliEvent withGenerateGenLockPreDocVersion(String generateGenLockPreDocVersion) { + Utils.checkNotNull(generateGenLockPreDocVersion, "generateGenLockPreDocVersion"); + this.generateGenLockPreDocVersion = Optional.ofNullable(generateGenLockPreDocVersion); + return this; + } + + /** + * info.Version of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + */ + public CliEvent withGenerateGenLockPreDocVersion(Optional generateGenLockPreDocVersion) { + Utils.checkNotNull(generateGenLockPreDocVersion, "generateGenLockPreDocVersion"); + this.generateGenLockPreDocVersion = generateGenLockPreDocVersion; + return this; + } + + /** + * Features prior to generation + */ + public CliEvent withGenerateGenLockPreFeatures(String generateGenLockPreFeatures) { + Utils.checkNotNull(generateGenLockPreFeatures, "generateGenLockPreFeatures"); + this.generateGenLockPreFeatures = Optional.ofNullable(generateGenLockPreFeatures); + return this; + } + + /** + * Features prior to generation + */ + public CliEvent withGenerateGenLockPreFeatures(Optional generateGenLockPreFeatures) { + Utils.checkNotNull(generateGenLockPreFeatures, "generateGenLockPreFeatures"); + this.generateGenLockPreFeatures = generateGenLockPreFeatures; + return this; + } + + /** + * Namespace name of the Previous Generation + */ + public CliEvent withGenerateGenLockPreNamespaceName(String generateGenLockPreNamespaceName) { + Utils.checkNotNull(generateGenLockPreNamespaceName, "generateGenLockPreNamespaceName"); + this.generateGenLockPreNamespaceName = Optional.ofNullable(generateGenLockPreNamespaceName); + return this; + } + + /** + * Namespace name of the Previous Generation + */ + public CliEvent withGenerateGenLockPreNamespaceName(Optional generateGenLockPreNamespaceName) { + Utils.checkNotNull(generateGenLockPreNamespaceName, "generateGenLockPreNamespaceName"); + this.generateGenLockPreNamespaceName = generateGenLockPreNamespaceName; + return this; + } + + /** + * Revision digest of the Previous Generation + */ + public CliEvent withGenerateGenLockPreRevisionDigest(String generateGenLockPreRevisionDigest) { + Utils.checkNotNull(generateGenLockPreRevisionDigest, "generateGenLockPreRevisionDigest"); + this.generateGenLockPreRevisionDigest = Optional.ofNullable(generateGenLockPreRevisionDigest); + return this; + } + + /** + * Revision digest of the Previous Generation + */ + public CliEvent withGenerateGenLockPreRevisionDigest(Optional generateGenLockPreRevisionDigest) { + Utils.checkNotNull(generateGenLockPreRevisionDigest, "generateGenLockPreRevisionDigest"); + this.generateGenLockPreRevisionDigest = generateGenLockPreRevisionDigest; + return this; + } + + /** + * Artifact version for the Previous Generation + */ + public CliEvent withGenerateGenLockPreVersion(String generateGenLockPreVersion) { + Utils.checkNotNull(generateGenLockPreVersion, "generateGenLockPreVersion"); + this.generateGenLockPreVersion = Optional.ofNullable(generateGenLockPreVersion); + return this; + } + + /** + * Artifact version for the Previous Generation + */ + public CliEvent withGenerateGenLockPreVersion(Optional generateGenLockPreVersion) { + Utils.checkNotNull(generateGenLockPreVersion, "generateGenLockPreVersion"); + this.generateGenLockPreVersion = generateGenLockPreVersion; + return this; + } + + /** + * The number of operations ignored in generation. + */ + public CliEvent withGenerateNumberOfOperationsIgnored(long generateNumberOfOperationsIgnored) { + Utils.checkNotNull(generateNumberOfOperationsIgnored, "generateNumberOfOperationsIgnored"); + this.generateNumberOfOperationsIgnored = Optional.ofNullable(generateNumberOfOperationsIgnored); + return this; + } + + /** + * The number of operations ignored in generation. + */ + public CliEvent withGenerateNumberOfOperationsIgnored(Optional generateNumberOfOperationsIgnored) { + Utils.checkNotNull(generateNumberOfOperationsIgnored, "generateNumberOfOperationsIgnored"); + this.generateNumberOfOperationsIgnored = generateNumberOfOperationsIgnored; + return this; + } + + /** + * The number of operations used in generation. + */ + public CliEvent withGenerateNumberOfOperationsUsed(long generateNumberOfOperationsUsed) { + Utils.checkNotNull(generateNumberOfOperationsUsed, "generateNumberOfOperationsUsed"); + this.generateNumberOfOperationsUsed = Optional.ofNullable(generateNumberOfOperationsUsed); + return this; + } + + /** + * The number of operations used in generation. + */ + public CliEvent withGenerateNumberOfOperationsUsed(Optional generateNumberOfOperationsUsed) { + Utils.checkNotNull(generateNumberOfOperationsUsed, "generateNumberOfOperationsUsed"); + this.generateNumberOfOperationsUsed = generateNumberOfOperationsUsed; + return this; + } + + /** + * Indicates whether tests were output. + */ + public CliEvent withGenerateOutputTests(boolean generateOutputTests) { + Utils.checkNotNull(generateOutputTests, "generateOutputTests"); + this.generateOutputTests = Optional.ofNullable(generateOutputTests); + return this; + } + + /** + * Indicates whether tests were output. + */ + public CliEvent withGenerateOutputTests(Optional generateOutputTests) { + Utils.checkNotNull(generateOutputTests, "generateOutputTests"); + this.generateOutputTests = generateOutputTests; + return this; + } + + /** + * Indicates whether the target was considered published. + */ + public CliEvent withGeneratePublished(boolean generatePublished) { + Utils.checkNotNull(generatePublished, "generatePublished"); + this.generatePublished = Optional.ofNullable(generatePublished); + return this; + } + + /** + * Indicates whether the target was considered published. + */ + public CliEvent withGeneratePublished(Optional generatePublished) { + Utils.checkNotNull(generatePublished, "generatePublished"); + this.generatePublished = generatePublished; + return this; + } + + /** + * Expected Repo URL, for use in documentation generation. + */ + public CliEvent withGenerateRepoUrl(String generateRepoUrl) { + Utils.checkNotNull(generateRepoUrl, "generateRepoUrl"); + this.generateRepoUrl = Optional.ofNullable(generateRepoUrl); + return this; + } + + /** + * Expected Repo URL, for use in documentation generation. + */ + public CliEvent withGenerateRepoUrl(Optional generateRepoUrl) { + Utils.checkNotNull(generateRepoUrl, "generateRepoUrl"); + this.generateRepoUrl = generateRepoUrl; + return this; + } + + /** + * The target of the event. + */ + public CliEvent withGenerateTarget(String generateTarget) { + Utils.checkNotNull(generateTarget, "generateTarget"); + this.generateTarget = Optional.ofNullable(generateTarget); + return this; + } + + /** + * The target of the event. + */ + public CliEvent withGenerateTarget(Optional generateTarget) { + Utils.checkNotNull(generateTarget, "generateTarget"); + this.generateTarget = generateTarget; + return this; + } + + /** + * The workflow name of the target. + */ + public CliEvent withGenerateTargetName(String generateTargetName) { + Utils.checkNotNull(generateTargetName, "generateTargetName"); + this.generateTargetName = Optional.ofNullable(generateTargetName); + return this; + } + + /** + * The workflow name of the target. + */ + public CliEvent withGenerateTargetName(Optional generateTargetName) { + Utils.checkNotNull(generateTargetName, "generateTargetName"); + this.generateTargetName = generateTargetName; + return this; + } + + /** + * The version of the target. + */ + public CliEvent withGenerateTargetVersion(String generateTargetVersion) { + Utils.checkNotNull(generateTargetVersion, "generateTargetVersion"); + this.generateTargetVersion = Optional.ofNullable(generateTargetVersion); + return this; + } + + /** + * The version of the target. + */ + public CliEvent withGenerateTargetVersion(Optional generateTargetVersion) { + Utils.checkNotNull(generateTargetVersion, "generateTargetVersion"); + this.generateTargetVersion = generateTargetVersion; + return this; + } + + /** + * Version of the generation logic used. + */ + public CliEvent withGenerateVersion(String generateVersion) { + Utils.checkNotNull(generateVersion, "generateVersion"); + this.generateVersion = Optional.ofNullable(generateVersion); + return this; + } + + /** + * Version of the generation logic used. + */ + public CliEvent withGenerateVersion(Optional generateVersion) { + Utils.checkNotNull(generateVersion, "generateVersion"); + this.generateVersion = generateVersion; + return this; + } + + /** + * GitHub organization of the action. + */ + public CliEvent withGhActionOrganization(String ghActionOrganization) { + Utils.checkNotNull(ghActionOrganization, "ghActionOrganization"); + this.ghActionOrganization = Optional.ofNullable(ghActionOrganization); + return this; + } + + /** + * GitHub organization of the action. + */ + public CliEvent withGhActionOrganization(Optional ghActionOrganization) { + Utils.checkNotNull(ghActionOrganization, "ghActionOrganization"); + this.ghActionOrganization = ghActionOrganization; + return this; + } + + /** + * GitHub Action ref value. + */ + public CliEvent withGhActionRef(String ghActionRef) { + Utils.checkNotNull(ghActionRef, "ghActionRef"); + this.ghActionRef = Optional.ofNullable(ghActionRef); + return this; + } + + /** + * GitHub Action ref value. + */ + public CliEvent withGhActionRef(Optional ghActionRef) { + Utils.checkNotNull(ghActionRef, "ghActionRef"); + this.ghActionRef = ghActionRef; + return this; + } + + /** + * GitHub repository of the action. + */ + public CliEvent withGhActionRepository(String ghActionRepository) { + Utils.checkNotNull(ghActionRepository, "ghActionRepository"); + this.ghActionRepository = Optional.ofNullable(ghActionRepository); + return this; + } + + /** + * GitHub repository of the action. + */ + public CliEvent withGhActionRepository(Optional ghActionRepository) { + Utils.checkNotNull(ghActionRepository, "ghActionRepository"); + this.ghActionRepository = ghActionRepository; + return this; + } + + /** + * Link to the GitHub action run. + */ + public CliEvent withGhActionRunLink(String ghActionRunLink) { + Utils.checkNotNull(ghActionRunLink, "ghActionRunLink"); + this.ghActionRunLink = Optional.ofNullable(ghActionRunLink); + return this; + } + + /** + * Link to the GitHub action run. + */ + public CliEvent withGhActionRunLink(Optional ghActionRunLink) { + Utils.checkNotNull(ghActionRunLink, "ghActionRunLink"); + this.ghActionRunLink = ghActionRunLink; + return this; + } + + /** + * Version of the GitHub action. + */ + public CliEvent withGhActionVersion(String ghActionVersion) { + Utils.checkNotNull(ghActionVersion, "ghActionVersion"); + this.ghActionVersion = Optional.ofNullable(ghActionVersion); + return this; + } + + /** + * Version of the GitHub action. + */ + public CliEvent withGhActionVersion(Optional ghActionVersion) { + Utils.checkNotNull(ghActionVersion, "ghActionVersion"); + this.ghActionVersion = ghActionVersion; + return this; + } + + /** + * Current working directory relative to the git root. + */ + public CliEvent withGitRelativeCwd(String gitRelativeCwd) { + Utils.checkNotNull(gitRelativeCwd, "gitRelativeCwd"); + this.gitRelativeCwd = Optional.ofNullable(gitRelativeCwd); + return this; + } + + /** + * Current working directory relative to the git root. + */ + public CliEvent withGitRelativeCwd(Optional gitRelativeCwd) { + Utils.checkNotNull(gitRelativeCwd, "gitRelativeCwd"); + this.gitRelativeCwd = gitRelativeCwd; + return this; + } + + /** + * Default owner for git remote. + */ + public CliEvent withGitRemoteDefaultOwner(String gitRemoteDefaultOwner) { + Utils.checkNotNull(gitRemoteDefaultOwner, "gitRemoteDefaultOwner"); + this.gitRemoteDefaultOwner = Optional.ofNullable(gitRemoteDefaultOwner); + return this; + } + + /** + * Default owner for git remote. + */ + public CliEvent withGitRemoteDefaultOwner(Optional gitRemoteDefaultOwner) { + Utils.checkNotNull(gitRemoteDefaultOwner, "gitRemoteDefaultOwner"); + this.gitRemoteDefaultOwner = gitRemoteDefaultOwner; + return this; + } + + /** + * Default repository name for git remote. + */ + public CliEvent withGitRemoteDefaultRepo(String gitRemoteDefaultRepo) { + Utils.checkNotNull(gitRemoteDefaultRepo, "gitRemoteDefaultRepo"); + this.gitRemoteDefaultRepo = Optional.ofNullable(gitRemoteDefaultRepo); + return this; + } + + /** + * Default repository name for git remote. + */ + public CliEvent withGitRemoteDefaultRepo(Optional gitRemoteDefaultRepo) { + Utils.checkNotNull(gitRemoteDefaultRepo, "gitRemoteDefaultRepo"); + this.gitRemoteDefaultRepo = gitRemoteDefaultRepo; + return this; + } + + /** + * User email from git configuration. + */ + public CliEvent withGitUserEmail(String gitUserEmail) { + Utils.checkNotNull(gitUserEmail, "gitUserEmail"); + this.gitUserEmail = Optional.ofNullable(gitUserEmail); + return this; + } + + /** + * User email from git configuration. + */ + public CliEvent withGitUserEmail(Optional gitUserEmail) { + Utils.checkNotNull(gitUserEmail, "gitUserEmail"); + this.gitUserEmail = gitUserEmail; + return this; + } + + /** + * User's name from git configuration. (not GitHub username) + */ + public CliEvent withGitUserName(String gitUserName) { + Utils.checkNotNull(gitUserName, "gitUserName"); + this.gitUserName = Optional.ofNullable(gitUserName); + return this; + } + + /** + * User's name from git configuration. (not GitHub username) + */ + public CliEvent withGitUserName(Optional gitUserName) { + Utils.checkNotNull(gitUserName, "gitUserName"); + this.gitUserName = gitUserName; + return this; + } + + /** + * Remote hostname. + */ + public CliEvent withHostname(String hostname) { + Utils.checkNotNull(hostname, "hostname"); + this.hostname = Optional.ofNullable(hostname); + return this; + } + + /** + * Remote hostname. + */ + public CliEvent withHostname(Optional hostname) { + Utils.checkNotNull(hostname, "hostname"); + this.hostname = hostname; + return this; + } + + /** + * Unique identifier for each event. + */ + public CliEvent withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Type of interaction. + */ + public CliEvent withInteractionType(InteractionType interactionType) { + Utils.checkNotNull(interactionType, "interactionType"); + this.interactionType = interactionType; + return this; + } + + /** + * The last step of the event. + */ + public CliEvent withLastStep(String lastStep) { + Utils.checkNotNull(lastStep, "lastStep"); + this.lastStep = Optional.ofNullable(lastStep); + return this; + } + + /** + * The last step of the event. + */ + public CliEvent withLastStep(Optional lastStep) { + Utils.checkNotNull(lastStep, "lastStep"); + this.lastStep = lastStep; + return this; + } + + /** + * The checksum of the lint report. + */ + public CliEvent withLintReportDigest(String lintReportDigest) { + Utils.checkNotNull(lintReportDigest, "lintReportDigest"); + this.lintReportDigest = Optional.ofNullable(lintReportDigest); + return this; + } + + /** + * The checksum of the lint report. + */ + public CliEvent withLintReportDigest(Optional lintReportDigest) { + Utils.checkNotNull(lintReportDigest, "lintReportDigest"); + this.lintReportDigest = lintReportDigest; + return this; + } + + /** + * The number of errors in the lint report. + */ + public CliEvent withLintReportErrorCount(long lintReportErrorCount) { + Utils.checkNotNull(lintReportErrorCount, "lintReportErrorCount"); + this.lintReportErrorCount = Optional.ofNullable(lintReportErrorCount); + return this; + } + + /** + * The number of errors in the lint report. + */ + public CliEvent withLintReportErrorCount(Optional lintReportErrorCount) { + Utils.checkNotNull(lintReportErrorCount, "lintReportErrorCount"); + this.lintReportErrorCount = lintReportErrorCount; + return this; + } + + /** + * The number of info messages in the lint report. + */ + public CliEvent withLintReportInfoCount(long lintReportInfoCount) { + Utils.checkNotNull(lintReportInfoCount, "lintReportInfoCount"); + this.lintReportInfoCount = Optional.ofNullable(lintReportInfoCount); + return this; + } + + /** + * The number of info messages in the lint report. + */ + public CliEvent withLintReportInfoCount(Optional lintReportInfoCount) { + Utils.checkNotNull(lintReportInfoCount, "lintReportInfoCount"); + this.lintReportInfoCount = lintReportInfoCount; + return this; + } + + /** + * The number of warnings in the lint report. + */ + public CliEvent withLintReportWarningCount(long lintReportWarningCount) { + Utils.checkNotNull(lintReportWarningCount, "lintReportWarningCount"); + this.lintReportWarningCount = Optional.ofNullable(lintReportWarningCount); + return this; + } + + /** + * The number of warnings in the lint report. + */ + public CliEvent withLintReportWarningCount(Optional lintReportWarningCount) { + Utils.checkNotNull(lintReportWarningCount, "lintReportWarningCount"); + this.lintReportWarningCount = lintReportWarningCount; + return this; + } + + /** + * Timestamp when the event completed, in local time. + */ + public CliEvent withLocalCompletedAt(OffsetDateTime localCompletedAt) { + Utils.checkNotNull(localCompletedAt, "localCompletedAt"); + this.localCompletedAt = Optional.ofNullable(localCompletedAt); + return this; + } + + /** + * Timestamp when the event completed, in local time. + */ + public CliEvent withLocalCompletedAt(Optional localCompletedAt) { + Utils.checkNotNull(localCompletedAt, "localCompletedAt"); + this.localCompletedAt = localCompletedAt; + return this; + } + + /** + * Timestamp when the event started, in local time. + */ + public CliEvent withLocalStartedAt(OffsetDateTime localStartedAt) { + Utils.checkNotNull(localStartedAt, "localStartedAt"); + this.localStartedAt = localStartedAt; + return this; + } + + /** + * Checksum of the currently Rendered OpenAPI document. + */ + public CliEvent withManagementDocChecksum(String managementDocChecksum) { + Utils.checkNotNull(managementDocChecksum, "managementDocChecksum"); + this.managementDocChecksum = Optional.ofNullable(managementDocChecksum); + return this; + } + + /** + * Checksum of the currently Rendered OpenAPI document. + */ + public CliEvent withManagementDocChecksum(Optional managementDocChecksum) { + Utils.checkNotNull(managementDocChecksum, "managementDocChecksum"); + this.managementDocChecksum = managementDocChecksum; + return this; + } + + /** + * Version taken from info.version field of the Rendered OpenAPI document. + */ + public CliEvent withManagementDocVersion(String managementDocVersion) { + Utils.checkNotNull(managementDocVersion, "managementDocVersion"); + this.managementDocVersion = Optional.ofNullable(managementDocVersion); + return this; + } + + /** + * Version taken from info.version field of the Rendered OpenAPI document. + */ + public CliEvent withManagementDocVersion(Optional managementDocVersion) { + Utils.checkNotNull(managementDocVersion, "managementDocVersion"); + this.managementDocVersion = managementDocVersion; + return this; + } + + /** + * Mermaid diagram + */ + public CliEvent withMermaidDiagram(String mermaidDiagram) { + Utils.checkNotNull(mermaidDiagram, "mermaidDiagram"); + this.mermaidDiagram = Optional.ofNullable(mermaidDiagram); + return this; + } + + /** + * Mermaid diagram + */ + public CliEvent withMermaidDiagram(Optional mermaidDiagram) { + Utils.checkNotNull(mermaidDiagram, "mermaidDiagram"); + this.mermaidDiagram = mermaidDiagram; + return this; + } + + /** + * The blob digest of the base source. + */ + public CliEvent withOpenapiDiffBaseSourceBlobDigest(String openapiDiffBaseSourceBlobDigest) { + Utils.checkNotNull(openapiDiffBaseSourceBlobDigest, "openapiDiffBaseSourceBlobDigest"); + this.openapiDiffBaseSourceBlobDigest = Optional.ofNullable(openapiDiffBaseSourceBlobDigest); + return this; + } + + /** + * The blob digest of the base source. + */ + public CliEvent withOpenapiDiffBaseSourceBlobDigest(Optional openapiDiffBaseSourceBlobDigest) { + Utils.checkNotNull(openapiDiffBaseSourceBlobDigest, "openapiDiffBaseSourceBlobDigest"); + this.openapiDiffBaseSourceBlobDigest = openapiDiffBaseSourceBlobDigest; + return this; + } + + /** + * The namespace name of the base source. + */ + public CliEvent withOpenapiDiffBaseSourceNamespaceName(String openapiDiffBaseSourceNamespaceName) { + Utils.checkNotNull(openapiDiffBaseSourceNamespaceName, "openapiDiffBaseSourceNamespaceName"); + this.openapiDiffBaseSourceNamespaceName = Optional.ofNullable(openapiDiffBaseSourceNamespaceName); + return this; + } + + /** + * The namespace name of the base source. + */ + public CliEvent withOpenapiDiffBaseSourceNamespaceName(Optional openapiDiffBaseSourceNamespaceName) { + Utils.checkNotNull(openapiDiffBaseSourceNamespaceName, "openapiDiffBaseSourceNamespaceName"); + this.openapiDiffBaseSourceNamespaceName = openapiDiffBaseSourceNamespaceName; + return this; + } + + /** + * The revision digest of the base source. + */ + public CliEvent withOpenapiDiffBaseSourceRevisionDigest(String openapiDiffBaseSourceRevisionDigest) { + Utils.checkNotNull(openapiDiffBaseSourceRevisionDigest, "openapiDiffBaseSourceRevisionDigest"); + this.openapiDiffBaseSourceRevisionDigest = Optional.ofNullable(openapiDiffBaseSourceRevisionDigest); + return this; + } + + /** + * The revision digest of the base source. + */ + public CliEvent withOpenapiDiffBaseSourceRevisionDigest(Optional openapiDiffBaseSourceRevisionDigest) { + Utils.checkNotNull(openapiDiffBaseSourceRevisionDigest, "openapiDiffBaseSourceRevisionDigest"); + this.openapiDiffBaseSourceRevisionDigest = openapiDiffBaseSourceRevisionDigest; + return this; + } + + /** + * The number of breaking changes in the openapi diff report. + */ + public CliEvent withOpenapiDiffBreakingChangesCount(long openapiDiffBreakingChangesCount) { + Utils.checkNotNull(openapiDiffBreakingChangesCount, "openapiDiffBreakingChangesCount"); + this.openapiDiffBreakingChangesCount = Optional.ofNullable(openapiDiffBreakingChangesCount); + return this; + } + + /** + * The number of breaking changes in the openapi diff report. + */ + public CliEvent withOpenapiDiffBreakingChangesCount(Optional openapiDiffBreakingChangesCount) { + Utils.checkNotNull(openapiDiffBreakingChangesCount, "openapiDiffBreakingChangesCount"); + this.openapiDiffBreakingChangesCount = openapiDiffBreakingChangesCount; + return this; + } + + /** + * Bump type of the lock file (calculated semver delta, or a custom change (manual release)) + */ + public CliEvent withOpenapiDiffBumpType(OpenapiDiffBumpType openapiDiffBumpType) { + Utils.checkNotNull(openapiDiffBumpType, "openapiDiffBumpType"); + this.openapiDiffBumpType = Optional.ofNullable(openapiDiffBumpType); + return this; + } + + /** + * Bump type of the lock file (calculated semver delta, or a custom change (manual release)) + */ + public CliEvent withOpenapiDiffBumpType(Optional openapiDiffBumpType) { + Utils.checkNotNull(openapiDiffBumpType, "openapiDiffBumpType"); + this.openapiDiffBumpType = openapiDiffBumpType; + return this; + } + + /** + * The checksum of the openapi diff report. + */ + public CliEvent withOpenapiDiffReportDigest(String openapiDiffReportDigest) { + Utils.checkNotNull(openapiDiffReportDigest, "openapiDiffReportDigest"); + this.openapiDiffReportDigest = Optional.ofNullable(openapiDiffReportDigest); + return this; + } + + /** + * The checksum of the openapi diff report. + */ + public CliEvent withOpenapiDiffReportDigest(Optional openapiDiffReportDigest) { + Utils.checkNotNull(openapiDiffReportDigest, "openapiDiffReportDigest"); + this.openapiDiffReportDigest = openapiDiffReportDigest; + return this; + } + + /** + * Name of the published package. + */ + public CliEvent withPublishPackageName(String publishPackageName) { + Utils.checkNotNull(publishPackageName, "publishPackageName"); + this.publishPackageName = Optional.ofNullable(publishPackageName); + return this; + } + + /** + * Name of the published package. + */ + public CliEvent withPublishPackageName(Optional publishPackageName) { + Utils.checkNotNull(publishPackageName, "publishPackageName"); + this.publishPackageName = publishPackageName; + return this; + } + + /** + * Name of the registry where the package was published. + */ + public CliEvent withPublishPackageRegistryName(String publishPackageRegistryName) { + Utils.checkNotNull(publishPackageRegistryName, "publishPackageRegistryName"); + this.publishPackageRegistryName = Optional.ofNullable(publishPackageRegistryName); + return this; + } + + /** + * Name of the registry where the package was published. + */ + public CliEvent withPublishPackageRegistryName(Optional publishPackageRegistryName) { + Utils.checkNotNull(publishPackageRegistryName, "publishPackageRegistryName"); + this.publishPackageRegistryName = publishPackageRegistryName; + return this; + } + + /** + * URL of the published package. + */ + public CliEvent withPublishPackageUrl(String publishPackageUrl) { + Utils.checkNotNull(publishPackageUrl, "publishPackageUrl"); + this.publishPackageUrl = Optional.ofNullable(publishPackageUrl); + return this; + } + + /** + * URL of the published package. + */ + public CliEvent withPublishPackageUrl(Optional publishPackageUrl) { + Utils.checkNotNull(publishPackageUrl, "publishPackageUrl"); + this.publishPackageUrl = publishPackageUrl; + return this; + } + + /** + * Version of the published package. + */ + public CliEvent withPublishPackageVersion(String publishPackageVersion) { + Utils.checkNotNull(publishPackageVersion, "publishPackageVersion"); + this.publishPackageVersion = Optional.ofNullable(publishPackageVersion); + return this; + } + + /** + * Version of the published package. + */ + public CliEvent withPublishPackageVersion(Optional publishPackageVersion) { + Utils.checkNotNull(publishPackageVersion, "publishPackageVersion"); + this.publishPackageVersion = publishPackageVersion; + return this; + } + + /** + * Full CLI command. + */ + public CliEvent withRawCommand(String rawCommand) { + Utils.checkNotNull(rawCommand, "rawCommand"); + this.rawCommand = Optional.ofNullable(rawCommand); + return this; + } + + /** + * Full CLI command. + */ + public CliEvent withRawCommand(Optional rawCommand) { + Utils.checkNotNull(rawCommand, "rawCommand"); + this.rawCommand = rawCommand; + return this; + } + + /** + * Label of the git repository. + */ + public CliEvent withRepoLabel(String repoLabel) { + Utils.checkNotNull(repoLabel, "repoLabel"); + this.repoLabel = Optional.ofNullable(repoLabel); + return this; + } + + /** + * Label of the git repository. + */ + public CliEvent withRepoLabel(Optional repoLabel) { + Utils.checkNotNull(repoLabel, "repoLabel"); + this.repoLabel = repoLabel; + return this; + } + + /** + * The blob digest of the source. + */ + public CliEvent withSourceBlobDigest(String sourceBlobDigest) { + Utils.checkNotNull(sourceBlobDigest, "sourceBlobDigest"); + this.sourceBlobDigest = Optional.ofNullable(sourceBlobDigest); + return this; + } + + /** + * The blob digest of the source. + */ + public CliEvent withSourceBlobDigest(Optional sourceBlobDigest) { + Utils.checkNotNull(sourceBlobDigest, "sourceBlobDigest"); + this.sourceBlobDigest = sourceBlobDigest; + return this; + } + + /** + * The namespace name of the source. + */ + public CliEvent withSourceNamespaceName(String sourceNamespaceName) { + Utils.checkNotNull(sourceNamespaceName, "sourceNamespaceName"); + this.sourceNamespaceName = Optional.ofNullable(sourceNamespaceName); + return this; + } + + /** + * The namespace name of the source. + */ + public CliEvent withSourceNamespaceName(Optional sourceNamespaceName) { + Utils.checkNotNull(sourceNamespaceName, "sourceNamespaceName"); + this.sourceNamespaceName = sourceNamespaceName; + return this; + } + + /** + * The revision digest of the source. + */ + public CliEvent withSourceRevisionDigest(String sourceRevisionDigest) { + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + this.sourceRevisionDigest = Optional.ofNullable(sourceRevisionDigest); + return this; + } + + /** + * The revision digest of the source. + */ + public CliEvent withSourceRevisionDigest(Optional sourceRevisionDigest) { + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + this.sourceRevisionDigest = sourceRevisionDigest; + return this; + } + + /** + * Identifier of the Speakeasy API key. + */ + public CliEvent withSpeakeasyApiKeyName(String speakeasyApiKeyName) { + Utils.checkNotNull(speakeasyApiKeyName, "speakeasyApiKeyName"); + this.speakeasyApiKeyName = speakeasyApiKeyName; + return this; + } + + /** + * Version of the Speakeasy CLI. + */ + public CliEvent withSpeakeasyVersion(String speakeasyVersion) { + Utils.checkNotNull(speakeasyVersion, "speakeasyVersion"); + this.speakeasyVersion = speakeasyVersion; + return this; + } + + /** + * Indicates whether the event was successful. + */ + public CliEvent withSuccess(boolean success) { + Utils.checkNotNull(success, "success"); + this.success = success; + return this; + } + + /** + * Workflow lock file (post execution) + */ + public CliEvent withWorkflowLockPostRaw(String workflowLockPostRaw) { + Utils.checkNotNull(workflowLockPostRaw, "workflowLockPostRaw"); + this.workflowLockPostRaw = Optional.ofNullable(workflowLockPostRaw); + return this; + } + + /** + * Workflow lock file (post execution) + */ + public CliEvent withWorkflowLockPostRaw(Optional workflowLockPostRaw) { + Utils.checkNotNull(workflowLockPostRaw, "workflowLockPostRaw"); + this.workflowLockPostRaw = workflowLockPostRaw; + return this; + } + + /** + * Workflow lock file (prior to execution) + */ + public CliEvent withWorkflowLockPreRaw(String workflowLockPreRaw) { + Utils.checkNotNull(workflowLockPreRaw, "workflowLockPreRaw"); + this.workflowLockPreRaw = Optional.ofNullable(workflowLockPreRaw); + return this; + } + + /** + * Workflow lock file (prior to execution) + */ + public CliEvent withWorkflowLockPreRaw(Optional workflowLockPreRaw) { + Utils.checkNotNull(workflowLockPreRaw, "workflowLockPreRaw"); + this.workflowLockPreRaw = workflowLockPreRaw; + return this; + } + + /** + * Workflow file (post execution) + */ + public CliEvent withWorkflowPostRaw(String workflowPostRaw) { + Utils.checkNotNull(workflowPostRaw, "workflowPostRaw"); + this.workflowPostRaw = Optional.ofNullable(workflowPostRaw); + return this; + } + + /** + * Workflow file (post execution) + */ + public CliEvent withWorkflowPostRaw(Optional workflowPostRaw) { + Utils.checkNotNull(workflowPostRaw, "workflowPostRaw"); + this.workflowPostRaw = workflowPostRaw; + return this; + } + + /** + * Workflow file (prior to execution) + */ + public CliEvent withWorkflowPreRaw(String workflowPreRaw) { + Utils.checkNotNull(workflowPreRaw, "workflowPreRaw"); + this.workflowPreRaw = Optional.ofNullable(workflowPreRaw); + return this; + } + + /** + * Workflow file (prior to execution) + */ + public CliEvent withWorkflowPreRaw(Optional workflowPreRaw) { + Utils.checkNotNull(workflowPreRaw, "workflowPreRaw"); + this.workflowPreRaw = workflowPreRaw; + return this; + } + + /** + * Identifier of the workspace. + */ + public CliEvent withWorkspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CliEvent other = (CliEvent) o; + return + Objects.deepEquals(this.commitHead, other.commitHead) && + Objects.deepEquals(this.continuousIntegrationEnvironment, other.continuousIntegrationEnvironment) && + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.durationMs, other.durationMs) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.executionId, other.executionId) && + Objects.deepEquals(this.generateBumpType, other.generateBumpType) && + Objects.deepEquals(this.generateConfigPostChecksum, other.generateConfigPostChecksum) && + Objects.deepEquals(this.generateConfigPostRaw, other.generateConfigPostRaw) && + Objects.deepEquals(this.generateConfigPostVersion, other.generateConfigPostVersion) && + Objects.deepEquals(this.generateConfigPreChecksum, other.generateConfigPreChecksum) && + Objects.deepEquals(this.generateConfigPreRaw, other.generateConfigPreRaw) && + Objects.deepEquals(this.generateConfigPreVersion, other.generateConfigPreVersion) && + Objects.deepEquals(this.generateEligibleFeatures, other.generateEligibleFeatures) && + Objects.deepEquals(this.generateGenLockId, other.generateGenLockId) && + Objects.deepEquals(this.generateGenLockPostFeatures, other.generateGenLockPostFeatures) && + Objects.deepEquals(this.generateGenLockPreBlobDigest, other.generateGenLockPreBlobDigest) && + Objects.deepEquals(this.generateGenLockPreDocChecksum, other.generateGenLockPreDocChecksum) && + Objects.deepEquals(this.generateGenLockPreDocVersion, other.generateGenLockPreDocVersion) && + Objects.deepEquals(this.generateGenLockPreFeatures, other.generateGenLockPreFeatures) && + Objects.deepEquals(this.generateGenLockPreNamespaceName, other.generateGenLockPreNamespaceName) && + Objects.deepEquals(this.generateGenLockPreRevisionDigest, other.generateGenLockPreRevisionDigest) && + Objects.deepEquals(this.generateGenLockPreVersion, other.generateGenLockPreVersion) && + Objects.deepEquals(this.generateNumberOfOperationsIgnored, other.generateNumberOfOperationsIgnored) && + Objects.deepEquals(this.generateNumberOfOperationsUsed, other.generateNumberOfOperationsUsed) && + Objects.deepEquals(this.generateOutputTests, other.generateOutputTests) && + Objects.deepEquals(this.generatePublished, other.generatePublished) && + Objects.deepEquals(this.generateRepoUrl, other.generateRepoUrl) && + Objects.deepEquals(this.generateTarget, other.generateTarget) && + Objects.deepEquals(this.generateTargetName, other.generateTargetName) && + Objects.deepEquals(this.generateTargetVersion, other.generateTargetVersion) && + Objects.deepEquals(this.generateVersion, other.generateVersion) && + Objects.deepEquals(this.ghActionOrganization, other.ghActionOrganization) && + Objects.deepEquals(this.ghActionRef, other.ghActionRef) && + Objects.deepEquals(this.ghActionRepository, other.ghActionRepository) && + Objects.deepEquals(this.ghActionRunLink, other.ghActionRunLink) && + Objects.deepEquals(this.ghActionVersion, other.ghActionVersion) && + Objects.deepEquals(this.gitRelativeCwd, other.gitRelativeCwd) && + Objects.deepEquals(this.gitRemoteDefaultOwner, other.gitRemoteDefaultOwner) && + Objects.deepEquals(this.gitRemoteDefaultRepo, other.gitRemoteDefaultRepo) && + Objects.deepEquals(this.gitUserEmail, other.gitUserEmail) && + Objects.deepEquals(this.gitUserName, other.gitUserName) && + Objects.deepEquals(this.hostname, other.hostname) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.interactionType, other.interactionType) && + Objects.deepEquals(this.lastStep, other.lastStep) && + Objects.deepEquals(this.lintReportDigest, other.lintReportDigest) && + Objects.deepEquals(this.lintReportErrorCount, other.lintReportErrorCount) && + Objects.deepEquals(this.lintReportInfoCount, other.lintReportInfoCount) && + Objects.deepEquals(this.lintReportWarningCount, other.lintReportWarningCount) && + Objects.deepEquals(this.localCompletedAt, other.localCompletedAt) && + Objects.deepEquals(this.localStartedAt, other.localStartedAt) && + Objects.deepEquals(this.managementDocChecksum, other.managementDocChecksum) && + Objects.deepEquals(this.managementDocVersion, other.managementDocVersion) && + Objects.deepEquals(this.mermaidDiagram, other.mermaidDiagram) && + Objects.deepEquals(this.openapiDiffBaseSourceBlobDigest, other.openapiDiffBaseSourceBlobDigest) && + Objects.deepEquals(this.openapiDiffBaseSourceNamespaceName, other.openapiDiffBaseSourceNamespaceName) && + Objects.deepEquals(this.openapiDiffBaseSourceRevisionDigest, other.openapiDiffBaseSourceRevisionDigest) && + Objects.deepEquals(this.openapiDiffBreakingChangesCount, other.openapiDiffBreakingChangesCount) && + Objects.deepEquals(this.openapiDiffBumpType, other.openapiDiffBumpType) && + Objects.deepEquals(this.openapiDiffReportDigest, other.openapiDiffReportDigest) && + Objects.deepEquals(this.publishPackageName, other.publishPackageName) && + Objects.deepEquals(this.publishPackageRegistryName, other.publishPackageRegistryName) && + Objects.deepEquals(this.publishPackageUrl, other.publishPackageUrl) && + Objects.deepEquals(this.publishPackageVersion, other.publishPackageVersion) && + Objects.deepEquals(this.rawCommand, other.rawCommand) && + Objects.deepEquals(this.repoLabel, other.repoLabel) && + Objects.deepEquals(this.sourceBlobDigest, other.sourceBlobDigest) && + Objects.deepEquals(this.sourceNamespaceName, other.sourceNamespaceName) && + Objects.deepEquals(this.sourceRevisionDigest, other.sourceRevisionDigest) && + Objects.deepEquals(this.speakeasyApiKeyName, other.speakeasyApiKeyName) && + Objects.deepEquals(this.speakeasyVersion, other.speakeasyVersion) && + Objects.deepEquals(this.success, other.success) && + Objects.deepEquals(this.workflowLockPostRaw, other.workflowLockPostRaw) && + Objects.deepEquals(this.workflowLockPreRaw, other.workflowLockPreRaw) && + Objects.deepEquals(this.workflowPostRaw, other.workflowPostRaw) && + Objects.deepEquals(this.workflowPreRaw, other.workflowPreRaw) && + Objects.deepEquals(this.workspaceId, other.workspaceId); + } + + @Override + public int hashCode() { + return Objects.hash( + commitHead, + continuousIntegrationEnvironment, + createdAt, + durationMs, + error, + executionId, + generateBumpType, + generateConfigPostChecksum, + generateConfigPostRaw, + generateConfigPostVersion, + generateConfigPreChecksum, + generateConfigPreRaw, + generateConfigPreVersion, + generateEligibleFeatures, + generateGenLockId, + generateGenLockPostFeatures, + generateGenLockPreBlobDigest, + generateGenLockPreDocChecksum, + generateGenLockPreDocVersion, + generateGenLockPreFeatures, + generateGenLockPreNamespaceName, + generateGenLockPreRevisionDigest, + generateGenLockPreVersion, + generateNumberOfOperationsIgnored, + generateNumberOfOperationsUsed, + generateOutputTests, + generatePublished, + generateRepoUrl, + generateTarget, + generateTargetName, + generateTargetVersion, + generateVersion, + ghActionOrganization, + ghActionRef, + ghActionRepository, + ghActionRunLink, + ghActionVersion, + gitRelativeCwd, + gitRemoteDefaultOwner, + gitRemoteDefaultRepo, + gitUserEmail, + gitUserName, + hostname, + id, + interactionType, + lastStep, + lintReportDigest, + lintReportErrorCount, + lintReportInfoCount, + lintReportWarningCount, + localCompletedAt, + localStartedAt, + managementDocChecksum, + managementDocVersion, + mermaidDiagram, + openapiDiffBaseSourceBlobDigest, + openapiDiffBaseSourceNamespaceName, + openapiDiffBaseSourceRevisionDigest, + openapiDiffBreakingChangesCount, + openapiDiffBumpType, + openapiDiffReportDigest, + publishPackageName, + publishPackageRegistryName, + publishPackageUrl, + publishPackageVersion, + rawCommand, + repoLabel, + sourceBlobDigest, + sourceNamespaceName, + sourceRevisionDigest, + speakeasyApiKeyName, + speakeasyVersion, + success, + workflowLockPostRaw, + workflowLockPreRaw, + workflowPostRaw, + workflowPreRaw, + workspaceId); + } + + @Override + public String toString() { + return Utils.toString(CliEvent.class, + "commitHead", commitHead, + "continuousIntegrationEnvironment", continuousIntegrationEnvironment, + "createdAt", createdAt, + "durationMs", durationMs, + "error", error, + "executionId", executionId, + "generateBumpType", generateBumpType, + "generateConfigPostChecksum", generateConfigPostChecksum, + "generateConfigPostRaw", generateConfigPostRaw, + "generateConfigPostVersion", generateConfigPostVersion, + "generateConfigPreChecksum", generateConfigPreChecksum, + "generateConfigPreRaw", generateConfigPreRaw, + "generateConfigPreVersion", generateConfigPreVersion, + "generateEligibleFeatures", generateEligibleFeatures, + "generateGenLockId", generateGenLockId, + "generateGenLockPostFeatures", generateGenLockPostFeatures, + "generateGenLockPreBlobDigest", generateGenLockPreBlobDigest, + "generateGenLockPreDocChecksum", generateGenLockPreDocChecksum, + "generateGenLockPreDocVersion", generateGenLockPreDocVersion, + "generateGenLockPreFeatures", generateGenLockPreFeatures, + "generateGenLockPreNamespaceName", generateGenLockPreNamespaceName, + "generateGenLockPreRevisionDigest", generateGenLockPreRevisionDigest, + "generateGenLockPreVersion", generateGenLockPreVersion, + "generateNumberOfOperationsIgnored", generateNumberOfOperationsIgnored, + "generateNumberOfOperationsUsed", generateNumberOfOperationsUsed, + "generateOutputTests", generateOutputTests, + "generatePublished", generatePublished, + "generateRepoUrl", generateRepoUrl, + "generateTarget", generateTarget, + "generateTargetName", generateTargetName, + "generateTargetVersion", generateTargetVersion, + "generateVersion", generateVersion, + "ghActionOrganization", ghActionOrganization, + "ghActionRef", ghActionRef, + "ghActionRepository", ghActionRepository, + "ghActionRunLink", ghActionRunLink, + "ghActionVersion", ghActionVersion, + "gitRelativeCwd", gitRelativeCwd, + "gitRemoteDefaultOwner", gitRemoteDefaultOwner, + "gitRemoteDefaultRepo", gitRemoteDefaultRepo, + "gitUserEmail", gitUserEmail, + "gitUserName", gitUserName, + "hostname", hostname, + "id", id, + "interactionType", interactionType, + "lastStep", lastStep, + "lintReportDigest", lintReportDigest, + "lintReportErrorCount", lintReportErrorCount, + "lintReportInfoCount", lintReportInfoCount, + "lintReportWarningCount", lintReportWarningCount, + "localCompletedAt", localCompletedAt, + "localStartedAt", localStartedAt, + "managementDocChecksum", managementDocChecksum, + "managementDocVersion", managementDocVersion, + "mermaidDiagram", mermaidDiagram, + "openapiDiffBaseSourceBlobDigest", openapiDiffBaseSourceBlobDigest, + "openapiDiffBaseSourceNamespaceName", openapiDiffBaseSourceNamespaceName, + "openapiDiffBaseSourceRevisionDigest", openapiDiffBaseSourceRevisionDigest, + "openapiDiffBreakingChangesCount", openapiDiffBreakingChangesCount, + "openapiDiffBumpType", openapiDiffBumpType, + "openapiDiffReportDigest", openapiDiffReportDigest, + "publishPackageName", publishPackageName, + "publishPackageRegistryName", publishPackageRegistryName, + "publishPackageUrl", publishPackageUrl, + "publishPackageVersion", publishPackageVersion, + "rawCommand", rawCommand, + "repoLabel", repoLabel, + "sourceBlobDigest", sourceBlobDigest, + "sourceNamespaceName", sourceNamespaceName, + "sourceRevisionDigest", sourceRevisionDigest, + "speakeasyApiKeyName", speakeasyApiKeyName, + "speakeasyVersion", speakeasyVersion, + "success", success, + "workflowLockPostRaw", workflowLockPostRaw, + "workflowLockPreRaw", workflowLockPreRaw, + "workflowPostRaw", workflowPostRaw, + "workflowPreRaw", workflowPreRaw, + "workspaceId", workspaceId); + } + + public final static class Builder { + + private Optional commitHead = Optional.empty(); + + private Optional continuousIntegrationEnvironment = Optional.empty(); + + private OffsetDateTime createdAt; + + private Optional durationMs = Optional.empty(); + + private Optional error = Optional.empty(); + + private String executionId; + + private Optional generateBumpType = Optional.empty(); + + private Optional generateConfigPostChecksum = Optional.empty(); + + private Optional generateConfigPostRaw = Optional.empty(); + + private Optional generateConfigPostVersion = Optional.empty(); + + private Optional generateConfigPreChecksum = Optional.empty(); + + private Optional generateConfigPreRaw = Optional.empty(); + + private Optional generateConfigPreVersion = Optional.empty(); + + private Optional generateEligibleFeatures = Optional.empty(); + + private Optional generateGenLockId = Optional.empty(); + + private Optional generateGenLockPostFeatures = Optional.empty(); + + private Optional generateGenLockPreBlobDigest = Optional.empty(); + + private Optional generateGenLockPreDocChecksum = Optional.empty(); + + private Optional generateGenLockPreDocVersion = Optional.empty(); + + private Optional generateGenLockPreFeatures = Optional.empty(); + + private Optional generateGenLockPreNamespaceName = Optional.empty(); + + private Optional generateGenLockPreRevisionDigest = Optional.empty(); + + private Optional generateGenLockPreVersion = Optional.empty(); + + private Optional generateNumberOfOperationsIgnored = Optional.empty(); + + private Optional generateNumberOfOperationsUsed = Optional.empty(); + + private Optional generateOutputTests = Optional.empty(); + + private Optional generatePublished = Optional.empty(); + + private Optional generateRepoUrl = Optional.empty(); + + private Optional generateTarget = Optional.empty(); + + private Optional generateTargetName = Optional.empty(); + + private Optional generateTargetVersion = Optional.empty(); + + private Optional generateVersion = Optional.empty(); + + private Optional ghActionOrganization = Optional.empty(); + + private Optional ghActionRef = Optional.empty(); + + private Optional ghActionRepository = Optional.empty(); + + private Optional ghActionRunLink = Optional.empty(); + + private Optional ghActionVersion = Optional.empty(); + + private Optional gitRelativeCwd = Optional.empty(); + + private Optional gitRemoteDefaultOwner = Optional.empty(); + + private Optional gitRemoteDefaultRepo = Optional.empty(); + + private Optional gitUserEmail = Optional.empty(); + + private Optional gitUserName = Optional.empty(); + + private Optional hostname = Optional.empty(); + + private String id; + + private InteractionType interactionType; + + private Optional lastStep = Optional.empty(); + + private Optional lintReportDigest = Optional.empty(); + + private Optional lintReportErrorCount = Optional.empty(); + + private Optional lintReportInfoCount = Optional.empty(); + + private Optional lintReportWarningCount = Optional.empty(); + + private Optional localCompletedAt = Optional.empty(); + + private OffsetDateTime localStartedAt; + + private Optional managementDocChecksum = Optional.empty(); + + private Optional managementDocVersion = Optional.empty(); + + private Optional mermaidDiagram = Optional.empty(); + + private Optional openapiDiffBaseSourceBlobDigest = Optional.empty(); + + private Optional openapiDiffBaseSourceNamespaceName = Optional.empty(); + + private Optional openapiDiffBaseSourceRevisionDigest = Optional.empty(); + + private Optional openapiDiffBreakingChangesCount = Optional.empty(); + + private Optional openapiDiffBumpType = Optional.empty(); + + private Optional openapiDiffReportDigest = Optional.empty(); + + private Optional publishPackageName = Optional.empty(); + + private Optional publishPackageRegistryName = Optional.empty(); + + private Optional publishPackageUrl = Optional.empty(); + + private Optional publishPackageVersion = Optional.empty(); + + private Optional rawCommand = Optional.empty(); + + private Optional repoLabel = Optional.empty(); + + private Optional sourceBlobDigest = Optional.empty(); + + private Optional sourceNamespaceName = Optional.empty(); + + private Optional sourceRevisionDigest = Optional.empty(); + + private String speakeasyApiKeyName; + + private String speakeasyVersion; + + private Boolean success; + + private Optional workflowLockPostRaw = Optional.empty(); + + private Optional workflowLockPreRaw = Optional.empty(); + + private Optional workflowPostRaw = Optional.empty(); + + private Optional workflowPreRaw = Optional.empty(); + + private String workspaceId; + + private Builder() { + // force use of static builder() method + } + + /** + * Remote commit ID. + */ + public Builder commitHead(String commitHead) { + Utils.checkNotNull(commitHead, "commitHead"); + this.commitHead = Optional.ofNullable(commitHead); + return this; + } + + /** + * Remote commit ID. + */ + public Builder commitHead(Optional commitHead) { + Utils.checkNotNull(commitHead, "commitHead"); + this.commitHead = commitHead; + return this; + } + + /** + * Name of the CI environment. + */ + public Builder continuousIntegrationEnvironment(String continuousIntegrationEnvironment) { + Utils.checkNotNull(continuousIntegrationEnvironment, "continuousIntegrationEnvironment"); + this.continuousIntegrationEnvironment = Optional.ofNullable(continuousIntegrationEnvironment); + return this; + } + + /** + * Name of the CI environment. + */ + public Builder continuousIntegrationEnvironment(Optional continuousIntegrationEnvironment) { + Utils.checkNotNull(continuousIntegrationEnvironment, "continuousIntegrationEnvironment"); + this.continuousIntegrationEnvironment = continuousIntegrationEnvironment; + return this; + } + + /** + * Timestamp when the event was created in the database. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * Duration of the event in milliseconds. + */ + public Builder durationMs(long durationMs) { + Utils.checkNotNull(durationMs, "durationMs"); + this.durationMs = Optional.ofNullable(durationMs); + return this; + } + + /** + * Duration of the event in milliseconds. + */ + public Builder durationMs(Optional durationMs) { + Utils.checkNotNull(durationMs, "durationMs"); + this.durationMs = durationMs; + return this; + } + + /** + * Error message if the event was not successful. + */ + public Builder error(String error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Error message if the event was not successful. + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * Unique identifier for each execution of the CLI. + */ + public Builder executionId(String executionId) { + Utils.checkNotNull(executionId, "executionId"); + this.executionId = executionId; + return this; + } + + /** + * Bump type of the lock file (calculated semver delta, custom change (manual release), or prerelease/graduate) + */ + public Builder generateBumpType(GenerateBumpType generateBumpType) { + Utils.checkNotNull(generateBumpType, "generateBumpType"); + this.generateBumpType = Optional.ofNullable(generateBumpType); + return this; + } + + /** + * Bump type of the lock file (calculated semver delta, custom change (manual release), or prerelease/graduate) + */ + public Builder generateBumpType(Optional generateBumpType) { + Utils.checkNotNull(generateBumpType, "generateBumpType"); + this.generateBumpType = generateBumpType; + return this; + } + + /** + * Checksum of the configuration file (post generation) + */ + public Builder generateConfigPostChecksum(String generateConfigPostChecksum) { + Utils.checkNotNull(generateConfigPostChecksum, "generateConfigPostChecksum"); + this.generateConfigPostChecksum = Optional.ofNullable(generateConfigPostChecksum); + return this; + } + + /** + * Checksum of the configuration file (post generation) + */ + public Builder generateConfigPostChecksum(Optional generateConfigPostChecksum) { + Utils.checkNotNull(generateConfigPostChecksum, "generateConfigPostChecksum"); + this.generateConfigPostChecksum = generateConfigPostChecksum; + return this; + } + + /** + * Rendered configuration file (post generation) + */ + public Builder generateConfigPostRaw(String generateConfigPostRaw) { + Utils.checkNotNull(generateConfigPostRaw, "generateConfigPostRaw"); + this.generateConfigPostRaw = Optional.ofNullable(generateConfigPostRaw); + return this; + } + + /** + * Rendered configuration file (post generation) + */ + public Builder generateConfigPostRaw(Optional generateConfigPostRaw) { + Utils.checkNotNull(generateConfigPostRaw, "generateConfigPostRaw"); + this.generateConfigPostRaw = generateConfigPostRaw; + return this; + } + + /** + * The version of the customer's SDK that we just generated + */ + public Builder generateConfigPostVersion(String generateConfigPostVersion) { + Utils.checkNotNull(generateConfigPostVersion, "generateConfigPostVersion"); + this.generateConfigPostVersion = Optional.ofNullable(generateConfigPostVersion); + return this; + } + + /** + * The version of the customer's SDK that we just generated + */ + public Builder generateConfigPostVersion(Optional generateConfigPostVersion) { + Utils.checkNotNull(generateConfigPostVersion, "generateConfigPostVersion"); + this.generateConfigPostVersion = generateConfigPostVersion; + return this; + } + + /** + * Checksum of the configuration file (prior to generation) + */ + public Builder generateConfigPreChecksum(String generateConfigPreChecksum) { + Utils.checkNotNull(generateConfigPreChecksum, "generateConfigPreChecksum"); + this.generateConfigPreChecksum = Optional.ofNullable(generateConfigPreChecksum); + return this; + } + + /** + * Checksum of the configuration file (prior to generation) + */ + public Builder generateConfigPreChecksum(Optional generateConfigPreChecksum) { + Utils.checkNotNull(generateConfigPreChecksum, "generateConfigPreChecksum"); + this.generateConfigPreChecksum = generateConfigPreChecksum; + return this; + } + + /** + * Rendered configuration file (prior to generation) + */ + public Builder generateConfigPreRaw(String generateConfigPreRaw) { + Utils.checkNotNull(generateConfigPreRaw, "generateConfigPreRaw"); + this.generateConfigPreRaw = Optional.ofNullable(generateConfigPreRaw); + return this; + } + + /** + * Rendered configuration file (prior to generation) + */ + public Builder generateConfigPreRaw(Optional generateConfigPreRaw) { + Utils.checkNotNull(generateConfigPreRaw, "generateConfigPreRaw"); + this.generateConfigPreRaw = generateConfigPreRaw; + return this; + } + + /** + * The version of the customer's SDK before we generated + */ + public Builder generateConfigPreVersion(String generateConfigPreVersion) { + Utils.checkNotNull(generateConfigPreVersion, "generateConfigPreVersion"); + this.generateConfigPreVersion = Optional.ofNullable(generateConfigPreVersion); + return this; + } + + /** + * The version of the customer's SDK before we generated + */ + public Builder generateConfigPreVersion(Optional generateConfigPreVersion) { + Utils.checkNotNull(generateConfigPreVersion, "generateConfigPreVersion"); + this.generateConfigPreVersion = generateConfigPreVersion; + return this; + } + + /** + * Eligible feature set during generation + */ + public Builder generateEligibleFeatures(String generateEligibleFeatures) { + Utils.checkNotNull(generateEligibleFeatures, "generateEligibleFeatures"); + this.generateEligibleFeatures = Optional.ofNullable(generateEligibleFeatures); + return this; + } + + /** + * Eligible feature set during generation + */ + public Builder generateEligibleFeatures(Optional generateEligibleFeatures) { + Utils.checkNotNull(generateEligibleFeatures, "generateEligibleFeatures"); + this.generateEligibleFeatures = generateEligibleFeatures; + return this; + } + + /** + * gen.lock ID (expected to be a uuid). + */ + public Builder generateGenLockId(String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = Optional.ofNullable(generateGenLockId); + return this; + } + + /** + * gen.lock ID (expected to be a uuid). + */ + public Builder generateGenLockId(Optional generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + return this; + } + + /** + * Features post generation + */ + public Builder generateGenLockPostFeatures(String generateGenLockPostFeatures) { + Utils.checkNotNull(generateGenLockPostFeatures, "generateGenLockPostFeatures"); + this.generateGenLockPostFeatures = Optional.ofNullable(generateGenLockPostFeatures); + return this; + } + + /** + * Features post generation + */ + public Builder generateGenLockPostFeatures(Optional generateGenLockPostFeatures) { + Utils.checkNotNull(generateGenLockPostFeatures, "generateGenLockPostFeatures"); + this.generateGenLockPostFeatures = generateGenLockPostFeatures; + return this; + } + + /** + * Blob digest of the Previous Generation + */ + public Builder generateGenLockPreBlobDigest(String generateGenLockPreBlobDigest) { + Utils.checkNotNull(generateGenLockPreBlobDigest, "generateGenLockPreBlobDigest"); + this.generateGenLockPreBlobDigest = Optional.ofNullable(generateGenLockPreBlobDigest); + return this; + } + + /** + * Blob digest of the Previous Generation + */ + public Builder generateGenLockPreBlobDigest(Optional generateGenLockPreBlobDigest) { + Utils.checkNotNull(generateGenLockPreBlobDigest, "generateGenLockPreBlobDigest"); + this.generateGenLockPreBlobDigest = generateGenLockPreBlobDigest; + return this; + } + + /** + * Checksum of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + */ + public Builder generateGenLockPreDocChecksum(String generateGenLockPreDocChecksum) { + Utils.checkNotNull(generateGenLockPreDocChecksum, "generateGenLockPreDocChecksum"); + this.generateGenLockPreDocChecksum = Optional.ofNullable(generateGenLockPreDocChecksum); + return this; + } + + /** + * Checksum of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + */ + public Builder generateGenLockPreDocChecksum(Optional generateGenLockPreDocChecksum) { + Utils.checkNotNull(generateGenLockPreDocChecksum, "generateGenLockPreDocChecksum"); + this.generateGenLockPreDocChecksum = generateGenLockPreDocChecksum; + return this; + } + + /** + * info.Version of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + */ + public Builder generateGenLockPreDocVersion(String generateGenLockPreDocVersion) { + Utils.checkNotNull(generateGenLockPreDocVersion, "generateGenLockPreDocVersion"); + this.generateGenLockPreDocVersion = Optional.ofNullable(generateGenLockPreDocVersion); + return this; + } + + /** + * info.Version of the Previous Rendered OpenAPI document (prior to generation, via gen lock) + */ + public Builder generateGenLockPreDocVersion(Optional generateGenLockPreDocVersion) { + Utils.checkNotNull(generateGenLockPreDocVersion, "generateGenLockPreDocVersion"); + this.generateGenLockPreDocVersion = generateGenLockPreDocVersion; + return this; + } + + /** + * Features prior to generation + */ + public Builder generateGenLockPreFeatures(String generateGenLockPreFeatures) { + Utils.checkNotNull(generateGenLockPreFeatures, "generateGenLockPreFeatures"); + this.generateGenLockPreFeatures = Optional.ofNullable(generateGenLockPreFeatures); + return this; + } + + /** + * Features prior to generation + */ + public Builder generateGenLockPreFeatures(Optional generateGenLockPreFeatures) { + Utils.checkNotNull(generateGenLockPreFeatures, "generateGenLockPreFeatures"); + this.generateGenLockPreFeatures = generateGenLockPreFeatures; + return this; + } + + /** + * Namespace name of the Previous Generation + */ + public Builder generateGenLockPreNamespaceName(String generateGenLockPreNamespaceName) { + Utils.checkNotNull(generateGenLockPreNamespaceName, "generateGenLockPreNamespaceName"); + this.generateGenLockPreNamespaceName = Optional.ofNullable(generateGenLockPreNamespaceName); + return this; + } + + /** + * Namespace name of the Previous Generation + */ + public Builder generateGenLockPreNamespaceName(Optional generateGenLockPreNamespaceName) { + Utils.checkNotNull(generateGenLockPreNamespaceName, "generateGenLockPreNamespaceName"); + this.generateGenLockPreNamespaceName = generateGenLockPreNamespaceName; + return this; + } + + /** + * Revision digest of the Previous Generation + */ + public Builder generateGenLockPreRevisionDigest(String generateGenLockPreRevisionDigest) { + Utils.checkNotNull(generateGenLockPreRevisionDigest, "generateGenLockPreRevisionDigest"); + this.generateGenLockPreRevisionDigest = Optional.ofNullable(generateGenLockPreRevisionDigest); + return this; + } + + /** + * Revision digest of the Previous Generation + */ + public Builder generateGenLockPreRevisionDigest(Optional generateGenLockPreRevisionDigest) { + Utils.checkNotNull(generateGenLockPreRevisionDigest, "generateGenLockPreRevisionDigest"); + this.generateGenLockPreRevisionDigest = generateGenLockPreRevisionDigest; + return this; + } + + /** + * Artifact version for the Previous Generation + */ + public Builder generateGenLockPreVersion(String generateGenLockPreVersion) { + Utils.checkNotNull(generateGenLockPreVersion, "generateGenLockPreVersion"); + this.generateGenLockPreVersion = Optional.ofNullable(generateGenLockPreVersion); + return this; + } + + /** + * Artifact version for the Previous Generation + */ + public Builder generateGenLockPreVersion(Optional generateGenLockPreVersion) { + Utils.checkNotNull(generateGenLockPreVersion, "generateGenLockPreVersion"); + this.generateGenLockPreVersion = generateGenLockPreVersion; + return this; + } + + /** + * The number of operations ignored in generation. + */ + public Builder generateNumberOfOperationsIgnored(long generateNumberOfOperationsIgnored) { + Utils.checkNotNull(generateNumberOfOperationsIgnored, "generateNumberOfOperationsIgnored"); + this.generateNumberOfOperationsIgnored = Optional.ofNullable(generateNumberOfOperationsIgnored); + return this; + } + + /** + * The number of operations ignored in generation. + */ + public Builder generateNumberOfOperationsIgnored(Optional generateNumberOfOperationsIgnored) { + Utils.checkNotNull(generateNumberOfOperationsIgnored, "generateNumberOfOperationsIgnored"); + this.generateNumberOfOperationsIgnored = generateNumberOfOperationsIgnored; + return this; + } + + /** + * The number of operations used in generation. + */ + public Builder generateNumberOfOperationsUsed(long generateNumberOfOperationsUsed) { + Utils.checkNotNull(generateNumberOfOperationsUsed, "generateNumberOfOperationsUsed"); + this.generateNumberOfOperationsUsed = Optional.ofNullable(generateNumberOfOperationsUsed); + return this; + } + + /** + * The number of operations used in generation. + */ + public Builder generateNumberOfOperationsUsed(Optional generateNumberOfOperationsUsed) { + Utils.checkNotNull(generateNumberOfOperationsUsed, "generateNumberOfOperationsUsed"); + this.generateNumberOfOperationsUsed = generateNumberOfOperationsUsed; + return this; + } + + /** + * Indicates whether tests were output. + */ + public Builder generateOutputTests(boolean generateOutputTests) { + Utils.checkNotNull(generateOutputTests, "generateOutputTests"); + this.generateOutputTests = Optional.ofNullable(generateOutputTests); + return this; + } + + /** + * Indicates whether tests were output. + */ + public Builder generateOutputTests(Optional generateOutputTests) { + Utils.checkNotNull(generateOutputTests, "generateOutputTests"); + this.generateOutputTests = generateOutputTests; + return this; + } + + /** + * Indicates whether the target was considered published. + */ + public Builder generatePublished(boolean generatePublished) { + Utils.checkNotNull(generatePublished, "generatePublished"); + this.generatePublished = Optional.ofNullable(generatePublished); + return this; + } + + /** + * Indicates whether the target was considered published. + */ + public Builder generatePublished(Optional generatePublished) { + Utils.checkNotNull(generatePublished, "generatePublished"); + this.generatePublished = generatePublished; + return this; + } + + /** + * Expected Repo URL, for use in documentation generation. + */ + public Builder generateRepoUrl(String generateRepoUrl) { + Utils.checkNotNull(generateRepoUrl, "generateRepoUrl"); + this.generateRepoUrl = Optional.ofNullable(generateRepoUrl); + return this; + } + + /** + * Expected Repo URL, for use in documentation generation. + */ + public Builder generateRepoUrl(Optional generateRepoUrl) { + Utils.checkNotNull(generateRepoUrl, "generateRepoUrl"); + this.generateRepoUrl = generateRepoUrl; + return this; + } + + /** + * The target of the event. + */ + public Builder generateTarget(String generateTarget) { + Utils.checkNotNull(generateTarget, "generateTarget"); + this.generateTarget = Optional.ofNullable(generateTarget); + return this; + } + + /** + * The target of the event. + */ + public Builder generateTarget(Optional generateTarget) { + Utils.checkNotNull(generateTarget, "generateTarget"); + this.generateTarget = generateTarget; + return this; + } + + /** + * The workflow name of the target. + */ + public Builder generateTargetName(String generateTargetName) { + Utils.checkNotNull(generateTargetName, "generateTargetName"); + this.generateTargetName = Optional.ofNullable(generateTargetName); + return this; + } + + /** + * The workflow name of the target. + */ + public Builder generateTargetName(Optional generateTargetName) { + Utils.checkNotNull(generateTargetName, "generateTargetName"); + this.generateTargetName = generateTargetName; + return this; + } + + /** + * The version of the target. + */ + public Builder generateTargetVersion(String generateTargetVersion) { + Utils.checkNotNull(generateTargetVersion, "generateTargetVersion"); + this.generateTargetVersion = Optional.ofNullable(generateTargetVersion); + return this; + } + + /** + * The version of the target. + */ + public Builder generateTargetVersion(Optional generateTargetVersion) { + Utils.checkNotNull(generateTargetVersion, "generateTargetVersion"); + this.generateTargetVersion = generateTargetVersion; + return this; + } + + /** + * Version of the generation logic used. + */ + public Builder generateVersion(String generateVersion) { + Utils.checkNotNull(generateVersion, "generateVersion"); + this.generateVersion = Optional.ofNullable(generateVersion); + return this; + } + + /** + * Version of the generation logic used. + */ + public Builder generateVersion(Optional generateVersion) { + Utils.checkNotNull(generateVersion, "generateVersion"); + this.generateVersion = generateVersion; + return this; + } + + /** + * GitHub organization of the action. + */ + public Builder ghActionOrganization(String ghActionOrganization) { + Utils.checkNotNull(ghActionOrganization, "ghActionOrganization"); + this.ghActionOrganization = Optional.ofNullable(ghActionOrganization); + return this; + } + + /** + * GitHub organization of the action. + */ + public Builder ghActionOrganization(Optional ghActionOrganization) { + Utils.checkNotNull(ghActionOrganization, "ghActionOrganization"); + this.ghActionOrganization = ghActionOrganization; + return this; + } + + /** + * GitHub Action ref value. + */ + public Builder ghActionRef(String ghActionRef) { + Utils.checkNotNull(ghActionRef, "ghActionRef"); + this.ghActionRef = Optional.ofNullable(ghActionRef); + return this; + } + + /** + * GitHub Action ref value. + */ + public Builder ghActionRef(Optional ghActionRef) { + Utils.checkNotNull(ghActionRef, "ghActionRef"); + this.ghActionRef = ghActionRef; + return this; + } + + /** + * GitHub repository of the action. + */ + public Builder ghActionRepository(String ghActionRepository) { + Utils.checkNotNull(ghActionRepository, "ghActionRepository"); + this.ghActionRepository = Optional.ofNullable(ghActionRepository); + return this; + } + + /** + * GitHub repository of the action. + */ + public Builder ghActionRepository(Optional ghActionRepository) { + Utils.checkNotNull(ghActionRepository, "ghActionRepository"); + this.ghActionRepository = ghActionRepository; + return this; + } + + /** + * Link to the GitHub action run. + */ + public Builder ghActionRunLink(String ghActionRunLink) { + Utils.checkNotNull(ghActionRunLink, "ghActionRunLink"); + this.ghActionRunLink = Optional.ofNullable(ghActionRunLink); + return this; + } + + /** + * Link to the GitHub action run. + */ + public Builder ghActionRunLink(Optional ghActionRunLink) { + Utils.checkNotNull(ghActionRunLink, "ghActionRunLink"); + this.ghActionRunLink = ghActionRunLink; + return this; + } + + /** + * Version of the GitHub action. + */ + public Builder ghActionVersion(String ghActionVersion) { + Utils.checkNotNull(ghActionVersion, "ghActionVersion"); + this.ghActionVersion = Optional.ofNullable(ghActionVersion); + return this; + } + + /** + * Version of the GitHub action. + */ + public Builder ghActionVersion(Optional ghActionVersion) { + Utils.checkNotNull(ghActionVersion, "ghActionVersion"); + this.ghActionVersion = ghActionVersion; + return this; + } + + /** + * Current working directory relative to the git root. + */ + public Builder gitRelativeCwd(String gitRelativeCwd) { + Utils.checkNotNull(gitRelativeCwd, "gitRelativeCwd"); + this.gitRelativeCwd = Optional.ofNullable(gitRelativeCwd); + return this; + } + + /** + * Current working directory relative to the git root. + */ + public Builder gitRelativeCwd(Optional gitRelativeCwd) { + Utils.checkNotNull(gitRelativeCwd, "gitRelativeCwd"); + this.gitRelativeCwd = gitRelativeCwd; + return this; + } + + /** + * Default owner for git remote. + */ + public Builder gitRemoteDefaultOwner(String gitRemoteDefaultOwner) { + Utils.checkNotNull(gitRemoteDefaultOwner, "gitRemoteDefaultOwner"); + this.gitRemoteDefaultOwner = Optional.ofNullable(gitRemoteDefaultOwner); + return this; + } + + /** + * Default owner for git remote. + */ + public Builder gitRemoteDefaultOwner(Optional gitRemoteDefaultOwner) { + Utils.checkNotNull(gitRemoteDefaultOwner, "gitRemoteDefaultOwner"); + this.gitRemoteDefaultOwner = gitRemoteDefaultOwner; + return this; + } + + /** + * Default repository name for git remote. + */ + public Builder gitRemoteDefaultRepo(String gitRemoteDefaultRepo) { + Utils.checkNotNull(gitRemoteDefaultRepo, "gitRemoteDefaultRepo"); + this.gitRemoteDefaultRepo = Optional.ofNullable(gitRemoteDefaultRepo); + return this; + } + + /** + * Default repository name for git remote. + */ + public Builder gitRemoteDefaultRepo(Optional gitRemoteDefaultRepo) { + Utils.checkNotNull(gitRemoteDefaultRepo, "gitRemoteDefaultRepo"); + this.gitRemoteDefaultRepo = gitRemoteDefaultRepo; + return this; + } + + /** + * User email from git configuration. + */ + public Builder gitUserEmail(String gitUserEmail) { + Utils.checkNotNull(gitUserEmail, "gitUserEmail"); + this.gitUserEmail = Optional.ofNullable(gitUserEmail); + return this; + } + + /** + * User email from git configuration. + */ + public Builder gitUserEmail(Optional gitUserEmail) { + Utils.checkNotNull(gitUserEmail, "gitUserEmail"); + this.gitUserEmail = gitUserEmail; + return this; + } + + /** + * User's name from git configuration. (not GitHub username) + */ + public Builder gitUserName(String gitUserName) { + Utils.checkNotNull(gitUserName, "gitUserName"); + this.gitUserName = Optional.ofNullable(gitUserName); + return this; + } + + /** + * User's name from git configuration. (not GitHub username) + */ + public Builder gitUserName(Optional gitUserName) { + Utils.checkNotNull(gitUserName, "gitUserName"); + this.gitUserName = gitUserName; + return this; + } + + /** + * Remote hostname. + */ + public Builder hostname(String hostname) { + Utils.checkNotNull(hostname, "hostname"); + this.hostname = Optional.ofNullable(hostname); + return this; + } + + /** + * Remote hostname. + */ + public Builder hostname(Optional hostname) { + Utils.checkNotNull(hostname, "hostname"); + this.hostname = hostname; + return this; + } + + /** + * Unique identifier for each event. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Type of interaction. + */ + public Builder interactionType(InteractionType interactionType) { + Utils.checkNotNull(interactionType, "interactionType"); + this.interactionType = interactionType; + return this; + } + + /** + * The last step of the event. + */ + public Builder lastStep(String lastStep) { + Utils.checkNotNull(lastStep, "lastStep"); + this.lastStep = Optional.ofNullable(lastStep); + return this; + } + + /** + * The last step of the event. + */ + public Builder lastStep(Optional lastStep) { + Utils.checkNotNull(lastStep, "lastStep"); + this.lastStep = lastStep; + return this; + } + + /** + * The checksum of the lint report. + */ + public Builder lintReportDigest(String lintReportDigest) { + Utils.checkNotNull(lintReportDigest, "lintReportDigest"); + this.lintReportDigest = Optional.ofNullable(lintReportDigest); + return this; + } + + /** + * The checksum of the lint report. + */ + public Builder lintReportDigest(Optional lintReportDigest) { + Utils.checkNotNull(lintReportDigest, "lintReportDigest"); + this.lintReportDigest = lintReportDigest; + return this; + } + + /** + * The number of errors in the lint report. + */ + public Builder lintReportErrorCount(long lintReportErrorCount) { + Utils.checkNotNull(lintReportErrorCount, "lintReportErrorCount"); + this.lintReportErrorCount = Optional.ofNullable(lintReportErrorCount); + return this; + } + + /** + * The number of errors in the lint report. + */ + public Builder lintReportErrorCount(Optional lintReportErrorCount) { + Utils.checkNotNull(lintReportErrorCount, "lintReportErrorCount"); + this.lintReportErrorCount = lintReportErrorCount; + return this; + } + + /** + * The number of info messages in the lint report. + */ + public Builder lintReportInfoCount(long lintReportInfoCount) { + Utils.checkNotNull(lintReportInfoCount, "lintReportInfoCount"); + this.lintReportInfoCount = Optional.ofNullable(lintReportInfoCount); + return this; + } + + /** + * The number of info messages in the lint report. + */ + public Builder lintReportInfoCount(Optional lintReportInfoCount) { + Utils.checkNotNull(lintReportInfoCount, "lintReportInfoCount"); + this.lintReportInfoCount = lintReportInfoCount; + return this; + } + + /** + * The number of warnings in the lint report. + */ + public Builder lintReportWarningCount(long lintReportWarningCount) { + Utils.checkNotNull(lintReportWarningCount, "lintReportWarningCount"); + this.lintReportWarningCount = Optional.ofNullable(lintReportWarningCount); + return this; + } + + /** + * The number of warnings in the lint report. + */ + public Builder lintReportWarningCount(Optional lintReportWarningCount) { + Utils.checkNotNull(lintReportWarningCount, "lintReportWarningCount"); + this.lintReportWarningCount = lintReportWarningCount; + return this; + } + + /** + * Timestamp when the event completed, in local time. + */ + public Builder localCompletedAt(OffsetDateTime localCompletedAt) { + Utils.checkNotNull(localCompletedAt, "localCompletedAt"); + this.localCompletedAt = Optional.ofNullable(localCompletedAt); + return this; + } + + /** + * Timestamp when the event completed, in local time. + */ + public Builder localCompletedAt(Optional localCompletedAt) { + Utils.checkNotNull(localCompletedAt, "localCompletedAt"); + this.localCompletedAt = localCompletedAt; + return this; + } + + /** + * Timestamp when the event started, in local time. + */ + public Builder localStartedAt(OffsetDateTime localStartedAt) { + Utils.checkNotNull(localStartedAt, "localStartedAt"); + this.localStartedAt = localStartedAt; + return this; + } + + /** + * Checksum of the currently Rendered OpenAPI document. + */ + public Builder managementDocChecksum(String managementDocChecksum) { + Utils.checkNotNull(managementDocChecksum, "managementDocChecksum"); + this.managementDocChecksum = Optional.ofNullable(managementDocChecksum); + return this; + } + + /** + * Checksum of the currently Rendered OpenAPI document. + */ + public Builder managementDocChecksum(Optional managementDocChecksum) { + Utils.checkNotNull(managementDocChecksum, "managementDocChecksum"); + this.managementDocChecksum = managementDocChecksum; + return this; + } + + /** + * Version taken from info.version field of the Rendered OpenAPI document. + */ + public Builder managementDocVersion(String managementDocVersion) { + Utils.checkNotNull(managementDocVersion, "managementDocVersion"); + this.managementDocVersion = Optional.ofNullable(managementDocVersion); + return this; + } + + /** + * Version taken from info.version field of the Rendered OpenAPI document. + */ + public Builder managementDocVersion(Optional managementDocVersion) { + Utils.checkNotNull(managementDocVersion, "managementDocVersion"); + this.managementDocVersion = managementDocVersion; + return this; + } + + /** + * Mermaid diagram + */ + public Builder mermaidDiagram(String mermaidDiagram) { + Utils.checkNotNull(mermaidDiagram, "mermaidDiagram"); + this.mermaidDiagram = Optional.ofNullable(mermaidDiagram); + return this; + } + + /** + * Mermaid diagram + */ + public Builder mermaidDiagram(Optional mermaidDiagram) { + Utils.checkNotNull(mermaidDiagram, "mermaidDiagram"); + this.mermaidDiagram = mermaidDiagram; + return this; + } + + /** + * The blob digest of the base source. + */ + public Builder openapiDiffBaseSourceBlobDigest(String openapiDiffBaseSourceBlobDigest) { + Utils.checkNotNull(openapiDiffBaseSourceBlobDigest, "openapiDiffBaseSourceBlobDigest"); + this.openapiDiffBaseSourceBlobDigest = Optional.ofNullable(openapiDiffBaseSourceBlobDigest); + return this; + } + + /** + * The blob digest of the base source. + */ + public Builder openapiDiffBaseSourceBlobDigest(Optional openapiDiffBaseSourceBlobDigest) { + Utils.checkNotNull(openapiDiffBaseSourceBlobDigest, "openapiDiffBaseSourceBlobDigest"); + this.openapiDiffBaseSourceBlobDigest = openapiDiffBaseSourceBlobDigest; + return this; + } + + /** + * The namespace name of the base source. + */ + public Builder openapiDiffBaseSourceNamespaceName(String openapiDiffBaseSourceNamespaceName) { + Utils.checkNotNull(openapiDiffBaseSourceNamespaceName, "openapiDiffBaseSourceNamespaceName"); + this.openapiDiffBaseSourceNamespaceName = Optional.ofNullable(openapiDiffBaseSourceNamespaceName); + return this; + } + + /** + * The namespace name of the base source. + */ + public Builder openapiDiffBaseSourceNamespaceName(Optional openapiDiffBaseSourceNamespaceName) { + Utils.checkNotNull(openapiDiffBaseSourceNamespaceName, "openapiDiffBaseSourceNamespaceName"); + this.openapiDiffBaseSourceNamespaceName = openapiDiffBaseSourceNamespaceName; + return this; + } + + /** + * The revision digest of the base source. + */ + public Builder openapiDiffBaseSourceRevisionDigest(String openapiDiffBaseSourceRevisionDigest) { + Utils.checkNotNull(openapiDiffBaseSourceRevisionDigest, "openapiDiffBaseSourceRevisionDigest"); + this.openapiDiffBaseSourceRevisionDigest = Optional.ofNullable(openapiDiffBaseSourceRevisionDigest); + return this; + } + + /** + * The revision digest of the base source. + */ + public Builder openapiDiffBaseSourceRevisionDigest(Optional openapiDiffBaseSourceRevisionDigest) { + Utils.checkNotNull(openapiDiffBaseSourceRevisionDigest, "openapiDiffBaseSourceRevisionDigest"); + this.openapiDiffBaseSourceRevisionDigest = openapiDiffBaseSourceRevisionDigest; + return this; + } + + /** + * The number of breaking changes in the openapi diff report. + */ + public Builder openapiDiffBreakingChangesCount(long openapiDiffBreakingChangesCount) { + Utils.checkNotNull(openapiDiffBreakingChangesCount, "openapiDiffBreakingChangesCount"); + this.openapiDiffBreakingChangesCount = Optional.ofNullable(openapiDiffBreakingChangesCount); + return this; + } + + /** + * The number of breaking changes in the openapi diff report. + */ + public Builder openapiDiffBreakingChangesCount(Optional openapiDiffBreakingChangesCount) { + Utils.checkNotNull(openapiDiffBreakingChangesCount, "openapiDiffBreakingChangesCount"); + this.openapiDiffBreakingChangesCount = openapiDiffBreakingChangesCount; + return this; + } + + /** + * Bump type of the lock file (calculated semver delta, or a custom change (manual release)) + */ + public Builder openapiDiffBumpType(OpenapiDiffBumpType openapiDiffBumpType) { + Utils.checkNotNull(openapiDiffBumpType, "openapiDiffBumpType"); + this.openapiDiffBumpType = Optional.ofNullable(openapiDiffBumpType); + return this; + } + + /** + * Bump type of the lock file (calculated semver delta, or a custom change (manual release)) + */ + public Builder openapiDiffBumpType(Optional openapiDiffBumpType) { + Utils.checkNotNull(openapiDiffBumpType, "openapiDiffBumpType"); + this.openapiDiffBumpType = openapiDiffBumpType; + return this; + } + + /** + * The checksum of the openapi diff report. + */ + public Builder openapiDiffReportDigest(String openapiDiffReportDigest) { + Utils.checkNotNull(openapiDiffReportDigest, "openapiDiffReportDigest"); + this.openapiDiffReportDigest = Optional.ofNullable(openapiDiffReportDigest); + return this; + } + + /** + * The checksum of the openapi diff report. + */ + public Builder openapiDiffReportDigest(Optional openapiDiffReportDigest) { + Utils.checkNotNull(openapiDiffReportDigest, "openapiDiffReportDigest"); + this.openapiDiffReportDigest = openapiDiffReportDigest; + return this; + } + + /** + * Name of the published package. + */ + public Builder publishPackageName(String publishPackageName) { + Utils.checkNotNull(publishPackageName, "publishPackageName"); + this.publishPackageName = Optional.ofNullable(publishPackageName); + return this; + } + + /** + * Name of the published package. + */ + public Builder publishPackageName(Optional publishPackageName) { + Utils.checkNotNull(publishPackageName, "publishPackageName"); + this.publishPackageName = publishPackageName; + return this; + } + + /** + * Name of the registry where the package was published. + */ + public Builder publishPackageRegistryName(String publishPackageRegistryName) { + Utils.checkNotNull(publishPackageRegistryName, "publishPackageRegistryName"); + this.publishPackageRegistryName = Optional.ofNullable(publishPackageRegistryName); + return this; + } + + /** + * Name of the registry where the package was published. + */ + public Builder publishPackageRegistryName(Optional publishPackageRegistryName) { + Utils.checkNotNull(publishPackageRegistryName, "publishPackageRegistryName"); + this.publishPackageRegistryName = publishPackageRegistryName; + return this; + } + + /** + * URL of the published package. + */ + public Builder publishPackageUrl(String publishPackageUrl) { + Utils.checkNotNull(publishPackageUrl, "publishPackageUrl"); + this.publishPackageUrl = Optional.ofNullable(publishPackageUrl); + return this; + } + + /** + * URL of the published package. + */ + public Builder publishPackageUrl(Optional publishPackageUrl) { + Utils.checkNotNull(publishPackageUrl, "publishPackageUrl"); + this.publishPackageUrl = publishPackageUrl; + return this; + } + + /** + * Version of the published package. + */ + public Builder publishPackageVersion(String publishPackageVersion) { + Utils.checkNotNull(publishPackageVersion, "publishPackageVersion"); + this.publishPackageVersion = Optional.ofNullable(publishPackageVersion); + return this; + } + + /** + * Version of the published package. + */ + public Builder publishPackageVersion(Optional publishPackageVersion) { + Utils.checkNotNull(publishPackageVersion, "publishPackageVersion"); + this.publishPackageVersion = publishPackageVersion; + return this; + } + + /** + * Full CLI command. + */ + public Builder rawCommand(String rawCommand) { + Utils.checkNotNull(rawCommand, "rawCommand"); + this.rawCommand = Optional.ofNullable(rawCommand); + return this; + } + + /** + * Full CLI command. + */ + public Builder rawCommand(Optional rawCommand) { + Utils.checkNotNull(rawCommand, "rawCommand"); + this.rawCommand = rawCommand; + return this; + } + + /** + * Label of the git repository. + */ + public Builder repoLabel(String repoLabel) { + Utils.checkNotNull(repoLabel, "repoLabel"); + this.repoLabel = Optional.ofNullable(repoLabel); + return this; + } + + /** + * Label of the git repository. + */ + public Builder repoLabel(Optional repoLabel) { + Utils.checkNotNull(repoLabel, "repoLabel"); + this.repoLabel = repoLabel; + return this; + } + + /** + * The blob digest of the source. + */ + public Builder sourceBlobDigest(String sourceBlobDigest) { + Utils.checkNotNull(sourceBlobDigest, "sourceBlobDigest"); + this.sourceBlobDigest = Optional.ofNullable(sourceBlobDigest); + return this; + } + + /** + * The blob digest of the source. + */ + public Builder sourceBlobDigest(Optional sourceBlobDigest) { + Utils.checkNotNull(sourceBlobDigest, "sourceBlobDigest"); + this.sourceBlobDigest = sourceBlobDigest; + return this; + } + + /** + * The namespace name of the source. + */ + public Builder sourceNamespaceName(String sourceNamespaceName) { + Utils.checkNotNull(sourceNamespaceName, "sourceNamespaceName"); + this.sourceNamespaceName = Optional.ofNullable(sourceNamespaceName); + return this; + } + + /** + * The namespace name of the source. + */ + public Builder sourceNamespaceName(Optional sourceNamespaceName) { + Utils.checkNotNull(sourceNamespaceName, "sourceNamespaceName"); + this.sourceNamespaceName = sourceNamespaceName; + return this; + } + + /** + * The revision digest of the source. + */ + public Builder sourceRevisionDigest(String sourceRevisionDigest) { + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + this.sourceRevisionDigest = Optional.ofNullable(sourceRevisionDigest); + return this; + } + + /** + * The revision digest of the source. + */ + public Builder sourceRevisionDigest(Optional sourceRevisionDigest) { + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + this.sourceRevisionDigest = sourceRevisionDigest; + return this; + } + + /** + * Identifier of the Speakeasy API key. + */ + public Builder speakeasyApiKeyName(String speakeasyApiKeyName) { + Utils.checkNotNull(speakeasyApiKeyName, "speakeasyApiKeyName"); + this.speakeasyApiKeyName = speakeasyApiKeyName; + return this; + } + + /** + * Version of the Speakeasy CLI. + */ + public Builder speakeasyVersion(String speakeasyVersion) { + Utils.checkNotNull(speakeasyVersion, "speakeasyVersion"); + this.speakeasyVersion = speakeasyVersion; + return this; + } + + /** + * Indicates whether the event was successful. + */ + public Builder success(boolean success) { + Utils.checkNotNull(success, "success"); + this.success = success; + return this; + } + + /** + * Workflow lock file (post execution) + */ + public Builder workflowLockPostRaw(String workflowLockPostRaw) { + Utils.checkNotNull(workflowLockPostRaw, "workflowLockPostRaw"); + this.workflowLockPostRaw = Optional.ofNullable(workflowLockPostRaw); + return this; + } + + /** + * Workflow lock file (post execution) + */ + public Builder workflowLockPostRaw(Optional workflowLockPostRaw) { + Utils.checkNotNull(workflowLockPostRaw, "workflowLockPostRaw"); + this.workflowLockPostRaw = workflowLockPostRaw; + return this; + } + + /** + * Workflow lock file (prior to execution) + */ + public Builder workflowLockPreRaw(String workflowLockPreRaw) { + Utils.checkNotNull(workflowLockPreRaw, "workflowLockPreRaw"); + this.workflowLockPreRaw = Optional.ofNullable(workflowLockPreRaw); + return this; + } + + /** + * Workflow lock file (prior to execution) + */ + public Builder workflowLockPreRaw(Optional workflowLockPreRaw) { + Utils.checkNotNull(workflowLockPreRaw, "workflowLockPreRaw"); + this.workflowLockPreRaw = workflowLockPreRaw; + return this; + } + + /** + * Workflow file (post execution) + */ + public Builder workflowPostRaw(String workflowPostRaw) { + Utils.checkNotNull(workflowPostRaw, "workflowPostRaw"); + this.workflowPostRaw = Optional.ofNullable(workflowPostRaw); + return this; + } + + /** + * Workflow file (post execution) + */ + public Builder workflowPostRaw(Optional workflowPostRaw) { + Utils.checkNotNull(workflowPostRaw, "workflowPostRaw"); + this.workflowPostRaw = workflowPostRaw; + return this; + } + + /** + * Workflow file (prior to execution) + */ + public Builder workflowPreRaw(String workflowPreRaw) { + Utils.checkNotNull(workflowPreRaw, "workflowPreRaw"); + this.workflowPreRaw = Optional.ofNullable(workflowPreRaw); + return this; + } + + /** + * Workflow file (prior to execution) + */ + public Builder workflowPreRaw(Optional workflowPreRaw) { + Utils.checkNotNull(workflowPreRaw, "workflowPreRaw"); + this.workflowPreRaw = workflowPreRaw; + return this; + } + + /** + * Identifier of the workspace. + */ + public Builder workspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + public CliEvent build() { + return new CliEvent( + commitHead, + continuousIntegrationEnvironment, + createdAt, + durationMs, + error, + executionId, + generateBumpType, + generateConfigPostChecksum, + generateConfigPostRaw, + generateConfigPostVersion, + generateConfigPreChecksum, + generateConfigPreRaw, + generateConfigPreVersion, + generateEligibleFeatures, + generateGenLockId, + generateGenLockPostFeatures, + generateGenLockPreBlobDigest, + generateGenLockPreDocChecksum, + generateGenLockPreDocVersion, + generateGenLockPreFeatures, + generateGenLockPreNamespaceName, + generateGenLockPreRevisionDigest, + generateGenLockPreVersion, + generateNumberOfOperationsIgnored, + generateNumberOfOperationsUsed, + generateOutputTests, + generatePublished, + generateRepoUrl, + generateTarget, + generateTargetName, + generateTargetVersion, + generateVersion, + ghActionOrganization, + ghActionRef, + ghActionRepository, + ghActionRunLink, + ghActionVersion, + gitRelativeCwd, + gitRemoteDefaultOwner, + gitRemoteDefaultRepo, + gitUserEmail, + gitUserName, + hostname, + id, + interactionType, + lastStep, + lintReportDigest, + lintReportErrorCount, + lintReportInfoCount, + lintReportWarningCount, + localCompletedAt, + localStartedAt, + managementDocChecksum, + managementDocVersion, + mermaidDiagram, + openapiDiffBaseSourceBlobDigest, + openapiDiffBaseSourceNamespaceName, + openapiDiffBaseSourceRevisionDigest, + openapiDiffBreakingChangesCount, + openapiDiffBumpType, + openapiDiffReportDigest, + publishPackageName, + publishPackageRegistryName, + publishPackageUrl, + publishPackageVersion, + rawCommand, + repoLabel, + sourceBlobDigest, + sourceNamespaceName, + sourceRevisionDigest, + speakeasyApiKeyName, + speakeasyVersion, + success, + workflowLockPostRaw, + workflowLockPreRaw, + workflowPostRaw, + workflowPreRaw, + workspaceId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Diagnostic.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Diagnostic.java new file mode 100644 index 00000000..c2e81284 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Diagnostic.java @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class Diagnostic { + + /** + * Help message for how to fix the issue + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("helpMessage") + private Optional helpMessage; + + /** + * Message describing the issue + */ + @JsonProperty("message") + private String message; + + /** + * Schema path to the issue + */ + @JsonProperty("path") + private List path; + + /** + * Issue type + */ + @JsonProperty("type") + private String type; + + @JsonCreator + public Diagnostic( + @JsonProperty("helpMessage") Optional helpMessage, + @JsonProperty("message") String message, + @JsonProperty("path") List path, + @JsonProperty("type") String type) { + Utils.checkNotNull(helpMessage, "helpMessage"); + Utils.checkNotNull(message, "message"); + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(type, "type"); + this.helpMessage = helpMessage; + this.message = message; + this.path = path; + this.type = type; + } + + public Diagnostic( + String message, + List path, + String type) { + this(Optional.empty(), message, path, type); + } + + /** + * Help message for how to fix the issue + */ + @JsonIgnore + public Optional helpMessage() { + return helpMessage; + } + + /** + * Message describing the issue + */ + @JsonIgnore + public String message() { + return message; + } + + /** + * Schema path to the issue + */ + @JsonIgnore + public List path() { + return path; + } + + /** + * Issue type + */ + @JsonIgnore + public String type() { + return type; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Help message for how to fix the issue + */ + public Diagnostic withHelpMessage(String helpMessage) { + Utils.checkNotNull(helpMessage, "helpMessage"); + this.helpMessage = Optional.ofNullable(helpMessage); + return this; + } + + /** + * Help message for how to fix the issue + */ + public Diagnostic withHelpMessage(Optional helpMessage) { + Utils.checkNotNull(helpMessage, "helpMessage"); + this.helpMessage = helpMessage; + return this; + } + + /** + * Message describing the issue + */ + public Diagnostic withMessage(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + /** + * Schema path to the issue + */ + public Diagnostic withPath(List path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * Issue type + */ + public Diagnostic withType(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Diagnostic other = (Diagnostic) o; + return + Objects.deepEquals(this.helpMessage, other.helpMessage) && + Objects.deepEquals(this.message, other.message) && + Objects.deepEquals(this.path, other.path) && + Objects.deepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return Objects.hash( + helpMessage, + message, + path, + type); + } + + @Override + public String toString() { + return Utils.toString(Diagnostic.class, + "helpMessage", helpMessage, + "message", message, + "path", path, + "type", type); + } + + public final static class Builder { + + private Optional helpMessage = Optional.empty(); + + private String message; + + private List path; + + private String type; + + private Builder() { + // force use of static builder() method + } + + /** + * Help message for how to fix the issue + */ + public Builder helpMessage(String helpMessage) { + Utils.checkNotNull(helpMessage, "helpMessage"); + this.helpMessage = Optional.ofNullable(helpMessage); + return this; + } + + /** + * Help message for how to fix the issue + */ + public Builder helpMessage(Optional helpMessage) { + Utils.checkNotNull(helpMessage, "helpMessage"); + this.helpMessage = helpMessage; + return this; + } + + /** + * Message describing the issue + */ + public Builder message(String message) { + Utils.checkNotNull(message, "message"); + this.message = message; + return this; + } + + /** + * Schema path to the issue + */ + public Builder path(List path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + /** + * Issue type + */ + public Builder type(String type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Diagnostic build() { + return new Diagnostic( + helpMessage, + message, + path, + type); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/EmbedAccessTokenResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/EmbedAccessTokenResponse.java new file mode 100644 index 00000000..8fa875b4 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/EmbedAccessTokenResponse.java @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * EmbedAccessTokenResponse - An EmbedAccessTokenResponse contains a token that can be used to embed a Speakeasy dashboard. + */ + +public class EmbedAccessTokenResponse { + + @JsonProperty("access_token") + private String accessToken; + + @JsonCreator + public EmbedAccessTokenResponse( + @JsonProperty("access_token") String accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; + } + + @JsonIgnore + public String accessToken() { + return accessToken; + } + + public final static Builder builder() { + return new Builder(); + } + + public EmbedAccessTokenResponse withAccessToken(String accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmbedAccessTokenResponse other = (EmbedAccessTokenResponse) o; + return + Objects.deepEquals(this.accessToken, other.accessToken); + } + + @Override + public int hashCode() { + return Objects.hash( + accessToken); + } + + @Override + public String toString() { + return Utils.toString(EmbedAccessTokenResponse.class, + "accessToken", accessToken); + } + + public final static class Builder { + + private String accessToken; + + private Builder() { + // force use of static builder() method + } + + public Builder accessToken(String accessToken) { + Utils.checkNotNull(accessToken, "accessToken"); + this.accessToken = accessToken; + return this; + } + + public EmbedAccessTokenResponse build() { + return new EmbedAccessTokenResponse( + accessToken); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/EmbedToken.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/EmbedToken.java new file mode 100644 index 00000000..21220642 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/EmbedToken.java @@ -0,0 +1,545 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.Optional; + +/** + * EmbedToken - A representation of an embed token granted for working with Speakeasy components. + */ + +public class EmbedToken { + + /** + * Creation timestamp. + */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * The ID of the user that created this token. + */ + @JsonProperty("created_by") + private String createdBy; + + /** + * A detailed description of the EmbedToken. + */ + @JsonProperty("description") + private String description; + + /** + * The time this token expires. + */ + @JsonProperty("expires_at") + private OffsetDateTime expiresAt; + + /** + * The filters applied to this token. + */ + @JsonProperty("filters") + private String filters; + + /** + * The ID of this EmbedToken. + */ + @JsonProperty("id") + private String id; + + /** + * The last time this token was used. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("last_used") + private Optional lastUsed; + + /** + * The time this token was revoked. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("revoked_at") + private Optional revokedAt; + + /** + * The ID of the user that revoked this token. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("revoked_by") + private Optional revokedBy; + + /** + * The workspace ID this token belongs to. + */ + @JsonProperty("workspace_id") + private String workspaceId; + + @JsonCreator + public EmbedToken( + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("created_by") String createdBy, + @JsonProperty("description") String description, + @JsonProperty("expires_at") OffsetDateTime expiresAt, + @JsonProperty("filters") String filters, + @JsonProperty("id") String id, + @JsonProperty("last_used") Optional lastUsed, + @JsonProperty("revoked_at") Optional revokedAt, + @JsonProperty("revoked_by") Optional revokedBy, + @JsonProperty("workspace_id") String workspaceId) { + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(createdBy, "createdBy"); + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(expiresAt, "expiresAt"); + Utils.checkNotNull(filters, "filters"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(lastUsed, "lastUsed"); + Utils.checkNotNull(revokedAt, "revokedAt"); + Utils.checkNotNull(revokedBy, "revokedBy"); + Utils.checkNotNull(workspaceId, "workspaceId"); + this.createdAt = createdAt; + this.createdBy = createdBy; + this.description = description; + this.expiresAt = expiresAt; + this.filters = filters; + this.id = id; + this.lastUsed = lastUsed; + this.revokedAt = revokedAt; + this.revokedBy = revokedBy; + this.workspaceId = workspaceId; + } + + public EmbedToken( + OffsetDateTime createdAt, + String createdBy, + String description, + OffsetDateTime expiresAt, + String filters, + String id, + String workspaceId) { + this(createdAt, createdBy, description, expiresAt, filters, id, Optional.empty(), Optional.empty(), Optional.empty(), workspaceId); + } + + /** + * Creation timestamp. + */ + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + /** + * The ID of the user that created this token. + */ + @JsonIgnore + public String createdBy() { + return createdBy; + } + + /** + * A detailed description of the EmbedToken. + */ + @JsonIgnore + public String description() { + return description; + } + + /** + * The time this token expires. + */ + @JsonIgnore + public OffsetDateTime expiresAt() { + return expiresAt; + } + + /** + * The filters applied to this token. + */ + @JsonIgnore + public String filters() { + return filters; + } + + /** + * The ID of this EmbedToken. + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * The last time this token was used. + */ + @JsonIgnore + public Optional lastUsed() { + return lastUsed; + } + + /** + * The time this token was revoked. + */ + @JsonIgnore + public Optional revokedAt() { + return revokedAt; + } + + /** + * The ID of the user that revoked this token. + */ + @JsonIgnore + public Optional revokedBy() { + return revokedBy; + } + + /** + * The workspace ID this token belongs to. + */ + @JsonIgnore + public String workspaceId() { + return workspaceId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Creation timestamp. + */ + public EmbedToken withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * The ID of the user that created this token. + */ + public EmbedToken withCreatedBy(String createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = createdBy; + return this; + } + + /** + * A detailed description of the EmbedToken. + */ + public EmbedToken withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * The time this token expires. + */ + public EmbedToken withExpiresAt(OffsetDateTime expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = expiresAt; + return this; + } + + /** + * The filters applied to this token. + */ + public EmbedToken withFilters(String filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + /** + * The ID of this EmbedToken. + */ + public EmbedToken withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The last time this token was used. + */ + public EmbedToken withLastUsed(OffsetDateTime lastUsed) { + Utils.checkNotNull(lastUsed, "lastUsed"); + this.lastUsed = Optional.ofNullable(lastUsed); + return this; + } + + /** + * The last time this token was used. + */ + public EmbedToken withLastUsed(Optional lastUsed) { + Utils.checkNotNull(lastUsed, "lastUsed"); + this.lastUsed = lastUsed; + return this; + } + + /** + * The time this token was revoked. + */ + public EmbedToken withRevokedAt(OffsetDateTime revokedAt) { + Utils.checkNotNull(revokedAt, "revokedAt"); + this.revokedAt = Optional.ofNullable(revokedAt); + return this; + } + + /** + * The time this token was revoked. + */ + public EmbedToken withRevokedAt(Optional revokedAt) { + Utils.checkNotNull(revokedAt, "revokedAt"); + this.revokedAt = revokedAt; + return this; + } + + /** + * The ID of the user that revoked this token. + */ + public EmbedToken withRevokedBy(String revokedBy) { + Utils.checkNotNull(revokedBy, "revokedBy"); + this.revokedBy = Optional.ofNullable(revokedBy); + return this; + } + + /** + * The ID of the user that revoked this token. + */ + public EmbedToken withRevokedBy(Optional revokedBy) { + Utils.checkNotNull(revokedBy, "revokedBy"); + this.revokedBy = revokedBy; + return this; + } + + /** + * The workspace ID this token belongs to. + */ + public EmbedToken withWorkspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmbedToken other = (EmbedToken) o; + return + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.createdBy, other.createdBy) && + Objects.deepEquals(this.description, other.description) && + Objects.deepEquals(this.expiresAt, other.expiresAt) && + Objects.deepEquals(this.filters, other.filters) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.lastUsed, other.lastUsed) && + Objects.deepEquals(this.revokedAt, other.revokedAt) && + Objects.deepEquals(this.revokedBy, other.revokedBy) && + Objects.deepEquals(this.workspaceId, other.workspaceId); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + createdBy, + description, + expiresAt, + filters, + id, + lastUsed, + revokedAt, + revokedBy, + workspaceId); + } + + @Override + public String toString() { + return Utils.toString(EmbedToken.class, + "createdAt", createdAt, + "createdBy", createdBy, + "description", description, + "expiresAt", expiresAt, + "filters", filters, + "id", id, + "lastUsed", lastUsed, + "revokedAt", revokedAt, + "revokedBy", revokedBy, + "workspaceId", workspaceId); + } + + public final static class Builder { + + private OffsetDateTime createdAt; + + private String createdBy; + + private String description; + + private OffsetDateTime expiresAt; + + private String filters; + + private String id; + + private Optional lastUsed = Optional.empty(); + + private Optional revokedAt = Optional.empty(); + + private Optional revokedBy = Optional.empty(); + + private String workspaceId; + + private Builder() { + // force use of static builder() method + } + + /** + * Creation timestamp. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * The ID of the user that created this token. + */ + public Builder createdBy(String createdBy) { + Utils.checkNotNull(createdBy, "createdBy"); + this.createdBy = createdBy; + return this; + } + + /** + * A detailed description of the EmbedToken. + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * The time this token expires. + */ + public Builder expiresAt(OffsetDateTime expiresAt) { + Utils.checkNotNull(expiresAt, "expiresAt"); + this.expiresAt = expiresAt; + return this; + } + + /** + * The filters applied to this token. + */ + public Builder filters(String filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + /** + * The ID of this EmbedToken. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * The last time this token was used. + */ + public Builder lastUsed(OffsetDateTime lastUsed) { + Utils.checkNotNull(lastUsed, "lastUsed"); + this.lastUsed = Optional.ofNullable(lastUsed); + return this; + } + + /** + * The last time this token was used. + */ + public Builder lastUsed(Optional lastUsed) { + Utils.checkNotNull(lastUsed, "lastUsed"); + this.lastUsed = lastUsed; + return this; + } + + /** + * The time this token was revoked. + */ + public Builder revokedAt(OffsetDateTime revokedAt) { + Utils.checkNotNull(revokedAt, "revokedAt"); + this.revokedAt = Optional.ofNullable(revokedAt); + return this; + } + + /** + * The time this token was revoked. + */ + public Builder revokedAt(Optional revokedAt) { + Utils.checkNotNull(revokedAt, "revokedAt"); + this.revokedAt = revokedAt; + return this; + } + + /** + * The ID of the user that revoked this token. + */ + public Builder revokedBy(String revokedBy) { + Utils.checkNotNull(revokedBy, "revokedBy"); + this.revokedBy = Optional.ofNullable(revokedBy); + return this; + } + + /** + * The ID of the user that revoked this token. + */ + public Builder revokedBy(Optional revokedBy) { + Utils.checkNotNull(revokedBy, "revokedBy"); + this.revokedBy = revokedBy; + return this; + } + + /** + * The workspace ID this token belongs to. + */ + public Builder workspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + public EmbedToken build() { + return new EmbedToken( + createdAt, + createdBy, + description, + expiresAt, + filters, + id, + lastUsed, + revokedAt, + revokedBy, + workspaceId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/FeatureFlag.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/FeatureFlag.java new file mode 100644 index 00000000..789529a8 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/FeatureFlag.java @@ -0,0 +1,143 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * FeatureFlag - A feature flag is a key-value pair that can be used to enable or disable features. + */ + +public class FeatureFlag { + + @JsonProperty("feature_flag") + private String featureFlag; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("trial_ends_at") + private JsonNullable trialEndsAt; + + @JsonCreator + public FeatureFlag( + @JsonProperty("feature_flag") String featureFlag, + @JsonProperty("trial_ends_at") JsonNullable trialEndsAt) { + Utils.checkNotNull(featureFlag, "featureFlag"); + Utils.checkNotNull(trialEndsAt, "trialEndsAt"); + this.featureFlag = featureFlag; + this.trialEndsAt = trialEndsAt; + } + + public FeatureFlag( + String featureFlag) { + this(featureFlag, JsonNullable.undefined()); + } + + @JsonIgnore + public String featureFlag() { + return featureFlag; + } + + @JsonIgnore + public JsonNullable trialEndsAt() { + return trialEndsAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public FeatureFlag withFeatureFlag(String featureFlag) { + Utils.checkNotNull(featureFlag, "featureFlag"); + this.featureFlag = featureFlag; + return this; + } + + public FeatureFlag withTrialEndsAt(OffsetDateTime trialEndsAt) { + Utils.checkNotNull(trialEndsAt, "trialEndsAt"); + this.trialEndsAt = JsonNullable.of(trialEndsAt); + return this; + } + + public FeatureFlag withTrialEndsAt(JsonNullable trialEndsAt) { + Utils.checkNotNull(trialEndsAt, "trialEndsAt"); + this.trialEndsAt = trialEndsAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeatureFlag other = (FeatureFlag) o; + return + Objects.deepEquals(this.featureFlag, other.featureFlag) && + Objects.deepEquals(this.trialEndsAt, other.trialEndsAt); + } + + @Override + public int hashCode() { + return Objects.hash( + featureFlag, + trialEndsAt); + } + + @Override + public String toString() { + return Utils.toString(FeatureFlag.class, + "featureFlag", featureFlag, + "trialEndsAt", trialEndsAt); + } + + public final static class Builder { + + private String featureFlag; + + private JsonNullable trialEndsAt = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + public Builder featureFlag(String featureFlag) { + Utils.checkNotNull(featureFlag, "featureFlag"); + this.featureFlag = featureFlag; + return this; + } + + public Builder trialEndsAt(OffsetDateTime trialEndsAt) { + Utils.checkNotNull(trialEndsAt, "trialEndsAt"); + this.trialEndsAt = JsonNullable.of(trialEndsAt); + return this; + } + + public Builder trialEndsAt(JsonNullable trialEndsAt) { + Utils.checkNotNull(trialEndsAt, "trialEndsAt"); + this.trialEndsAt = trialEndsAt; + return this; + } + + public FeatureFlag build() { + return new FeatureFlag( + featureFlag, + trialEndsAt); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Filter.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Filter.java new file mode 100644 index 00000000..d3b8427a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Filter.java @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * Filter - A filter is a key-value pair that can be used to filter a list of requests. + */ + +public class Filter { + + /** + * The key of the filter. + */ + @JsonProperty("key") + private String key; + + /** + * The operator of the filter. + */ + @JsonProperty("operator") + private String operator; + + /** + * The value of the filter. + */ + @JsonProperty("value") + private String value; + + @JsonCreator + public Filter( + @JsonProperty("key") String key, + @JsonProperty("operator") String operator, + @JsonProperty("value") String value) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(operator, "operator"); + Utils.checkNotNull(value, "value"); + this.key = key; + this.operator = operator; + this.value = value; + } + + /** + * The key of the filter. + */ + @JsonIgnore + public String key() { + return key; + } + + /** + * The operator of the filter. + */ + @JsonIgnore + public String operator() { + return operator; + } + + /** + * The value of the filter. + */ + @JsonIgnore + public String value() { + return value; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The key of the filter. + */ + public Filter withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The operator of the filter. + */ + public Filter withOperator(String operator) { + Utils.checkNotNull(operator, "operator"); + this.operator = operator; + return this; + } + + /** + * The value of the filter. + */ + public Filter withValue(String value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Filter other = (Filter) o; + return + Objects.deepEquals(this.key, other.key) && + Objects.deepEquals(this.operator, other.operator) && + Objects.deepEquals(this.value, other.value); + } + + @Override + public int hashCode() { + return Objects.hash( + key, + operator, + value); + } + + @Override + public String toString() { + return Utils.toString(Filter.class, + "key", key, + "operator", operator, + "value", value); + } + + public final static class Builder { + + private String key; + + private String operator; + + private String value; + + private Builder() { + // force use of static builder() method + } + + /** + * The key of the filter. + */ + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + /** + * The operator of the filter. + */ + public Builder operator(String operator) { + Utils.checkNotNull(operator, "operator"); + this.operator = operator; + return this; + } + + /** + * The value of the filter. + */ + public Builder value(String value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + public Filter build() { + return new Filter( + key, + operator, + value); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Filters.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Filters.java new file mode 100644 index 00000000..401e2b7c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Filters.java @@ -0,0 +1,229 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; + +/** + * Filters - Filters are used to query requests. + */ + +public class Filters { + + /** + * A list of filters to apply to the query. + */ + @JsonProperty("filters") + private List filters; + + /** + * The maximum number of results to return. + */ + @JsonProperty("limit") + private long limit; + + /** + * The offset to start the query from. + */ + @JsonProperty("offset") + private long offset; + + /** + * The operator to use when combining filters. + */ + @JsonProperty("operator") + private String operator; + + @JsonCreator + public Filters( + @JsonProperty("filters") List filters, + @JsonProperty("limit") long limit, + @JsonProperty("offset") long offset, + @JsonProperty("operator") String operator) { + Utils.checkNotNull(filters, "filters"); + Utils.checkNotNull(limit, "limit"); + Utils.checkNotNull(offset, "offset"); + Utils.checkNotNull(operator, "operator"); + this.filters = filters; + this.limit = limit; + this.offset = offset; + this.operator = operator; + } + + /** + * A list of filters to apply to the query. + */ + @JsonIgnore + public List filters() { + return filters; + } + + /** + * The maximum number of results to return. + */ + @JsonIgnore + public long limit() { + return limit; + } + + /** + * The offset to start the query from. + */ + @JsonIgnore + public long offset() { + return offset; + } + + /** + * The operator to use when combining filters. + */ + @JsonIgnore + public String operator() { + return operator; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * A list of filters to apply to the query. + */ + public Filters withFilters(List filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + /** + * The maximum number of results to return. + */ + public Filters withLimit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + /** + * The offset to start the query from. + */ + public Filters withOffset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + /** + * The operator to use when combining filters. + */ + public Filters withOperator(String operator) { + Utils.checkNotNull(operator, "operator"); + this.operator = operator; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Filters other = (Filters) o; + return + Objects.deepEquals(this.filters, other.filters) && + Objects.deepEquals(this.limit, other.limit) && + Objects.deepEquals(this.offset, other.offset) && + Objects.deepEquals(this.operator, other.operator); + } + + @Override + public int hashCode() { + return Objects.hash( + filters, + limit, + offset, + operator); + } + + @Override + public String toString() { + return Utils.toString(Filters.class, + "filters", filters, + "limit", limit, + "offset", offset, + "operator", operator); + } + + public final static class Builder { + + private List filters; + + private Long limit; + + private Long offset; + + private String operator; + + private Builder() { + // force use of static builder() method + } + + /** + * A list of filters to apply to the query. + */ + public Builder filters(List filters) { + Utils.checkNotNull(filters, "filters"); + this.filters = filters; + return this; + } + + /** + * The maximum number of results to return. + */ + public Builder limit(long limit) { + Utils.checkNotNull(limit, "limit"); + this.limit = limit; + return this; + } + + /** + * The offset to start the query from. + */ + public Builder offset(long offset) { + Utils.checkNotNull(offset, "offset"); + this.offset = offset; + return this; + } + + /** + * The operator to use when combining filters. + */ + public Builder operator(String operator) { + Utils.checkNotNull(operator, "operator"); + this.operator = operator; + return this; + } + + public Filters build() { + return new Filters( + filters, + limit, + offset, + operator); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GenerateBumpType.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GenerateBumpType.java new file mode 100644 index 00000000..0fa81e79 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GenerateBumpType.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; + +/** + * GenerateBumpType - Bump type of the lock file (calculated semver delta, custom change (manual release), or prerelease/graduate) + */ +public enum GenerateBumpType { + MAJOR("major"), + MINOR("minor"), + PATCH("patch"), + CUSTOM("custom"), + GRADUATE("graduate"), + PRERELEASE("prerelease"), + NONE("none"); + + @JsonValue + private final String value; + + private GenerateBumpType(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GenerateOpenApiSpecDiff.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GenerateOpenApiSpecDiff.java new file mode 100644 index 00000000..6dec03b2 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GenerateOpenApiSpecDiff.java @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class GenerateOpenApiSpecDiff { + + @JsonProperty("current_schema") + private String currentSchema; + + @JsonProperty("new_schema") + private String newSchema; + + @JsonCreator + public GenerateOpenApiSpecDiff( + @JsonProperty("current_schema") String currentSchema, + @JsonProperty("new_schema") String newSchema) { + Utils.checkNotNull(currentSchema, "currentSchema"); + Utils.checkNotNull(newSchema, "newSchema"); + this.currentSchema = currentSchema; + this.newSchema = newSchema; + } + + @JsonIgnore + public String currentSchema() { + return currentSchema; + } + + @JsonIgnore + public String newSchema() { + return newSchema; + } + + public final static Builder builder() { + return new Builder(); + } + + public GenerateOpenApiSpecDiff withCurrentSchema(String currentSchema) { + Utils.checkNotNull(currentSchema, "currentSchema"); + this.currentSchema = currentSchema; + return this; + } + + public GenerateOpenApiSpecDiff withNewSchema(String newSchema) { + Utils.checkNotNull(newSchema, "newSchema"); + this.newSchema = newSchema; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GenerateOpenApiSpecDiff other = (GenerateOpenApiSpecDiff) o; + return + Objects.deepEquals(this.currentSchema, other.currentSchema) && + Objects.deepEquals(this.newSchema, other.newSchema); + } + + @Override + public int hashCode() { + return Objects.hash( + currentSchema, + newSchema); + } + + @Override + public String toString() { + return Utils.toString(GenerateOpenApiSpecDiff.class, + "currentSchema", currentSchema, + "newSchema", newSchema); + } + + public final static class Builder { + + private String currentSchema; + + private String newSchema; + + private Builder() { + // force use of static builder() method + } + + public Builder currentSchema(String currentSchema) { + Utils.checkNotNull(currentSchema, "currentSchema"); + this.currentSchema = currentSchema; + return this; + } + + public Builder newSchema(String newSchema) { + Utils.checkNotNull(newSchema, "newSchema"); + this.newSchema = newSchema; + return this; + } + + public GenerateOpenApiSpecDiff build() { + return new GenerateOpenApiSpecDiff( + currentSchema, + newSchema); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetNamespacesResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetNamespacesResponse.java new file mode 100644 index 00000000..bf333edd --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetNamespacesResponse.java @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; + + +public class GetNamespacesResponse { + + @JsonProperty("items") + private List items; + + @JsonCreator + public GetNamespacesResponse( + @JsonProperty("items") List items) { + Utils.checkNotNull(items, "items"); + this.items = items; + } + + @JsonIgnore + public List items() { + return items; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetNamespacesResponse withItems(List items) { + Utils.checkNotNull(items, "items"); + this.items = items; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetNamespacesResponse other = (GetNamespacesResponse) o; + return + Objects.deepEquals(this.items, other.items); + } + + @Override + public int hashCode() { + return Objects.hash( + items); + } + + @Override + public String toString() { + return Utils.toString(GetNamespacesResponse.class, + "items", items); + } + + public final static class Builder { + + private List items; + + private Builder() { + // force use of static builder() method + } + + public Builder items(List items) { + Utils.checkNotNull(items, "items"); + this.items = items; + return this; + } + + public GetNamespacesResponse build() { + return new GetNamespacesResponse( + items); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetRevisionsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetRevisionsResponse.java new file mode 100644 index 00000000..f2b405b4 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetRevisionsResponse.java @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; + + +public class GetRevisionsResponse { + + @JsonProperty("items") + private List items; + + @JsonProperty("next_page_token") + private String nextPageToken; + + @JsonCreator + public GetRevisionsResponse( + @JsonProperty("items") List items, + @JsonProperty("next_page_token") String nextPageToken) { + Utils.checkNotNull(items, "items"); + Utils.checkNotNull(nextPageToken, "nextPageToken"); + this.items = items; + this.nextPageToken = nextPageToken; + } + + @JsonIgnore + public List items() { + return items; + } + + @JsonIgnore + public String nextPageToken() { + return nextPageToken; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetRevisionsResponse withItems(List items) { + Utils.checkNotNull(items, "items"); + this.items = items; + return this; + } + + public GetRevisionsResponse withNextPageToken(String nextPageToken) { + Utils.checkNotNull(nextPageToken, "nextPageToken"); + this.nextPageToken = nextPageToken; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRevisionsResponse other = (GetRevisionsResponse) o; + return + Objects.deepEquals(this.items, other.items) && + Objects.deepEquals(this.nextPageToken, other.nextPageToken); + } + + @Override + public int hashCode() { + return Objects.hash( + items, + nextPageToken); + } + + @Override + public String toString() { + return Utils.toString(GetRevisionsResponse.class, + "items", items, + "nextPageToken", nextPageToken); + } + + public final static class Builder { + + private List items; + + private String nextPageToken; + + private Builder() { + // force use of static builder() method + } + + public Builder items(List items) { + Utils.checkNotNull(items, "items"); + this.items = items; + return this; + } + + public Builder nextPageToken(String nextPageToken) { + Utils.checkNotNull(nextPageToken, "nextPageToken"); + this.nextPageToken = nextPageToken; + return this; + } + + public GetRevisionsResponse build() { + return new GetRevisionsResponse( + items, + nextPageToken); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetTagsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetTagsResponse.java new file mode 100644 index 00000000..cd87bbdb --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GetTagsResponse.java @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; + + +public class GetTagsResponse { + + @JsonProperty("items") + private List items; + + @JsonCreator + public GetTagsResponse( + @JsonProperty("items") List items) { + Utils.checkNotNull(items, "items"); + this.items = items; + } + + @JsonIgnore + public List items() { + return items; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetTagsResponse withItems(List items) { + Utils.checkNotNull(items, "items"); + this.items = items; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetTagsResponse other = (GetTagsResponse) o; + return + Objects.deepEquals(this.items, other.items); + } + + @Override + public int hashCode() { + return Objects.hash( + items); + } + + @Override + public String toString() { + return Utils.toString(GetTagsResponse.class, + "items", items); + } + + public final static class Builder { + + private List items; + + private Builder() { + // force use of static builder() method + } + + public Builder items(List items) { + Utils.checkNotNull(items, "items"); + this.items = items; + return this; + } + + public GetTagsResponse build() { + return new GetTagsResponse( + items); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureCodeSamplesRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureCodeSamplesRequest.java new file mode 100644 index 00000000..9464c178 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureCodeSamplesRequest.java @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * GithubConfigureCodeSamplesRequest - A request to configure GitHub code samples + */ + +public class GithubConfigureCodeSamplesRequest { + + /** + * The GitHub organization name + */ + @JsonProperty("org") + private String org; + + /** + * The GitHub repository name + */ + @JsonProperty("repo") + private String repo; + + /** + * The target name for the code samples + */ + @JsonProperty("targetName") + private String targetName; + + @JsonCreator + public GithubConfigureCodeSamplesRequest( + @JsonProperty("org") String org, + @JsonProperty("repo") String repo, + @JsonProperty("targetName") String targetName) { + Utils.checkNotNull(org, "org"); + Utils.checkNotNull(repo, "repo"); + Utils.checkNotNull(targetName, "targetName"); + this.org = org; + this.repo = repo; + this.targetName = targetName; + } + + /** + * The GitHub organization name + */ + @JsonIgnore + public String org() { + return org; + } + + /** + * The GitHub repository name + */ + @JsonIgnore + public String repo() { + return repo; + } + + /** + * The target name for the code samples + */ + @JsonIgnore + public String targetName() { + return targetName; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The GitHub organization name + */ + public GithubConfigureCodeSamplesRequest withOrg(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + /** + * The GitHub repository name + */ + public GithubConfigureCodeSamplesRequest withRepo(String repo) { + Utils.checkNotNull(repo, "repo"); + this.repo = repo; + return this; + } + + /** + * The target name for the code samples + */ + public GithubConfigureCodeSamplesRequest withTargetName(String targetName) { + Utils.checkNotNull(targetName, "targetName"); + this.targetName = targetName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GithubConfigureCodeSamplesRequest other = (GithubConfigureCodeSamplesRequest) o; + return + Objects.deepEquals(this.org, other.org) && + Objects.deepEquals(this.repo, other.repo) && + Objects.deepEquals(this.targetName, other.targetName); + } + + @Override + public int hashCode() { + return Objects.hash( + org, + repo, + targetName); + } + + @Override + public String toString() { + return Utils.toString(GithubConfigureCodeSamplesRequest.class, + "org", org, + "repo", repo, + "targetName", targetName); + } + + public final static class Builder { + + private String org; + + private String repo; + + private String targetName; + + private Builder() { + // force use of static builder() method + } + + /** + * The GitHub organization name + */ + public Builder org(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + /** + * The GitHub repository name + */ + public Builder repo(String repo) { + Utils.checkNotNull(repo, "repo"); + this.repo = repo; + return this; + } + + /** + * The target name for the code samples + */ + public Builder targetName(String targetName) { + Utils.checkNotNull(targetName, "targetName"); + this.targetName = targetName; + return this; + } + + public GithubConfigureCodeSamplesRequest build() { + return new GithubConfigureCodeSamplesRequest( + org, + repo, + targetName); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureCodeSamplesResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureCodeSamplesResponse.java new file mode 100644 index 00000000..276e9a84 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureCodeSamplesResponse.java @@ -0,0 +1,214 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * GithubConfigureCodeSamplesResponse - A response to configure GitHub code samples + */ + +public class GithubConfigureCodeSamplesResponse { + + /** + * The URL of the code sample overlay registry + */ + @JsonProperty("codeSampleOverlayRegistryURL") + private String codeSampleOverlayRegistryURL; + + /** + * The ID of the GitHub action that was dispatched + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("ghActionID") + private Optional ghActionID; + + /** + * A document referenced by a workflow + */ + @JsonProperty("source") + private WorkflowDocument source; + + @JsonCreator + public GithubConfigureCodeSamplesResponse( + @JsonProperty("codeSampleOverlayRegistryURL") String codeSampleOverlayRegistryURL, + @JsonProperty("ghActionID") Optional ghActionID, + @JsonProperty("source") WorkflowDocument source) { + Utils.checkNotNull(codeSampleOverlayRegistryURL, "codeSampleOverlayRegistryURL"); + Utils.checkNotNull(ghActionID, "ghActionID"); + Utils.checkNotNull(source, "source"); + this.codeSampleOverlayRegistryURL = codeSampleOverlayRegistryURL; + this.ghActionID = ghActionID; + this.source = source; + } + + public GithubConfigureCodeSamplesResponse( + String codeSampleOverlayRegistryURL, + WorkflowDocument source) { + this(codeSampleOverlayRegistryURL, Optional.empty(), source); + } + + /** + * The URL of the code sample overlay registry + */ + @JsonIgnore + public String codeSampleOverlayRegistryURL() { + return codeSampleOverlayRegistryURL; + } + + /** + * The ID of the GitHub action that was dispatched + */ + @JsonIgnore + public Optional ghActionID() { + return ghActionID; + } + + /** + * A document referenced by a workflow + */ + @JsonIgnore + public WorkflowDocument source() { + return source; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The URL of the code sample overlay registry + */ + public GithubConfigureCodeSamplesResponse withCodeSampleOverlayRegistryURL(String codeSampleOverlayRegistryURL) { + Utils.checkNotNull(codeSampleOverlayRegistryURL, "codeSampleOverlayRegistryURL"); + this.codeSampleOverlayRegistryURL = codeSampleOverlayRegistryURL; + return this; + } + + /** + * The ID of the GitHub action that was dispatched + */ + public GithubConfigureCodeSamplesResponse withGhActionID(String ghActionID) { + Utils.checkNotNull(ghActionID, "ghActionID"); + this.ghActionID = Optional.ofNullable(ghActionID); + return this; + } + + /** + * The ID of the GitHub action that was dispatched + */ + public GithubConfigureCodeSamplesResponse withGhActionID(Optional ghActionID) { + Utils.checkNotNull(ghActionID, "ghActionID"); + this.ghActionID = ghActionID; + return this; + } + + /** + * A document referenced by a workflow + */ + public GithubConfigureCodeSamplesResponse withSource(WorkflowDocument source) { + Utils.checkNotNull(source, "source"); + this.source = source; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GithubConfigureCodeSamplesResponse other = (GithubConfigureCodeSamplesResponse) o; + return + Objects.deepEquals(this.codeSampleOverlayRegistryURL, other.codeSampleOverlayRegistryURL) && + Objects.deepEquals(this.ghActionID, other.ghActionID) && + Objects.deepEquals(this.source, other.source); + } + + @Override + public int hashCode() { + return Objects.hash( + codeSampleOverlayRegistryURL, + ghActionID, + source); + } + + @Override + public String toString() { + return Utils.toString(GithubConfigureCodeSamplesResponse.class, + "codeSampleOverlayRegistryURL", codeSampleOverlayRegistryURL, + "ghActionID", ghActionID, + "source", source); + } + + public final static class Builder { + + private String codeSampleOverlayRegistryURL; + + private Optional ghActionID = Optional.empty(); + + private WorkflowDocument source; + + private Builder() { + // force use of static builder() method + } + + /** + * The URL of the code sample overlay registry + */ + public Builder codeSampleOverlayRegistryURL(String codeSampleOverlayRegistryURL) { + Utils.checkNotNull(codeSampleOverlayRegistryURL, "codeSampleOverlayRegistryURL"); + this.codeSampleOverlayRegistryURL = codeSampleOverlayRegistryURL; + return this; + } + + /** + * The ID of the GitHub action that was dispatched + */ + public Builder ghActionID(String ghActionID) { + Utils.checkNotNull(ghActionID, "ghActionID"); + this.ghActionID = Optional.ofNullable(ghActionID); + return this; + } + + /** + * The ID of the GitHub action that was dispatched + */ + public Builder ghActionID(Optional ghActionID) { + Utils.checkNotNull(ghActionID, "ghActionID"); + this.ghActionID = ghActionID; + return this; + } + + /** + * A document referenced by a workflow + */ + public Builder source(WorkflowDocument source) { + Utils.checkNotNull(source, "source"); + this.source = source; + return this; + } + + public GithubConfigureCodeSamplesResponse build() { + return new GithubConfigureCodeSamplesResponse( + codeSampleOverlayRegistryURL, + ghActionID, + source); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureMintlifyRepoRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureMintlifyRepoRequest.java new file mode 100644 index 00000000..e03f6c5c --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureMintlifyRepoRequest.java @@ -0,0 +1,299 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GithubConfigureMintlifyRepoRequest - A request to configure a GitHub repository for mintlify + */ + +public class GithubConfigureMintlifyRepoRequest { + + /** + * The input OpenAPI document + */ + @JsonProperty("input") + private String input; + + /** + * The GitHub organization name + */ + @JsonProperty("org") + private String org; + + /** + * The overlays to apply + */ + @JsonProperty("overlays") + private List overlays; + + /** + * The GitHub repository name + */ + @JsonProperty("repo") + private String repo; + + /** + * The subdirectory (location of mint.json) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subdirectory") + private Optional subdirectory; + + @JsonCreator + public GithubConfigureMintlifyRepoRequest( + @JsonProperty("input") String input, + @JsonProperty("org") String org, + @JsonProperty("overlays") List overlays, + @JsonProperty("repo") String repo, + @JsonProperty("subdirectory") Optional subdirectory) { + Utils.checkNotNull(input, "input"); + Utils.checkNotNull(org, "org"); + Utils.checkNotNull(overlays, "overlays"); + Utils.checkNotNull(repo, "repo"); + Utils.checkNotNull(subdirectory, "subdirectory"); + this.input = input; + this.org = org; + this.overlays = overlays; + this.repo = repo; + this.subdirectory = subdirectory; + } + + public GithubConfigureMintlifyRepoRequest( + String input, + String org, + List overlays, + String repo) { + this(input, org, overlays, repo, Optional.empty()); + } + + /** + * The input OpenAPI document + */ + @JsonIgnore + public String input() { + return input; + } + + /** + * The GitHub organization name + */ + @JsonIgnore + public String org() { + return org; + } + + /** + * The overlays to apply + */ + @JsonIgnore + public List overlays() { + return overlays; + } + + /** + * The GitHub repository name + */ + @JsonIgnore + public String repo() { + return repo; + } + + /** + * The subdirectory (location of mint.json) + */ + @JsonIgnore + public Optional subdirectory() { + return subdirectory; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The input OpenAPI document + */ + public GithubConfigureMintlifyRepoRequest withInput(String input) { + Utils.checkNotNull(input, "input"); + this.input = input; + return this; + } + + /** + * The GitHub organization name + */ + public GithubConfigureMintlifyRepoRequest withOrg(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + /** + * The overlays to apply + */ + public GithubConfigureMintlifyRepoRequest withOverlays(List overlays) { + Utils.checkNotNull(overlays, "overlays"); + this.overlays = overlays; + return this; + } + + /** + * The GitHub repository name + */ + public GithubConfigureMintlifyRepoRequest withRepo(String repo) { + Utils.checkNotNull(repo, "repo"); + this.repo = repo; + return this; + } + + /** + * The subdirectory (location of mint.json) + */ + public GithubConfigureMintlifyRepoRequest withSubdirectory(String subdirectory) { + Utils.checkNotNull(subdirectory, "subdirectory"); + this.subdirectory = Optional.ofNullable(subdirectory); + return this; + } + + /** + * The subdirectory (location of mint.json) + */ + public GithubConfigureMintlifyRepoRequest withSubdirectory(Optional subdirectory) { + Utils.checkNotNull(subdirectory, "subdirectory"); + this.subdirectory = subdirectory; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GithubConfigureMintlifyRepoRequest other = (GithubConfigureMintlifyRepoRequest) o; + return + Objects.deepEquals(this.input, other.input) && + Objects.deepEquals(this.org, other.org) && + Objects.deepEquals(this.overlays, other.overlays) && + Objects.deepEquals(this.repo, other.repo) && + Objects.deepEquals(this.subdirectory, other.subdirectory); + } + + @Override + public int hashCode() { + return Objects.hash( + input, + org, + overlays, + repo, + subdirectory); + } + + @Override + public String toString() { + return Utils.toString(GithubConfigureMintlifyRepoRequest.class, + "input", input, + "org", org, + "overlays", overlays, + "repo", repo, + "subdirectory", subdirectory); + } + + public final static class Builder { + + private String input; + + private String org; + + private List overlays; + + private String repo; + + private Optional subdirectory = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The input OpenAPI document + */ + public Builder input(String input) { + Utils.checkNotNull(input, "input"); + this.input = input; + return this; + } + + /** + * The GitHub organization name + */ + public Builder org(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + /** + * The overlays to apply + */ + public Builder overlays(List overlays) { + Utils.checkNotNull(overlays, "overlays"); + this.overlays = overlays; + return this; + } + + /** + * The GitHub repository name + */ + public Builder repo(String repo) { + Utils.checkNotNull(repo, "repo"); + this.repo = repo; + return this; + } + + /** + * The subdirectory (location of mint.json) + */ + public Builder subdirectory(String subdirectory) { + Utils.checkNotNull(subdirectory, "subdirectory"); + this.subdirectory = Optional.ofNullable(subdirectory); + return this; + } + + /** + * The subdirectory (location of mint.json) + */ + public Builder subdirectory(Optional subdirectory) { + Utils.checkNotNull(subdirectory, "subdirectory"); + this.subdirectory = subdirectory; + return this; + } + + public GithubConfigureMintlifyRepoRequest build() { + return new GithubConfigureMintlifyRepoRequest( + input, + org, + overlays, + repo, + subdirectory); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureTargetRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureTargetRequest.java new file mode 100644 index 00000000..3b8e0347 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubConfigureTargetRequest.java @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * GithubConfigureTargetRequest - A request to configure a GitHub target + */ + +public class GithubConfigureTargetRequest { + + /** + * The GitHub organization name + */ + @JsonProperty("org") + private String org; + + /** + * The GitHub repository name + */ + @JsonProperty("repo_name") + private String repoName; + + @JsonCreator + public GithubConfigureTargetRequest( + @JsonProperty("org") String org, + @JsonProperty("repo_name") String repoName) { + Utils.checkNotNull(org, "org"); + Utils.checkNotNull(repoName, "repoName"); + this.org = org; + this.repoName = repoName; + } + + /** + * The GitHub organization name + */ + @JsonIgnore + public String org() { + return org; + } + + /** + * The GitHub repository name + */ + @JsonIgnore + public String repoName() { + return repoName; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The GitHub organization name + */ + public GithubConfigureTargetRequest withOrg(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + /** + * The GitHub repository name + */ + public GithubConfigureTargetRequest withRepoName(String repoName) { + Utils.checkNotNull(repoName, "repoName"); + this.repoName = repoName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GithubConfigureTargetRequest other = (GithubConfigureTargetRequest) o; + return + Objects.deepEquals(this.org, other.org) && + Objects.deepEquals(this.repoName, other.repoName); + } + + @Override + public int hashCode() { + return Objects.hash( + org, + repoName); + } + + @Override + public String toString() { + return Utils.toString(GithubConfigureTargetRequest.class, + "org", org, + "repoName", repoName); + } + + public final static class Builder { + + private String org; + + private String repoName; + + private Builder() { + // force use of static builder() method + } + + /** + * The GitHub organization name + */ + public Builder org(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + /** + * The GitHub repository name + */ + public Builder repoName(String repoName) { + Utils.checkNotNull(repoName, "repoName"); + this.repoName = repoName; + return this; + } + + public GithubConfigureTargetRequest build() { + return new GithubConfigureTargetRequest( + org, + repoName); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubGetActionResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubGetActionResponse.java new file mode 100644 index 00000000..dcf2c454 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubGetActionResponse.java @@ -0,0 +1,190 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * GithubGetActionResponse - response to a getting the latest action run on a GitHub request + */ + +public class GithubGetActionResponse { + + /** + * The status of the latest action run if available + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("run_status") + private Optional runStatus; + + /** + * The URL for latest action run if available + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("run_url") + private Optional runUrl; + + @JsonCreator + public GithubGetActionResponse( + @JsonProperty("run_status") Optional runStatus, + @JsonProperty("run_url") Optional runUrl) { + Utils.checkNotNull(runStatus, "runStatus"); + Utils.checkNotNull(runUrl, "runUrl"); + this.runStatus = runStatus; + this.runUrl = runUrl; + } + + public GithubGetActionResponse() { + this(Optional.empty(), Optional.empty()); + } + + /** + * The status of the latest action run if available + */ + @JsonIgnore + public Optional runStatus() { + return runStatus; + } + + /** + * The URL for latest action run if available + */ + @JsonIgnore + public Optional runUrl() { + return runUrl; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The status of the latest action run if available + */ + public GithubGetActionResponse withRunStatus(String runStatus) { + Utils.checkNotNull(runStatus, "runStatus"); + this.runStatus = Optional.ofNullable(runStatus); + return this; + } + + /** + * The status of the latest action run if available + */ + public GithubGetActionResponse withRunStatus(Optional runStatus) { + Utils.checkNotNull(runStatus, "runStatus"); + this.runStatus = runStatus; + return this; + } + + /** + * The URL for latest action run if available + */ + public GithubGetActionResponse withRunUrl(String runUrl) { + Utils.checkNotNull(runUrl, "runUrl"); + this.runUrl = Optional.ofNullable(runUrl); + return this; + } + + /** + * The URL for latest action run if available + */ + public GithubGetActionResponse withRunUrl(Optional runUrl) { + Utils.checkNotNull(runUrl, "runUrl"); + this.runUrl = runUrl; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GithubGetActionResponse other = (GithubGetActionResponse) o; + return + Objects.deepEquals(this.runStatus, other.runStatus) && + Objects.deepEquals(this.runUrl, other.runUrl); + } + + @Override + public int hashCode() { + return Objects.hash( + runStatus, + runUrl); + } + + @Override + public String toString() { + return Utils.toString(GithubGetActionResponse.class, + "runStatus", runStatus, + "runUrl", runUrl); + } + + public final static class Builder { + + private Optional runStatus = Optional.empty(); + + private Optional runUrl = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The status of the latest action run if available + */ + public Builder runStatus(String runStatus) { + Utils.checkNotNull(runStatus, "runStatus"); + this.runStatus = Optional.ofNullable(runStatus); + return this; + } + + /** + * The status of the latest action run if available + */ + public Builder runStatus(Optional runStatus) { + Utils.checkNotNull(runStatus, "runStatus"); + this.runStatus = runStatus; + return this; + } + + /** + * The URL for latest action run if available + */ + public Builder runUrl(String runUrl) { + Utils.checkNotNull(runUrl, "runUrl"); + this.runUrl = Optional.ofNullable(runUrl); + return this; + } + + /** + * The URL for latest action run if available + */ + public Builder runUrl(Optional runUrl) { + Utils.checkNotNull(runUrl, "runUrl"); + this.runUrl = runUrl; + return this; + } + + public GithubGetActionResponse build() { + return new GithubGetActionResponse( + runStatus, + runUrl); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubMissingPublishingSecretsResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubMissingPublishingSecretsResponse.java new file mode 100644 index 00000000..efe4aaf6 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubMissingPublishingSecretsResponse.java @@ -0,0 +1,115 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * GithubMissingPublishingSecretsResponse - A valid response containing MISSING publishing secret keys for a github target + */ + +public class GithubMissingPublishingSecretsResponse { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("missing_secrets") + private Optional> missingSecrets; + + @JsonCreator + public GithubMissingPublishingSecretsResponse( + @JsonProperty("missing_secrets") Optional> missingSecrets) { + Utils.checkNotNull(missingSecrets, "missingSecrets"); + this.missingSecrets = missingSecrets; + } + + public GithubMissingPublishingSecretsResponse() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> missingSecrets() { + return (Optional>) missingSecrets; + } + + public final static Builder builder() { + return new Builder(); + } + + public GithubMissingPublishingSecretsResponse withMissingSecrets(List missingSecrets) { + Utils.checkNotNull(missingSecrets, "missingSecrets"); + this.missingSecrets = Optional.ofNullable(missingSecrets); + return this; + } + + public GithubMissingPublishingSecretsResponse withMissingSecrets(Optional> missingSecrets) { + Utils.checkNotNull(missingSecrets, "missingSecrets"); + this.missingSecrets = missingSecrets; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GithubMissingPublishingSecretsResponse other = (GithubMissingPublishingSecretsResponse) o; + return + Objects.deepEquals(this.missingSecrets, other.missingSecrets); + } + + @Override + public int hashCode() { + return Objects.hash( + missingSecrets); + } + + @Override + public String toString() { + return Utils.toString(GithubMissingPublishingSecretsResponse.class, + "missingSecrets", missingSecrets); + } + + public final static class Builder { + + private Optional> missingSecrets = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder missingSecrets(List missingSecrets) { + Utils.checkNotNull(missingSecrets, "missingSecrets"); + this.missingSecrets = Optional.ofNullable(missingSecrets); + return this; + } + + public Builder missingSecrets(Optional> missingSecrets) { + Utils.checkNotNull(missingSecrets, "missingSecrets"); + this.missingSecrets = missingSecrets; + return this; + } + + public GithubMissingPublishingSecretsResponse build() { + return new GithubMissingPublishingSecretsResponse( + missingSecrets); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubPublishingPRResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubPublishingPRResponse.java new file mode 100644 index 00000000..eadde087 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubPublishingPRResponse.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * GithubPublishingPRResponse - Open generation PRs pending publishing + */ + +public class GithubPublishingPRResponse { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generation_pull_request") + private Optional generationPullRequest; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("pending_version") + private Optional pendingVersion; + + @JsonCreator + public GithubPublishingPRResponse( + @JsonProperty("generation_pull_request") Optional generationPullRequest, + @JsonProperty("pending_version") Optional pendingVersion) { + Utils.checkNotNull(generationPullRequest, "generationPullRequest"); + Utils.checkNotNull(pendingVersion, "pendingVersion"); + this.generationPullRequest = generationPullRequest; + this.pendingVersion = pendingVersion; + } + + public GithubPublishingPRResponse() { + this(Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional generationPullRequest() { + return generationPullRequest; + } + + @JsonIgnore + public Optional pendingVersion() { + return pendingVersion; + } + + public final static Builder builder() { + return new Builder(); + } + + public GithubPublishingPRResponse withGenerationPullRequest(String generationPullRequest) { + Utils.checkNotNull(generationPullRequest, "generationPullRequest"); + this.generationPullRequest = Optional.ofNullable(generationPullRequest); + return this; + } + + public GithubPublishingPRResponse withGenerationPullRequest(Optional generationPullRequest) { + Utils.checkNotNull(generationPullRequest, "generationPullRequest"); + this.generationPullRequest = generationPullRequest; + return this; + } + + public GithubPublishingPRResponse withPendingVersion(String pendingVersion) { + Utils.checkNotNull(pendingVersion, "pendingVersion"); + this.pendingVersion = Optional.ofNullable(pendingVersion); + return this; + } + + public GithubPublishingPRResponse withPendingVersion(Optional pendingVersion) { + Utils.checkNotNull(pendingVersion, "pendingVersion"); + this.pendingVersion = pendingVersion; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GithubPublishingPRResponse other = (GithubPublishingPRResponse) o; + return + Objects.deepEquals(this.generationPullRequest, other.generationPullRequest) && + Objects.deepEquals(this.pendingVersion, other.pendingVersion); + } + + @Override + public int hashCode() { + return Objects.hash( + generationPullRequest, + pendingVersion); + } + + @Override + public String toString() { + return Utils.toString(GithubPublishingPRResponse.class, + "generationPullRequest", generationPullRequest, + "pendingVersion", pendingVersion); + } + + public final static class Builder { + + private Optional generationPullRequest = Optional.empty(); + + private Optional pendingVersion = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder generationPullRequest(String generationPullRequest) { + Utils.checkNotNull(generationPullRequest, "generationPullRequest"); + this.generationPullRequest = Optional.ofNullable(generationPullRequest); + return this; + } + + public Builder generationPullRequest(Optional generationPullRequest) { + Utils.checkNotNull(generationPullRequest, "generationPullRequest"); + this.generationPullRequest = generationPullRequest; + return this; + } + + public Builder pendingVersion(String pendingVersion) { + Utils.checkNotNull(pendingVersion, "pendingVersion"); + this.pendingVersion = Optional.ofNullable(pendingVersion); + return this; + } + + public Builder pendingVersion(Optional pendingVersion) { + Utils.checkNotNull(pendingVersion, "pendingVersion"); + this.pendingVersion = pendingVersion; + return this; + } + + public GithubPublishingPRResponse build() { + return new GithubPublishingPRResponse( + generationPullRequest, + pendingVersion); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubStorePublishingSecretsRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubStorePublishingSecretsRequest.java new file mode 100644 index 00000000..f3887818 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubStorePublishingSecretsRequest.java @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * GithubStorePublishingSecretsRequest - A request to store publishing secrets for a github target + */ + +public class GithubStorePublishingSecretsRequest { + + /** + * The generation lock ID + */ + @JsonProperty("generate_gen_lock_id") + private String generateGenLockId; + + /** + * A map of secrets to store in the GitHub target + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secrets") + private Optional> secrets; + + @JsonCreator + public GithubStorePublishingSecretsRequest( + @JsonProperty("generate_gen_lock_id") String generateGenLockId, + @JsonProperty("secrets") Optional> secrets) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + Utils.checkNotNull(secrets, "secrets"); + this.generateGenLockId = generateGenLockId; + this.secrets = secrets; + } + + public GithubStorePublishingSecretsRequest( + String generateGenLockId) { + this(generateGenLockId, Optional.empty()); + } + + /** + * The generation lock ID + */ + @JsonIgnore + public String generateGenLockId() { + return generateGenLockId; + } + + /** + * A map of secrets to store in the GitHub target + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> secrets() { + return (Optional>) secrets; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The generation lock ID + */ + public GithubStorePublishingSecretsRequest withGenerateGenLockId(String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + return this; + } + + /** + * A map of secrets to store in the GitHub target + */ + public GithubStorePublishingSecretsRequest withSecrets(Map secrets) { + Utils.checkNotNull(secrets, "secrets"); + this.secrets = Optional.ofNullable(secrets); + return this; + } + + /** + * A map of secrets to store in the GitHub target + */ + public GithubStorePublishingSecretsRequest withSecrets(Optional> secrets) { + Utils.checkNotNull(secrets, "secrets"); + this.secrets = secrets; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GithubStorePublishingSecretsRequest other = (GithubStorePublishingSecretsRequest) o; + return + Objects.deepEquals(this.generateGenLockId, other.generateGenLockId) && + Objects.deepEquals(this.secrets, other.secrets); + } + + @Override + public int hashCode() { + return Objects.hash( + generateGenLockId, + secrets); + } + + @Override + public String toString() { + return Utils.toString(GithubStorePublishingSecretsRequest.class, + "generateGenLockId", generateGenLockId, + "secrets", secrets); + } + + public final static class Builder { + + private String generateGenLockId; + + private Optional> secrets = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The generation lock ID + */ + public Builder generateGenLockId(String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + return this; + } + + /** + * A map of secrets to store in the GitHub target + */ + public Builder secrets(Map secrets) { + Utils.checkNotNull(secrets, "secrets"); + this.secrets = Optional.ofNullable(secrets); + return this; + } + + /** + * A map of secrets to store in the GitHub target + */ + public Builder secrets(Optional> secrets) { + Utils.checkNotNull(secrets, "secrets"); + this.secrets = secrets; + return this; + } + + public GithubStorePublishingSecretsRequest build() { + return new GithubStorePublishingSecretsRequest( + generateGenLockId, + secrets); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubTriggerActionRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubTriggerActionRequest.java new file mode 100644 index 00000000..db1bf443 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/GithubTriggerActionRequest.java @@ -0,0 +1,377 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * GithubTriggerActionRequest - A request to trigger an action on a GitHub target + */ + +public class GithubTriggerActionRequest { + + /** + * Force an SDK generation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("force") + private Optional force; + + /** + * The generation lock ID + */ + @JsonProperty("gen_lock_id") + private String genLockId; + + /** + * The GitHub organization name + */ + @JsonProperty("org") + private String org; + + /** + * The GitHub repository name + */ + @JsonProperty("repo_name") + private String repoName; + + /** + * A version to override the SDK too in workflow dispatch + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("set_version") + private Optional setVersion; + + /** + * The target name for the action + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("target_name") + private Optional targetName; + + @JsonCreator + public GithubTriggerActionRequest( + @JsonProperty("force") Optional force, + @JsonProperty("gen_lock_id") String genLockId, + @JsonProperty("org") String org, + @JsonProperty("repo_name") String repoName, + @JsonProperty("set_version") Optional setVersion, + @JsonProperty("target_name") Optional targetName) { + Utils.checkNotNull(force, "force"); + Utils.checkNotNull(genLockId, "genLockId"); + Utils.checkNotNull(org, "org"); + Utils.checkNotNull(repoName, "repoName"); + Utils.checkNotNull(setVersion, "setVersion"); + Utils.checkNotNull(targetName, "targetName"); + this.force = force; + this.genLockId = genLockId; + this.org = org; + this.repoName = repoName; + this.setVersion = setVersion; + this.targetName = targetName; + } + + public GithubTriggerActionRequest( + String genLockId, + String org, + String repoName) { + this(Optional.empty(), genLockId, org, repoName, Optional.empty(), Optional.empty()); + } + + /** + * Force an SDK generation + */ + @JsonIgnore + public Optional force() { + return force; + } + + /** + * The generation lock ID + */ + @JsonIgnore + public String genLockId() { + return genLockId; + } + + /** + * The GitHub organization name + */ + @JsonIgnore + public String org() { + return org; + } + + /** + * The GitHub repository name + */ + @JsonIgnore + public String repoName() { + return repoName; + } + + /** + * A version to override the SDK too in workflow dispatch + */ + @JsonIgnore + public Optional setVersion() { + return setVersion; + } + + /** + * The target name for the action + */ + @JsonIgnore + public Optional targetName() { + return targetName; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Force an SDK generation + */ + public GithubTriggerActionRequest withForce(boolean force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + /** + * Force an SDK generation + */ + public GithubTriggerActionRequest withForce(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + /** + * The generation lock ID + */ + public GithubTriggerActionRequest withGenLockId(String genLockId) { + Utils.checkNotNull(genLockId, "genLockId"); + this.genLockId = genLockId; + return this; + } + + /** + * The GitHub organization name + */ + public GithubTriggerActionRequest withOrg(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + /** + * The GitHub repository name + */ + public GithubTriggerActionRequest withRepoName(String repoName) { + Utils.checkNotNull(repoName, "repoName"); + this.repoName = repoName; + return this; + } + + /** + * A version to override the SDK too in workflow dispatch + */ + public GithubTriggerActionRequest withSetVersion(String setVersion) { + Utils.checkNotNull(setVersion, "setVersion"); + this.setVersion = Optional.ofNullable(setVersion); + return this; + } + + /** + * A version to override the SDK too in workflow dispatch + */ + public GithubTriggerActionRequest withSetVersion(Optional setVersion) { + Utils.checkNotNull(setVersion, "setVersion"); + this.setVersion = setVersion; + return this; + } + + /** + * The target name for the action + */ + public GithubTriggerActionRequest withTargetName(String targetName) { + Utils.checkNotNull(targetName, "targetName"); + this.targetName = Optional.ofNullable(targetName); + return this; + } + + /** + * The target name for the action + */ + public GithubTriggerActionRequest withTargetName(Optional targetName) { + Utils.checkNotNull(targetName, "targetName"); + this.targetName = targetName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GithubTriggerActionRequest other = (GithubTriggerActionRequest) o; + return + Objects.deepEquals(this.force, other.force) && + Objects.deepEquals(this.genLockId, other.genLockId) && + Objects.deepEquals(this.org, other.org) && + Objects.deepEquals(this.repoName, other.repoName) && + Objects.deepEquals(this.setVersion, other.setVersion) && + Objects.deepEquals(this.targetName, other.targetName); + } + + @Override + public int hashCode() { + return Objects.hash( + force, + genLockId, + org, + repoName, + setVersion, + targetName); + } + + @Override + public String toString() { + return Utils.toString(GithubTriggerActionRequest.class, + "force", force, + "genLockId", genLockId, + "org", org, + "repoName", repoName, + "setVersion", setVersion, + "targetName", targetName); + } + + public final static class Builder { + + private Optional force = Optional.empty(); + + private String genLockId; + + private String org; + + private String repoName; + + private Optional setVersion = Optional.empty(); + + private Optional targetName = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Force an SDK generation + */ + public Builder force(boolean force) { + Utils.checkNotNull(force, "force"); + this.force = Optional.ofNullable(force); + return this; + } + + /** + * Force an SDK generation + */ + public Builder force(Optional force) { + Utils.checkNotNull(force, "force"); + this.force = force; + return this; + } + + /** + * The generation lock ID + */ + public Builder genLockId(String genLockId) { + Utils.checkNotNull(genLockId, "genLockId"); + this.genLockId = genLockId; + return this; + } + + /** + * The GitHub organization name + */ + public Builder org(String org) { + Utils.checkNotNull(org, "org"); + this.org = org; + return this; + } + + /** + * The GitHub repository name + */ + public Builder repoName(String repoName) { + Utils.checkNotNull(repoName, "repoName"); + this.repoName = repoName; + return this; + } + + /** + * A version to override the SDK too in workflow dispatch + */ + public Builder setVersion(String setVersion) { + Utils.checkNotNull(setVersion, "setVersion"); + this.setVersion = Optional.ofNullable(setVersion); + return this; + } + + /** + * A version to override the SDK too in workflow dispatch + */ + public Builder setVersion(Optional setVersion) { + Utils.checkNotNull(setVersion, "setVersion"); + this.setVersion = setVersion; + return this; + } + + /** + * The target name for the action + */ + public Builder targetName(String targetName) { + Utils.checkNotNull(targetName, "targetName"); + this.targetName = Optional.ofNullable(targetName); + return this; + } + + /** + * The target name for the action + */ + public Builder targetName(Optional targetName) { + Utils.checkNotNull(targetName, "targetName"); + this.targetName = targetName; + return this; + } + + public GithubTriggerActionRequest build() { + return new GithubTriggerActionRequest( + force, + genLockId, + org, + repoName, + setVersion, + targetName); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/InteractionType.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/InteractionType.java new file mode 100644 index 00000000..67017082 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/InteractionType.java @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; + +/** + * InteractionType - Type of interaction. + */ +public enum InteractionType { + CI_EXEC("CI_EXEC"), + CLI_EXEC("CLI_EXEC"), + LINT("LINT"), + OPENAPI_DIFF("OPENAPI_DIFF"), + TARGET_GENERATE("TARGET_GENERATE"), + TOMBSTONE("TOMBSTONE"), + AUTHENTICATE("AUTHENTICATE"), + QUICKSTART("QUICKSTART"), + RUN("RUN"), + CONFIGURE("CONFIGURE"), + PUBLISH("PUBLISH"); + + @JsonValue + private final String value; + + private InteractionType(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Level.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Level.java new file mode 100644 index 00000000..cb4181f8 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Level.java @@ -0,0 +1,25 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; + +public enum Level { + ALLOWED("allowed"), + WARNING("warning"), + BLOCKED("blocked"); + + @JsonValue + private final String value; + + private Level(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/License.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/License.java new file mode 100644 index 00000000..d6ba2128 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/License.java @@ -0,0 +1,109 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class License { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("identifier") + private Optional identifier; + + @JsonCreator + public License( + @JsonProperty("identifier") Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + } + + public License() { + this(Optional.empty()); + } + + @JsonIgnore + public Optional identifier() { + return identifier; + } + + public final static Builder builder() { + return new Builder(); + } + + public License withIdentifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public License withIdentifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + License other = (License) o; + return + Objects.deepEquals(this.identifier, other.identifier); + } + + @Override + public int hashCode() { + return Objects.hash( + identifier); + } + + @Override + public String toString() { + return Utils.toString(License.class, + "identifier", identifier); + } + + public final static class Builder { + + private Optional identifier = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder identifier(String identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = Optional.ofNullable(identifier); + return this; + } + + public Builder identifier(Optional identifier) { + Utils.checkNotNull(identifier, "identifier"); + this.identifier = identifier; + return this; + } + + public License build() { + return new License( + identifier); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Manifest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Manifest.java new file mode 100644 index 00000000..a6fecf55 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Manifest.java @@ -0,0 +1,375 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * Manifest - Returns the requested manifest file + */ + +public class Manifest { + + /** + * Annotations + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("annotations") + private Optional annotations; + + /** + * Type of artifact + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("artifactType") + private Optional artifactType; + + /** + * List of V2 image layer information + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("layers") + private Optional> layers; + + /** + * Media type usually application/vnd.docker.distribution.manifest.v2+json if this is in the accept header + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaType") + private Optional mediaType; + + /** + * Schema version + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("schemaVersion") + private Optional schemaVersion; + + @JsonCreator + public Manifest( + @JsonProperty("annotations") Optional annotations, + @JsonProperty("artifactType") Optional artifactType, + @JsonProperty("layers") Optional> layers, + @JsonProperty("mediaType") Optional mediaType, + @JsonProperty("schemaVersion") Optional schemaVersion) { + Utils.checkNotNull(annotations, "annotations"); + Utils.checkNotNull(artifactType, "artifactType"); + Utils.checkNotNull(layers, "layers"); + Utils.checkNotNull(mediaType, "mediaType"); + Utils.checkNotNull(schemaVersion, "schemaVersion"); + this.annotations = annotations; + this.artifactType = artifactType; + this.layers = layers; + this.mediaType = mediaType; + this.schemaVersion = schemaVersion; + } + + public Manifest() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Annotations + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional annotations() { + return (Optional) annotations; + } + + /** + * Type of artifact + */ + @JsonIgnore + public Optional artifactType() { + return artifactType; + } + + /** + * List of V2 image layer information + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> layers() { + return (Optional>) layers; + } + + /** + * Media type usually application/vnd.docker.distribution.manifest.v2+json if this is in the accept header + */ + @JsonIgnore + public Optional mediaType() { + return mediaType; + } + + /** + * Schema version + */ + @JsonIgnore + public Optional schemaVersion() { + return schemaVersion; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Annotations + */ + public Manifest withAnnotations(Annotations annotations) { + Utils.checkNotNull(annotations, "annotations"); + this.annotations = Optional.ofNullable(annotations); + return this; + } + + /** + * Annotations + */ + public Manifest withAnnotations(Optional annotations) { + Utils.checkNotNull(annotations, "annotations"); + this.annotations = annotations; + return this; + } + + /** + * Type of artifact + */ + public Manifest withArtifactType(String artifactType) { + Utils.checkNotNull(artifactType, "artifactType"); + this.artifactType = Optional.ofNullable(artifactType); + return this; + } + + /** + * Type of artifact + */ + public Manifest withArtifactType(Optional artifactType) { + Utils.checkNotNull(artifactType, "artifactType"); + this.artifactType = artifactType; + return this; + } + + /** + * List of V2 image layer information + */ + public Manifest withLayers(List layers) { + Utils.checkNotNull(layers, "layers"); + this.layers = Optional.ofNullable(layers); + return this; + } + + /** + * List of V2 image layer information + */ + public Manifest withLayers(Optional> layers) { + Utils.checkNotNull(layers, "layers"); + this.layers = layers; + return this; + } + + /** + * Media type usually application/vnd.docker.distribution.manifest.v2+json if this is in the accept header + */ + public Manifest withMediaType(String mediaType) { + Utils.checkNotNull(mediaType, "mediaType"); + this.mediaType = Optional.ofNullable(mediaType); + return this; + } + + /** + * Media type usually application/vnd.docker.distribution.manifest.v2+json if this is in the accept header + */ + public Manifest withMediaType(Optional mediaType) { + Utils.checkNotNull(mediaType, "mediaType"); + this.mediaType = mediaType; + return this; + } + + /** + * Schema version + */ + public Manifest withSchemaVersion(long schemaVersion) { + Utils.checkNotNull(schemaVersion, "schemaVersion"); + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + /** + * Schema version + */ + public Manifest withSchemaVersion(Optional schemaVersion) { + Utils.checkNotNull(schemaVersion, "schemaVersion"); + this.schemaVersion = schemaVersion; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Manifest other = (Manifest) o; + return + Objects.deepEquals(this.annotations, other.annotations) && + Objects.deepEquals(this.artifactType, other.artifactType) && + Objects.deepEquals(this.layers, other.layers) && + Objects.deepEquals(this.mediaType, other.mediaType) && + Objects.deepEquals(this.schemaVersion, other.schemaVersion); + } + + @Override + public int hashCode() { + return Objects.hash( + annotations, + artifactType, + layers, + mediaType, + schemaVersion); + } + + @Override + public String toString() { + return Utils.toString(Manifest.class, + "annotations", annotations, + "artifactType", artifactType, + "layers", layers, + "mediaType", mediaType, + "schemaVersion", schemaVersion); + } + + public final static class Builder { + + private Optional annotations = Optional.empty(); + + private Optional artifactType = Optional.empty(); + + private Optional> layers = Optional.empty(); + + private Optional mediaType = Optional.empty(); + + private Optional schemaVersion = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Annotations + */ + public Builder annotations(Annotations annotations) { + Utils.checkNotNull(annotations, "annotations"); + this.annotations = Optional.ofNullable(annotations); + return this; + } + + /** + * Annotations + */ + public Builder annotations(Optional annotations) { + Utils.checkNotNull(annotations, "annotations"); + this.annotations = annotations; + return this; + } + + /** + * Type of artifact + */ + public Builder artifactType(String artifactType) { + Utils.checkNotNull(artifactType, "artifactType"); + this.artifactType = Optional.ofNullable(artifactType); + return this; + } + + /** + * Type of artifact + */ + public Builder artifactType(Optional artifactType) { + Utils.checkNotNull(artifactType, "artifactType"); + this.artifactType = artifactType; + return this; + } + + /** + * List of V2 image layer information + */ + public Builder layers(List layers) { + Utils.checkNotNull(layers, "layers"); + this.layers = Optional.ofNullable(layers); + return this; + } + + /** + * List of V2 image layer information + */ + public Builder layers(Optional> layers) { + Utils.checkNotNull(layers, "layers"); + this.layers = layers; + return this; + } + + /** + * Media type usually application/vnd.docker.distribution.manifest.v2+json if this is in the accept header + */ + public Builder mediaType(String mediaType) { + Utils.checkNotNull(mediaType, "mediaType"); + this.mediaType = Optional.ofNullable(mediaType); + return this; + } + + /** + * Media type usually application/vnd.docker.distribution.manifest.v2+json if this is in the accept header + */ + public Builder mediaType(Optional mediaType) { + Utils.checkNotNull(mediaType, "mediaType"); + this.mediaType = mediaType; + return this; + } + + /** + * Schema version + */ + public Builder schemaVersion(long schemaVersion) { + Utils.checkNotNull(schemaVersion, "schemaVersion"); + this.schemaVersion = Optional.ofNullable(schemaVersion); + return this; + } + + /** + * Schema version + */ + public Builder schemaVersion(Optional schemaVersion) { + Utils.checkNotNull(schemaVersion, "schemaVersion"); + this.schemaVersion = schemaVersion; + return this; + } + + public Manifest build() { + return new Manifest( + annotations, + artifactType, + layers, + mediaType, + schemaVersion); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Namespace.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Namespace.java new file mode 100644 index 00000000..81400699 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Namespace.java @@ -0,0 +1,204 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Namespace - A namespace contains many revisions. + */ + +public class Namespace { + + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * {organization_slug}/{workspace_slug}/{namespace_name} + */ + @JsonProperty("id") + private String id; + + /** + * A human-readable name for the namespace. + */ + @JsonProperty("name") + private String name; + + @JsonProperty("updated_at") + private OffsetDateTime updatedAt; + + @JsonCreator + public Namespace( + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("id") String id, + @JsonProperty("name") String name, + @JsonProperty("updated_at") OffsetDateTime updatedAt) { + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.createdAt = createdAt; + this.id = id; + this.name = name; + this.updatedAt = updatedAt; + } + + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + /** + * {organization_slug}/{workspace_slug}/{namespace_name} + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * A human-readable name for the namespace. + */ + @JsonIgnore + public String name() { + return name; + } + + @JsonIgnore + public OffsetDateTime updatedAt() { + return updatedAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public Namespace withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * {organization_slug}/{workspace_slug}/{namespace_name} + */ + public Namespace withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * A human-readable name for the namespace. + */ + public Namespace withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Namespace withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Namespace other = (Namespace) o; + return + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.name, other.name) && + Objects.deepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + id, + name, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(Namespace.class, + "createdAt", createdAt, + "id", id, + "name", name, + "updatedAt", updatedAt); + } + + public final static class Builder { + + private OffsetDateTime createdAt; + + private String id; + + private String name; + + private OffsetDateTime updatedAt; + + private Builder() { + // force use of static builder() method + } + + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * {organization_slug}/{workspace_slug}/{namespace_name} + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * A human-readable name for the namespace. + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Namespace build() { + return new Namespace( + createdAt, + id, + name, + updatedAt); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASInfo.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASInfo.java new file mode 100644 index 00000000..2039a763 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASInfo.java @@ -0,0 +1,205 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class OASInfo { + + @JsonProperty("description") + private String description; + + @JsonProperty("license") + private License license; + + @JsonProperty("summary") + private String summary; + + @JsonProperty("title") + private String title; + + @JsonProperty("version") + private String version; + + @JsonCreator + public OASInfo( + @JsonProperty("description") String description, + @JsonProperty("license") License license, + @JsonProperty("summary") String summary, + @JsonProperty("title") String title, + @JsonProperty("version") String version) { + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(license, "license"); + Utils.checkNotNull(summary, "summary"); + Utils.checkNotNull(title, "title"); + Utils.checkNotNull(version, "version"); + this.description = description; + this.license = license; + this.summary = summary; + this.title = title; + this.version = version; + } + + @JsonIgnore + public String description() { + return description; + } + + @JsonIgnore + public License license() { + return license; + } + + @JsonIgnore + public String summary() { + return summary; + } + + @JsonIgnore + public String title() { + return title; + } + + @JsonIgnore + public String version() { + return version; + } + + public final static Builder builder() { + return new Builder(); + } + + public OASInfo withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + public OASInfo withLicense(License license) { + Utils.checkNotNull(license, "license"); + this.license = license; + return this; + } + + public OASInfo withSummary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public OASInfo withTitle(String title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public OASInfo withVersion(String version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OASInfo other = (OASInfo) o; + return + Objects.deepEquals(this.description, other.description) && + Objects.deepEquals(this.license, other.license) && + Objects.deepEquals(this.summary, other.summary) && + Objects.deepEquals(this.title, other.title) && + Objects.deepEquals(this.version, other.version); + } + + @Override + public int hashCode() { + return Objects.hash( + description, + license, + summary, + title, + version); + } + + @Override + public String toString() { + return Utils.toString(OASInfo.class, + "description", description, + "license", license, + "summary", summary, + "title", title, + "version", version); + } + + public final static class Builder { + + private String description; + + private License license; + + private String summary; + + private String title; + + private String version; + + private Builder() { + // force use of static builder() method + } + + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + public Builder license(License license) { + Utils.checkNotNull(license, "license"); + this.license = license; + return this; + } + + public Builder summary(String summary) { + Utils.checkNotNull(summary, "summary"); + this.summary = summary; + return this; + } + + public Builder title(String title) { + Utils.checkNotNull(title, "title"); + this.title = title; + return this; + } + + public Builder version(String version) { + Utils.checkNotNull(version, "version"); + this.version = version; + return this; + } + + public OASInfo build() { + return new OASInfo( + description, + license, + summary, + title, + version); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASOperation.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASOperation.java new file mode 100644 index 00000000..7d8be0f9 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASOperation.java @@ -0,0 +1,206 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; + + +public class OASOperation { + + @JsonProperty("description") + private String description; + + @JsonProperty("method") + private String method; + + @JsonProperty("operation_id") + private String operationId; + + @JsonProperty("path") + private String path; + + @JsonProperty("tags") + private List tags; + + @JsonCreator + public OASOperation( + @JsonProperty("description") String description, + @JsonProperty("method") String method, + @JsonProperty("operation_id") String operationId, + @JsonProperty("path") String path, + @JsonProperty("tags") List tags) { + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(method, "method"); + Utils.checkNotNull(operationId, "operationId"); + Utils.checkNotNull(path, "path"); + Utils.checkNotNull(tags, "tags"); + this.description = description; + this.method = method; + this.operationId = operationId; + this.path = path; + this.tags = tags; + } + + @JsonIgnore + public String description() { + return description; + } + + @JsonIgnore + public String method() { + return method; + } + + @JsonIgnore + public String operationId() { + return operationId; + } + + @JsonIgnore + public String path() { + return path; + } + + @JsonIgnore + public List tags() { + return tags; + } + + public final static Builder builder() { + return new Builder(); + } + + public OASOperation withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + public OASOperation withMethod(String method) { + Utils.checkNotNull(method, "method"); + this.method = method; + return this; + } + + public OASOperation withOperationId(String operationId) { + Utils.checkNotNull(operationId, "operationId"); + this.operationId = operationId; + return this; + } + + public OASOperation withPath(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + public OASOperation withTags(List tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = tags; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OASOperation other = (OASOperation) o; + return + Objects.deepEquals(this.description, other.description) && + Objects.deepEquals(this.method, other.method) && + Objects.deepEquals(this.operationId, other.operationId) && + Objects.deepEquals(this.path, other.path) && + Objects.deepEquals(this.tags, other.tags); + } + + @Override + public int hashCode() { + return Objects.hash( + description, + method, + operationId, + path, + tags); + } + + @Override + public String toString() { + return Utils.toString(OASOperation.class, + "description", description, + "method", method, + "operationId", operationId, + "path", path, + "tags", tags); + } + + public final static class Builder { + + private String description; + + private String method; + + private String operationId; + + private String path; + + private List tags; + + private Builder() { + // force use of static builder() method + } + + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + public Builder method(String method) { + Utils.checkNotNull(method, "method"); + this.method = method; + return this; + } + + public Builder operationId(String operationId) { + Utils.checkNotNull(operationId, "operationId"); + this.operationId = operationId; + return this; + } + + public Builder path(String path) { + Utils.checkNotNull(path, "path"); + this.path = path; + return this; + } + + public Builder tags(List tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = tags; + return this; + } + + public OASOperation build() { + return new OASOperation( + description, + method, + operationId, + path, + tags); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASSummary.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASSummary.java new file mode 100644 index 00000000..75f11d7d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OASSummary.java @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; + + +public class OASSummary { + + @JsonProperty("info") + private OASInfo info; + + @JsonProperty("operations") + private List operations; + + @JsonCreator + public OASSummary( + @JsonProperty("info") OASInfo info, + @JsonProperty("operations") List operations) { + Utils.checkNotNull(info, "info"); + Utils.checkNotNull(operations, "operations"); + this.info = info; + this.operations = operations; + } + + @JsonIgnore + public OASInfo info() { + return info; + } + + @JsonIgnore + public List operations() { + return operations; + } + + public final static Builder builder() { + return new Builder(); + } + + public OASSummary withInfo(OASInfo info) { + Utils.checkNotNull(info, "info"); + this.info = info; + return this; + } + + public OASSummary withOperations(List operations) { + Utils.checkNotNull(operations, "operations"); + this.operations = operations; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OASSummary other = (OASSummary) o; + return + Objects.deepEquals(this.info, other.info) && + Objects.deepEquals(this.operations, other.operations); + } + + @Override + public int hashCode() { + return Objects.hash( + info, + operations); + } + + @Override + public String toString() { + return Utils.toString(OASSummary.class, + "info", info, + "operations", operations); + } + + public final static class Builder { + + private OASInfo info; + + private List operations; + + private Builder() { + // force use of static builder() method + } + + public Builder info(OASInfo info) { + Utils.checkNotNull(info, "info"); + this.info = info; + return this; + } + + public Builder operations(List operations) { + Utils.checkNotNull(operations, "operations"); + this.operations = operations; + return this; + } + + public OASSummary build() { + return new OASSummary( + info, + operations); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OpenapiDiffBumpType.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OpenapiDiffBumpType.java new file mode 100644 index 00000000..20a6cfb3 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OpenapiDiffBumpType.java @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; + +/** + * OpenapiDiffBumpType - Bump type of the lock file (calculated semver delta, or a custom change (manual release)) + */ +public enum OpenapiDiffBumpType { + MAJOR("major"), + MINOR("minor"), + PATCH("patch"), + NONE("none"); + + @JsonValue + private final String value; + + private OpenapiDiffBumpType(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Organization.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Organization.java new file mode 100644 index 00000000..d9ee6393 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Organization.java @@ -0,0 +1,360 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.Optional; + +/** + * Organization - A speakeasy organization + */ + +public class Organization { + + @JsonProperty("account_type") + private AccountType accountType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("created_at") + private Optional createdAt; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("free_trial_expiry") + private Optional freeTrialExpiry; + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("slug") + private Optional slug; + + @JsonProperty("telemetry_disabled") + private boolean telemetryDisabled; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updated_at") + private Optional updatedAt; + + @JsonCreator + public Organization( + @JsonProperty("account_type") AccountType accountType, + @JsonProperty("created_at") Optional createdAt, + @JsonProperty("free_trial_expiry") Optional freeTrialExpiry, + @JsonProperty("id") String id, + @JsonProperty("name") String name, + @JsonProperty("slug") Optional slug, + @JsonProperty("telemetry_disabled") boolean telemetryDisabled, + @JsonProperty("updated_at") Optional updatedAt) { + Utils.checkNotNull(accountType, "accountType"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(freeTrialExpiry, "freeTrialExpiry"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(slug, "slug"); + Utils.checkNotNull(telemetryDisabled, "telemetryDisabled"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.accountType = accountType; + this.createdAt = createdAt; + this.freeTrialExpiry = freeTrialExpiry; + this.id = id; + this.name = name; + this.slug = slug; + this.telemetryDisabled = telemetryDisabled; + this.updatedAt = updatedAt; + } + + public Organization( + AccountType accountType, + String id, + String name, + boolean telemetryDisabled) { + this(accountType, Optional.empty(), Optional.empty(), id, name, Optional.empty(), telemetryDisabled, Optional.empty()); + } + + @JsonIgnore + public AccountType accountType() { + return accountType; + } + + @JsonIgnore + public Optional createdAt() { + return createdAt; + } + + @JsonIgnore + public Optional freeTrialExpiry() { + return freeTrialExpiry; + } + + @JsonIgnore + public String id() { + return id; + } + + @JsonIgnore + public String name() { + return name; + } + + @JsonIgnore + public Optional slug() { + return slug; + } + + @JsonIgnore + public boolean telemetryDisabled() { + return telemetryDisabled; + } + + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public Organization withAccountType(AccountType accountType) { + Utils.checkNotNull(accountType, "accountType"); + this.accountType = accountType; + return this; + } + + public Organization withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public Organization withCreatedAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public Organization withFreeTrialExpiry(OffsetDateTime freeTrialExpiry) { + Utils.checkNotNull(freeTrialExpiry, "freeTrialExpiry"); + this.freeTrialExpiry = Optional.ofNullable(freeTrialExpiry); + return this; + } + + public Organization withFreeTrialExpiry(Optional freeTrialExpiry) { + Utils.checkNotNull(freeTrialExpiry, "freeTrialExpiry"); + this.freeTrialExpiry = freeTrialExpiry; + return this; + } + + public Organization withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Organization withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Organization withSlug(String slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = Optional.ofNullable(slug); + return this; + } + + public Organization withSlug(Optional slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = slug; + return this; + } + + public Organization withTelemetryDisabled(boolean telemetryDisabled) { + Utils.checkNotNull(telemetryDisabled, "telemetryDisabled"); + this.telemetryDisabled = telemetryDisabled; + return this; + } + + public Organization withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Organization withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Organization other = (Organization) o; + return + Objects.deepEquals(this.accountType, other.accountType) && + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.freeTrialExpiry, other.freeTrialExpiry) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.name, other.name) && + Objects.deepEquals(this.slug, other.slug) && + Objects.deepEquals(this.telemetryDisabled, other.telemetryDisabled) && + Objects.deepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash( + accountType, + createdAt, + freeTrialExpiry, + id, + name, + slug, + telemetryDisabled, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(Organization.class, + "accountType", accountType, + "createdAt", createdAt, + "freeTrialExpiry", freeTrialExpiry, + "id", id, + "name", name, + "slug", slug, + "telemetryDisabled", telemetryDisabled, + "updatedAt", updatedAt); + } + + public final static class Builder { + + private AccountType accountType; + + private Optional createdAt = Optional.empty(); + + private Optional freeTrialExpiry = Optional.empty(); + + private String id; + + private String name; + + private Optional slug = Optional.empty(); + + private Boolean telemetryDisabled; + + private Optional updatedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder accountType(AccountType accountType) { + Utils.checkNotNull(accountType, "accountType"); + this.accountType = accountType; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = Optional.ofNullable(createdAt); + return this; + } + + public Builder createdAt(Optional createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public Builder freeTrialExpiry(OffsetDateTime freeTrialExpiry) { + Utils.checkNotNull(freeTrialExpiry, "freeTrialExpiry"); + this.freeTrialExpiry = Optional.ofNullable(freeTrialExpiry); + return this; + } + + public Builder freeTrialExpiry(Optional freeTrialExpiry) { + Utils.checkNotNull(freeTrialExpiry, "freeTrialExpiry"); + this.freeTrialExpiry = freeTrialExpiry; + return this; + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Builder slug(String slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = Optional.ofNullable(slug); + return this; + } + + public Builder slug(Optional slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = slug; + return this; + } + + public Builder telemetryDisabled(boolean telemetryDisabled) { + Utils.checkNotNull(telemetryDisabled, "telemetryDisabled"); + this.telemetryDisabled = telemetryDisabled; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Organization build() { + return new Organization( + accountType, + createdAt, + freeTrialExpiry, + id, + name, + slug, + telemetryDisabled, + updatedAt); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OrganizationUsage.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OrganizationUsage.java new file mode 100644 index 00000000..0c4aac48 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OrganizationUsage.java @@ -0,0 +1,350 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Objects; + + +public class OrganizationUsage { + + /** + * Indicates if the features are accessible + */ + @JsonProperty("accessible") + private boolean accessible; + + /** + * Features that are accessible + */ + @JsonProperty("accessible_features") + private List accessibleFeatures; + + /** + * List of generation lock IDs + */ + @JsonProperty("gen_lock_ids") + private List genLockIds; + + /** + * The programming language used + */ + @JsonProperty("language") + private String language; + + /** + * Number of operations performed + */ + @JsonProperty("number_of_operations") + private long numberOfOperations; + + /** + * Features that have been used + */ + @JsonProperty("used_features") + private List usedFeatures; + + /** + * List of workspace IDs + */ + @JsonProperty("workspaces") + private List workspaces; + + @JsonCreator + public OrganizationUsage( + @JsonProperty("accessible") boolean accessible, + @JsonProperty("accessible_features") List accessibleFeatures, + @JsonProperty("gen_lock_ids") List genLockIds, + @JsonProperty("language") String language, + @JsonProperty("number_of_operations") long numberOfOperations, + @JsonProperty("used_features") List usedFeatures, + @JsonProperty("workspaces") List workspaces) { + Utils.checkNotNull(accessible, "accessible"); + Utils.checkNotNull(accessibleFeatures, "accessibleFeatures"); + Utils.checkNotNull(genLockIds, "genLockIds"); + Utils.checkNotNull(language, "language"); + Utils.checkNotNull(numberOfOperations, "numberOfOperations"); + Utils.checkNotNull(usedFeatures, "usedFeatures"); + Utils.checkNotNull(workspaces, "workspaces"); + this.accessible = accessible; + this.accessibleFeatures = accessibleFeatures; + this.genLockIds = genLockIds; + this.language = language; + this.numberOfOperations = numberOfOperations; + this.usedFeatures = usedFeatures; + this.workspaces = workspaces; + } + + /** + * Indicates if the features are accessible + */ + @JsonIgnore + public boolean accessible() { + return accessible; + } + + /** + * Features that are accessible + */ + @JsonIgnore + public List accessibleFeatures() { + return accessibleFeatures; + } + + /** + * List of generation lock IDs + */ + @JsonIgnore + public List genLockIds() { + return genLockIds; + } + + /** + * The programming language used + */ + @JsonIgnore + public String language() { + return language; + } + + /** + * Number of operations performed + */ + @JsonIgnore + public long numberOfOperations() { + return numberOfOperations; + } + + /** + * Features that have been used + */ + @JsonIgnore + public List usedFeatures() { + return usedFeatures; + } + + /** + * List of workspace IDs + */ + @JsonIgnore + public List workspaces() { + return workspaces; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Indicates if the features are accessible + */ + public OrganizationUsage withAccessible(boolean accessible) { + Utils.checkNotNull(accessible, "accessible"); + this.accessible = accessible; + return this; + } + + /** + * Features that are accessible + */ + public OrganizationUsage withAccessibleFeatures(List accessibleFeatures) { + Utils.checkNotNull(accessibleFeatures, "accessibleFeatures"); + this.accessibleFeatures = accessibleFeatures; + return this; + } + + /** + * List of generation lock IDs + */ + public OrganizationUsage withGenLockIds(List genLockIds) { + Utils.checkNotNull(genLockIds, "genLockIds"); + this.genLockIds = genLockIds; + return this; + } + + /** + * The programming language used + */ + public OrganizationUsage withLanguage(String language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + /** + * Number of operations performed + */ + public OrganizationUsage withNumberOfOperations(long numberOfOperations) { + Utils.checkNotNull(numberOfOperations, "numberOfOperations"); + this.numberOfOperations = numberOfOperations; + return this; + } + + /** + * Features that have been used + */ + public OrganizationUsage withUsedFeatures(List usedFeatures) { + Utils.checkNotNull(usedFeatures, "usedFeatures"); + this.usedFeatures = usedFeatures; + return this; + } + + /** + * List of workspace IDs + */ + public OrganizationUsage withWorkspaces(List workspaces) { + Utils.checkNotNull(workspaces, "workspaces"); + this.workspaces = workspaces; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrganizationUsage other = (OrganizationUsage) o; + return + Objects.deepEquals(this.accessible, other.accessible) && + Objects.deepEquals(this.accessibleFeatures, other.accessibleFeatures) && + Objects.deepEquals(this.genLockIds, other.genLockIds) && + Objects.deepEquals(this.language, other.language) && + Objects.deepEquals(this.numberOfOperations, other.numberOfOperations) && + Objects.deepEquals(this.usedFeatures, other.usedFeatures) && + Objects.deepEquals(this.workspaces, other.workspaces); + } + + @Override + public int hashCode() { + return Objects.hash( + accessible, + accessibleFeatures, + genLockIds, + language, + numberOfOperations, + usedFeatures, + workspaces); + } + + @Override + public String toString() { + return Utils.toString(OrganizationUsage.class, + "accessible", accessible, + "accessibleFeatures", accessibleFeatures, + "genLockIds", genLockIds, + "language", language, + "numberOfOperations", numberOfOperations, + "usedFeatures", usedFeatures, + "workspaces", workspaces); + } + + public final static class Builder { + + private Boolean accessible; + + private List accessibleFeatures; + + private List genLockIds; + + private String language; + + private Long numberOfOperations; + + private List usedFeatures; + + private List workspaces; + + private Builder() { + // force use of static builder() method + } + + /** + * Indicates if the features are accessible + */ + public Builder accessible(boolean accessible) { + Utils.checkNotNull(accessible, "accessible"); + this.accessible = accessible; + return this; + } + + /** + * Features that are accessible + */ + public Builder accessibleFeatures(List accessibleFeatures) { + Utils.checkNotNull(accessibleFeatures, "accessibleFeatures"); + this.accessibleFeatures = accessibleFeatures; + return this; + } + + /** + * List of generation lock IDs + */ + public Builder genLockIds(List genLockIds) { + Utils.checkNotNull(genLockIds, "genLockIds"); + this.genLockIds = genLockIds; + return this; + } + + /** + * The programming language used + */ + public Builder language(String language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + /** + * Number of operations performed + */ + public Builder numberOfOperations(long numberOfOperations) { + Utils.checkNotNull(numberOfOperations, "numberOfOperations"); + this.numberOfOperations = numberOfOperations; + return this; + } + + /** + * Features that have been used + */ + public Builder usedFeatures(List usedFeatures) { + Utils.checkNotNull(usedFeatures, "usedFeatures"); + this.usedFeatures = usedFeatures; + return this; + } + + /** + * List of workspace IDs + */ + public Builder workspaces(List workspaces) { + Utils.checkNotNull(workspaces, "workspaces"); + this.workspaces = workspaces; + return this; + } + + public OrganizationUsage build() { + return new OrganizationUsage( + accessible, + accessibleFeatures, + genLockIds, + language, + numberOfOperations, + usedFeatures, + workspaces); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OrganizationUsageResponse.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OrganizationUsageResponse.java new file mode 100644 index 00000000..abdb740f --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/OrganizationUsageResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +/** + * OrganizationUsageResponse - A billing summary of organization usage + */ + +public class OrganizationUsageResponse { + + /** + * List of allowed languages + */ + @JsonProperty("allowed_languages") + private List allowedLanguages; + + /** + * Expiry date of the free trial, will be null if no trial + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("free_trial_expiry") + private Optional freeTrialExpiry; + + /** + * Total number of allowed languages, -1 if unlimited + */ + @JsonProperty("total_allowed_languages") + private long totalAllowedLanguages; + + @JsonProperty("usage") + private List usage; + + @JsonCreator + public OrganizationUsageResponse( + @JsonProperty("allowed_languages") List allowedLanguages, + @JsonProperty("free_trial_expiry") Optional freeTrialExpiry, + @JsonProperty("total_allowed_languages") long totalAllowedLanguages, + @JsonProperty("usage") List usage) { + Utils.checkNotNull(allowedLanguages, "allowedLanguages"); + Utils.checkNotNull(freeTrialExpiry, "freeTrialExpiry"); + Utils.checkNotNull(totalAllowedLanguages, "totalAllowedLanguages"); + Utils.checkNotNull(usage, "usage"); + this.allowedLanguages = allowedLanguages; + this.freeTrialExpiry = freeTrialExpiry; + this.totalAllowedLanguages = totalAllowedLanguages; + this.usage = usage; + } + + public OrganizationUsageResponse( + List allowedLanguages, + long totalAllowedLanguages, + List usage) { + this(allowedLanguages, Optional.empty(), totalAllowedLanguages, usage); + } + + /** + * List of allowed languages + */ + @JsonIgnore + public List allowedLanguages() { + return allowedLanguages; + } + + /** + * Expiry date of the free trial, will be null if no trial + */ + @JsonIgnore + public Optional freeTrialExpiry() { + return freeTrialExpiry; + } + + /** + * Total number of allowed languages, -1 if unlimited + */ + @JsonIgnore + public long totalAllowedLanguages() { + return totalAllowedLanguages; + } + + @JsonIgnore + public List usage() { + return usage; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * List of allowed languages + */ + public OrganizationUsageResponse withAllowedLanguages(List allowedLanguages) { + Utils.checkNotNull(allowedLanguages, "allowedLanguages"); + this.allowedLanguages = allowedLanguages; + return this; + } + + /** + * Expiry date of the free trial, will be null if no trial + */ + public OrganizationUsageResponse withFreeTrialExpiry(OffsetDateTime freeTrialExpiry) { + Utils.checkNotNull(freeTrialExpiry, "freeTrialExpiry"); + this.freeTrialExpiry = Optional.ofNullable(freeTrialExpiry); + return this; + } + + /** + * Expiry date of the free trial, will be null if no trial + */ + public OrganizationUsageResponse withFreeTrialExpiry(Optional freeTrialExpiry) { + Utils.checkNotNull(freeTrialExpiry, "freeTrialExpiry"); + this.freeTrialExpiry = freeTrialExpiry; + return this; + } + + /** + * Total number of allowed languages, -1 if unlimited + */ + public OrganizationUsageResponse withTotalAllowedLanguages(long totalAllowedLanguages) { + Utils.checkNotNull(totalAllowedLanguages, "totalAllowedLanguages"); + this.totalAllowedLanguages = totalAllowedLanguages; + return this; + } + + public OrganizationUsageResponse withUsage(List usage) { + Utils.checkNotNull(usage, "usage"); + this.usage = usage; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrganizationUsageResponse other = (OrganizationUsageResponse) o; + return + Objects.deepEquals(this.allowedLanguages, other.allowedLanguages) && + Objects.deepEquals(this.freeTrialExpiry, other.freeTrialExpiry) && + Objects.deepEquals(this.totalAllowedLanguages, other.totalAllowedLanguages) && + Objects.deepEquals(this.usage, other.usage); + } + + @Override + public int hashCode() { + return Objects.hash( + allowedLanguages, + freeTrialExpiry, + totalAllowedLanguages, + usage); + } + + @Override + public String toString() { + return Utils.toString(OrganizationUsageResponse.class, + "allowedLanguages", allowedLanguages, + "freeTrialExpiry", freeTrialExpiry, + "totalAllowedLanguages", totalAllowedLanguages, + "usage", usage); + } + + public final static class Builder { + + private List allowedLanguages; + + private Optional freeTrialExpiry = Optional.empty(); + + private Long totalAllowedLanguages; + + private List usage; + + private Builder() { + // force use of static builder() method + } + + /** + * List of allowed languages + */ + public Builder allowedLanguages(List allowedLanguages) { + Utils.checkNotNull(allowedLanguages, "allowedLanguages"); + this.allowedLanguages = allowedLanguages; + return this; + } + + /** + * Expiry date of the free trial, will be null if no trial + */ + public Builder freeTrialExpiry(OffsetDateTime freeTrialExpiry) { + Utils.checkNotNull(freeTrialExpiry, "freeTrialExpiry"); + this.freeTrialExpiry = Optional.ofNullable(freeTrialExpiry); + return this; + } + + /** + * Expiry date of the free trial, will be null if no trial + */ + public Builder freeTrialExpiry(Optional freeTrialExpiry) { + Utils.checkNotNull(freeTrialExpiry, "freeTrialExpiry"); + this.freeTrialExpiry = freeTrialExpiry; + return this; + } + + /** + * Total number of allowed languages, -1 if unlimited + */ + public Builder totalAllowedLanguages(long totalAllowedLanguages) { + Utils.checkNotNull(totalAllowedLanguages, "totalAllowedLanguages"); + this.totalAllowedLanguages = totalAllowedLanguages; + return this; + } + + public Builder usage(List usage) { + Utils.checkNotNull(usage, "usage"); + this.usage = usage; + return this; + } + + public OrganizationUsageResponse build() { + return new OrganizationUsageResponse( + allowedLanguages, + freeTrialExpiry, + totalAllowedLanguages, + usage); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/PreflightRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/PreflightRequest.java new file mode 100644 index 00000000..986f0dd8 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/PreflightRequest.java @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class PreflightRequest { + + @JsonProperty("namespace_name") + private String namespaceName; + + @JsonCreator + public PreflightRequest( + @JsonProperty("namespace_name") String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + } + + @JsonIgnore + public String namespaceName() { + return namespaceName; + } + + public final static Builder builder() { + return new Builder(); + } + + public PreflightRequest withNamespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreflightRequest other = (PreflightRequest) o; + return + Objects.deepEquals(this.namespaceName, other.namespaceName); + } + + @Override + public int hashCode() { + return Objects.hash( + namespaceName); + } + + @Override + public String toString() { + return Utils.toString(PreflightRequest.class, + "namespaceName", namespaceName); + } + + public final static class Builder { + + private String namespaceName; + + private Builder() { + // force use of static builder() method + } + + public Builder namespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public PreflightRequest build() { + return new PreflightRequest( + namespaceName); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/PreflightToken.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/PreflightToken.java new file mode 100644 index 00000000..c7d680d8 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/PreflightToken.java @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * PreflightToken - A PreflightToken is a token that allows access to the OCI distribution endpoints. + */ + +public class PreflightToken { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("auth_token") + private Optional authToken; + + @JsonCreator + public PreflightToken( + @JsonProperty("auth_token") Optional authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = authToken; + } + + public PreflightToken() { + this(Optional.empty()); + } + + @JsonIgnore + public Optional authToken() { + return authToken; + } + + public final static Builder builder() { + return new Builder(); + } + + public PreflightToken withAuthToken(String authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = Optional.ofNullable(authToken); + return this; + } + + public PreflightToken withAuthToken(Optional authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = authToken; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreflightToken other = (PreflightToken) o; + return + Objects.deepEquals(this.authToken, other.authToken); + } + + @Override + public int hashCode() { + return Objects.hash( + authToken); + } + + @Override + public String toString() { + return Utils.toString(PreflightToken.class, + "authToken", authToken); + } + + public final static class Builder { + + private Optional authToken = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder authToken(String authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = Optional.ofNullable(authToken); + return this; + } + + public Builder authToken(Optional authToken) { + Utils.checkNotNull(authToken, "authToken"); + this.authToken = authToken; + return this; + } + + public PreflightToken build() { + return new PreflightToken( + authToken); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Report.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Report.java new file mode 100644 index 00000000..41881364 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Report.java @@ -0,0 +1,111 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class Report { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private Optional type; + + @JsonCreator + public Report( + @JsonProperty("type") Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + } + + public Report() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional type() { + return (Optional) type; + } + + public final static Builder builder() { + return new Builder(); + } + + public Report withType(Type type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Report withType(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Report other = (Report) o; + return + Objects.deepEquals(this.type, other.type); + } + + @Override + public int hashCode() { + return Objects.hash( + type); + } + + @Override + public String toString() { + return Utils.toString(Report.class, + "type", type); + } + + public final static class Builder { + + private Optional type = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder type(Type type) { + Utils.checkNotNull(type, "type"); + this.type = Optional.ofNullable(type); + return this; + } + + public Builder type(Optional type) { + Utils.checkNotNull(type, "type"); + this.type = type; + return this; + } + + public Report build() { + return new Report( + type); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/RequestMetadata.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/RequestMetadata.java new file mode 100644 index 00000000..05182f34 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/RequestMetadata.java @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * RequestMetadata - Key-Value pairs associated with a request + */ + +public class RequestMetadata { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private Optional key; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("value") + private Optional value; + + @JsonCreator + public RequestMetadata( + @JsonProperty("key") Optional key, + @JsonProperty("value") Optional value) { + Utils.checkNotNull(key, "key"); + Utils.checkNotNull(value, "value"); + this.key = key; + this.value = value; + } + + public RequestMetadata() { + this(Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional key() { + return key; + } + + @JsonIgnore + public Optional value() { + return value; + } + + public final static Builder builder() { + return new Builder(); + } + + public RequestMetadata withKey(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public RequestMetadata withKey(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public RequestMetadata withValue(String value) { + Utils.checkNotNull(value, "value"); + this.value = Optional.ofNullable(value); + return this; + } + + public RequestMetadata withValue(Optional value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RequestMetadata other = (RequestMetadata) o; + return + Objects.deepEquals(this.key, other.key) && + Objects.deepEquals(this.value, other.value); + } + + @Override + public int hashCode() { + return Objects.hash( + key, + value); + } + + @Override + public String toString() { + return Utils.toString(RequestMetadata.class, + "key", key, + "value", value); + } + + public final static class Builder { + + private Optional key = Optional.empty(); + + private Optional value = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder key(String key) { + Utils.checkNotNull(key, "key"); + this.key = Optional.ofNullable(key); + return this; + } + + public Builder key(Optional key) { + Utils.checkNotNull(key, "key"); + this.key = key; + return this; + } + + public Builder value(String value) { + Utils.checkNotNull(value, "value"); + this.value = Optional.ofNullable(value); + return this; + } + + public Builder value(Optional value) { + Utils.checkNotNull(value, "value"); + this.value = value; + return this; + } + + public RequestMetadata build() { + return new RequestMetadata( + key, + value); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Revision.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Revision.java new file mode 100644 index 00000000..f4710d39 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Revision.java @@ -0,0 +1,248 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; + + +public class Revision { + + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + @JsonProperty("digest") + private String digest; + + /** + * Format {namespace_id}/{revision_digest} + */ + @JsonProperty("id") + private String id; + + @JsonProperty("namespace_name") + private String namespaceName; + + @JsonProperty("tags") + private List tags; + + @JsonProperty("updated_at") + private OffsetDateTime updatedAt; + + @JsonCreator + public Revision( + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("digest") String digest, + @JsonProperty("id") String id, + @JsonProperty("namespace_name") String namespaceName, + @JsonProperty("tags") List tags, + @JsonProperty("updated_at") OffsetDateTime updatedAt) { + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(digest, "digest"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(namespaceName, "namespaceName"); + Utils.checkNotNull(tags, "tags"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.createdAt = createdAt; + this.digest = digest; + this.id = id; + this.namespaceName = namespaceName; + this.tags = tags; + this.updatedAt = updatedAt; + } + + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + @JsonIgnore + public String digest() { + return digest; + } + + /** + * Format {namespace_id}/{revision_digest} + */ + @JsonIgnore + public String id() { + return id; + } + + @JsonIgnore + public String namespaceName() { + return namespaceName; + } + + @JsonIgnore + public List tags() { + return tags; + } + + @JsonIgnore + public OffsetDateTime updatedAt() { + return updatedAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public Revision withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public Revision withDigest(String digest) { + Utils.checkNotNull(digest, "digest"); + this.digest = digest; + return this; + } + + /** + * Format {namespace_id}/{revision_digest} + */ + public Revision withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Revision withNamespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public Revision withTags(List tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = tags; + return this; + } + + public Revision withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Revision other = (Revision) o; + return + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.digest, other.digest) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.namespaceName, other.namespaceName) && + Objects.deepEquals(this.tags, other.tags) && + Objects.deepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + digest, + id, + namespaceName, + tags, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(Revision.class, + "createdAt", createdAt, + "digest", digest, + "id", id, + "namespaceName", namespaceName, + "tags", tags, + "updatedAt", updatedAt); + } + + public final static class Builder { + + private OffsetDateTime createdAt; + + private String digest; + + private String id; + + private String namespaceName; + + private List tags; + + private OffsetDateTime updatedAt; + + private Builder() { + // force use of static builder() method + } + + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public Builder digest(String digest) { + Utils.checkNotNull(digest, "digest"); + this.digest = digest; + return this; + } + + /** + * Format {namespace_id}/{revision_digest} + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder namespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public Builder tags(List tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = tags; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Revision build() { + return new Revision( + createdAt, + digest, + id, + namespaceName, + tags, + updatedAt); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Schema.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Schema.java new file mode 100644 index 00000000..1bdf3a01 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Schema.java @@ -0,0 +1,310 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * Schema - A Schema represents an API schema for a particular Api and Version. + */ + +public class Schema { + + /** + * The ID of the Api this Schema belongs to. + */ + @JsonProperty("api_id") + private String apiId; + + /** + * Creation timestamp. + */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * A detailed description of the Schema. + */ + @JsonProperty("description") + private String description; + + /** + * An ID referencing this particular revision of the Schema. + */ + @JsonProperty("revision_id") + private String revisionId; + + /** + * The version ID of the Api this Schema belongs to. + */ + @JsonProperty("version_id") + private String versionId; + + /** + * The workspace ID this Schema belongs to. + */ + @JsonProperty("workspace_id") + private String workspaceId; + + @JsonCreator + public Schema( + @JsonProperty("api_id") String apiId, + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("description") String description, + @JsonProperty("revision_id") String revisionId, + @JsonProperty("version_id") String versionId, + @JsonProperty("workspace_id") String workspaceId) { + Utils.checkNotNull(apiId, "apiId"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(revisionId, "revisionId"); + Utils.checkNotNull(versionId, "versionId"); + Utils.checkNotNull(workspaceId, "workspaceId"); + this.apiId = apiId; + this.createdAt = createdAt; + this.description = description; + this.revisionId = revisionId; + this.versionId = versionId; + this.workspaceId = workspaceId; + } + + /** + * The ID of the Api this Schema belongs to. + */ + @JsonIgnore + public String apiId() { + return apiId; + } + + /** + * Creation timestamp. + */ + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + /** + * A detailed description of the Schema. + */ + @JsonIgnore + public String description() { + return description; + } + + /** + * An ID referencing this particular revision of the Schema. + */ + @JsonIgnore + public String revisionId() { + return revisionId; + } + + /** + * The version ID of the Api this Schema belongs to. + */ + @JsonIgnore + public String versionId() { + return versionId; + } + + /** + * The workspace ID this Schema belongs to. + */ + @JsonIgnore + public String workspaceId() { + return workspaceId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api this Schema belongs to. + */ + public Schema withApiId(String apiId) { + Utils.checkNotNull(apiId, "apiId"); + this.apiId = apiId; + return this; + } + + /** + * Creation timestamp. + */ + public Schema withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * A detailed description of the Schema. + */ + public Schema withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * An ID referencing this particular revision of the Schema. + */ + public Schema withRevisionId(String revisionId) { + Utils.checkNotNull(revisionId, "revisionId"); + this.revisionId = revisionId; + return this; + } + + /** + * The version ID of the Api this Schema belongs to. + */ + public Schema withVersionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + /** + * The workspace ID this Schema belongs to. + */ + public Schema withWorkspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Schema other = (Schema) o; + return + Objects.deepEquals(this.apiId, other.apiId) && + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.description, other.description) && + Objects.deepEquals(this.revisionId, other.revisionId) && + Objects.deepEquals(this.versionId, other.versionId) && + Objects.deepEquals(this.workspaceId, other.workspaceId); + } + + @Override + public int hashCode() { + return Objects.hash( + apiId, + createdAt, + description, + revisionId, + versionId, + workspaceId); + } + + @Override + public String toString() { + return Utils.toString(Schema.class, + "apiId", apiId, + "createdAt", createdAt, + "description", description, + "revisionId", revisionId, + "versionId", versionId, + "workspaceId", workspaceId); + } + + public final static class Builder { + + private String apiId; + + private OffsetDateTime createdAt; + + private String description; + + private String revisionId; + + private String versionId; + + private String workspaceId; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api this Schema belongs to. + */ + public Builder apiId(String apiId) { + Utils.checkNotNull(apiId, "apiId"); + this.apiId = apiId; + return this; + } + + /** + * Creation timestamp. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * A detailed description of the Schema. + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * An ID referencing this particular revision of the Schema. + */ + public Builder revisionId(String revisionId) { + Utils.checkNotNull(revisionId, "revisionId"); + this.revisionId = revisionId; + return this; + } + + /** + * The version ID of the Api this Schema belongs to. + */ + public Builder versionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + /** + * The workspace ID this Schema belongs to. + */ + public Builder workspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + public Schema build() { + return new Schema( + apiId, + createdAt, + description, + revisionId, + versionId, + workspaceId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SchemaDiff.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SchemaDiff.java new file mode 100644 index 00000000..70b65040 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SchemaDiff.java @@ -0,0 +1,188 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * SchemaDiff - A SchemaDiff represents a diff of two Schemas. + */ + +public class SchemaDiff { + + /** + * Holds every addition change in the diff. + */ + @JsonProperty("additions") + private List additions; + + /** + * Holds every deletion change in the diff. + */ + @JsonProperty("deletions") + private List deletions; + + /** + * Holds every modification change in the diff. + */ + @JsonProperty("modifications") + private Map modifications; + + @JsonCreator + public SchemaDiff( + @JsonProperty("additions") List additions, + @JsonProperty("deletions") List deletions, + @JsonProperty("modifications") Map modifications) { + Utils.checkNotNull(additions, "additions"); + Utils.checkNotNull(deletions, "deletions"); + modifications = Utils.emptyMapIfNull(modifications); + this.additions = additions; + this.deletions = deletions; + this.modifications = modifications; + } + + /** + * Holds every addition change in the diff. + */ + @JsonIgnore + public List additions() { + return additions; + } + + /** + * Holds every deletion change in the diff. + */ + @JsonIgnore + public List deletions() { + return deletions; + } + + /** + * Holds every modification change in the diff. + */ + @JsonIgnore + public Map modifications() { + return modifications; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Holds every addition change in the diff. + */ + public SchemaDiff withAdditions(List additions) { + Utils.checkNotNull(additions, "additions"); + this.additions = additions; + return this; + } + + /** + * Holds every deletion change in the diff. + */ + public SchemaDiff withDeletions(List deletions) { + Utils.checkNotNull(deletions, "deletions"); + this.deletions = deletions; + return this; + } + + /** + * Holds every modification change in the diff. + */ + public SchemaDiff withModifications(Map modifications) { + Utils.checkNotNull(modifications, "modifications"); + this.modifications = modifications; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemaDiff other = (SchemaDiff) o; + return + Objects.deepEquals(this.additions, other.additions) && + Objects.deepEquals(this.deletions, other.deletions) && + Objects.deepEquals(this.modifications, other.modifications); + } + + @Override + public int hashCode() { + return Objects.hash( + additions, + deletions, + modifications); + } + + @Override + public String toString() { + return Utils.toString(SchemaDiff.class, + "additions", additions, + "deletions", deletions, + "modifications", modifications); + } + + public final static class Builder { + + private List additions; + + private List deletions; + + private Map modifications; + + private Builder() { + // force use of static builder() method + } + + /** + * Holds every addition change in the diff. + */ + public Builder additions(List additions) { + Utils.checkNotNull(additions, "additions"); + this.additions = additions; + return this; + } + + /** + * Holds every deletion change in the diff. + */ + public Builder deletions(List deletions) { + Utils.checkNotNull(deletions, "deletions"); + this.deletions = deletions; + return this; + } + + /** + * Holds every modification change in the diff. + */ + public Builder modifications(Map modifications) { + Utils.checkNotNull(modifications, "modifications"); + this.modifications = modifications; + return this; + } + + public SchemaDiff build() { + return new SchemaDiff( + additions, + deletions, + modifications); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Security.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Security.java new file mode 100644 index 00000000..12f723e8 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Security.java @@ -0,0 +1,147 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import dev.speakeasyapi.javaclientsdk.utils.SpeakeasyMetadata; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + + +public class Security { + + @SpeakeasyMetadata("security:scheme=true,type=apiKey,subtype=header,name=x-api-key") + private Optional apiKey; + + @SpeakeasyMetadata("security:scheme=true,type=http,subtype=bearer,name=Authorization") + private Optional bearer; + + @JsonCreator + public Security( + Optional apiKey, + Optional bearer) { + Utils.checkNotNull(apiKey, "apiKey"); + Utils.checkNotNull(bearer, "bearer"); + this.apiKey = apiKey; + this.bearer = bearer; + } + + public Security() { + this(Optional.empty(), Optional.empty()); + } + + @JsonIgnore + public Optional apiKey() { + return apiKey; + } + + @JsonIgnore + public Optional bearer() { + return bearer; + } + + public final static Builder builder() { + return new Builder(); + } + + public Security withAPIKey(String apiKey) { + Utils.checkNotNull(apiKey, "apiKey"); + this.apiKey = Optional.ofNullable(apiKey); + return this; + } + + public Security withAPIKey(Optional apiKey) { + Utils.checkNotNull(apiKey, "apiKey"); + this.apiKey = apiKey; + return this; + } + + public Security withBearer(String bearer) { + Utils.checkNotNull(bearer, "bearer"); + this.bearer = Optional.ofNullable(bearer); + return this; + } + + public Security withBearer(Optional bearer) { + Utils.checkNotNull(bearer, "bearer"); + this.bearer = bearer; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Security other = (Security) o; + return + Objects.deepEquals(this.apiKey, other.apiKey) && + Objects.deepEquals(this.bearer, other.bearer); + } + + @Override + public int hashCode() { + return Objects.hash( + apiKey, + bearer); + } + + @Override + public String toString() { + return Utils.toString(Security.class, + "apiKey", apiKey, + "bearer", bearer); + } + + public final static class Builder { + + private Optional apiKey = Optional.empty(); + + private Optional bearer = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder apiKey(String apiKey) { + Utils.checkNotNull(apiKey, "apiKey"); + this.apiKey = Optional.ofNullable(apiKey); + return this; + } + + public Builder apiKey(Optional apiKey) { + Utils.checkNotNull(apiKey, "apiKey"); + this.apiKey = apiKey; + return this; + } + + public Builder bearer(String bearer) { + Utils.checkNotNull(bearer, "bearer"); + this.bearer = Optional.ofNullable(bearer); + return this; + } + + public Builder bearer(Optional bearer) { + Utils.checkNotNull(bearer, "bearer"); + this.bearer = bearer; + return this; + } + + public Security build() { + return new Security( + apiKey, + bearer); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ShortURL.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ShortURL.java new file mode 100644 index 00000000..af19d640 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ShortURL.java @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class ShortURL { + + @JsonProperty("full_url") + private String fullUrl; + + @JsonProperty("short_url") + private String shortUrl; + + @JsonCreator + public ShortURL( + @JsonProperty("full_url") String fullUrl, + @JsonProperty("short_url") String shortUrl) { + Utils.checkNotNull(fullUrl, "fullUrl"); + Utils.checkNotNull(shortUrl, "shortUrl"); + this.fullUrl = fullUrl; + this.shortUrl = shortUrl; + } + + @JsonIgnore + public String fullUrl() { + return fullUrl; + } + + @JsonIgnore + public String shortUrl() { + return shortUrl; + } + + public final static Builder builder() { + return new Builder(); + } + + public ShortURL withFullUrl(String fullUrl) { + Utils.checkNotNull(fullUrl, "fullUrl"); + this.fullUrl = fullUrl; + return this; + } + + public ShortURL withShortUrl(String shortUrl) { + Utils.checkNotNull(shortUrl, "shortUrl"); + this.shortUrl = shortUrl; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ShortURL other = (ShortURL) o; + return + Objects.deepEquals(this.fullUrl, other.fullUrl) && + Objects.deepEquals(this.shortUrl, other.shortUrl); + } + + @Override + public int hashCode() { + return Objects.hash( + fullUrl, + shortUrl); + } + + @Override + public String toString() { + return Utils.toString(ShortURL.class, + "fullUrl", fullUrl, + "shortUrl", shortUrl); + } + + public final static class Builder { + + private String fullUrl; + + private String shortUrl; + + private Builder() { + // force use of static builder() method + } + + public Builder fullUrl(String fullUrl) { + Utils.checkNotNull(fullUrl, "fullUrl"); + this.fullUrl = fullUrl; + return this; + } + + public Builder shortUrl(String shortUrl) { + Utils.checkNotNull(shortUrl, "shortUrl"); + this.shortUrl = shortUrl; + return this; + } + + public ShortURL build() { + return new ShortURL( + fullUrl, + shortUrl); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SuggestOpts.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SuggestOpts.java new file mode 100644 index 00000000..35f8f7ee --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SuggestOpts.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + + +public class SuggestOpts { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("diagnostics") + private Optional> diagnostics; + + @JsonProperty("suggestion_type") + private SuggestionType suggestionType; + + @JsonCreator + public SuggestOpts( + @JsonProperty("diagnostics") Optional> diagnostics, + @JsonProperty("suggestion_type") SuggestionType suggestionType) { + Utils.checkNotNull(diagnostics, "diagnostics"); + Utils.checkNotNull(suggestionType, "suggestionType"); + this.diagnostics = diagnostics; + this.suggestionType = suggestionType; + } + + public SuggestOpts( + SuggestionType suggestionType) { + this(Optional.empty(), suggestionType); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> diagnostics() { + return (Optional>) diagnostics; + } + + @JsonIgnore + public SuggestionType suggestionType() { + return suggestionType; + } + + public final static Builder builder() { + return new Builder(); + } + + public SuggestOpts withDiagnostics(List diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = Optional.ofNullable(diagnostics); + return this; + } + + public SuggestOpts withDiagnostics(Optional> diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = diagnostics; + return this; + } + + public SuggestOpts withSuggestionType(SuggestionType suggestionType) { + Utils.checkNotNull(suggestionType, "suggestionType"); + this.suggestionType = suggestionType; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuggestOpts other = (SuggestOpts) o; + return + Objects.deepEquals(this.diagnostics, other.diagnostics) && + Objects.deepEquals(this.suggestionType, other.suggestionType); + } + + @Override + public int hashCode() { + return Objects.hash( + diagnostics, + suggestionType); + } + + @Override + public String toString() { + return Utils.toString(SuggestOpts.class, + "diagnostics", diagnostics, + "suggestionType", suggestionType); + } + + public final static class Builder { + + private Optional> diagnostics = Optional.empty(); + + private SuggestionType suggestionType; + + private Builder() { + // force use of static builder() method + } + + public Builder diagnostics(List diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = Optional.ofNullable(diagnostics); + return this; + } + + public Builder diagnostics(Optional> diagnostics) { + Utils.checkNotNull(diagnostics, "diagnostics"); + this.diagnostics = diagnostics; + return this; + } + + public Builder suggestionType(SuggestionType suggestionType) { + Utils.checkNotNull(suggestionType, "suggestionType"); + this.suggestionType = suggestionType; + return this; + } + + public SuggestOpts build() { + return new SuggestOpts( + diagnostics, + suggestionType); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SuggestionType.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SuggestionType.java new file mode 100644 index 00000000..580f8cef --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/SuggestionType.java @@ -0,0 +1,24 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; + +public enum SuggestionType { + METHOD_NAMES("method-names"), + DIAGNOSTICS_ONLY("diagnostics-only"); + + @JsonValue + private final String value; + + private SuggestionType(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Tag.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Tag.java new file mode 100644 index 00000000..da841c74 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Tag.java @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class Tag { + + /** + * Format {namespace_id}/{tag} + */ + @JsonProperty("id") + private String id; + + /** + * Human readable tag name + */ + @JsonProperty("name") + private String name; + + @JsonProperty("namespace_name") + private String namespaceName; + + @JsonProperty("revision_digest") + private String revisionDigest; + + @JsonCreator + public Tag( + @JsonProperty("id") String id, + @JsonProperty("name") String name, + @JsonProperty("namespace_name") String namespaceName, + @JsonProperty("revision_digest") String revisionDigest) { + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(namespaceName, "namespaceName"); + Utils.checkNotNull(revisionDigest, "revisionDigest"); + this.id = id; + this.name = name; + this.namespaceName = namespaceName; + this.revisionDigest = revisionDigest; + } + + /** + * Format {namespace_id}/{tag} + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * Human readable tag name + */ + @JsonIgnore + public String name() { + return name; + } + + @JsonIgnore + public String namespaceName() { + return namespaceName; + } + + @JsonIgnore + public String revisionDigest() { + return revisionDigest; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Format {namespace_id}/{tag} + */ + public Tag withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Human readable tag name + */ + public Tag withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Tag withNamespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public Tag withRevisionDigest(String revisionDigest) { + Utils.checkNotNull(revisionDigest, "revisionDigest"); + this.revisionDigest = revisionDigest; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag other = (Tag) o; + return + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.name, other.name) && + Objects.deepEquals(this.namespaceName, other.namespaceName) && + Objects.deepEquals(this.revisionDigest, other.revisionDigest); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + name, + namespaceName, + revisionDigest); + } + + @Override + public String toString() { + return Utils.toString(Tag.class, + "id", id, + "name", name, + "namespaceName", namespaceName, + "revisionDigest", revisionDigest); + } + + public final static class Builder { + + private String id; + + private String name; + + private String namespaceName; + + private String revisionDigest; + + private Builder() { + // force use of static builder() method + } + + /** + * Format {namespace_id}/{tag} + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Human readable tag name + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Builder namespaceName(String namespaceName) { + Utils.checkNotNull(namespaceName, "namespaceName"); + this.namespaceName = namespaceName; + return this; + } + + public Builder revisionDigest(String revisionDigest) { + Utils.checkNotNull(revisionDigest, "revisionDigest"); + this.revisionDigest = revisionDigest; + return this; + } + + public Tag build() { + return new Tag( + id, + name, + namespaceName, + revisionDigest); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/TargetSDK.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/TargetSDK.java new file mode 100644 index 00000000..2e3ffdb0 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/TargetSDK.java @@ -0,0 +1,2122 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.Optional; + + +public class TargetSDK { + + /** + * Remote commit ID. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("commit_head") + private Optional commitHead; + + /** + * Name of the CI environment. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("continuous_integration_environment") + private Optional continuousIntegrationEnvironment; + + /** + * Error message if the last event was not successful. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private Optional error; + + /** + * Version of the generated target (post generation) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_config_post_version") + private Optional generateConfigPostVersion; + + /** + * Eligible feature set during generation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_eligible_features") + private Optional generateEligibleFeatures; + + /** + * gen.lock ID (expected to be a uuid). The same as `id`. A unique identifier for the target. + */ + @JsonProperty("generate_gen_lock_id") + private String generateGenLockId; + + /** + * Features prior to generation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_gen_lock_pre_features") + private Optional generateGenLockPreFeatures; + + /** + * Artifact version for the Previous Generation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_gen_lock_pre_version") + private Optional generateGenLockPreVersion; + + /** + * The number of operations ignored in generation. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_number_of_operations_ignored") + private Optional generateNumberOfOperationsIgnored; + + /** + * The number of operations used in generation. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_number_of_operations_used") + private Optional generateNumberOfOperationsUsed; + + /** + * Indicates whether the target was considered published. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_published") + private Optional generatePublished; + + /** + * eg `typescript`, `terraform`, `python` + */ + @JsonProperty("generate_target") + private String generateTarget; + + /** + * The workflow name of the target. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_target_name") + private Optional generateTargetName; + + /** + * The version of the Speakeasy generator for this target eg v2 of the typescript generator. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generate_target_version") + private Optional generateTargetVersion; + + /** + * GitHub organization of the action. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("gh_action_organization") + private Optional ghActionOrganization; + + /** + * GitHub Action ref value. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("gh_action_ref") + private Optional ghActionRef; + + /** + * GitHub repository of the action. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("gh_action_repository") + private Optional ghActionRepository; + + /** + * Link to the GitHub action run. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("gh_action_run_link") + private Optional ghActionRunLink; + + /** + * Version of the GitHub action. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("gh_action_version") + private Optional ghActionVersion; + + /** + * Current working directory relative to the git root. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("git_relative_cwd") + private Optional gitRelativeCwd; + + /** + * Default owner for git remote. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("git_remote_default_owner") + private Optional gitRemoteDefaultOwner; + + /** + * Default repository name for git remote. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("git_remote_default_repo") + private Optional gitRemoteDefaultRepo; + + /** + * User email from git configuration. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("git_user_email") + private Optional gitUserEmail; + + /** + * User's name from git configuration. (not GitHub username) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("git_user_name") + private Optional gitUserName; + + /** + * Remote hostname. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("hostname") + private Optional hostname; + + /** + * Unique identifier of the target the same as `generate_gen_lock_id` + */ + @JsonProperty("id") + private String id; + + /** + * Timestamp when the event was created in the database. + */ + @JsonProperty("last_event_created_at") + private OffsetDateTime lastEventCreatedAt; + + /** + * Unique identifier of the last event for the target + */ + @JsonProperty("last_event_id") + private String lastEventId; + + /** + * Type of interaction. + */ + @JsonProperty("last_event_interaction_type") + private InteractionType lastEventInteractionType; + + /** + * Label of the git repository. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("repo_label") + private Optional repoLabel; + + /** + * The blob digest of the source. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_blob_digest") + private Optional sourceBlobDigest; + + /** + * The namespace name of the source. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_namespace_name") + private Optional sourceNamespaceName; + + /** + * The revision digest of the source. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("source_revision_digest") + private Optional sourceRevisionDigest; + + /** + * Indicates whether the event was successful. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("success") + private Optional success; + + /** + * Workflow file (post execution) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("workflow_post_raw") + private Optional workflowPostRaw; + + /** + * Workflow file (prior to execution) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("workflow_pre_raw") + private Optional workflowPreRaw; + + @JsonCreator + public TargetSDK( + @JsonProperty("commit_head") Optional commitHead, + @JsonProperty("continuous_integration_environment") Optional continuousIntegrationEnvironment, + @JsonProperty("error") Optional error, + @JsonProperty("generate_config_post_version") Optional generateConfigPostVersion, + @JsonProperty("generate_eligible_features") Optional generateEligibleFeatures, + @JsonProperty("generate_gen_lock_id") String generateGenLockId, + @JsonProperty("generate_gen_lock_pre_features") Optional generateGenLockPreFeatures, + @JsonProperty("generate_gen_lock_pre_version") Optional generateGenLockPreVersion, + @JsonProperty("generate_number_of_operations_ignored") Optional generateNumberOfOperationsIgnored, + @JsonProperty("generate_number_of_operations_used") Optional generateNumberOfOperationsUsed, + @JsonProperty("generate_published") Optional generatePublished, + @JsonProperty("generate_target") String generateTarget, + @JsonProperty("generate_target_name") Optional generateTargetName, + @JsonProperty("generate_target_version") Optional generateTargetVersion, + @JsonProperty("gh_action_organization") Optional ghActionOrganization, + @JsonProperty("gh_action_ref") Optional ghActionRef, + @JsonProperty("gh_action_repository") Optional ghActionRepository, + @JsonProperty("gh_action_run_link") Optional ghActionRunLink, + @JsonProperty("gh_action_version") Optional ghActionVersion, + @JsonProperty("git_relative_cwd") Optional gitRelativeCwd, + @JsonProperty("git_remote_default_owner") Optional gitRemoteDefaultOwner, + @JsonProperty("git_remote_default_repo") Optional gitRemoteDefaultRepo, + @JsonProperty("git_user_email") Optional gitUserEmail, + @JsonProperty("git_user_name") Optional gitUserName, + @JsonProperty("hostname") Optional hostname, + @JsonProperty("id") String id, + @JsonProperty("last_event_created_at") OffsetDateTime lastEventCreatedAt, + @JsonProperty("last_event_id") String lastEventId, + @JsonProperty("last_event_interaction_type") InteractionType lastEventInteractionType, + @JsonProperty("repo_label") Optional repoLabel, + @JsonProperty("source_blob_digest") Optional sourceBlobDigest, + @JsonProperty("source_namespace_name") Optional sourceNamespaceName, + @JsonProperty("source_revision_digest") Optional sourceRevisionDigest, + @JsonProperty("success") Optional success, + @JsonProperty("workflow_post_raw") Optional workflowPostRaw, + @JsonProperty("workflow_pre_raw") Optional workflowPreRaw) { + Utils.checkNotNull(commitHead, "commitHead"); + Utils.checkNotNull(continuousIntegrationEnvironment, "continuousIntegrationEnvironment"); + Utils.checkNotNull(error, "error"); + Utils.checkNotNull(generateConfigPostVersion, "generateConfigPostVersion"); + Utils.checkNotNull(generateEligibleFeatures, "generateEligibleFeatures"); + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + Utils.checkNotNull(generateGenLockPreFeatures, "generateGenLockPreFeatures"); + Utils.checkNotNull(generateGenLockPreVersion, "generateGenLockPreVersion"); + Utils.checkNotNull(generateNumberOfOperationsIgnored, "generateNumberOfOperationsIgnored"); + Utils.checkNotNull(generateNumberOfOperationsUsed, "generateNumberOfOperationsUsed"); + Utils.checkNotNull(generatePublished, "generatePublished"); + Utils.checkNotNull(generateTarget, "generateTarget"); + Utils.checkNotNull(generateTargetName, "generateTargetName"); + Utils.checkNotNull(generateTargetVersion, "generateTargetVersion"); + Utils.checkNotNull(ghActionOrganization, "ghActionOrganization"); + Utils.checkNotNull(ghActionRef, "ghActionRef"); + Utils.checkNotNull(ghActionRepository, "ghActionRepository"); + Utils.checkNotNull(ghActionRunLink, "ghActionRunLink"); + Utils.checkNotNull(ghActionVersion, "ghActionVersion"); + Utils.checkNotNull(gitRelativeCwd, "gitRelativeCwd"); + Utils.checkNotNull(gitRemoteDefaultOwner, "gitRemoteDefaultOwner"); + Utils.checkNotNull(gitRemoteDefaultRepo, "gitRemoteDefaultRepo"); + Utils.checkNotNull(gitUserEmail, "gitUserEmail"); + Utils.checkNotNull(gitUserName, "gitUserName"); + Utils.checkNotNull(hostname, "hostname"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(lastEventCreatedAt, "lastEventCreatedAt"); + Utils.checkNotNull(lastEventId, "lastEventId"); + Utils.checkNotNull(lastEventInteractionType, "lastEventInteractionType"); + Utils.checkNotNull(repoLabel, "repoLabel"); + Utils.checkNotNull(sourceBlobDigest, "sourceBlobDigest"); + Utils.checkNotNull(sourceNamespaceName, "sourceNamespaceName"); + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + Utils.checkNotNull(success, "success"); + Utils.checkNotNull(workflowPostRaw, "workflowPostRaw"); + Utils.checkNotNull(workflowPreRaw, "workflowPreRaw"); + this.commitHead = commitHead; + this.continuousIntegrationEnvironment = continuousIntegrationEnvironment; + this.error = error; + this.generateConfigPostVersion = generateConfigPostVersion; + this.generateEligibleFeatures = generateEligibleFeatures; + this.generateGenLockId = generateGenLockId; + this.generateGenLockPreFeatures = generateGenLockPreFeatures; + this.generateGenLockPreVersion = generateGenLockPreVersion; + this.generateNumberOfOperationsIgnored = generateNumberOfOperationsIgnored; + this.generateNumberOfOperationsUsed = generateNumberOfOperationsUsed; + this.generatePublished = generatePublished; + this.generateTarget = generateTarget; + this.generateTargetName = generateTargetName; + this.generateTargetVersion = generateTargetVersion; + this.ghActionOrganization = ghActionOrganization; + this.ghActionRef = ghActionRef; + this.ghActionRepository = ghActionRepository; + this.ghActionRunLink = ghActionRunLink; + this.ghActionVersion = ghActionVersion; + this.gitRelativeCwd = gitRelativeCwd; + this.gitRemoteDefaultOwner = gitRemoteDefaultOwner; + this.gitRemoteDefaultRepo = gitRemoteDefaultRepo; + this.gitUserEmail = gitUserEmail; + this.gitUserName = gitUserName; + this.hostname = hostname; + this.id = id; + this.lastEventCreatedAt = lastEventCreatedAt; + this.lastEventId = lastEventId; + this.lastEventInteractionType = lastEventInteractionType; + this.repoLabel = repoLabel; + this.sourceBlobDigest = sourceBlobDigest; + this.sourceNamespaceName = sourceNamespaceName; + this.sourceRevisionDigest = sourceRevisionDigest; + this.success = success; + this.workflowPostRaw = workflowPostRaw; + this.workflowPreRaw = workflowPreRaw; + } + + public TargetSDK( + String generateGenLockId, + String generateTarget, + String id, + OffsetDateTime lastEventCreatedAt, + String lastEventId, + InteractionType lastEventInteractionType) { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), generateGenLockId, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), generateTarget, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), id, lastEventCreatedAt, lastEventId, lastEventInteractionType, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Remote commit ID. + */ + @JsonIgnore + public Optional commitHead() { + return commitHead; + } + + /** + * Name of the CI environment. + */ + @JsonIgnore + public Optional continuousIntegrationEnvironment() { + return continuousIntegrationEnvironment; + } + + /** + * Error message if the last event was not successful. + */ + @JsonIgnore + public Optional error() { + return error; + } + + /** + * Version of the generated target (post generation) + */ + @JsonIgnore + public Optional generateConfigPostVersion() { + return generateConfigPostVersion; + } + + /** + * Eligible feature set during generation + */ + @JsonIgnore + public Optional generateEligibleFeatures() { + return generateEligibleFeatures; + } + + /** + * gen.lock ID (expected to be a uuid). The same as `id`. A unique identifier for the target. + */ + @JsonIgnore + public String generateGenLockId() { + return generateGenLockId; + } + + /** + * Features prior to generation + */ + @JsonIgnore + public Optional generateGenLockPreFeatures() { + return generateGenLockPreFeatures; + } + + /** + * Artifact version for the Previous Generation + */ + @JsonIgnore + public Optional generateGenLockPreVersion() { + return generateGenLockPreVersion; + } + + /** + * The number of operations ignored in generation. + */ + @JsonIgnore + public Optional generateNumberOfOperationsIgnored() { + return generateNumberOfOperationsIgnored; + } + + /** + * The number of operations used in generation. + */ + @JsonIgnore + public Optional generateNumberOfOperationsUsed() { + return generateNumberOfOperationsUsed; + } + + /** + * Indicates whether the target was considered published. + */ + @JsonIgnore + public Optional generatePublished() { + return generatePublished; + } + + /** + * eg `typescript`, `terraform`, `python` + */ + @JsonIgnore + public String generateTarget() { + return generateTarget; + } + + /** + * The workflow name of the target. + */ + @JsonIgnore + public Optional generateTargetName() { + return generateTargetName; + } + + /** + * The version of the Speakeasy generator for this target eg v2 of the typescript generator. + */ + @JsonIgnore + public Optional generateTargetVersion() { + return generateTargetVersion; + } + + /** + * GitHub organization of the action. + */ + @JsonIgnore + public Optional ghActionOrganization() { + return ghActionOrganization; + } + + /** + * GitHub Action ref value. + */ + @JsonIgnore + public Optional ghActionRef() { + return ghActionRef; + } + + /** + * GitHub repository of the action. + */ + @JsonIgnore + public Optional ghActionRepository() { + return ghActionRepository; + } + + /** + * Link to the GitHub action run. + */ + @JsonIgnore + public Optional ghActionRunLink() { + return ghActionRunLink; + } + + /** + * Version of the GitHub action. + */ + @JsonIgnore + public Optional ghActionVersion() { + return ghActionVersion; + } + + /** + * Current working directory relative to the git root. + */ + @JsonIgnore + public Optional gitRelativeCwd() { + return gitRelativeCwd; + } + + /** + * Default owner for git remote. + */ + @JsonIgnore + public Optional gitRemoteDefaultOwner() { + return gitRemoteDefaultOwner; + } + + /** + * Default repository name for git remote. + */ + @JsonIgnore + public Optional gitRemoteDefaultRepo() { + return gitRemoteDefaultRepo; + } + + /** + * User email from git configuration. + */ + @JsonIgnore + public Optional gitUserEmail() { + return gitUserEmail; + } + + /** + * User's name from git configuration. (not GitHub username) + */ + @JsonIgnore + public Optional gitUserName() { + return gitUserName; + } + + /** + * Remote hostname. + */ + @JsonIgnore + public Optional hostname() { + return hostname; + } + + /** + * Unique identifier of the target the same as `generate_gen_lock_id` + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * Timestamp when the event was created in the database. + */ + @JsonIgnore + public OffsetDateTime lastEventCreatedAt() { + return lastEventCreatedAt; + } + + /** + * Unique identifier of the last event for the target + */ + @JsonIgnore + public String lastEventId() { + return lastEventId; + } + + /** + * Type of interaction. + */ + @JsonIgnore + public InteractionType lastEventInteractionType() { + return lastEventInteractionType; + } + + /** + * Label of the git repository. + */ + @JsonIgnore + public Optional repoLabel() { + return repoLabel; + } + + /** + * The blob digest of the source. + */ + @JsonIgnore + public Optional sourceBlobDigest() { + return sourceBlobDigest; + } + + /** + * The namespace name of the source. + */ + @JsonIgnore + public Optional sourceNamespaceName() { + return sourceNamespaceName; + } + + /** + * The revision digest of the source. + */ + @JsonIgnore + public Optional sourceRevisionDigest() { + return sourceRevisionDigest; + } + + /** + * Indicates whether the event was successful. + */ + @JsonIgnore + public Optional success() { + return success; + } + + /** + * Workflow file (post execution) + */ + @JsonIgnore + public Optional workflowPostRaw() { + return workflowPostRaw; + } + + /** + * Workflow file (prior to execution) + */ + @JsonIgnore + public Optional workflowPreRaw() { + return workflowPreRaw; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Remote commit ID. + */ + public TargetSDK withCommitHead(String commitHead) { + Utils.checkNotNull(commitHead, "commitHead"); + this.commitHead = Optional.ofNullable(commitHead); + return this; + } + + /** + * Remote commit ID. + */ + public TargetSDK withCommitHead(Optional commitHead) { + Utils.checkNotNull(commitHead, "commitHead"); + this.commitHead = commitHead; + return this; + } + + /** + * Name of the CI environment. + */ + public TargetSDK withContinuousIntegrationEnvironment(String continuousIntegrationEnvironment) { + Utils.checkNotNull(continuousIntegrationEnvironment, "continuousIntegrationEnvironment"); + this.continuousIntegrationEnvironment = Optional.ofNullable(continuousIntegrationEnvironment); + return this; + } + + /** + * Name of the CI environment. + */ + public TargetSDK withContinuousIntegrationEnvironment(Optional continuousIntegrationEnvironment) { + Utils.checkNotNull(continuousIntegrationEnvironment, "continuousIntegrationEnvironment"); + this.continuousIntegrationEnvironment = continuousIntegrationEnvironment; + return this; + } + + /** + * Error message if the last event was not successful. + */ + public TargetSDK withError(String error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Error message if the last event was not successful. + */ + public TargetSDK withError(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * Version of the generated target (post generation) + */ + public TargetSDK withGenerateConfigPostVersion(String generateConfigPostVersion) { + Utils.checkNotNull(generateConfigPostVersion, "generateConfigPostVersion"); + this.generateConfigPostVersion = Optional.ofNullable(generateConfigPostVersion); + return this; + } + + /** + * Version of the generated target (post generation) + */ + public TargetSDK withGenerateConfigPostVersion(Optional generateConfigPostVersion) { + Utils.checkNotNull(generateConfigPostVersion, "generateConfigPostVersion"); + this.generateConfigPostVersion = generateConfigPostVersion; + return this; + } + + /** + * Eligible feature set during generation + */ + public TargetSDK withGenerateEligibleFeatures(String generateEligibleFeatures) { + Utils.checkNotNull(generateEligibleFeatures, "generateEligibleFeatures"); + this.generateEligibleFeatures = Optional.ofNullable(generateEligibleFeatures); + return this; + } + + /** + * Eligible feature set during generation + */ + public TargetSDK withGenerateEligibleFeatures(Optional generateEligibleFeatures) { + Utils.checkNotNull(generateEligibleFeatures, "generateEligibleFeatures"); + this.generateEligibleFeatures = generateEligibleFeatures; + return this; + } + + /** + * gen.lock ID (expected to be a uuid). The same as `id`. A unique identifier for the target. + */ + public TargetSDK withGenerateGenLockId(String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + return this; + } + + /** + * Features prior to generation + */ + public TargetSDK withGenerateGenLockPreFeatures(String generateGenLockPreFeatures) { + Utils.checkNotNull(generateGenLockPreFeatures, "generateGenLockPreFeatures"); + this.generateGenLockPreFeatures = Optional.ofNullable(generateGenLockPreFeatures); + return this; + } + + /** + * Features prior to generation + */ + public TargetSDK withGenerateGenLockPreFeatures(Optional generateGenLockPreFeatures) { + Utils.checkNotNull(generateGenLockPreFeatures, "generateGenLockPreFeatures"); + this.generateGenLockPreFeatures = generateGenLockPreFeatures; + return this; + } + + /** + * Artifact version for the Previous Generation + */ + public TargetSDK withGenerateGenLockPreVersion(String generateGenLockPreVersion) { + Utils.checkNotNull(generateGenLockPreVersion, "generateGenLockPreVersion"); + this.generateGenLockPreVersion = Optional.ofNullable(generateGenLockPreVersion); + return this; + } + + /** + * Artifact version for the Previous Generation + */ + public TargetSDK withGenerateGenLockPreVersion(Optional generateGenLockPreVersion) { + Utils.checkNotNull(generateGenLockPreVersion, "generateGenLockPreVersion"); + this.generateGenLockPreVersion = generateGenLockPreVersion; + return this; + } + + /** + * The number of operations ignored in generation. + */ + public TargetSDK withGenerateNumberOfOperationsIgnored(long generateNumberOfOperationsIgnored) { + Utils.checkNotNull(generateNumberOfOperationsIgnored, "generateNumberOfOperationsIgnored"); + this.generateNumberOfOperationsIgnored = Optional.ofNullable(generateNumberOfOperationsIgnored); + return this; + } + + /** + * The number of operations ignored in generation. + */ + public TargetSDK withGenerateNumberOfOperationsIgnored(Optional generateNumberOfOperationsIgnored) { + Utils.checkNotNull(generateNumberOfOperationsIgnored, "generateNumberOfOperationsIgnored"); + this.generateNumberOfOperationsIgnored = generateNumberOfOperationsIgnored; + return this; + } + + /** + * The number of operations used in generation. + */ + public TargetSDK withGenerateNumberOfOperationsUsed(long generateNumberOfOperationsUsed) { + Utils.checkNotNull(generateNumberOfOperationsUsed, "generateNumberOfOperationsUsed"); + this.generateNumberOfOperationsUsed = Optional.ofNullable(generateNumberOfOperationsUsed); + return this; + } + + /** + * The number of operations used in generation. + */ + public TargetSDK withGenerateNumberOfOperationsUsed(Optional generateNumberOfOperationsUsed) { + Utils.checkNotNull(generateNumberOfOperationsUsed, "generateNumberOfOperationsUsed"); + this.generateNumberOfOperationsUsed = generateNumberOfOperationsUsed; + return this; + } + + /** + * Indicates whether the target was considered published. + */ + public TargetSDK withGeneratePublished(boolean generatePublished) { + Utils.checkNotNull(generatePublished, "generatePublished"); + this.generatePublished = Optional.ofNullable(generatePublished); + return this; + } + + /** + * Indicates whether the target was considered published. + */ + public TargetSDK withGeneratePublished(Optional generatePublished) { + Utils.checkNotNull(generatePublished, "generatePublished"); + this.generatePublished = generatePublished; + return this; + } + + /** + * eg `typescript`, `terraform`, `python` + */ + public TargetSDK withGenerateTarget(String generateTarget) { + Utils.checkNotNull(generateTarget, "generateTarget"); + this.generateTarget = generateTarget; + return this; + } + + /** + * The workflow name of the target. + */ + public TargetSDK withGenerateTargetName(String generateTargetName) { + Utils.checkNotNull(generateTargetName, "generateTargetName"); + this.generateTargetName = Optional.ofNullable(generateTargetName); + return this; + } + + /** + * The workflow name of the target. + */ + public TargetSDK withGenerateTargetName(Optional generateTargetName) { + Utils.checkNotNull(generateTargetName, "generateTargetName"); + this.generateTargetName = generateTargetName; + return this; + } + + /** + * The version of the Speakeasy generator for this target eg v2 of the typescript generator. + */ + public TargetSDK withGenerateTargetVersion(String generateTargetVersion) { + Utils.checkNotNull(generateTargetVersion, "generateTargetVersion"); + this.generateTargetVersion = Optional.ofNullable(generateTargetVersion); + return this; + } + + /** + * The version of the Speakeasy generator for this target eg v2 of the typescript generator. + */ + public TargetSDK withGenerateTargetVersion(Optional generateTargetVersion) { + Utils.checkNotNull(generateTargetVersion, "generateTargetVersion"); + this.generateTargetVersion = generateTargetVersion; + return this; + } + + /** + * GitHub organization of the action. + */ + public TargetSDK withGhActionOrganization(String ghActionOrganization) { + Utils.checkNotNull(ghActionOrganization, "ghActionOrganization"); + this.ghActionOrganization = Optional.ofNullable(ghActionOrganization); + return this; + } + + /** + * GitHub organization of the action. + */ + public TargetSDK withGhActionOrganization(Optional ghActionOrganization) { + Utils.checkNotNull(ghActionOrganization, "ghActionOrganization"); + this.ghActionOrganization = ghActionOrganization; + return this; + } + + /** + * GitHub Action ref value. + */ + public TargetSDK withGhActionRef(String ghActionRef) { + Utils.checkNotNull(ghActionRef, "ghActionRef"); + this.ghActionRef = Optional.ofNullable(ghActionRef); + return this; + } + + /** + * GitHub Action ref value. + */ + public TargetSDK withGhActionRef(Optional ghActionRef) { + Utils.checkNotNull(ghActionRef, "ghActionRef"); + this.ghActionRef = ghActionRef; + return this; + } + + /** + * GitHub repository of the action. + */ + public TargetSDK withGhActionRepository(String ghActionRepository) { + Utils.checkNotNull(ghActionRepository, "ghActionRepository"); + this.ghActionRepository = Optional.ofNullable(ghActionRepository); + return this; + } + + /** + * GitHub repository of the action. + */ + public TargetSDK withGhActionRepository(Optional ghActionRepository) { + Utils.checkNotNull(ghActionRepository, "ghActionRepository"); + this.ghActionRepository = ghActionRepository; + return this; + } + + /** + * Link to the GitHub action run. + */ + public TargetSDK withGhActionRunLink(String ghActionRunLink) { + Utils.checkNotNull(ghActionRunLink, "ghActionRunLink"); + this.ghActionRunLink = Optional.ofNullable(ghActionRunLink); + return this; + } + + /** + * Link to the GitHub action run. + */ + public TargetSDK withGhActionRunLink(Optional ghActionRunLink) { + Utils.checkNotNull(ghActionRunLink, "ghActionRunLink"); + this.ghActionRunLink = ghActionRunLink; + return this; + } + + /** + * Version of the GitHub action. + */ + public TargetSDK withGhActionVersion(String ghActionVersion) { + Utils.checkNotNull(ghActionVersion, "ghActionVersion"); + this.ghActionVersion = Optional.ofNullable(ghActionVersion); + return this; + } + + /** + * Version of the GitHub action. + */ + public TargetSDK withGhActionVersion(Optional ghActionVersion) { + Utils.checkNotNull(ghActionVersion, "ghActionVersion"); + this.ghActionVersion = ghActionVersion; + return this; + } + + /** + * Current working directory relative to the git root. + */ + public TargetSDK withGitRelativeCwd(String gitRelativeCwd) { + Utils.checkNotNull(gitRelativeCwd, "gitRelativeCwd"); + this.gitRelativeCwd = Optional.ofNullable(gitRelativeCwd); + return this; + } + + /** + * Current working directory relative to the git root. + */ + public TargetSDK withGitRelativeCwd(Optional gitRelativeCwd) { + Utils.checkNotNull(gitRelativeCwd, "gitRelativeCwd"); + this.gitRelativeCwd = gitRelativeCwd; + return this; + } + + /** + * Default owner for git remote. + */ + public TargetSDK withGitRemoteDefaultOwner(String gitRemoteDefaultOwner) { + Utils.checkNotNull(gitRemoteDefaultOwner, "gitRemoteDefaultOwner"); + this.gitRemoteDefaultOwner = Optional.ofNullable(gitRemoteDefaultOwner); + return this; + } + + /** + * Default owner for git remote. + */ + public TargetSDK withGitRemoteDefaultOwner(Optional gitRemoteDefaultOwner) { + Utils.checkNotNull(gitRemoteDefaultOwner, "gitRemoteDefaultOwner"); + this.gitRemoteDefaultOwner = gitRemoteDefaultOwner; + return this; + } + + /** + * Default repository name for git remote. + */ + public TargetSDK withGitRemoteDefaultRepo(String gitRemoteDefaultRepo) { + Utils.checkNotNull(gitRemoteDefaultRepo, "gitRemoteDefaultRepo"); + this.gitRemoteDefaultRepo = Optional.ofNullable(gitRemoteDefaultRepo); + return this; + } + + /** + * Default repository name for git remote. + */ + public TargetSDK withGitRemoteDefaultRepo(Optional gitRemoteDefaultRepo) { + Utils.checkNotNull(gitRemoteDefaultRepo, "gitRemoteDefaultRepo"); + this.gitRemoteDefaultRepo = gitRemoteDefaultRepo; + return this; + } + + /** + * User email from git configuration. + */ + public TargetSDK withGitUserEmail(String gitUserEmail) { + Utils.checkNotNull(gitUserEmail, "gitUserEmail"); + this.gitUserEmail = Optional.ofNullable(gitUserEmail); + return this; + } + + /** + * User email from git configuration. + */ + public TargetSDK withGitUserEmail(Optional gitUserEmail) { + Utils.checkNotNull(gitUserEmail, "gitUserEmail"); + this.gitUserEmail = gitUserEmail; + return this; + } + + /** + * User's name from git configuration. (not GitHub username) + */ + public TargetSDK withGitUserName(String gitUserName) { + Utils.checkNotNull(gitUserName, "gitUserName"); + this.gitUserName = Optional.ofNullable(gitUserName); + return this; + } + + /** + * User's name from git configuration. (not GitHub username) + */ + public TargetSDK withGitUserName(Optional gitUserName) { + Utils.checkNotNull(gitUserName, "gitUserName"); + this.gitUserName = gitUserName; + return this; + } + + /** + * Remote hostname. + */ + public TargetSDK withHostname(String hostname) { + Utils.checkNotNull(hostname, "hostname"); + this.hostname = Optional.ofNullable(hostname); + return this; + } + + /** + * Remote hostname. + */ + public TargetSDK withHostname(Optional hostname) { + Utils.checkNotNull(hostname, "hostname"); + this.hostname = hostname; + return this; + } + + /** + * Unique identifier of the target the same as `generate_gen_lock_id` + */ + public TargetSDK withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Timestamp when the event was created in the database. + */ + public TargetSDK withLastEventCreatedAt(OffsetDateTime lastEventCreatedAt) { + Utils.checkNotNull(lastEventCreatedAt, "lastEventCreatedAt"); + this.lastEventCreatedAt = lastEventCreatedAt; + return this; + } + + /** + * Unique identifier of the last event for the target + */ + public TargetSDK withLastEventId(String lastEventId) { + Utils.checkNotNull(lastEventId, "lastEventId"); + this.lastEventId = lastEventId; + return this; + } + + /** + * Type of interaction. + */ + public TargetSDK withLastEventInteractionType(InteractionType lastEventInteractionType) { + Utils.checkNotNull(lastEventInteractionType, "lastEventInteractionType"); + this.lastEventInteractionType = lastEventInteractionType; + return this; + } + + /** + * Label of the git repository. + */ + public TargetSDK withRepoLabel(String repoLabel) { + Utils.checkNotNull(repoLabel, "repoLabel"); + this.repoLabel = Optional.ofNullable(repoLabel); + return this; + } + + /** + * Label of the git repository. + */ + public TargetSDK withRepoLabel(Optional repoLabel) { + Utils.checkNotNull(repoLabel, "repoLabel"); + this.repoLabel = repoLabel; + return this; + } + + /** + * The blob digest of the source. + */ + public TargetSDK withSourceBlobDigest(String sourceBlobDigest) { + Utils.checkNotNull(sourceBlobDigest, "sourceBlobDigest"); + this.sourceBlobDigest = Optional.ofNullable(sourceBlobDigest); + return this; + } + + /** + * The blob digest of the source. + */ + public TargetSDK withSourceBlobDigest(Optional sourceBlobDigest) { + Utils.checkNotNull(sourceBlobDigest, "sourceBlobDigest"); + this.sourceBlobDigest = sourceBlobDigest; + return this; + } + + /** + * The namespace name of the source. + */ + public TargetSDK withSourceNamespaceName(String sourceNamespaceName) { + Utils.checkNotNull(sourceNamespaceName, "sourceNamespaceName"); + this.sourceNamespaceName = Optional.ofNullable(sourceNamespaceName); + return this; + } + + /** + * The namespace name of the source. + */ + public TargetSDK withSourceNamespaceName(Optional sourceNamespaceName) { + Utils.checkNotNull(sourceNamespaceName, "sourceNamespaceName"); + this.sourceNamespaceName = sourceNamespaceName; + return this; + } + + /** + * The revision digest of the source. + */ + public TargetSDK withSourceRevisionDigest(String sourceRevisionDigest) { + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + this.sourceRevisionDigest = Optional.ofNullable(sourceRevisionDigest); + return this; + } + + /** + * The revision digest of the source. + */ + public TargetSDK withSourceRevisionDigest(Optional sourceRevisionDigest) { + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + this.sourceRevisionDigest = sourceRevisionDigest; + return this; + } + + /** + * Indicates whether the event was successful. + */ + public TargetSDK withSuccess(boolean success) { + Utils.checkNotNull(success, "success"); + this.success = Optional.ofNullable(success); + return this; + } + + /** + * Indicates whether the event was successful. + */ + public TargetSDK withSuccess(Optional success) { + Utils.checkNotNull(success, "success"); + this.success = success; + return this; + } + + /** + * Workflow file (post execution) + */ + public TargetSDK withWorkflowPostRaw(String workflowPostRaw) { + Utils.checkNotNull(workflowPostRaw, "workflowPostRaw"); + this.workflowPostRaw = Optional.ofNullable(workflowPostRaw); + return this; + } + + /** + * Workflow file (post execution) + */ + public TargetSDK withWorkflowPostRaw(Optional workflowPostRaw) { + Utils.checkNotNull(workflowPostRaw, "workflowPostRaw"); + this.workflowPostRaw = workflowPostRaw; + return this; + } + + /** + * Workflow file (prior to execution) + */ + public TargetSDK withWorkflowPreRaw(String workflowPreRaw) { + Utils.checkNotNull(workflowPreRaw, "workflowPreRaw"); + this.workflowPreRaw = Optional.ofNullable(workflowPreRaw); + return this; + } + + /** + * Workflow file (prior to execution) + */ + public TargetSDK withWorkflowPreRaw(Optional workflowPreRaw) { + Utils.checkNotNull(workflowPreRaw, "workflowPreRaw"); + this.workflowPreRaw = workflowPreRaw; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TargetSDK other = (TargetSDK) o; + return + Objects.deepEquals(this.commitHead, other.commitHead) && + Objects.deepEquals(this.continuousIntegrationEnvironment, other.continuousIntegrationEnvironment) && + Objects.deepEquals(this.error, other.error) && + Objects.deepEquals(this.generateConfigPostVersion, other.generateConfigPostVersion) && + Objects.deepEquals(this.generateEligibleFeatures, other.generateEligibleFeatures) && + Objects.deepEquals(this.generateGenLockId, other.generateGenLockId) && + Objects.deepEquals(this.generateGenLockPreFeatures, other.generateGenLockPreFeatures) && + Objects.deepEquals(this.generateGenLockPreVersion, other.generateGenLockPreVersion) && + Objects.deepEquals(this.generateNumberOfOperationsIgnored, other.generateNumberOfOperationsIgnored) && + Objects.deepEquals(this.generateNumberOfOperationsUsed, other.generateNumberOfOperationsUsed) && + Objects.deepEquals(this.generatePublished, other.generatePublished) && + Objects.deepEquals(this.generateTarget, other.generateTarget) && + Objects.deepEquals(this.generateTargetName, other.generateTargetName) && + Objects.deepEquals(this.generateTargetVersion, other.generateTargetVersion) && + Objects.deepEquals(this.ghActionOrganization, other.ghActionOrganization) && + Objects.deepEquals(this.ghActionRef, other.ghActionRef) && + Objects.deepEquals(this.ghActionRepository, other.ghActionRepository) && + Objects.deepEquals(this.ghActionRunLink, other.ghActionRunLink) && + Objects.deepEquals(this.ghActionVersion, other.ghActionVersion) && + Objects.deepEquals(this.gitRelativeCwd, other.gitRelativeCwd) && + Objects.deepEquals(this.gitRemoteDefaultOwner, other.gitRemoteDefaultOwner) && + Objects.deepEquals(this.gitRemoteDefaultRepo, other.gitRemoteDefaultRepo) && + Objects.deepEquals(this.gitUserEmail, other.gitUserEmail) && + Objects.deepEquals(this.gitUserName, other.gitUserName) && + Objects.deepEquals(this.hostname, other.hostname) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.lastEventCreatedAt, other.lastEventCreatedAt) && + Objects.deepEquals(this.lastEventId, other.lastEventId) && + Objects.deepEquals(this.lastEventInteractionType, other.lastEventInteractionType) && + Objects.deepEquals(this.repoLabel, other.repoLabel) && + Objects.deepEquals(this.sourceBlobDigest, other.sourceBlobDigest) && + Objects.deepEquals(this.sourceNamespaceName, other.sourceNamespaceName) && + Objects.deepEquals(this.sourceRevisionDigest, other.sourceRevisionDigest) && + Objects.deepEquals(this.success, other.success) && + Objects.deepEquals(this.workflowPostRaw, other.workflowPostRaw) && + Objects.deepEquals(this.workflowPreRaw, other.workflowPreRaw); + } + + @Override + public int hashCode() { + return Objects.hash( + commitHead, + continuousIntegrationEnvironment, + error, + generateConfigPostVersion, + generateEligibleFeatures, + generateGenLockId, + generateGenLockPreFeatures, + generateGenLockPreVersion, + generateNumberOfOperationsIgnored, + generateNumberOfOperationsUsed, + generatePublished, + generateTarget, + generateTargetName, + generateTargetVersion, + ghActionOrganization, + ghActionRef, + ghActionRepository, + ghActionRunLink, + ghActionVersion, + gitRelativeCwd, + gitRemoteDefaultOwner, + gitRemoteDefaultRepo, + gitUserEmail, + gitUserName, + hostname, + id, + lastEventCreatedAt, + lastEventId, + lastEventInteractionType, + repoLabel, + sourceBlobDigest, + sourceNamespaceName, + sourceRevisionDigest, + success, + workflowPostRaw, + workflowPreRaw); + } + + @Override + public String toString() { + return Utils.toString(TargetSDK.class, + "commitHead", commitHead, + "continuousIntegrationEnvironment", continuousIntegrationEnvironment, + "error", error, + "generateConfigPostVersion", generateConfigPostVersion, + "generateEligibleFeatures", generateEligibleFeatures, + "generateGenLockId", generateGenLockId, + "generateGenLockPreFeatures", generateGenLockPreFeatures, + "generateGenLockPreVersion", generateGenLockPreVersion, + "generateNumberOfOperationsIgnored", generateNumberOfOperationsIgnored, + "generateNumberOfOperationsUsed", generateNumberOfOperationsUsed, + "generatePublished", generatePublished, + "generateTarget", generateTarget, + "generateTargetName", generateTargetName, + "generateTargetVersion", generateTargetVersion, + "ghActionOrganization", ghActionOrganization, + "ghActionRef", ghActionRef, + "ghActionRepository", ghActionRepository, + "ghActionRunLink", ghActionRunLink, + "ghActionVersion", ghActionVersion, + "gitRelativeCwd", gitRelativeCwd, + "gitRemoteDefaultOwner", gitRemoteDefaultOwner, + "gitRemoteDefaultRepo", gitRemoteDefaultRepo, + "gitUserEmail", gitUserEmail, + "gitUserName", gitUserName, + "hostname", hostname, + "id", id, + "lastEventCreatedAt", lastEventCreatedAt, + "lastEventId", lastEventId, + "lastEventInteractionType", lastEventInteractionType, + "repoLabel", repoLabel, + "sourceBlobDigest", sourceBlobDigest, + "sourceNamespaceName", sourceNamespaceName, + "sourceRevisionDigest", sourceRevisionDigest, + "success", success, + "workflowPostRaw", workflowPostRaw, + "workflowPreRaw", workflowPreRaw); + } + + public final static class Builder { + + private Optional commitHead = Optional.empty(); + + private Optional continuousIntegrationEnvironment = Optional.empty(); + + private Optional error = Optional.empty(); + + private Optional generateConfigPostVersion = Optional.empty(); + + private Optional generateEligibleFeatures = Optional.empty(); + + private String generateGenLockId; + + private Optional generateGenLockPreFeatures = Optional.empty(); + + private Optional generateGenLockPreVersion = Optional.empty(); + + private Optional generateNumberOfOperationsIgnored = Optional.empty(); + + private Optional generateNumberOfOperationsUsed = Optional.empty(); + + private Optional generatePublished = Optional.empty(); + + private String generateTarget; + + private Optional generateTargetName = Optional.empty(); + + private Optional generateTargetVersion = Optional.empty(); + + private Optional ghActionOrganization = Optional.empty(); + + private Optional ghActionRef = Optional.empty(); + + private Optional ghActionRepository = Optional.empty(); + + private Optional ghActionRunLink = Optional.empty(); + + private Optional ghActionVersion = Optional.empty(); + + private Optional gitRelativeCwd = Optional.empty(); + + private Optional gitRemoteDefaultOwner = Optional.empty(); + + private Optional gitRemoteDefaultRepo = Optional.empty(); + + private Optional gitUserEmail = Optional.empty(); + + private Optional gitUserName = Optional.empty(); + + private Optional hostname = Optional.empty(); + + private String id; + + private OffsetDateTime lastEventCreatedAt; + + private String lastEventId; + + private InteractionType lastEventInteractionType; + + private Optional repoLabel = Optional.empty(); + + private Optional sourceBlobDigest = Optional.empty(); + + private Optional sourceNamespaceName = Optional.empty(); + + private Optional sourceRevisionDigest = Optional.empty(); + + private Optional success = Optional.empty(); + + private Optional workflowPostRaw = Optional.empty(); + + private Optional workflowPreRaw = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Remote commit ID. + */ + public Builder commitHead(String commitHead) { + Utils.checkNotNull(commitHead, "commitHead"); + this.commitHead = Optional.ofNullable(commitHead); + return this; + } + + /** + * Remote commit ID. + */ + public Builder commitHead(Optional commitHead) { + Utils.checkNotNull(commitHead, "commitHead"); + this.commitHead = commitHead; + return this; + } + + /** + * Name of the CI environment. + */ + public Builder continuousIntegrationEnvironment(String continuousIntegrationEnvironment) { + Utils.checkNotNull(continuousIntegrationEnvironment, "continuousIntegrationEnvironment"); + this.continuousIntegrationEnvironment = Optional.ofNullable(continuousIntegrationEnvironment); + return this; + } + + /** + * Name of the CI environment. + */ + public Builder continuousIntegrationEnvironment(Optional continuousIntegrationEnvironment) { + Utils.checkNotNull(continuousIntegrationEnvironment, "continuousIntegrationEnvironment"); + this.continuousIntegrationEnvironment = continuousIntegrationEnvironment; + return this; + } + + /** + * Error message if the last event was not successful. + */ + public Builder error(String error) { + Utils.checkNotNull(error, "error"); + this.error = Optional.ofNullable(error); + return this; + } + + /** + * Error message if the last event was not successful. + */ + public Builder error(Optional error) { + Utils.checkNotNull(error, "error"); + this.error = error; + return this; + } + + /** + * Version of the generated target (post generation) + */ + public Builder generateConfigPostVersion(String generateConfigPostVersion) { + Utils.checkNotNull(generateConfigPostVersion, "generateConfigPostVersion"); + this.generateConfigPostVersion = Optional.ofNullable(generateConfigPostVersion); + return this; + } + + /** + * Version of the generated target (post generation) + */ + public Builder generateConfigPostVersion(Optional generateConfigPostVersion) { + Utils.checkNotNull(generateConfigPostVersion, "generateConfigPostVersion"); + this.generateConfigPostVersion = generateConfigPostVersion; + return this; + } + + /** + * Eligible feature set during generation + */ + public Builder generateEligibleFeatures(String generateEligibleFeatures) { + Utils.checkNotNull(generateEligibleFeatures, "generateEligibleFeatures"); + this.generateEligibleFeatures = Optional.ofNullable(generateEligibleFeatures); + return this; + } + + /** + * Eligible feature set during generation + */ + public Builder generateEligibleFeatures(Optional generateEligibleFeatures) { + Utils.checkNotNull(generateEligibleFeatures, "generateEligibleFeatures"); + this.generateEligibleFeatures = generateEligibleFeatures; + return this; + } + + /** + * gen.lock ID (expected to be a uuid). The same as `id`. A unique identifier for the target. + */ + public Builder generateGenLockId(String generateGenLockId) { + Utils.checkNotNull(generateGenLockId, "generateGenLockId"); + this.generateGenLockId = generateGenLockId; + return this; + } + + /** + * Features prior to generation + */ + public Builder generateGenLockPreFeatures(String generateGenLockPreFeatures) { + Utils.checkNotNull(generateGenLockPreFeatures, "generateGenLockPreFeatures"); + this.generateGenLockPreFeatures = Optional.ofNullable(generateGenLockPreFeatures); + return this; + } + + /** + * Features prior to generation + */ + public Builder generateGenLockPreFeatures(Optional generateGenLockPreFeatures) { + Utils.checkNotNull(generateGenLockPreFeatures, "generateGenLockPreFeatures"); + this.generateGenLockPreFeatures = generateGenLockPreFeatures; + return this; + } + + /** + * Artifact version for the Previous Generation + */ + public Builder generateGenLockPreVersion(String generateGenLockPreVersion) { + Utils.checkNotNull(generateGenLockPreVersion, "generateGenLockPreVersion"); + this.generateGenLockPreVersion = Optional.ofNullable(generateGenLockPreVersion); + return this; + } + + /** + * Artifact version for the Previous Generation + */ + public Builder generateGenLockPreVersion(Optional generateGenLockPreVersion) { + Utils.checkNotNull(generateGenLockPreVersion, "generateGenLockPreVersion"); + this.generateGenLockPreVersion = generateGenLockPreVersion; + return this; + } + + /** + * The number of operations ignored in generation. + */ + public Builder generateNumberOfOperationsIgnored(long generateNumberOfOperationsIgnored) { + Utils.checkNotNull(generateNumberOfOperationsIgnored, "generateNumberOfOperationsIgnored"); + this.generateNumberOfOperationsIgnored = Optional.ofNullable(generateNumberOfOperationsIgnored); + return this; + } + + /** + * The number of operations ignored in generation. + */ + public Builder generateNumberOfOperationsIgnored(Optional generateNumberOfOperationsIgnored) { + Utils.checkNotNull(generateNumberOfOperationsIgnored, "generateNumberOfOperationsIgnored"); + this.generateNumberOfOperationsIgnored = generateNumberOfOperationsIgnored; + return this; + } + + /** + * The number of operations used in generation. + */ + public Builder generateNumberOfOperationsUsed(long generateNumberOfOperationsUsed) { + Utils.checkNotNull(generateNumberOfOperationsUsed, "generateNumberOfOperationsUsed"); + this.generateNumberOfOperationsUsed = Optional.ofNullable(generateNumberOfOperationsUsed); + return this; + } + + /** + * The number of operations used in generation. + */ + public Builder generateNumberOfOperationsUsed(Optional generateNumberOfOperationsUsed) { + Utils.checkNotNull(generateNumberOfOperationsUsed, "generateNumberOfOperationsUsed"); + this.generateNumberOfOperationsUsed = generateNumberOfOperationsUsed; + return this; + } + + /** + * Indicates whether the target was considered published. + */ + public Builder generatePublished(boolean generatePublished) { + Utils.checkNotNull(generatePublished, "generatePublished"); + this.generatePublished = Optional.ofNullable(generatePublished); + return this; + } + + /** + * Indicates whether the target was considered published. + */ + public Builder generatePublished(Optional generatePublished) { + Utils.checkNotNull(generatePublished, "generatePublished"); + this.generatePublished = generatePublished; + return this; + } + + /** + * eg `typescript`, `terraform`, `python` + */ + public Builder generateTarget(String generateTarget) { + Utils.checkNotNull(generateTarget, "generateTarget"); + this.generateTarget = generateTarget; + return this; + } + + /** + * The workflow name of the target. + */ + public Builder generateTargetName(String generateTargetName) { + Utils.checkNotNull(generateTargetName, "generateTargetName"); + this.generateTargetName = Optional.ofNullable(generateTargetName); + return this; + } + + /** + * The workflow name of the target. + */ + public Builder generateTargetName(Optional generateTargetName) { + Utils.checkNotNull(generateTargetName, "generateTargetName"); + this.generateTargetName = generateTargetName; + return this; + } + + /** + * The version of the Speakeasy generator for this target eg v2 of the typescript generator. + */ + public Builder generateTargetVersion(String generateTargetVersion) { + Utils.checkNotNull(generateTargetVersion, "generateTargetVersion"); + this.generateTargetVersion = Optional.ofNullable(generateTargetVersion); + return this; + } + + /** + * The version of the Speakeasy generator for this target eg v2 of the typescript generator. + */ + public Builder generateTargetVersion(Optional generateTargetVersion) { + Utils.checkNotNull(generateTargetVersion, "generateTargetVersion"); + this.generateTargetVersion = generateTargetVersion; + return this; + } + + /** + * GitHub organization of the action. + */ + public Builder ghActionOrganization(String ghActionOrganization) { + Utils.checkNotNull(ghActionOrganization, "ghActionOrganization"); + this.ghActionOrganization = Optional.ofNullable(ghActionOrganization); + return this; + } + + /** + * GitHub organization of the action. + */ + public Builder ghActionOrganization(Optional ghActionOrganization) { + Utils.checkNotNull(ghActionOrganization, "ghActionOrganization"); + this.ghActionOrganization = ghActionOrganization; + return this; + } + + /** + * GitHub Action ref value. + */ + public Builder ghActionRef(String ghActionRef) { + Utils.checkNotNull(ghActionRef, "ghActionRef"); + this.ghActionRef = Optional.ofNullable(ghActionRef); + return this; + } + + /** + * GitHub Action ref value. + */ + public Builder ghActionRef(Optional ghActionRef) { + Utils.checkNotNull(ghActionRef, "ghActionRef"); + this.ghActionRef = ghActionRef; + return this; + } + + /** + * GitHub repository of the action. + */ + public Builder ghActionRepository(String ghActionRepository) { + Utils.checkNotNull(ghActionRepository, "ghActionRepository"); + this.ghActionRepository = Optional.ofNullable(ghActionRepository); + return this; + } + + /** + * GitHub repository of the action. + */ + public Builder ghActionRepository(Optional ghActionRepository) { + Utils.checkNotNull(ghActionRepository, "ghActionRepository"); + this.ghActionRepository = ghActionRepository; + return this; + } + + /** + * Link to the GitHub action run. + */ + public Builder ghActionRunLink(String ghActionRunLink) { + Utils.checkNotNull(ghActionRunLink, "ghActionRunLink"); + this.ghActionRunLink = Optional.ofNullable(ghActionRunLink); + return this; + } + + /** + * Link to the GitHub action run. + */ + public Builder ghActionRunLink(Optional ghActionRunLink) { + Utils.checkNotNull(ghActionRunLink, "ghActionRunLink"); + this.ghActionRunLink = ghActionRunLink; + return this; + } + + /** + * Version of the GitHub action. + */ + public Builder ghActionVersion(String ghActionVersion) { + Utils.checkNotNull(ghActionVersion, "ghActionVersion"); + this.ghActionVersion = Optional.ofNullable(ghActionVersion); + return this; + } + + /** + * Version of the GitHub action. + */ + public Builder ghActionVersion(Optional ghActionVersion) { + Utils.checkNotNull(ghActionVersion, "ghActionVersion"); + this.ghActionVersion = ghActionVersion; + return this; + } + + /** + * Current working directory relative to the git root. + */ + public Builder gitRelativeCwd(String gitRelativeCwd) { + Utils.checkNotNull(gitRelativeCwd, "gitRelativeCwd"); + this.gitRelativeCwd = Optional.ofNullable(gitRelativeCwd); + return this; + } + + /** + * Current working directory relative to the git root. + */ + public Builder gitRelativeCwd(Optional gitRelativeCwd) { + Utils.checkNotNull(gitRelativeCwd, "gitRelativeCwd"); + this.gitRelativeCwd = gitRelativeCwd; + return this; + } + + /** + * Default owner for git remote. + */ + public Builder gitRemoteDefaultOwner(String gitRemoteDefaultOwner) { + Utils.checkNotNull(gitRemoteDefaultOwner, "gitRemoteDefaultOwner"); + this.gitRemoteDefaultOwner = Optional.ofNullable(gitRemoteDefaultOwner); + return this; + } + + /** + * Default owner for git remote. + */ + public Builder gitRemoteDefaultOwner(Optional gitRemoteDefaultOwner) { + Utils.checkNotNull(gitRemoteDefaultOwner, "gitRemoteDefaultOwner"); + this.gitRemoteDefaultOwner = gitRemoteDefaultOwner; + return this; + } + + /** + * Default repository name for git remote. + */ + public Builder gitRemoteDefaultRepo(String gitRemoteDefaultRepo) { + Utils.checkNotNull(gitRemoteDefaultRepo, "gitRemoteDefaultRepo"); + this.gitRemoteDefaultRepo = Optional.ofNullable(gitRemoteDefaultRepo); + return this; + } + + /** + * Default repository name for git remote. + */ + public Builder gitRemoteDefaultRepo(Optional gitRemoteDefaultRepo) { + Utils.checkNotNull(gitRemoteDefaultRepo, "gitRemoteDefaultRepo"); + this.gitRemoteDefaultRepo = gitRemoteDefaultRepo; + return this; + } + + /** + * User email from git configuration. + */ + public Builder gitUserEmail(String gitUserEmail) { + Utils.checkNotNull(gitUserEmail, "gitUserEmail"); + this.gitUserEmail = Optional.ofNullable(gitUserEmail); + return this; + } + + /** + * User email from git configuration. + */ + public Builder gitUserEmail(Optional gitUserEmail) { + Utils.checkNotNull(gitUserEmail, "gitUserEmail"); + this.gitUserEmail = gitUserEmail; + return this; + } + + /** + * User's name from git configuration. (not GitHub username) + */ + public Builder gitUserName(String gitUserName) { + Utils.checkNotNull(gitUserName, "gitUserName"); + this.gitUserName = Optional.ofNullable(gitUserName); + return this; + } + + /** + * User's name from git configuration. (not GitHub username) + */ + public Builder gitUserName(Optional gitUserName) { + Utils.checkNotNull(gitUserName, "gitUserName"); + this.gitUserName = gitUserName; + return this; + } + + /** + * Remote hostname. + */ + public Builder hostname(String hostname) { + Utils.checkNotNull(hostname, "hostname"); + this.hostname = Optional.ofNullable(hostname); + return this; + } + + /** + * Remote hostname. + */ + public Builder hostname(Optional hostname) { + Utils.checkNotNull(hostname, "hostname"); + this.hostname = hostname; + return this; + } + + /** + * Unique identifier of the target the same as `generate_gen_lock_id` + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Timestamp when the event was created in the database. + */ + public Builder lastEventCreatedAt(OffsetDateTime lastEventCreatedAt) { + Utils.checkNotNull(lastEventCreatedAt, "lastEventCreatedAt"); + this.lastEventCreatedAt = lastEventCreatedAt; + return this; + } + + /** + * Unique identifier of the last event for the target + */ + public Builder lastEventId(String lastEventId) { + Utils.checkNotNull(lastEventId, "lastEventId"); + this.lastEventId = lastEventId; + return this; + } + + /** + * Type of interaction. + */ + public Builder lastEventInteractionType(InteractionType lastEventInteractionType) { + Utils.checkNotNull(lastEventInteractionType, "lastEventInteractionType"); + this.lastEventInteractionType = lastEventInteractionType; + return this; + } + + /** + * Label of the git repository. + */ + public Builder repoLabel(String repoLabel) { + Utils.checkNotNull(repoLabel, "repoLabel"); + this.repoLabel = Optional.ofNullable(repoLabel); + return this; + } + + /** + * Label of the git repository. + */ + public Builder repoLabel(Optional repoLabel) { + Utils.checkNotNull(repoLabel, "repoLabel"); + this.repoLabel = repoLabel; + return this; + } + + /** + * The blob digest of the source. + */ + public Builder sourceBlobDigest(String sourceBlobDigest) { + Utils.checkNotNull(sourceBlobDigest, "sourceBlobDigest"); + this.sourceBlobDigest = Optional.ofNullable(sourceBlobDigest); + return this; + } + + /** + * The blob digest of the source. + */ + public Builder sourceBlobDigest(Optional sourceBlobDigest) { + Utils.checkNotNull(sourceBlobDigest, "sourceBlobDigest"); + this.sourceBlobDigest = sourceBlobDigest; + return this; + } + + /** + * The namespace name of the source. + */ + public Builder sourceNamespaceName(String sourceNamespaceName) { + Utils.checkNotNull(sourceNamespaceName, "sourceNamespaceName"); + this.sourceNamespaceName = Optional.ofNullable(sourceNamespaceName); + return this; + } + + /** + * The namespace name of the source. + */ + public Builder sourceNamespaceName(Optional sourceNamespaceName) { + Utils.checkNotNull(sourceNamespaceName, "sourceNamespaceName"); + this.sourceNamespaceName = sourceNamespaceName; + return this; + } + + /** + * The revision digest of the source. + */ + public Builder sourceRevisionDigest(String sourceRevisionDigest) { + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + this.sourceRevisionDigest = Optional.ofNullable(sourceRevisionDigest); + return this; + } + + /** + * The revision digest of the source. + */ + public Builder sourceRevisionDigest(Optional sourceRevisionDigest) { + Utils.checkNotNull(sourceRevisionDigest, "sourceRevisionDigest"); + this.sourceRevisionDigest = sourceRevisionDigest; + return this; + } + + /** + * Indicates whether the event was successful. + */ + public Builder success(boolean success) { + Utils.checkNotNull(success, "success"); + this.success = Optional.ofNullable(success); + return this; + } + + /** + * Indicates whether the event was successful. + */ + public Builder success(Optional success) { + Utils.checkNotNull(success, "success"); + this.success = success; + return this; + } + + /** + * Workflow file (post execution) + */ + public Builder workflowPostRaw(String workflowPostRaw) { + Utils.checkNotNull(workflowPostRaw, "workflowPostRaw"); + this.workflowPostRaw = Optional.ofNullable(workflowPostRaw); + return this; + } + + /** + * Workflow file (post execution) + */ + public Builder workflowPostRaw(Optional workflowPostRaw) { + Utils.checkNotNull(workflowPostRaw, "workflowPostRaw"); + this.workflowPostRaw = workflowPostRaw; + return this; + } + + /** + * Workflow file (prior to execution) + */ + public Builder workflowPreRaw(String workflowPreRaw) { + Utils.checkNotNull(workflowPreRaw, "workflowPreRaw"); + this.workflowPreRaw = Optional.ofNullable(workflowPreRaw); + return this; + } + + /** + * Workflow file (prior to execution) + */ + public Builder workflowPreRaw(Optional workflowPreRaw) { + Utils.checkNotNull(workflowPreRaw, "workflowPreRaw"); + this.workflowPreRaw = workflowPreRaw; + return this; + } + + public TargetSDK build() { + return new TargetSDK( + commitHead, + continuousIntegrationEnvironment, + error, + generateConfigPostVersion, + generateEligibleFeatures, + generateGenLockId, + generateGenLockPreFeatures, + generateGenLockPreVersion, + generateNumberOfOperationsIgnored, + generateNumberOfOperationsUsed, + generatePublished, + generateTarget, + generateTargetName, + generateTargetVersion, + ghActionOrganization, + ghActionRef, + ghActionRepository, + ghActionRunLink, + ghActionVersion, + gitRelativeCwd, + gitRemoteDefaultOwner, + gitRemoteDefaultRepo, + gitUserEmail, + gitUserName, + hostname, + id, + lastEventCreatedAt, + lastEventId, + lastEventInteractionType, + repoLabel, + sourceBlobDigest, + sourceNamespaceName, + sourceRevisionDigest, + success, + workflowPostRaw, + workflowPreRaw); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Type.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Type.java new file mode 100644 index 00000000..c5f3e911 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Type.java @@ -0,0 +1,24 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; + +public enum Type { + LINTING("linting"), + CHANGES("changes"); + + @JsonValue + private final String value; + + private Type(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/UnboundedRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/UnboundedRequest.java new file mode 100644 index 00000000..4738a596 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/UnboundedRequest.java @@ -0,0 +1,270 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * UnboundedRequest - An UnboundedRequest represents the HAR content capture by Speakeasy when logging a request. + */ + +public class UnboundedRequest { + + /** + * Creation timestamp. + */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * The HAR content of the request. + */ + @JsonProperty("har") + private String har; + + /** + * The size of the HAR content in bytes. + */ + @JsonProperty("har_size_bytes") + private long harSizeBytes; + + /** + * The ID of this request. + */ + @JsonProperty("request_id") + private String requestId; + + /** + * The workspace ID this request was made to. + */ + @JsonProperty("workspace_id") + private String workspaceId; + + @JsonCreator + public UnboundedRequest( + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("har") String har, + @JsonProperty("har_size_bytes") long harSizeBytes, + @JsonProperty("request_id") String requestId, + @JsonProperty("workspace_id") String workspaceId) { + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(har, "har"); + Utils.checkNotNull(harSizeBytes, "harSizeBytes"); + Utils.checkNotNull(requestId, "requestId"); + Utils.checkNotNull(workspaceId, "workspaceId"); + this.createdAt = createdAt; + this.har = har; + this.harSizeBytes = harSizeBytes; + this.requestId = requestId; + this.workspaceId = workspaceId; + } + + /** + * Creation timestamp. + */ + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + /** + * The HAR content of the request. + */ + @JsonIgnore + public String har() { + return har; + } + + /** + * The size of the HAR content in bytes. + */ + @JsonIgnore + public long harSizeBytes() { + return harSizeBytes; + } + + /** + * The ID of this request. + */ + @JsonIgnore + public String requestId() { + return requestId; + } + + /** + * The workspace ID this request was made to. + */ + @JsonIgnore + public String workspaceId() { + return workspaceId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Creation timestamp. + */ + public UnboundedRequest withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * The HAR content of the request. + */ + public UnboundedRequest withHar(String har) { + Utils.checkNotNull(har, "har"); + this.har = har; + return this; + } + + /** + * The size of the HAR content in bytes. + */ + public UnboundedRequest withHarSizeBytes(long harSizeBytes) { + Utils.checkNotNull(harSizeBytes, "harSizeBytes"); + this.harSizeBytes = harSizeBytes; + return this; + } + + /** + * The ID of this request. + */ + public UnboundedRequest withRequestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + /** + * The workspace ID this request was made to. + */ + public UnboundedRequest withWorkspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnboundedRequest other = (UnboundedRequest) o; + return + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.har, other.har) && + Objects.deepEquals(this.harSizeBytes, other.harSizeBytes) && + Objects.deepEquals(this.requestId, other.requestId) && + Objects.deepEquals(this.workspaceId, other.workspaceId); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + har, + harSizeBytes, + requestId, + workspaceId); + } + + @Override + public String toString() { + return Utils.toString(UnboundedRequest.class, + "createdAt", createdAt, + "har", har, + "harSizeBytes", harSizeBytes, + "requestId", requestId, + "workspaceId", workspaceId); + } + + public final static class Builder { + + private OffsetDateTime createdAt; + + private String har; + + private Long harSizeBytes; + + private String requestId; + + private String workspaceId; + + private Builder() { + // force use of static builder() method + } + + /** + * Creation timestamp. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * The HAR content of the request. + */ + public Builder har(String har) { + Utils.checkNotNull(har, "har"); + this.har = har; + return this; + } + + /** + * The size of the HAR content in bytes. + */ + public Builder harSizeBytes(long harSizeBytes) { + Utils.checkNotNull(harSizeBytes, "harSizeBytes"); + this.harSizeBytes = harSizeBytes; + return this; + } + + /** + * The ID of this request. + */ + public Builder requestId(String requestId) { + Utils.checkNotNull(requestId, "requestId"); + this.requestId = requestId; + return this; + } + + /** + * The workspace ID this request was made to. + */ + public Builder workspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + public UnboundedRequest build() { + return new UnboundedRequest( + createdAt, + har, + harSizeBytes, + requestId, + workspaceId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/User.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/User.java new file mode 100644 index 00000000..6896ef2b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/User.java @@ -0,0 +1,669 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.Optional; + + +public class User { + + /** + * Indicates whether the user is an admin. + */ + @JsonProperty("admin") + private boolean admin; + + /** + * Indicates whether the user has been confirmed. + */ + @JsonProperty("confirmed") + private boolean confirmed; + + /** + * Timestamp of the user's creation. + */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * Identifier of the default workspace. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("default_workspace_id") + private Optional defaultWorkspaceId; + + /** + * Display name of the user. + */ + @JsonProperty("display_name") + private String displayName; + + /** + * Email address of the user. + */ + @JsonProperty("email") + private String email; + + /** + * Indicates whether the email address has been verified. + */ + @JsonProperty("email_verified") + private boolean emailVerified; + + /** + * GitHub handle of the user. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("github_handle") + private Optional githubHandle; + + /** + * Unique identifier for the user. + */ + @JsonProperty("id") + private String id; + + /** + * Timestamp of the last login. + */ + @JsonProperty("last_login_at") + private OffsetDateTime lastLoginAt; + + /** + * URL of the user's photo. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("photo_url") + private Optional photoUrl; + + /** + * Timestamp of the user's last update. + */ + @JsonProperty("updated_at") + private OffsetDateTime updatedAt; + + /** + * Indicates whether the user has been whitelisted. + */ + @JsonProperty("whitelisted") + private boolean whitelisted; + + @JsonCreator + public User( + @JsonProperty("admin") boolean admin, + @JsonProperty("confirmed") boolean confirmed, + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("default_workspace_id") Optional defaultWorkspaceId, + @JsonProperty("display_name") String displayName, + @JsonProperty("email") String email, + @JsonProperty("email_verified") boolean emailVerified, + @JsonProperty("github_handle") Optional githubHandle, + @JsonProperty("id") String id, + @JsonProperty("last_login_at") OffsetDateTime lastLoginAt, + @JsonProperty("photo_url") Optional photoUrl, + @JsonProperty("updated_at") OffsetDateTime updatedAt, + @JsonProperty("whitelisted") boolean whitelisted) { + Utils.checkNotNull(admin, "admin"); + Utils.checkNotNull(confirmed, "confirmed"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(defaultWorkspaceId, "defaultWorkspaceId"); + Utils.checkNotNull(displayName, "displayName"); + Utils.checkNotNull(email, "email"); + Utils.checkNotNull(emailVerified, "emailVerified"); + Utils.checkNotNull(githubHandle, "githubHandle"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(lastLoginAt, "lastLoginAt"); + Utils.checkNotNull(photoUrl, "photoUrl"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(whitelisted, "whitelisted"); + this.admin = admin; + this.confirmed = confirmed; + this.createdAt = createdAt; + this.defaultWorkspaceId = defaultWorkspaceId; + this.displayName = displayName; + this.email = email; + this.emailVerified = emailVerified; + this.githubHandle = githubHandle; + this.id = id; + this.lastLoginAt = lastLoginAt; + this.photoUrl = photoUrl; + this.updatedAt = updatedAt; + this.whitelisted = whitelisted; + } + + public User( + boolean admin, + boolean confirmed, + OffsetDateTime createdAt, + String displayName, + String email, + boolean emailVerified, + String id, + OffsetDateTime lastLoginAt, + OffsetDateTime updatedAt, + boolean whitelisted) { + this(admin, confirmed, createdAt, Optional.empty(), displayName, email, emailVerified, Optional.empty(), id, lastLoginAt, Optional.empty(), updatedAt, whitelisted); + } + + /** + * Indicates whether the user is an admin. + */ + @JsonIgnore + public boolean admin() { + return admin; + } + + /** + * Indicates whether the user has been confirmed. + */ + @JsonIgnore + public boolean confirmed() { + return confirmed; + } + + /** + * Timestamp of the user's creation. + */ + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + /** + * Identifier of the default workspace. + */ + @JsonIgnore + public Optional defaultWorkspaceId() { + return defaultWorkspaceId; + } + + /** + * Display name of the user. + */ + @JsonIgnore + public String displayName() { + return displayName; + } + + /** + * Email address of the user. + */ + @JsonIgnore + public String email() { + return email; + } + + /** + * Indicates whether the email address has been verified. + */ + @JsonIgnore + public boolean emailVerified() { + return emailVerified; + } + + /** + * GitHub handle of the user. + */ + @JsonIgnore + public Optional githubHandle() { + return githubHandle; + } + + /** + * Unique identifier for the user. + */ + @JsonIgnore + public String id() { + return id; + } + + /** + * Timestamp of the last login. + */ + @JsonIgnore + public OffsetDateTime lastLoginAt() { + return lastLoginAt; + } + + /** + * URL of the user's photo. + */ + @JsonIgnore + public Optional photoUrl() { + return photoUrl; + } + + /** + * Timestamp of the user's last update. + */ + @JsonIgnore + public OffsetDateTime updatedAt() { + return updatedAt; + } + + /** + * Indicates whether the user has been whitelisted. + */ + @JsonIgnore + public boolean whitelisted() { + return whitelisted; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Indicates whether the user is an admin. + */ + public User withAdmin(boolean admin) { + Utils.checkNotNull(admin, "admin"); + this.admin = admin; + return this; + } + + /** + * Indicates whether the user has been confirmed. + */ + public User withConfirmed(boolean confirmed) { + Utils.checkNotNull(confirmed, "confirmed"); + this.confirmed = confirmed; + return this; + } + + /** + * Timestamp of the user's creation. + */ + public User withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * Identifier of the default workspace. + */ + public User withDefaultWorkspaceId(String defaultWorkspaceId) { + Utils.checkNotNull(defaultWorkspaceId, "defaultWorkspaceId"); + this.defaultWorkspaceId = Optional.ofNullable(defaultWorkspaceId); + return this; + } + + /** + * Identifier of the default workspace. + */ + public User withDefaultWorkspaceId(Optional defaultWorkspaceId) { + Utils.checkNotNull(defaultWorkspaceId, "defaultWorkspaceId"); + this.defaultWorkspaceId = defaultWorkspaceId; + return this; + } + + /** + * Display name of the user. + */ + public User withDisplayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + /** + * Email address of the user. + */ + public User withEmail(String email) { + Utils.checkNotNull(email, "email"); + this.email = email; + return this; + } + + /** + * Indicates whether the email address has been verified. + */ + public User withEmailVerified(boolean emailVerified) { + Utils.checkNotNull(emailVerified, "emailVerified"); + this.emailVerified = emailVerified; + return this; + } + + /** + * GitHub handle of the user. + */ + public User withGithubHandle(String githubHandle) { + Utils.checkNotNull(githubHandle, "githubHandle"); + this.githubHandle = Optional.ofNullable(githubHandle); + return this; + } + + /** + * GitHub handle of the user. + */ + public User withGithubHandle(Optional githubHandle) { + Utils.checkNotNull(githubHandle, "githubHandle"); + this.githubHandle = githubHandle; + return this; + } + + /** + * Unique identifier for the user. + */ + public User withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Timestamp of the last login. + */ + public User withLastLoginAt(OffsetDateTime lastLoginAt) { + Utils.checkNotNull(lastLoginAt, "lastLoginAt"); + this.lastLoginAt = lastLoginAt; + return this; + } + + /** + * URL of the user's photo. + */ + public User withPhotoUrl(String photoUrl) { + Utils.checkNotNull(photoUrl, "photoUrl"); + this.photoUrl = Optional.ofNullable(photoUrl); + return this; + } + + /** + * URL of the user's photo. + */ + public User withPhotoUrl(Optional photoUrl) { + Utils.checkNotNull(photoUrl, "photoUrl"); + this.photoUrl = photoUrl; + return this; + } + + /** + * Timestamp of the user's last update. + */ + public User withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * Indicates whether the user has been whitelisted. + */ + public User withWhitelisted(boolean whitelisted) { + Utils.checkNotNull(whitelisted, "whitelisted"); + this.whitelisted = whitelisted; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User other = (User) o; + return + Objects.deepEquals(this.admin, other.admin) && + Objects.deepEquals(this.confirmed, other.confirmed) && + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.defaultWorkspaceId, other.defaultWorkspaceId) && + Objects.deepEquals(this.displayName, other.displayName) && + Objects.deepEquals(this.email, other.email) && + Objects.deepEquals(this.emailVerified, other.emailVerified) && + Objects.deepEquals(this.githubHandle, other.githubHandle) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.lastLoginAt, other.lastLoginAt) && + Objects.deepEquals(this.photoUrl, other.photoUrl) && + Objects.deepEquals(this.updatedAt, other.updatedAt) && + Objects.deepEquals(this.whitelisted, other.whitelisted); + } + + @Override + public int hashCode() { + return Objects.hash( + admin, + confirmed, + createdAt, + defaultWorkspaceId, + displayName, + email, + emailVerified, + githubHandle, + id, + lastLoginAt, + photoUrl, + updatedAt, + whitelisted); + } + + @Override + public String toString() { + return Utils.toString(User.class, + "admin", admin, + "confirmed", confirmed, + "createdAt", createdAt, + "defaultWorkspaceId", defaultWorkspaceId, + "displayName", displayName, + "email", email, + "emailVerified", emailVerified, + "githubHandle", githubHandle, + "id", id, + "lastLoginAt", lastLoginAt, + "photoUrl", photoUrl, + "updatedAt", updatedAt, + "whitelisted", whitelisted); + } + + public final static class Builder { + + private Boolean admin; + + private Boolean confirmed; + + private OffsetDateTime createdAt; + + private Optional defaultWorkspaceId = Optional.empty(); + + private String displayName; + + private String email; + + private Boolean emailVerified; + + private Optional githubHandle = Optional.empty(); + + private String id; + + private OffsetDateTime lastLoginAt; + + private Optional photoUrl = Optional.empty(); + + private OffsetDateTime updatedAt; + + private Boolean whitelisted; + + private Builder() { + // force use of static builder() method + } + + /** + * Indicates whether the user is an admin. + */ + public Builder admin(boolean admin) { + Utils.checkNotNull(admin, "admin"); + this.admin = admin; + return this; + } + + /** + * Indicates whether the user has been confirmed. + */ + public Builder confirmed(boolean confirmed) { + Utils.checkNotNull(confirmed, "confirmed"); + this.confirmed = confirmed; + return this; + } + + /** + * Timestamp of the user's creation. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * Identifier of the default workspace. + */ + public Builder defaultWorkspaceId(String defaultWorkspaceId) { + Utils.checkNotNull(defaultWorkspaceId, "defaultWorkspaceId"); + this.defaultWorkspaceId = Optional.ofNullable(defaultWorkspaceId); + return this; + } + + /** + * Identifier of the default workspace. + */ + public Builder defaultWorkspaceId(Optional defaultWorkspaceId) { + Utils.checkNotNull(defaultWorkspaceId, "defaultWorkspaceId"); + this.defaultWorkspaceId = defaultWorkspaceId; + return this; + } + + /** + * Display name of the user. + */ + public Builder displayName(String displayName) { + Utils.checkNotNull(displayName, "displayName"); + this.displayName = displayName; + return this; + } + + /** + * Email address of the user. + */ + public Builder email(String email) { + Utils.checkNotNull(email, "email"); + this.email = email; + return this; + } + + /** + * Indicates whether the email address has been verified. + */ + public Builder emailVerified(boolean emailVerified) { + Utils.checkNotNull(emailVerified, "emailVerified"); + this.emailVerified = emailVerified; + return this; + } + + /** + * GitHub handle of the user. + */ + public Builder githubHandle(String githubHandle) { + Utils.checkNotNull(githubHandle, "githubHandle"); + this.githubHandle = Optional.ofNullable(githubHandle); + return this; + } + + /** + * GitHub handle of the user. + */ + public Builder githubHandle(Optional githubHandle) { + Utils.checkNotNull(githubHandle, "githubHandle"); + this.githubHandle = githubHandle; + return this; + } + + /** + * Unique identifier for the user. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * Timestamp of the last login. + */ + public Builder lastLoginAt(OffsetDateTime lastLoginAt) { + Utils.checkNotNull(lastLoginAt, "lastLoginAt"); + this.lastLoginAt = lastLoginAt; + return this; + } + + /** + * URL of the user's photo. + */ + public Builder photoUrl(String photoUrl) { + Utils.checkNotNull(photoUrl, "photoUrl"); + this.photoUrl = Optional.ofNullable(photoUrl); + return this; + } + + /** + * URL of the user's photo. + */ + public Builder photoUrl(Optional photoUrl) { + Utils.checkNotNull(photoUrl, "photoUrl"); + this.photoUrl = photoUrl; + return this; + } + + /** + * Timestamp of the user's last update. + */ + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + /** + * Indicates whether the user has been whitelisted. + */ + public Builder whitelisted(boolean whitelisted) { + Utils.checkNotNull(whitelisted, "whitelisted"); + this.whitelisted = whitelisted; + return this; + } + + public User build() { + return new User( + admin, + confirmed, + createdAt, + defaultWorkspaceId, + displayName, + email, + emailVerified, + githubHandle, + id, + lastLoginAt, + photoUrl, + updatedAt, + whitelisted); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/V2Descriptor.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/V2Descriptor.java new file mode 100644 index 00000000..cbb98d81 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/V2Descriptor.java @@ -0,0 +1,313 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Long; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + +/** + * V2Descriptor - V2 descriptor + */ + +public class V2Descriptor { + + /** + * Annotations + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("annotations") + private Optional annotations; + + /** + * Digest + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("digest") + private Optional digest; + + /** + * Media type + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mediaType") + private Optional mediaType; + + /** + * Size + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("size") + private Optional size; + + @JsonCreator + public V2Descriptor( + @JsonProperty("annotations") Optional annotations, + @JsonProperty("digest") Optional digest, + @JsonProperty("mediaType") Optional mediaType, + @JsonProperty("size") Optional size) { + Utils.checkNotNull(annotations, "annotations"); + Utils.checkNotNull(digest, "digest"); + Utils.checkNotNull(mediaType, "mediaType"); + Utils.checkNotNull(size, "size"); + this.annotations = annotations; + this.digest = digest; + this.mediaType = mediaType; + this.size = size; + } + + public V2Descriptor() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Annotations + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional annotations() { + return (Optional) annotations; + } + + /** + * Digest + */ + @JsonIgnore + public Optional digest() { + return digest; + } + + /** + * Media type + */ + @JsonIgnore + public Optional mediaType() { + return mediaType; + } + + /** + * Size + */ + @JsonIgnore + public Optional size() { + return size; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Annotations + */ + public V2Descriptor withAnnotations(Annotations annotations) { + Utils.checkNotNull(annotations, "annotations"); + this.annotations = Optional.ofNullable(annotations); + return this; + } + + /** + * Annotations + */ + public V2Descriptor withAnnotations(Optional annotations) { + Utils.checkNotNull(annotations, "annotations"); + this.annotations = annotations; + return this; + } + + /** + * Digest + */ + public V2Descriptor withDigest(String digest) { + Utils.checkNotNull(digest, "digest"); + this.digest = Optional.ofNullable(digest); + return this; + } + + /** + * Digest + */ + public V2Descriptor withDigest(Optional digest) { + Utils.checkNotNull(digest, "digest"); + this.digest = digest; + return this; + } + + /** + * Media type + */ + public V2Descriptor withMediaType(String mediaType) { + Utils.checkNotNull(mediaType, "mediaType"); + this.mediaType = Optional.ofNullable(mediaType); + return this; + } + + /** + * Media type + */ + public V2Descriptor withMediaType(Optional mediaType) { + Utils.checkNotNull(mediaType, "mediaType"); + this.mediaType = mediaType; + return this; + } + + /** + * Size + */ + public V2Descriptor withSize(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * Size + */ + public V2Descriptor withSize(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + V2Descriptor other = (V2Descriptor) o; + return + Objects.deepEquals(this.annotations, other.annotations) && + Objects.deepEquals(this.digest, other.digest) && + Objects.deepEquals(this.mediaType, other.mediaType) && + Objects.deepEquals(this.size, other.size); + } + + @Override + public int hashCode() { + return Objects.hash( + annotations, + digest, + mediaType, + size); + } + + @Override + public String toString() { + return Utils.toString(V2Descriptor.class, + "annotations", annotations, + "digest", digest, + "mediaType", mediaType, + "size", size); + } + + public final static class Builder { + + private Optional annotations = Optional.empty(); + + private Optional digest = Optional.empty(); + + private Optional mediaType = Optional.empty(); + + private Optional size = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Annotations + */ + public Builder annotations(Annotations annotations) { + Utils.checkNotNull(annotations, "annotations"); + this.annotations = Optional.ofNullable(annotations); + return this; + } + + /** + * Annotations + */ + public Builder annotations(Optional annotations) { + Utils.checkNotNull(annotations, "annotations"); + this.annotations = annotations; + return this; + } + + /** + * Digest + */ + public Builder digest(String digest) { + Utils.checkNotNull(digest, "digest"); + this.digest = Optional.ofNullable(digest); + return this; + } + + /** + * Digest + */ + public Builder digest(Optional digest) { + Utils.checkNotNull(digest, "digest"); + this.digest = digest; + return this; + } + + /** + * Media type + */ + public Builder mediaType(String mediaType) { + Utils.checkNotNull(mediaType, "mediaType"); + this.mediaType = Optional.ofNullable(mediaType); + return this; + } + + /** + * Media type + */ + public Builder mediaType(Optional mediaType) { + Utils.checkNotNull(mediaType, "mediaType"); + this.mediaType = mediaType; + return this; + } + + /** + * Size + */ + public Builder size(long size) { + Utils.checkNotNull(size, "size"); + this.size = Optional.ofNullable(size); + return this; + } + + /** + * Size + */ + public Builder size(Optional size) { + Utils.checkNotNull(size, "size"); + this.size = size; + return this; + } + + public V2Descriptor build() { + return new V2Descriptor( + annotations, + digest, + mediaType, + size); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ValueChange.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ValueChange.java new file mode 100644 index 00000000..1c188b0d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/ValueChange.java @@ -0,0 +1,142 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + + +public class ValueChange { + + /** + * Represents the previous value of the element. + */ + @JsonProperty("From") + private String from; + + /** + * Represents the current value of the element. + */ + @JsonProperty("To") + private String to; + + @JsonCreator + public ValueChange( + @JsonProperty("From") String from, + @JsonProperty("To") String to) { + Utils.checkNotNull(from, "from"); + Utils.checkNotNull(to, "to"); + this.from = from; + this.to = to; + } + + /** + * Represents the previous value of the element. + */ + @JsonIgnore + public String from() { + return from; + } + + /** + * Represents the current value of the element. + */ + @JsonIgnore + public String to() { + return to; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Represents the previous value of the element. + */ + public ValueChange withFrom(String from) { + Utils.checkNotNull(from, "from"); + this.from = from; + return this; + } + + /** + * Represents the current value of the element. + */ + public ValueChange withTo(String to) { + Utils.checkNotNull(to, "to"); + this.to = to; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValueChange other = (ValueChange) o; + return + Objects.deepEquals(this.from, other.from) && + Objects.deepEquals(this.to, other.to); + } + + @Override + public int hashCode() { + return Objects.hash( + from, + to); + } + + @Override + public String toString() { + return Utils.toString(ValueChange.class, + "from", from, + "to", to); + } + + public final static class Builder { + + private String from; + + private String to; + + private Builder() { + // force use of static builder() method + } + + /** + * Represents the previous value of the element. + */ + public Builder from(String from) { + Utils.checkNotNull(from, "from"); + this.from = from; + return this; + } + + /** + * Represents the current value of the element. + */ + public Builder to(String to) { + Utils.checkNotNull(to, "to"); + this.to = to; + return this; + } + + public ValueChange build() { + return new ValueChange( + from, + to); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/VersionMetadata.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/VersionMetadata.java new file mode 100644 index 00000000..905d27c2 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/VersionMetadata.java @@ -0,0 +1,310 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * VersionMetadata - A set of keys and associated values, attached to a particular version of an Api. + */ + +public class VersionMetadata { + + /** + * The ID of the Api this Metadata belongs to. + */ + @JsonProperty("api_id") + private String apiId; + + /** + * Creation timestamp. + */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** + * The key for this metadata. + */ + @JsonProperty("meta_key") + private String metaKey; + + /** + * One of the values for this metadata. + */ + @JsonProperty("meta_value") + private String metaValue; + + /** + * The version ID of the Api this Metadata belongs to. + */ + @JsonProperty("version_id") + private String versionId; + + /** + * The workspace ID this Metadata belongs to. + */ + @JsonProperty("workspace_id") + private String workspaceId; + + @JsonCreator + public VersionMetadata( + @JsonProperty("api_id") String apiId, + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("meta_key") String metaKey, + @JsonProperty("meta_value") String metaValue, + @JsonProperty("version_id") String versionId, + @JsonProperty("workspace_id") String workspaceId) { + Utils.checkNotNull(apiId, "apiId"); + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(metaKey, "metaKey"); + Utils.checkNotNull(metaValue, "metaValue"); + Utils.checkNotNull(versionId, "versionId"); + Utils.checkNotNull(workspaceId, "workspaceId"); + this.apiId = apiId; + this.createdAt = createdAt; + this.metaKey = metaKey; + this.metaValue = metaValue; + this.versionId = versionId; + this.workspaceId = workspaceId; + } + + /** + * The ID of the Api this Metadata belongs to. + */ + @JsonIgnore + public String apiId() { + return apiId; + } + + /** + * Creation timestamp. + */ + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + /** + * The key for this metadata. + */ + @JsonIgnore + public String metaKey() { + return metaKey; + } + + /** + * One of the values for this metadata. + */ + @JsonIgnore + public String metaValue() { + return metaValue; + } + + /** + * The version ID of the Api this Metadata belongs to. + */ + @JsonIgnore + public String versionId() { + return versionId; + } + + /** + * The workspace ID this Metadata belongs to. + */ + @JsonIgnore + public String workspaceId() { + return workspaceId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The ID of the Api this Metadata belongs to. + */ + public VersionMetadata withApiId(String apiId) { + Utils.checkNotNull(apiId, "apiId"); + this.apiId = apiId; + return this; + } + + /** + * Creation timestamp. + */ + public VersionMetadata withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * The key for this metadata. + */ + public VersionMetadata withMetaKey(String metaKey) { + Utils.checkNotNull(metaKey, "metaKey"); + this.metaKey = metaKey; + return this; + } + + /** + * One of the values for this metadata. + */ + public VersionMetadata withMetaValue(String metaValue) { + Utils.checkNotNull(metaValue, "metaValue"); + this.metaValue = metaValue; + return this; + } + + /** + * The version ID of the Api this Metadata belongs to. + */ + public VersionMetadata withVersionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + /** + * The workspace ID this Metadata belongs to. + */ + public VersionMetadata withWorkspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VersionMetadata other = (VersionMetadata) o; + return + Objects.deepEquals(this.apiId, other.apiId) && + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.metaKey, other.metaKey) && + Objects.deepEquals(this.metaValue, other.metaValue) && + Objects.deepEquals(this.versionId, other.versionId) && + Objects.deepEquals(this.workspaceId, other.workspaceId); + } + + @Override + public int hashCode() { + return Objects.hash( + apiId, + createdAt, + metaKey, + metaValue, + versionId, + workspaceId); + } + + @Override + public String toString() { + return Utils.toString(VersionMetadata.class, + "apiId", apiId, + "createdAt", createdAt, + "metaKey", metaKey, + "metaValue", metaValue, + "versionId", versionId, + "workspaceId", workspaceId); + } + + public final static class Builder { + + private String apiId; + + private OffsetDateTime createdAt; + + private String metaKey; + + private String metaValue; + + private String versionId; + + private String workspaceId; + + private Builder() { + // force use of static builder() method + } + + /** + * The ID of the Api this Metadata belongs to. + */ + public Builder apiId(String apiId) { + Utils.checkNotNull(apiId, "apiId"); + this.apiId = apiId; + return this; + } + + /** + * Creation timestamp. + */ + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + /** + * The key for this metadata. + */ + public Builder metaKey(String metaKey) { + Utils.checkNotNull(metaKey, "metaKey"); + this.metaKey = metaKey; + return this; + } + + /** + * One of the values for this metadata. + */ + public Builder metaValue(String metaValue) { + Utils.checkNotNull(metaValue, "metaValue"); + this.metaValue = metaValue; + return this; + } + + /** + * The version ID of the Api this Metadata belongs to. + */ + public Builder versionId(String versionId) { + Utils.checkNotNull(versionId, "versionId"); + this.versionId = versionId; + return this; + } + + /** + * The workspace ID this Metadata belongs to. + */ + public Builder workspaceId(String workspaceId) { + Utils.checkNotNull(workspaceId, "workspaceId"); + this.workspaceId = workspaceId; + return this; + } + + public VersionMetadata build() { + return new VersionMetadata( + apiId, + createdAt, + metaKey, + metaValue, + versionId, + workspaceId); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/VersionMetadataInput.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/VersionMetadataInput.java new file mode 100644 index 00000000..f588208f --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/VersionMetadataInput.java @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; + +/** + * VersionMetadataInput - A set of keys and associated values, attached to a particular version of an Api. + */ + +public class VersionMetadataInput { + + /** + * The key for this metadata. + */ + @JsonProperty("meta_key") + private String metaKey; + + /** + * One of the values for this metadata. + */ + @JsonProperty("meta_value") + private String metaValue; + + @JsonCreator + public VersionMetadataInput( + @JsonProperty("meta_key") String metaKey, + @JsonProperty("meta_value") String metaValue) { + Utils.checkNotNull(metaKey, "metaKey"); + Utils.checkNotNull(metaValue, "metaValue"); + this.metaKey = metaKey; + this.metaValue = metaValue; + } + + /** + * The key for this metadata. + */ + @JsonIgnore + public String metaKey() { + return metaKey; + } + + /** + * One of the values for this metadata. + */ + @JsonIgnore + public String metaValue() { + return metaValue; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The key for this metadata. + */ + public VersionMetadataInput withMetaKey(String metaKey) { + Utils.checkNotNull(metaKey, "metaKey"); + this.metaKey = metaKey; + return this; + } + + /** + * One of the values for this metadata. + */ + public VersionMetadataInput withMetaValue(String metaValue) { + Utils.checkNotNull(metaValue, "metaValue"); + this.metaValue = metaValue; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VersionMetadataInput other = (VersionMetadataInput) o; + return + Objects.deepEquals(this.metaKey, other.metaKey) && + Objects.deepEquals(this.metaValue, other.metaValue); + } + + @Override + public int hashCode() { + return Objects.hash( + metaKey, + metaValue); + } + + @Override + public String toString() { + return Utils.toString(VersionMetadataInput.class, + "metaKey", metaKey, + "metaValue", metaValue); + } + + public final static class Builder { + + private String metaKey; + + private String metaValue; + + private Builder() { + // force use of static builder() method + } + + /** + * The key for this metadata. + */ + public Builder metaKey(String metaKey) { + Utils.checkNotNull(metaKey, "metaKey"); + this.metaKey = metaKey; + return this; + } + + /** + * One of the values for this metadata. + */ + public Builder metaValue(String metaValue) { + Utils.checkNotNull(metaValue, "metaValue"); + this.metaValue = metaValue; + return this; + } + + public VersionMetadataInput build() { + return new VersionMetadataInput( + metaKey, + metaValue); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/WorkflowDocument.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/WorkflowDocument.java new file mode 100644 index 00000000..f619109e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/WorkflowDocument.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + +/** + * WorkflowDocument - A document referenced by a workflow + */ + +public class WorkflowDocument { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("auth") + private Optional auth; + + @JsonProperty("location") + private String location; + + @JsonCreator + public WorkflowDocument( + @JsonProperty("auth") Optional auth, + @JsonProperty("location") String location) { + Utils.checkNotNull(auth, "auth"); + Utils.checkNotNull(location, "location"); + this.auth = auth; + this.location = location; + } + + public WorkflowDocument( + String location) { + this(Optional.empty(), location); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional auth() { + return (Optional) auth; + } + + @JsonIgnore + public String location() { + return location; + } + + public final static Builder builder() { + return new Builder(); + } + + public WorkflowDocument withAuth(Auth auth) { + Utils.checkNotNull(auth, "auth"); + this.auth = Optional.ofNullable(auth); + return this; + } + + public WorkflowDocument withAuth(Optional auth) { + Utils.checkNotNull(auth, "auth"); + this.auth = auth; + return this; + } + + public WorkflowDocument withLocation(String location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkflowDocument other = (WorkflowDocument) o; + return + Objects.deepEquals(this.auth, other.auth) && + Objects.deepEquals(this.location, other.location); + } + + @Override + public int hashCode() { + return Objects.hash( + auth, + location); + } + + @Override + public String toString() { + return Utils.toString(WorkflowDocument.class, + "auth", auth, + "location", location); + } + + public final static class Builder { + + private Optional auth = Optional.empty(); + + private String location; + + private Builder() { + // force use of static builder() method + } + + public Builder auth(Auth auth) { + Utils.checkNotNull(auth, "auth"); + this.auth = Optional.ofNullable(auth); + return this; + } + + public Builder auth(Optional auth) { + Utils.checkNotNull(auth, "auth"); + this.auth = auth; + return this; + } + + public Builder location(String location) { + Utils.checkNotNull(location, "location"); + this.location = location; + return this; + } + + public WorkflowDocument build() { + return new WorkflowDocument( + auth, + location); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Workspace.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Workspace.java new file mode 100644 index 00000000..c8706dc3 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Workspace.java @@ -0,0 +1,396 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.Optional; + +/** + * Workspace - A speakeasy workspace + */ + +public class Workspace { + + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("oci_repo") + private Optional ociRepo; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("oci_repo_created_at") + private Optional ociRepoCreatedAt; + + @JsonProperty("organization_id") + private String organizationId; + + @JsonProperty("slug") + private String slug; + + @JsonProperty("telemetry_disabled") + private boolean telemetryDisabled; + + @JsonProperty("updated_at") + private OffsetDateTime updatedAt; + + @JsonProperty("verified") + private boolean verified; + + @JsonCreator + public Workspace( + @JsonProperty("created_at") OffsetDateTime createdAt, + @JsonProperty("id") String id, + @JsonProperty("name") String name, + @JsonProperty("oci_repo") Optional ociRepo, + @JsonProperty("oci_repo_created_at") Optional ociRepoCreatedAt, + @JsonProperty("organization_id") String organizationId, + @JsonProperty("slug") String slug, + @JsonProperty("telemetry_disabled") boolean telemetryDisabled, + @JsonProperty("updated_at") OffsetDateTime updatedAt, + @JsonProperty("verified") boolean verified) { + Utils.checkNotNull(createdAt, "createdAt"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(ociRepo, "ociRepo"); + Utils.checkNotNull(ociRepoCreatedAt, "ociRepoCreatedAt"); + Utils.checkNotNull(organizationId, "organizationId"); + Utils.checkNotNull(slug, "slug"); + Utils.checkNotNull(telemetryDisabled, "telemetryDisabled"); + Utils.checkNotNull(updatedAt, "updatedAt"); + Utils.checkNotNull(verified, "verified"); + this.createdAt = createdAt; + this.id = id; + this.name = name; + this.ociRepo = ociRepo; + this.ociRepoCreatedAt = ociRepoCreatedAt; + this.organizationId = organizationId; + this.slug = slug; + this.telemetryDisabled = telemetryDisabled; + this.updatedAt = updatedAt; + this.verified = verified; + } + + public Workspace( + OffsetDateTime createdAt, + String id, + String name, + String organizationId, + String slug, + boolean telemetryDisabled, + OffsetDateTime updatedAt, + boolean verified) { + this(createdAt, id, name, Optional.empty(), Optional.empty(), organizationId, slug, telemetryDisabled, updatedAt, verified); + } + + @JsonIgnore + public OffsetDateTime createdAt() { + return createdAt; + } + + @JsonIgnore + public String id() { + return id; + } + + @JsonIgnore + public String name() { + return name; + } + + @JsonIgnore + public Optional ociRepo() { + return ociRepo; + } + + @JsonIgnore + public Optional ociRepoCreatedAt() { + return ociRepoCreatedAt; + } + + @JsonIgnore + public String organizationId() { + return organizationId; + } + + @JsonIgnore + public String slug() { + return slug; + } + + @JsonIgnore + public boolean telemetryDisabled() { + return telemetryDisabled; + } + + @JsonIgnore + public OffsetDateTime updatedAt() { + return updatedAt; + } + + @JsonIgnore + public boolean verified() { + return verified; + } + + public final static Builder builder() { + return new Builder(); + } + + public Workspace withCreatedAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public Workspace withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Workspace withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Workspace withOciRepo(String ociRepo) { + Utils.checkNotNull(ociRepo, "ociRepo"); + this.ociRepo = Optional.ofNullable(ociRepo); + return this; + } + + public Workspace withOciRepo(Optional ociRepo) { + Utils.checkNotNull(ociRepo, "ociRepo"); + this.ociRepo = ociRepo; + return this; + } + + public Workspace withOciRepoCreatedAt(OffsetDateTime ociRepoCreatedAt) { + Utils.checkNotNull(ociRepoCreatedAt, "ociRepoCreatedAt"); + this.ociRepoCreatedAt = Optional.ofNullable(ociRepoCreatedAt); + return this; + } + + public Workspace withOciRepoCreatedAt(Optional ociRepoCreatedAt) { + Utils.checkNotNull(ociRepoCreatedAt, "ociRepoCreatedAt"); + this.ociRepoCreatedAt = ociRepoCreatedAt; + return this; + } + + public Workspace withOrganizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + + public Workspace withSlug(String slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = slug; + return this; + } + + public Workspace withTelemetryDisabled(boolean telemetryDisabled) { + Utils.checkNotNull(telemetryDisabled, "telemetryDisabled"); + this.telemetryDisabled = telemetryDisabled; + return this; + } + + public Workspace withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Workspace withVerified(boolean verified) { + Utils.checkNotNull(verified, "verified"); + this.verified = verified; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Workspace other = (Workspace) o; + return + Objects.deepEquals(this.createdAt, other.createdAt) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.name, other.name) && + Objects.deepEquals(this.ociRepo, other.ociRepo) && + Objects.deepEquals(this.ociRepoCreatedAt, other.ociRepoCreatedAt) && + Objects.deepEquals(this.organizationId, other.organizationId) && + Objects.deepEquals(this.slug, other.slug) && + Objects.deepEquals(this.telemetryDisabled, other.telemetryDisabled) && + Objects.deepEquals(this.updatedAt, other.updatedAt) && + Objects.deepEquals(this.verified, other.verified); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + id, + name, + ociRepo, + ociRepoCreatedAt, + organizationId, + slug, + telemetryDisabled, + updatedAt, + verified); + } + + @Override + public String toString() { + return Utils.toString(Workspace.class, + "createdAt", createdAt, + "id", id, + "name", name, + "ociRepo", ociRepo, + "ociRepoCreatedAt", ociRepoCreatedAt, + "organizationId", organizationId, + "slug", slug, + "telemetryDisabled", telemetryDisabled, + "updatedAt", updatedAt, + "verified", verified); + } + + public final static class Builder { + + private OffsetDateTime createdAt; + + private String id; + + private String name; + + private Optional ociRepo = Optional.empty(); + + private Optional ociRepoCreatedAt = Optional.empty(); + + private String organizationId; + + private String slug; + + private Boolean telemetryDisabled; + + private OffsetDateTime updatedAt; + + private Boolean verified; + + private Builder() { + // force use of static builder() method + } + + public Builder createdAt(OffsetDateTime createdAt) { + Utils.checkNotNull(createdAt, "createdAt"); + this.createdAt = createdAt; + return this; + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Builder ociRepo(String ociRepo) { + Utils.checkNotNull(ociRepo, "ociRepo"); + this.ociRepo = Optional.ofNullable(ociRepo); + return this; + } + + public Builder ociRepo(Optional ociRepo) { + Utils.checkNotNull(ociRepo, "ociRepo"); + this.ociRepo = ociRepo; + return this; + } + + public Builder ociRepoCreatedAt(OffsetDateTime ociRepoCreatedAt) { + Utils.checkNotNull(ociRepoCreatedAt, "ociRepoCreatedAt"); + this.ociRepoCreatedAt = Optional.ofNullable(ociRepoCreatedAt); + return this; + } + + public Builder ociRepoCreatedAt(Optional ociRepoCreatedAt) { + Utils.checkNotNull(ociRepoCreatedAt, "ociRepoCreatedAt"); + this.ociRepoCreatedAt = ociRepoCreatedAt; + return this; + } + + public Builder organizationId(String organizationId) { + Utils.checkNotNull(organizationId, "organizationId"); + this.organizationId = organizationId; + return this; + } + + public Builder slug(String slug) { + Utils.checkNotNull(slug, "slug"); + this.slug = slug; + return this; + } + + public Builder telemetryDisabled(boolean telemetryDisabled) { + Utils.checkNotNull(telemetryDisabled, "telemetryDisabled"); + this.telemetryDisabled = telemetryDisabled; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Builder verified(boolean verified) { + Utils.checkNotNull(verified, "verified"); + this.verified = verified; + return this; + } + + public Workspace build() { + return new Workspace( + createdAt, + id, + name, + ociRepo, + ociRepoCreatedAt, + organizationId, + slug, + telemetryDisabled, + updatedAt, + verified); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Workspaces.java b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Workspaces.java new file mode 100644 index 00000000..0e51f87b --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/models/shared/Workspaces.java @@ -0,0 +1,238 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.models.shared; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import dev.speakeasyapi.javaclientsdk.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.Optional; + + +public class Workspaces { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("account_type") + private Optional accountType; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updated_at") + private Optional updatedAt; + + @JsonCreator + public Workspaces( + @JsonProperty("account_type") Optional accountType, + @JsonProperty("id") Optional id, + @JsonProperty("name") Optional name, + @JsonProperty("updated_at") Optional updatedAt) { + Utils.checkNotNull(accountType, "accountType"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(updatedAt, "updatedAt"); + this.accountType = accountType; + this.id = id; + this.name = name; + this.updatedAt = updatedAt; + } + + public Workspaces() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional accountType() { + return (Optional) accountType; + } + + @JsonIgnore + public Optional id() { + return id; + } + + @JsonIgnore + public Optional name() { + return name; + } + + @JsonIgnore + public Optional updatedAt() { + return updatedAt; + } + + public final static Builder builder() { + return new Builder(); + } + + public Workspaces withAccountType(AccountType accountType) { + Utils.checkNotNull(accountType, "accountType"); + this.accountType = Optional.ofNullable(accountType); + return this; + } + + public Workspaces withAccountType(Optional accountType) { + Utils.checkNotNull(accountType, "accountType"); + this.accountType = accountType; + return this; + } + + public Workspaces withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Workspaces withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Workspaces withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Workspaces withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Workspaces withUpdatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Workspaces withUpdatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Workspaces other = (Workspaces) o; + return + Objects.deepEquals(this.accountType, other.accountType) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.name, other.name) && + Objects.deepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash( + accountType, + id, + name, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(Workspaces.class, + "accountType", accountType, + "id", id, + "name", name, + "updatedAt", updatedAt); + } + + public final static class Builder { + + private Optional accountType = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional updatedAt = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + public Builder accountType(AccountType accountType) { + Utils.checkNotNull(accountType, "accountType"); + this.accountType = Optional.ofNullable(accountType); + return this; + } + + public Builder accountType(Optional accountType) { + Utils.checkNotNull(accountType, "accountType"); + this.accountType = accountType; + return this; + } + + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = Optional.ofNullable(updatedAt); + return this; + } + + public Builder updatedAt(Optional updatedAt) { + Utils.checkNotNull(updatedAt, "updatedAt"); + this.updatedAt = updatedAt; + return this; + } + + public Workspaces build() { + return new Workspaces( + accountType, + id, + name, + updatedAt); + } + } +} + diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/BackoffStrategy.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/BackoffStrategy.java new file mode 100644 index 00000000..97ff7b93 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/BackoffStrategy.java @@ -0,0 +1,250 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.util.concurrent.TimeUnit; + +/** + * Exponential Backoff Strategy with Jitter + * + * The duration between consecutive attempts is calculated as follows: + * intervalMs = min(maxIntervalMs, initialIntervalMs*(baseFactor^attempts) +/- r) + * where baseFactor is the base factor and r a random value between 0 and jitterFactor*intervalMs. + */ +public class BackoffStrategy { + + private static final long DEFAULT_INITIAL_INTERVAL_MS = 500L; + private static final long DEFAULT_MAX_INTERVAL_MS = 60000L; + private static final long DEFAULT_MAX_ELAPSED_TIME_MS = 3600000L; + private static final double DEFAULT_EXPONENT = 1.5; + private static final double DEFAULT_JITTER_FACTOR = 0.5; + private static final boolean DEFAULT_RETRY_CONNECT_ERROR = false; + private static final boolean DEFAULT_RETRY_READ_TIMEOUT_ERROR = false; + + private final long initialIntervalMs; + private final long maxIntervalMs; + private final long maxElapsedTimeMs; + private final double baseFactor; + private final double jitterFactor; + private final boolean retryConnectError; + private final boolean retryReadTimeoutError; + + private BackoffStrategy(long initialIntervalMs, + long maxIntervalMs, + long maxElapsedTimeMs, + double baseFactor, + double jitterFactor, + boolean retryConnectError, + boolean retryReadTimeoutError) { + this.initialIntervalMs = initialIntervalMs; + this.maxIntervalMs = maxIntervalMs; + this.maxElapsedTimeMs = maxElapsedTimeMs; + this.baseFactor = baseFactor; + this.jitterFactor = jitterFactor; + this.retryConnectError = retryConnectError; + this.retryReadTimeoutError = retryReadTimeoutError; + } + + public static BackoffStrategy withDefaults() { + return BackoffStrategy.builder().build(); + } + + public long initialIntervalMs() { + return initialIntervalMs; + } + + public long maxIntervalMs() { + return maxIntervalMs; + } + + public double baseFactor() { + return baseFactor; + } + + /** + * @deprecated use {@link #baseFactor()} instead. + */ + @Deprecated + public double exponent() { + return baseFactor; + } + + public long maxElapsedTimeMs() { + return maxElapsedTimeMs; + } + + public double jitterFactor() { + return jitterFactor; + } + + public boolean retryConnectError() { + return retryConnectError; + } + + public boolean retryReadTimeoutError() { + return retryReadTimeoutError; + } + + public final static Builder builder() { + return new Builder(); + } + + public final static class Builder { + + private long initialIntervalMs = DEFAULT_INITIAL_INTERVAL_MS; + private long maxIntervalMs = DEFAULT_MAX_INTERVAL_MS; + private long maxElapsedTimeMs = DEFAULT_MAX_ELAPSED_TIME_MS; + private double baseFactor = DEFAULT_EXPONENT; + private double jitterFactor = DEFAULT_JITTER_FACTOR; + private boolean retryConnectError = DEFAULT_RETRY_CONNECT_ERROR; + private boolean retryReadTimeoutError = DEFAULT_RETRY_READ_TIMEOUT_ERROR; + + private Builder() {} + + /** + * Sets the initial interval + * + * @param duration The initial interval. + * @param unit The time unit associated with duration. + * @return The builder instance. + */ + public Builder initialInterval(long duration, TimeUnit unit) { + Utils.checkNotNull(unit, "unit"); + if (duration < 0) { + throw new IllegalArgumentException("initialInterval must be positive"); + } + this.initialIntervalMs = unit.toMillis(duration); + return this; + } + + /** + * Sets the maximum interval + * + * @param duration The maximum interval. + * @param unit The time unit associated with duration. + * @return The builder instance. + */ + public Builder maxInterval(long duration, TimeUnit unit) { + Utils.checkNotNull(unit, "unit"); + if (duration <= 0) { + throw new IllegalArgumentException("maxInterval must be strictly positive"); + } + this.maxIntervalMs = unit.toMillis(duration); + return this; + } + + /** + * Sets the maximum elapsed time + * + * @param duration The maximum elapsed time. + * @param unit The time unit associated with duration. + * @return The builder instance. + */ + public Builder maxElapsedTime(long duration, TimeUnit unit) { + Utils.checkNotNull(unit, "unit"); + if (duration < 0) { + throw new IllegalArgumentException("maxElapsedTime must be positive"); + } + this.maxElapsedTimeMs = unit.toMillis(duration); + return this; + } + + /** + * Sets the backoff base factor. + * + * @param baseFactor The base factor to use. + * @return The builder instance. + */ + public Builder baseFactor(double baseFactor) { + if (baseFactor <= 0 ) { + throw new IllegalArgumentException("baseFactor must be strictly positive"); + } + this.baseFactor = baseFactor; + return this; + } + + /** + * Sets the backoff base factor. + * + * @deprecated use {@link #baseFactor(double)} instead. + * @param baseFactor The base factor to use. + * @return The builder instance. + */ + @Deprecated + public Builder exponent(double baseFactor) { + if (baseFactor <= 0 ) { + throw new IllegalArgumentException("baseFactor must be strictly positive"); + } + this.baseFactor = baseFactor; + return this; + } + + /** + * Sets the jitter factor used to randomize the backoff interval. + * + * @param jitterFactor The jitter factor to use (default is 0.5f). + * @return The builder instance. + */ + public Builder jitterFactor(double jitterFactor) { + if (jitterFactor < 0 || jitterFactor > 1) { + throw new IllegalArgumentException("jitterFactor must be between 0 and 1"); + } + this.jitterFactor = jitterFactor; + return this; + } + + /** + * Specifies whether connection errors should be retried. + * + * @param retry Whether to retry on connection error. + * @return The builder instance. + */ + public Builder retryConnectError(boolean retry) { + this.retryConnectError = retry; + return this; + } + + /** + * Do not retry on connection error. + * + * @return The builder instance. + */ + public Builder throwConnectError() { + this.retryConnectError = false; + return this; + } + + /** + * Specifies whether Read Timeout errors should be retried. + * + * @param retry Whether to retry on Read Timeout error. + * @return The builder instance. + */ + public Builder retryReadTimeoutError(boolean retry) { + this.retryReadTimeoutError = retry; + return this; + } + + /** + * Do not retry on Read Timeout error. + * + * @return The builder instance. + */ + public Builder throwReadTimeoutError() { + this.retryReadTimeoutError = false; + return this; + } + + public BackoffStrategy build() { + return new BackoffStrategy(initialIntervalMs, + maxIntervalMs, + maxElapsedTimeMs, + baseFactor, + jitterFactor, + retryConnectError, + retryReadTimeoutError); + } + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/BigDecimalString.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/BigDecimalString.java new file mode 100644 index 00000000..2c0543a6 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/BigDecimalString.java @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Objects; + +import com.fasterxml.jackson.core.JacksonException; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; + +// Internal API only + +// Note that Jackson 2.16.1 does not support @JsonValue and @JsonFormat combined so we must use +// a custom serializer/deserializer + +@JsonSerialize(using = BigDecimalString.BigDecimalStringSerializer.class) +@JsonDeserialize(using = BigDecimalString.BigDecimalStringDeserializer.class) +public class BigDecimalString { + + private final BigDecimal value; + + public BigDecimalString(BigDecimal value) { + this.value = value; + } + + public BigDecimalString(String value) { + this(new BigDecimal(value)); + } + + public BigDecimal value() { + return value; + } + + @Override + public String toString() { + return value.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + BigDecimalString other = (BigDecimalString) obj; + return Objects.equals(value, other.value); + } + + public static final class BigDecimalStringSerializer extends StdSerializer { + + private static final long serialVersionUID = -3828937716095008071L; + + public BigDecimalStringSerializer() { + this(null); + } + + public BigDecimalStringSerializer(Class t) { + super(t); + } + + @Override + public void serialize(BigDecimalString value, JsonGenerator g, SerializerProvider provider) + throws IOException, JsonProcessingException { + g.writeString(value.value.toString()); + } + } + + public static final class BigDecimalStringDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -2474225842945673085L; + + public BigDecimalStringDeserializer() { + this(null); + } + + public BigDecimalStringDeserializer(Class t) { + super(t); + } + + @Override + public BigDecimalString deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + String s = p.readValueAs(String.class); + return new BigDecimalString(new BigDecimal(s)); + } + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/BigIntegerString.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/BigIntegerString.java new file mode 100644 index 00000000..1683d314 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/BigIntegerString.java @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.io.IOException; +import java.math.BigInteger; +import java.util.Objects; + +import com.fasterxml.jackson.core.JacksonException; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; + +// Internal API only + +// Note that Jackson 2.16.1 does not support @JsonValue and @JsonFormat combined so we must use +// a custom serializer/deserializer + +@JsonSerialize(using = BigIntegerString.BigIntegerStringSerializer.class) +@JsonDeserialize(using = BigIntegerString.BigIntegerStringDeserializer.class) +public class BigIntegerString { + + private final BigInteger value; + + public BigIntegerString(BigInteger value) { + this.value = value; + } + + public BigIntegerString(String value) { + this(new BigInteger(value)); + } + + public BigInteger value() { + return value; + } + + @Override + public String toString() { + return value.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + BigIntegerString other = (BigIntegerString) obj; + return Objects.equals(value, other.value); + } + + public static final class BigIntegerStringSerializer extends StdSerializer { + + private static final long serialVersionUID = -2474225842945673085L; + + public BigIntegerStringSerializer() { + this(null); + } + + public BigIntegerStringSerializer(Class t) { + super(t); + } + + @Override + public void serialize(BigIntegerString value, JsonGenerator g, SerializerProvider provider) + throws IOException, JsonProcessingException { + g.writeString(value.value.toString()); + } + } + + public static final class BigIntegerStringDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -2474225842945673085L; + + public BigIntegerStringDeserializer() { + this(null); + } + + public BigIntegerStringDeserializer(Class t) { + super(t); + } + + @Override + public BigIntegerString deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + String s = p.readValueAs(String.class); + return new BigIntegerString(new BigInteger(s)); + } + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Deserializers.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Deserializers.java new file mode 100644 index 00000000..460cf6ca --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Deserializers.java @@ -0,0 +1,241 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; + +import com.fasterxml.jackson.core.JacksonException; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.Module; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.module.SimpleModule; + +public final class Deserializers { + + public static final JsonDeserializer BOOLEAN_STRICT = new StrictBooleanDeserializer(); + public static final JsonDeserializer INTEGER_STRICT = new StrictIntegerDeserializer(); + public static final JsonDeserializer LONG_STRICT = new StrictLongDeserializer(); + public static final JsonDeserializer SHORT_STRICT = new StrictShortDeserializer(); + public static final JsonDeserializer FLOAT_STRICT = new StrictFloatDeserializer(); + public static final JsonDeserializer DOUBLE_STRICT = new StrictDoubleDeserializer(); + public static final JsonDeserializer LOCAL_DATE_STRICT = new StrictLocalDateDeserializer(); + public static final JsonDeserializer OFFSET_DATE_TIME_STRICT = new StrictOffsetDateTimeDeserializer(); + public static final JsonDeserializer STRING_STRICT = new StrictStringDeserializer(); + + public static final Module STRICT_DESERIALIZERS = createStrictDeserializersModule(); + + private static Module createStrictDeserializersModule() { + SimpleModule m = new SimpleModule(); + m.addDeserializer(Boolean.class, Deserializers.BOOLEAN_STRICT); + m.addDeserializer(Short.class, Deserializers.SHORT_STRICT); + m.addDeserializer(Integer.class, Deserializers.INTEGER_STRICT); + m.addDeserializer(Long.class, Deserializers.LONG_STRICT); + m.addDeserializer(Float.class, Deserializers.FLOAT_STRICT); + m.addDeserializer(Double.class, Deserializers.DOUBLE_STRICT); + m.addDeserializer(OffsetDateTime.class, Deserializers.OFFSET_DATE_TIME_STRICT); + m.addDeserializer(LocalDate.class, Deserializers.LOCAL_DATE_STRICT); + m.addDeserializer(String.class, Deserializers.STRING_STRICT); + return m; + } + + private static final class StrictBooleanDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6014987192625841276L; + + StrictBooleanDeserializer() { + super(Boolean.class); + } + + @Override + public Boolean deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_TRUE) { + return true; + } else if (t == JsonToken.VALUE_FALSE) { + return false; + } else { + return (Boolean) ctxt.handleUnexpectedToken(Boolean.class, p); + } + } + } + + private static final class StrictDoubleDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 5500822592284739392L; + + StrictDoubleDeserializer() { + super(Double.class); + } + + @Override + public Double deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_NUMBER_INT) { + return p.getDoubleValue(); + } else if (t == JsonToken.VALUE_NUMBER_FLOAT) { + return p.getDoubleValue(); + } else { + return (Double) ctxt.handleUnexpectedToken(Double.class, p); + } + } + } + + private static final class StrictFloatDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 2207323065789635630L; + + StrictFloatDeserializer() { + super(Float.class); + } + + @Override + public Float deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_NUMBER_INT) { + return p.getFloatValue(); + } else if (t == JsonToken.VALUE_NUMBER_FLOAT) { + return p.getFloatValue(); + } else { + return (Float) ctxt.handleUnexpectedToken(Float.class, p); + } + } + } + + private static final class StrictIntegerDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6079282945607228350L; + + StrictIntegerDeserializer() { + super(Integer.class); + } + + @Override + public Integer deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_NUMBER_INT) { + return p.getIntValue(); + } else { + return (Integer) ctxt.handleUnexpectedToken(Integer.class, p); + } + } + } + + private static final class StrictLocalDateDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6014987192625841276L; + + StrictLocalDateDeserializer() { + super(LocalDate.class); + } + + @Override + public LocalDate deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JacksonException { + if (p.currentToken() == JsonToken.VALUE_STRING) { + String text = p.getText(); + try { + return LocalDate.parse(text, DateTimeFormatter.ISO_LOCAL_DATE); + } catch (DateTimeParseException e) { + return (LocalDate) ctxt.handleWeirdStringValue(LocalDate.class, text, e.getMessage()); + } + } else { + return (LocalDate) ctxt.handleUnexpectedToken(LocalDate.class, p); + } + } + } + + private static final class StrictLongDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -2721538755854421632L; + + public StrictLongDeserializer() { + super(Long.class); + } + + @Override + public Long deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_NUMBER_INT) { + return p.getLongValue(); + } else { + return (Long) ctxt.handleUnexpectedToken(Long.class, p); + } + } + } + + private static final class StrictOffsetDateTimeDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6014987192625841276L; + + StrictOffsetDateTimeDeserializer() { + super(OffsetDateTime.class); + } + + @Override + public OffsetDateTime deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JacksonException { + if (p.currentToken() == JsonToken.VALUE_STRING) { + String text = p.getText(); + try { + return OffsetDateTime.parse(text, DateTimeFormatter.ISO_DATE_TIME); + } catch (DateTimeParseException e) { + return (OffsetDateTime) ctxt.handleWeirdStringValue(OffsetDateTime.class, text, e.getMessage()); + } + } else { + return (OffsetDateTime) ctxt.handleUnexpectedToken(OffsetDateTime.class, p); + } + } + } + + private static final class StrictShortDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 2162877248512421L; + + StrictShortDeserializer() { + super(Short.class); + } + + @Override + public Short deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_NUMBER_INT) { + return p.getShortValue(); + } else { + return (Short) ctxt.handleUnexpectedToken(Short.class, p); + } + } + } + + private static final class StrictStringDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6014987192625841276L; + + StrictStringDeserializer() { + super(String.class); + } + + @Override + public String deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JacksonException { + JsonToken t = p.currentToken(); + if (t == JsonToken.VALUE_STRING) { + return p.getText(); + } else { + return (String) ctxt.handleUnexpectedToken(String.class, p); + } + } + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStream.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStream.java new file mode 100644 index 00000000..fa437ff8 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStream.java @@ -0,0 +1,126 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; +import java.util.Iterator; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.Optional; +import java.util.Spliterator; +import java.util.Spliterators; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import java.util.stream.StreamSupport; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +/** + * Manages the parsing of an InputStream in SSE (Server Sent Events) format. + * + * @param the type that the SSE {@code data} field is deserialized into + */ +/** + * @param + */ +public final class EventStream implements AutoCloseable { + + private final EventStreamReader reader; + private final TypeReference typeReference; + private final ObjectMapper mapper; + + // Internal use only + public EventStream(InputStream in, TypeReference typeReference, ObjectMapper mapper) { + this.reader = new EventStreamReader(in); + this.typeReference = typeReference; + this.mapper = mapper; + } + + /** + * Returns the next message. If another message does not exist returns + * {@code Optional.empty()}. + * + * @return the next message or {@code Optional.empty()} if no more messages + * @throws IOException + */ + public Optional next() throws IOException { + return reader.readMessage() // + .map(x -> Utils.asType(x, mapper, typeReference)); + } + + /** + * Reads all events and returns them as a {@code List}. This method calls + * {@code close()}. + * + * @return list of events + */ + public List toList() { + try { + return stream().collect(Collectors.toList()); + } finally { + try { + close(); + } catch (IOException e) { + throw new UncheckedIOException(e); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + + /** + * Returns a {@link Stream} of events. Must be closed after use! + * + * @return streamed events + */ + public Stream stream() { + return StreamSupport.stream(Spliterators.spliteratorUnknownSize(new Iterator() { + Optional next = null; + + public T next() { + load(); + if (!next.isPresent()) { + throw new NoSuchElementException(); + } + T v = next.get(); + next = null; + return v; + } + + public boolean hasNext() { + load(); + return next.isPresent(); + } + + private void load() { + if (next == null) { + try { + next = EventStream.this.next(); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + } + + }, Spliterator.ORDERED), false).onClose(() -> { + try { + EventStream.this.close(); + } catch (IOException e) { + throw new UncheckedIOException(e); + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + } + + @Override + public void close() throws Exception { + reader.close(); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamLineReader.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamLineReader.java new file mode 100644 index 00000000..b1ad79a5 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamLineReader.java @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.io.IOException; +import java.io.Reader; + +/** + * Converts CR-LF, LF, CR to LF + */ +public class EventStreamLineReader extends Reader { + + private final Reader reader; + private int lastCh = -1; // not LF nor CR + + public EventStreamLineReader(Reader reader) { + this.reader = reader; + } + + @Override + public int read() throws IOException { + if (lastCh == -1) { + // load first character of stream + lastCh = reader.read(); + if (lastCh == -1 || lastCh == '\n') { + // force reload of buffered last ch + int v = lastCh; + lastCh = -1; + return v; + } + } + int ch = reader.read(); + if (ch == -1) { + if (lastCh == '\r') { + lastCh = -1; + return '\n'; + } else { + int v = lastCh; + lastCh = -1; + return v; + } + } else if (lastCh == '\n') { + lastCh = ch; + return '\n'; + } else if (lastCh == '\r' && ch == '\n') { + // force reload of buffered last ch + lastCh = -1; + return '\n'; + } else if (lastCh == '\r') { + lastCh = ch; + return '\n'; + } else { + int v = lastCh; + lastCh = ch; + return v; + } + } + + @Override + public int read(char[] cbuf, int off, int len) throws IOException { + throw new UnsupportedOperationException(); + } + + @Override + public void close() throws IOException { + reader.close(); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamMessage.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamMessage.java new file mode 100644 index 00000000..f8924f4a --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamMessage.java @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.util.Optional; + +public class EventStreamMessage { + + private final Optional event; + private final Optional id; + private final Optional retryMs; + private final String data; + + public EventStreamMessage(Optional event, Optional id, Optional retryMs, String data) { + if (data == null) { + throw new IllegalArgumentException("data cannot be null"); + } + this.event = event; + this.id = id; + this.retryMs = retryMs; + this.data = data; + } + + public Optional event() { + return event; + } + + public Optional id() { + return id; + } + + public Optional retryMs() { + return retryMs; + } + + public String data() { + return data; + } + + public boolean isEmpty() { + return !event.isPresent() && !id().isPresent() && !retryMs().isPresent() && data.isEmpty(); + } + + @Override + public String toString() { + StringBuilder b = new StringBuilder(); + event.ifPresent(value -> b.append("event: " + value + "\n")); + id.ifPresent(value -> b.append("id: " + value + "\n")); + retryMs.ifPresent(value -> b.append("retry: " + value + "\n")); + if (!data.isEmpty()) { + b.append("data: " + data); + } + return b.toString(); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamReader.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamReader.java new file mode 100644 index 00000000..a365681d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/EventStreamReader.java @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; +import java.nio.charset.StandardCharsets; +import java.util.Optional; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public final class EventStreamReader implements AutoCloseable { + + private static final int BUFFER_SIZE = 8192; + + private static final String BYTE_ORDER_MARK = "\uFEFF"; + + private final Reader reader; + + private boolean first = true; + + public EventStreamReader(InputStream in) { + reader = new EventStreamLineReader( + new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8), BUFFER_SIZE)); + } + + /** + * Returns the event message (lines separated by \n) without the terminating + * \n\n. Returns null when end of stream reached (and may occur with a partially + * read event message that has not yet been terminated). Characters in comment + * lines are discarded as read (they are not buffered). + * + * @return the event message + * @throws IOException + */ + // VisibleForTesting + public String readRawMessage() throws IOException { + StringBuilder line = new StringBuilder(); + StringBuilder b = new StringBuilder(); + + char previousCh = 0; + boolean previousAvailable = false; + boolean isComment = false; + char ch; + while (true) { + int v = reader.read(); + if (v == -1) { + return null; + } + ch = (char) v; + if (previousAvailable) { + // note that incoming input stream converts sequences of \r and/or \n to \n + // characters so we only concern ourselves with \n (divide and conquer) + if (previousCh == '\n' && ch == '\n') { + b.append(line); + line.setLength(0); + isComment = false; + trimTrailingNewLines(b); + String msg = b.toString(); + if (first) { + // skip BOM if present in the first message only + if (msg.startsWith(BYTE_ORDER_MARK)) { + msg = msg.substring(BYTE_ORDER_MARK.length()); + } + first = false; + } + return msg; + } else { + if (line.length() == 0 && previousCh == ':') { + isComment = true; + } + if (!isComment) { + line.append(previousCh); + if (previousCh == '\n') { + b.append(line); + // reset line + line.setLength(0); + } + } else if (previousCh == '\n') { + isComment = false; + } + } + } else { + previousAvailable = true; + } + previousCh = ch; + } + } + + public Optional readMessage() throws IOException { + String m = readRawMessage(); + if (m == null) { + return Optional.empty(); + } else { + return Optional.of(parseMessage(m)); + } + } + + private static final Pattern LINE_PATTERN = Pattern.compile("^([a-zA-Z]+): ?(.*)$"); + private static final char LINEFEED = '\n'; + + // VisibleForTesting + public static EventStreamMessage parseMessage(String text) { + String[] lines = text.split("\n"); + Optional event = Optional.empty(); + Optional id = Optional.empty(); + Optional retryMs = Optional.empty(); + StringBuilder data = new StringBuilder(); + boolean firstData = true; + for (String line : lines) { + Matcher m = LINE_PATTERN.matcher(line); + if (m.find()) { + String key = m.group(1).toLowerCase(); + String value = m.group(2); + if ("event".equals(key)) { + event = Optional.of(value); + } else if ("id".equals(key)) { + id = Optional.of(value); + } else if ("retry".equals(key)) { + try { + retryMs = Optional.of(Integer.parseInt(value)); + } catch (NumberFormatException e) { + // ignore + } + } else if ("data".equals(key)) { + if (!firstData) { + data.append(LINEFEED); + } + firstData = false; + data.append(value); + } // else ignore the line + } + } + return new EventStreamMessage(event, id, retryMs, data.toString()); + } + + private static StringBuilder trimTrailingNewLines(StringBuilder b) { + int i = 0; + while (b.length() > i && b.charAt(b.length() - i - 1) == '\n') { + i++; + } + b.setLength(b.length() - i); + return b; + } + + @Override + public void close() throws Exception { + reader.close(); + } + +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/FormMetadata.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/FormMetadata.java new file mode 100644 index 00000000..89d3197d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/FormMetadata.java @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.lang.reflect.Field; + +class FormMetadata { + + String style = "form"; + boolean explode = true; + boolean json; + String name; + + private FormMetadata() { + } + + // form:name=propName,style=spaceDelimited,explode=true + static FormMetadata parse(Field field) throws IllegalArgumentException, IllegalAccessException { + return Metadata.parse("form", new FormMetadata(), field); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/HTTPClient.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/HTTPClient.java new file mode 100644 index 00000000..32237c5d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/HTTPClient.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URISyntaxException; +import java.net.http.HttpResponse; +import java.net.http.HttpRequest; + +public interface HTTPClient { + + /** + * Sends an HTTP request and returns the response. + * + *

Note that {@link HttpRequest} is immutable. To modify the request you can use + * {@link HttpRequest#newBuilder(HttpRequest, BiPredicate)} with + * JDK 16 and later (which will copy the request for modification in a builder). + * If that method is not available then use {@link Helpers#copy} (which also returns + * a builder). + * + * @param request HTTP request + * @return HTTP response + * @throws IOException + * @throws InterruptedException + * @throws URISyntaxException + */ + HttpResponse send(HttpRequest request) + throws IOException, InterruptedException, URISyntaxException; +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/HTTPRequest.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/HTTPRequest.java new file mode 100644 index 00000000..19c1f904 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/HTTPRequest.java @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.net.URISyntaxException; +import java.net.http.HttpRequest; +import java.net.http.HttpRequest.BodyPublisher; +import java.net.http.HttpRequest.BodyPublishers; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +import org.apache.http.NameValuePair; +import org.apache.http.client.utils.URIBuilder; +import org.apache.http.message.BasicNameValuePair; + +public class HTTPRequest { + + private final String baseURL; + private final String method; + private final List queryParams = new ArrayList<>(); + private final Map> headers = new HashMap<>(); + private Optional body = Optional.empty(); // mutable + + public HTTPRequest(String baseURL, String method) { + Utils.checkNotNull(baseURL, "baseURL"); + Utils.checkNotNull(method, "method"); + this.baseURL = baseURL; + this.method = method; + } + + public void setBody(Optional body) { + Utils.checkNotNull(body, "body"); + this.body = body; + } + + public HTTPRequest addHeader(String key, String value) { + List headerValues = headers.get(key); + if (headerValues == null) { + headerValues = new ArrayList<>(); + headers.put(key, headerValues); + } + headerValues.add(value); + return this; + } + + public HTTPRequest addHeaders(Map> map) { + map.forEach((key, list) -> list.forEach(v -> addHeader(key, v))); + return this; + } + + public HTTPRequest addQueryParam(String name, String value) { + addQueryParam(new BasicNameValuePair(name, value)); + return this; + } + + public HTTPRequest addQueryParam(NameValuePair param) { + this.queryParams.add(param); + return this; + } + + public HTTPRequest addQueryParams(Collection params) { + params.forEach(p -> addQueryParam(p)); + return this; + } + + public HttpRequest build() { + HttpRequest.Builder requestBuilder = HttpRequest.newBuilder(); + + final BodyPublisher bodyPublisher; + if (body.isPresent()) { + bodyPublisher = body.get().body(); + requestBuilder.header("Content-Type", body.get().contentType()); + } else { + bodyPublisher = BodyPublishers.noBody(); + } + requestBuilder.method(method, bodyPublisher); + try { + URIBuilder b = new URIBuilder(this.baseURL); + queryParams.forEach(pair -> b.addParameter(pair.getName(), pair.getValue())); + requestBuilder.uri(b.build()); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + headers.forEach((k, list) -> list.forEach(v -> requestBuilder.header(k, v))); + return requestBuilder.build(); + } + +} \ No newline at end of file diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/HeaderMetadata.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/HeaderMetadata.java new file mode 100644 index 00000000..40278264 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/HeaderMetadata.java @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.lang.reflect.Field; + +class HeaderMetadata { + + String style = "simple"; + boolean explode; + String name; + + private HeaderMetadata() { + } + + // headerParam:style=simple,explode=false,name=apiID + static HeaderMetadata parse(Field field) throws IllegalArgumentException, IllegalAccessException { + return Metadata.parse("header", new HeaderMetadata(), field); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Helpers.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Helpers.java new file mode 100644 index 00000000..85fe6bb6 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Helpers.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.net.http.HttpRequest; +import java.util.function.BiPredicate; + +/** + * Public helper methods for use by customers and end-users. + * + */ +public final class Helpers { + + /** + * Returns an {@link HttpRequest.Builder} which is initialized with the + * state of the given {@link HttpRequest}. + * + *

Note that headers can be added and modified but not removed. To + * remove headers use {@link #copy(HttpRequest, BiPredicate)} (which applies + * a filter to the headers while copying). + * + *

Note also that this method is redundant from JDK 16 because the + * method {@code HttpRequest.newBuilder(HttpRequest)} is available. + * + * @param request request to copy + * @return a builder initialized with values from {@code request} + */ + public static HttpRequest.Builder copy(HttpRequest request) { + return Utils.copy(request); + } + + /** + * Returns an {@link HttpRequest.Builder} which is initialized with the + * state of the given {@link HttpRequest}. + * + *

Note that this method is redundant from JDK 16 because the + * method {@code HttpRequest.newBuilder(HttpRequest, BiPredicate)} is available. + + * @param request request to copy + * @param filter selects which header key-values to include in the copied request + * @return a builder initialized with values from {@code request} + */ + public static HttpRequest.Builder copy(HttpRequest request, BiPredicate filter) { + return Utils.copy(request, filter); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Hook.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Hook.java new file mode 100644 index 00000000..616dbb01 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Hook.java @@ -0,0 +1,272 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.io.InputStream; +import java.net.http.HttpResponse; +import java.net.http.HttpRequest; +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +import dev.speakeasyapi.javaclientsdk.SecuritySource; + +/** + * Holder class for hook-associated types. This class does not get + * instantiated. + */ +public final class Hook { + + private Hook() { + // prevent instantiation + } + + /** + * Context for a hook call. + */ + public interface HookContext { + String operationId(); + Optional> oauthScopes(); + Optional securitySource(); + } + + /** + * Context for a BeforeRequest hook call. + */ + public interface BeforeRequestContext extends HookContext { + } + + public static final class BeforeRequestContextImpl implements BeforeRequestContext { + + private final String operationId; + private final Optional> oauthScopes; + private final Optional securitySource; + + public BeforeRequestContextImpl(String operationId, Optional> oauthScopes, Optional securitySource) { + this.operationId = operationId; + this.oauthScopes = oauthScopes; + this.securitySource = securitySource; + } + + @Override + public String operationId() { + return operationId; + } + + @Override + public Optional securitySource() { + return securitySource; + } + + @Override + public Optional> oauthScopes() { + return oauthScopes; + } + } + + /** + * Context for an AfterSuccess hook call. + */ + public interface AfterSuccessContext extends HookContext { + } + + public static final class AfterSuccessContextImpl implements AfterSuccessContext { + + private final String operationId; + private final Optional> oauthScopes; + private final Optional securitySource; + + public AfterSuccessContextImpl(String operationId, Optional> oauthScopes, Optional securitySource) { + Utils.checkNotNull(securitySource, "securitySource"); + this.operationId = operationId; + this.oauthScopes = oauthScopes; + this.securitySource = securitySource; + } + + @Override + public String operationId() { + return operationId; + } + + @Override + public Optional securitySource() { + return securitySource; + } + + @Override + public Optional> oauthScopes() { + return oauthScopes; + } + } + + /** + * Context for an AfterError hook call. + */ + public interface AfterErrorContext extends HookContext { + } + + public static final class AfterErrorContextImpl implements AfterErrorContext { + + private final String operationId; + private final Optional> oauthScopes; + private final Optional securitySource; + + public AfterErrorContextImpl(String operationId, Optional> oauthScopes, Optional securitySource) { + Utils.checkNotNull(securitySource, "securitySource"); + this.operationId = operationId; + this.oauthScopes = oauthScopes; + this.securitySource = securitySource; + } + + @Override + public String operationId() { + return operationId; + } + + @Override + public Optional securitySource() { + return securitySource; + } + + @Override + public Optional> oauthScopes() { + return oauthScopes; + } + } + + /** + * Specifies how a request is transformed before sending. + */ + public interface BeforeRequest { + + /** + * Transforms the given {@link HttpRequest} before sending. + * + *

Note that {@link HttpRequest} is immutable. To modify the request you can use + * {@link HttpRequest#newBuilder(HttpRequest, BiPredicate)} with + * JDK 16 and later (which will copy the request for modification in a builder). + * If that method is not available then use {@link Helpers#copy} (which also returns + * a builder). + * + * @param context context for the hook call + * @param request request to be transformed + * @return transformed request + * @throws Exception on error + */ + HttpRequest beforeRequest(BeforeRequestContext context, HttpRequest request) throws Exception; + + /** + * The default action is to return the request untouched. + */ + static BeforeRequest DEFAULT = (context, request) -> request; + } + + /** + * Specifies how a response is transformed before response processing. + */ + public interface AfterSuccess { + + /** + * Transforms the given response before response processing occurs. + * + * @param context context for the hook call + * @param response response to be transformed + * @return transformed response + * @throws Exception on error + */ + HttpResponse afterSuccess(AfterSuccessContext context, HttpResponse response) + throws Exception; + + /** + * The default action is to return the response untouched. + */ + static AfterSuccess DEFAULT = (context, response) -> response; + } + + /** + * Specifies what happens if a request action throws an Exception. + */ + public interface AfterError { + + /** + * Either returns an HttpResponse or throws an Exception. Must be passed either + * a response or an error (both can't be absent). + * + * @param context context for the error + * @param response response information if available. + * @param error the optional exception. If response present then the error is for-info + * only, it was the last error in the chain of AfterError hook + * calls leading to this one + * @return HTTP response if method decides that an exception is not to be thrown + * @throws Exception if error to be propagated + */ + HttpResponse afterError( + AfterErrorContext context, + Optional> response, + Optional error) throws Exception; + + /** + * The default action is to rethrow the given error. + */ + static AfterError DEFAULT = (context, response, error) -> { + Utils.checkArgument( + response.isPresent() ^ error.isPresent(), + "one and only one of response or error must be present"); + if (error.isPresent()) { + throw error.get(); + } else { + return response.get(); + } + }; + } + + public static final class SdkInitData { + private final String baseUrl; + private final HTTPClient client; + + public SdkInitData(String baseUrl, HTTPClient client) { + this.baseUrl = baseUrl; + this.client = client; + } + + public String baseUrl() { + return baseUrl; + } + + public HTTPClient client() { + return client; + } + } + + /** + * Transforms the HTTPClient before use. + */ + public interface SdkInit { + + /** + * Returns a transformed {@link HTTPClient} and {@code baseUrl} for use in requests. + * + * @param data data to transform + * @return the transformed data + */ + SdkInitData sdkInit(SdkInitData data); + + /** + * The default action is to return the client untouched. + */ + static SdkInit DEFAULT = data -> data; + + } + + public static final class IdempotencyHook implements BeforeRequest { + + @Override + public HttpRequest beforeRequest(BeforeRequestContext context, HttpRequest request) throws Exception { + HttpRequest.Builder b = Helpers.copy(request); + b.header("Idempotency-Key", UUID.randomUUID().toString()); + return b.build(); + } + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Hooks.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Hooks.java new file mode 100644 index 00000000..cf891c64 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Hooks.java @@ -0,0 +1,197 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.io.InputStream; +import java.net.http.HttpResponse; +import java.net.http.HttpRequest; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CopyOnWriteArrayList; + +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterError; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterErrorContext; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccess; +import dev.speakeasyapi.javaclientsdk.utils.Hook.AfterSuccessContext; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequest; +import dev.speakeasyapi.javaclientsdk.utils.Hook.BeforeRequestContext; +import dev.speakeasyapi.javaclientsdk.utils.Hook.SdkInit; +import dev.speakeasyapi.javaclientsdk.utils.Hook.SdkInitData; + +/** + * Registers hooks for use at runtime by an end-user or for use by a customer + * that may edit the SDKHooks.java file. + * + *

+ * For example, this code will add a transaction id header to every request: + * + *

+ * hooks.registerBeforeRequest((context, request) -> {
+ *     request.headers().map().put("acme-transaction-id", nextTransactionId());
+ *     return request;
+ * });
+ * 
+ */ +// ThreadSafe +public class Hooks implements BeforeRequest, AfterSuccess, AfterError, SdkInit { + + // we use CopyOnWriteArrayList for thread safety + private final List beforeRequestHooks = new CopyOnWriteArrayList<>(); + private final List afterSuccessHooks = new CopyOnWriteArrayList<>(); + private final List afterErrorHooks = new CopyOnWriteArrayList<>(); + private final List SdkInitHooks = new CopyOnWriteArrayList<>(); + + /** + * Constructor. + */ + public Hooks() { + } + + /** + * Registers a {@link BeforeRequest} hook to be applied in order of + * registration. The result of the first BeforeRequest hook will be passed to + * the second BeforeRequest hook and processed similarly for the rest of the + * registered hooks. If a BeforeRequest hook throws then that Exception will + * not be passed to the {@link AfterError} hooks. + * + * @param beforeRequest hook to be registered + * @return this + */ + public Hooks registerBeforeRequest(BeforeRequest beforeRequest) { + Utils.checkNotNull(beforeRequest, "beforeRequest"); + this.beforeRequestHooks.add(beforeRequest); + return this; + } + + /** + * Registers an {@link AfterSuccess} hook to be applied in order of registration + * (multiple can be registered). The result of the first AfterSuccess hook will + * be passed to the second AfterSuccess hook and processed similarly for the + * rest of the registered hooks. If an AfterSuccess hook throws then that + * Exception will not be passed to the {@link AfterError} hooks. + * + * @param afterSuccess hook to be registered + * @return this + */ + public Hooks registerAfterSuccess(AfterSuccess afterSuccess) { + Utils.checkNotNull(afterSuccess, "afterSuccess"); + this.afterSuccessHooks.add(afterSuccess); + return this; + } + + /** + * Registers an {@link AfterError} hook to be applied in order of registration + * (multiple can be registered). If the first AfterError hook throws then the + * second hook will be called with that exception (and no response object) and + * so on for the rest of the registered hooks. If an AfterError hook returns + * normally then its result will be passed through to the next AfterError hook + * with the latest thrown Exception. + * + * @param afterError hook to be registered + * @return this + */ + public Hooks registerAfterError(AfterError afterError) { + Utils.checkNotNull(afterError, "afterError"); + this.afterErrorHooks.add(afterError); + return this; + } + + /** + * Registers a {@link SdkInit} hook to be applied in order of registration + * (multiple can be registered). + * + * @param SdkInit hook to be registered + * @return this + */ + public Hooks registerSdkInit(SdkInit SdkInit) { + Utils.checkNotNull(SdkInit, "SdkInit"); + this.SdkInitHooks.add(SdkInit); + return this; + } + + @Override + public HttpRequest beforeRequest(BeforeRequestContext context, HttpRequest request) throws Exception { + Utils.checkNotNull(context, "context"); + Utils.checkNotNull(request, "request"); + for (BeforeRequest hook : beforeRequestHooks) { + request = hook.beforeRequest(context, request); + } + return request; + } + + @Override + public HttpResponse afterSuccess(AfterSuccessContext context, HttpResponse response) + throws Exception { + Utils.checkNotNull(context, "context"); + Utils.checkNotNull(response, "response"); + + for (AfterSuccess hook : afterSuccessHooks) { + response = hook.afterSuccess(context, response); + if (response == null) { + throw new IllegalStateException("afterSuccess cannot return null"); + } + } + return response; + } + + @Override + public HttpResponse afterError( + AfterErrorContext context, + Optional> response, + Optional error) throws Exception { + Utils.checkNotNull(context, "context"); + Utils.checkNotNull(response, "response"); + Utils.checkNotNull(error, "error"); + Utils.checkArgument( + response.isPresent() ^ error.isPresent(), + "one and only one of response or error must be present"); + + for (AfterError hook : afterErrorHooks) { + try { + response = Optional.ofNullable(hook.afterError(context, response, error)); + if (!response.isPresent()) { + throw new IllegalStateException( + "afterError must either throw an exception or return a non-null response"); + } + } catch (FailEarlyException e) { + Throwable cause = e.getCause(); + if (cause instanceof Exception) { + throw (Exception) cause; + } else { + // must be an Error + throw (Error) cause; + } + } catch (Exception e) { + error = Optional.of(e); + response = Optional.empty(); + } + } + if (response.isPresent()) { + return response.get(); + } else { + throw error.get(); + } + } + + @Override + public SdkInitData sdkInit(SdkInitData data) { + Utils.checkNotNull(data, "data"); + for (SdkInit hook : SdkInitHooks) { + data = hook.sdkInit(data); + if (data == null) { + throw new IllegalStateException("sdkInit cannot return null"); + } + } + return data; + } + + @SuppressWarnings("serial") + public static final class FailEarlyException extends RuntimeException { + public FailEarlyException(Exception e) { + super(e); + } + } + +} \ No newline at end of file diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/JSON.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/JSON.java new file mode 100644 index 00000000..993bea0d --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/JSON.java @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import org.openapitools.jackson.nullable.JsonNullableModule; + +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class JSON { + public static ObjectMapper getMapper() { + return new ObjectMapper() + .registerModule(new JavaTimeModule()) + .registerModule(new Jdk8Module()) + .registerModule(new JsonNullableModule()) + .registerModule(Deserializers.STRICT_DESERIALIZERS) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .enable(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES); + } +} \ No newline at end of file diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/LazySingletonValue.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/LazySingletonValue.java new file mode 100644 index 00000000..70791d09 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/LazySingletonValue.java @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import com.fasterxml.jackson.core.type.TypeReference; + +public final class LazySingletonValue { + + private static final Object NOT_SET = new Object(); + + private final String name; + private final String json; + private final TypeReference typeReference; + private Object value = NOT_SET; + + public LazySingletonValue(String name, String json, TypeReference typeReference) { + this.name = name; + this.json = json; + this.typeReference = typeReference; + } + + @SuppressWarnings("unchecked") + public T value() { + if (value == NOT_SET) { + value = Utils.readDefaultOrConstValue(name, json, typeReference); + } + return (T) value; + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Metadata.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Metadata.java new file mode 100644 index 00000000..24767da6 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Metadata.java @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.Map; + +final class Metadata { + + private Metadata() { + // prevent instantiation + } + + static T parse(String name, T metadata, Field field) + throws IllegalArgumentException, IllegalAccessException { + SpeakeasyMetadata md = field.getAnnotation(SpeakeasyMetadata.class); + if (md == null) { + return null; + } + + String mdValue = md.value(); + + if (mdValue == null || mdValue.isBlank()) { + return null; + } + + String[] groups = mdValue.split(" "); + + boolean handled = false; + + for (String group : groups) { + String[] parts = group.split(":"); + if (parts.length != 2) { + return null; + } + + if (!parts[0].equals(name)) { + continue; + } + + Map values = new HashMap<>(); + + String[] pairs = parts[1].split(","); + for (String pair : pairs) { + String[] keyVal = pair.split("="); + String key = keyVal[0]; + + String val = ""; + if (keyVal.length > 1) { + val = keyVal[1]; + } + + values.put(key, val); + } + + Field[] fields = metadata.getClass().getDeclaredFields(); + + for (Field f : fields) { + f.setAccessible(true); + if (values.containsKey(f.getName())) { + String val = values.get(f.getName()); + + if (f.getType().equals(boolean.class) || f.getType().equals(Boolean.class)) { + f.set(metadata, val.equals("true") || val.isBlank()); + } else { + f.set(metadata, val); + } + } + } + + handled = true; + } + + if (!handled) { + return null; + } + + return (T) metadata; + } +} \ No newline at end of file diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/MultipartFormMetadata.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/MultipartFormMetadata.java new file mode 100644 index 00000000..87c45530 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/MultipartFormMetadata.java @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.lang.reflect.Field; + +class MultipartFormMetadata { + + boolean file; + boolean content; + boolean json; + String name; + + private MultipartFormMetadata() { + } + + // multipartForm:name=file + static MultipartFormMetadata parse(Field field) throws IllegalArgumentException, IllegalAccessException { + return Metadata.parse("multipartForm", new MultipartFormMetadata(), field); + } +} diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/OneOfDeserializer.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/OneOfDeserializer.java new file mode 100644 index 00000000..b7e0837e --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/OneOfDeserializer.java @@ -0,0 +1,271 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.io.IOException; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import dev.speakeasyapi.javaclientsdk.utils.Utils.TypeReferenceWithShape; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.TreeNode; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DatabindException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + + +public class OneOfDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -1; + + private final List typeReferences; // oneOf subschemas + private final Class cls; + private final boolean strict; + private final ObjectMapper mapper; + + /** + * Constructor. + * + * @param cls oneOf type + * @param strict if true then when multiple matches encountered an + * exception is thrown. If false then when multiple + * matches encountered the first match from the + * typeReferences array is used as deserialization result. + * @param typeReferences the types of the oneOf subschemas. When strict is false + * the first matching member of this array will be the + * type of the deserialization result. + */ + protected OneOfDeserializer(Class cls, boolean strict, TypeReferenceWithShape... typeReferences) { + super(cls); + this.typeReferences= Arrays.asList(typeReferences); + this.cls = cls; + this.strict = strict; + this.mapper = JSON.getMapper(); + } + + @Override + public T deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return deserializeOneOf(mapper, p, ctxt, typeReferences, cls, strict); + } + + private static T deserializeOneOf(ObjectMapper mapper, JsonParser p, DeserializationContext ctxt, + List typeReferences, Class cls, boolean strict) throws IOException { + TreeNode tree = p.getCodec().readTree(p); + // TODO don't have to generate json because can use tree.traverse to get a + // parser to read value, perf advantage and can stop plugging in ObjectMapper + String json = mapper.writeValueAsString(tree); + return deserializeOneOf(mapper, json, typeReferences, cls, ctxt, strict); + } + + private static T deserializeOneOf(ObjectMapper mapper, String json, List typeReferences, Class cls, + DeserializationContext ctxt, boolean strict) throws JsonProcessingException { + List> matches = new ArrayList<>(); + for (TypeReferenceWithShape c : typeReferences) { + // try to deserialize with each of the member classes + // @formatter:off + try { + JavaType jt = Utils.convertToShape(mapper.getTypeFactory(), c.typeReference(), c.shape()); + // Jackson very permissive with readValue so we will tighten things up a bit + if (matchPossible(jt, json)) { + Object o = mapper.readValue(json, jt); + o = Utils.convertToShapeInverse(o, c.shape(), jt); + @SuppressWarnings("unchecked") + TypedObject typed = TypedObject.of(o, c.shape(), (TypeReference) c.typeReference()); + T v = newInstance(cls, typed); + matches.add(new Match<>(c, v)); + } + } catch (DatabindException e) {} // NOPMD + // @formatter:on + } + matches = applyMatchPreferences(matches, json); + if (matches.size() == 1) { + return matches.get(0).value; + } else if (matches.size() > 1) { + if (strict) { + throw JsonMappingException.from(ctxt, + "json matched more than one of the possible type references, matches are: " + + typeNames(matches) + " - json=\n" + json); + } else { + // return first match + return matches.get(0).value; + } + } else { + throw JsonMappingException.from(ctxt, + "json did not match any of the possible type references: " + typeReferenceNames(typeReferences) + ", json=\n" + json); + } + } + + private static final class Match { + final TypeReferenceWithShape typeReference; + final T value; + + Match(TypeReferenceWithShape typeReference, T value) { + this.typeReference = typeReference; + this.value = value; + } + } + + private static final Set NUMERIC_CLASSES = Set.of( + Integer.class.getCanonicalName(), + Long.class.getCanonicalName(), + BigInteger.class.getCanonicalName(), + Float.class.getCanonicalName(), + Double.class.getCanonicalName(), + BigDecimal.class.getCanonicalName()); + + private static final Set DECIMAL_CLASSES = Set.of( + Float.class.getCanonicalName(), + Double.class.getCanonicalName(), + BigDecimal.class.getCanonicalName()); + + private static final Set INTEGER_CLASSES = Set.of( + Integer.class.getCanonicalName(), + Long.class.getCanonicalName(), + BigInteger.class.getCanonicalName()); + + private static final Set DATE_TIME_CLASSES = Set.of( + OffsetDateTime.class.getCanonicalName(), + LocalDate.class.getCanonicalName()); + + // VisibleForTesting + public static boolean matchPossible(JavaType type, String json) { + // situations we want to AVOID that can happen with Jackson ObjectMapper: + // * json numeric considered as valid for deserialization to OffsetDateTime, LocalDate + // * non-double-quoted json string considered as valid string + // * json numeric can be parsed as a Boolean + // * double-quoted numerics can be parsed as numerics + + // We make important assumptions about matching json with types + if (typeIs(type, String.class) || typeIs(type, BigIntegerString.class) || typeIs(type, BigDecimalString.class)) { + // string must be double quoted + return isDoubleQuoted(json); + } else if (typeIs(type, Boolean.class)) { + // boolean can only have false or true values + return json.equals("true") || json.equals("false"); + } else if (NUMERIC_CLASSES.contains(type.getTypeName())) { + return !json.contains("\""); + } else if (typeIs(type, OffsetDateTime.class) || typeIs(type, LocalDate.class)) { + // only json schema datetime format accepted, not epoch ms/s etc. + return isDoubleQuoted(json) && !isNumeric(json.substring(1, json.length() - 1)); + } else { + return true; + } + } + + private static boolean isDoubleQuoted(String s) { + return s.length() >=2 && s.startsWith("\"") && s.endsWith("\""); + } + + // VisibleForTesting + public static List> applyMatchPreferences(List> matches, String json) { + if (matches.size() <= 1) { + return matches; + } else if (allNumeric(matches)) { + List> decimalMatches = decimalMatches(matches); + List> integerMatches = integerMatches(matches); + if (!decimalMatches.isEmpty() && !integerMatches.isEmpty()) { + if (json.contains("e")|| json.contains(".")) { + return decimalMatches; + } else { + return integerMatches; + } + } else if (!decimalMatches.isEmpty()) { + return decimalMatches; + } else { + return integerMatches; + } + } if (allDateTime(matches)) { + if (json.contains("T")) { + return filter(matches, OffsetDateTime.class); + } else { + return filter(matches, LocalDate.class); + } + } else { + return matches; + } + } + + private static List> filter(List> matches, Class filterByClass) { + return matches // + .stream() // + .filter(x -> x.typeReference.typeReference().getType().getTypeName().equals(filterByClass.getCanonicalName())) // + .collect(Collectors.toList()); + } + + private static boolean allDateTime(List> matches) { + return matches.stream().allMatch(x -> DATE_TIME_CLASSES.contains(x.typeReference.typeReference().getType().getTypeName())); + } + + private static boolean allNumeric(List> matches) { + return matches.stream().allMatch(x -> NUMERIC_CLASSES.contains(x.typeReference.typeReference().getType().getTypeName())); + } + + private static List> decimalMatches(List> matches) { + return matches // + .stream() // + .filter(x -> DECIMAL_CLASSES.contains(x.typeReference.typeReference().getType().getTypeName())) // + .collect(Collectors.toList()); + } + + private static List> integerMatches(List> matches) { + return matches // + .stream() // + .filter(x -> INTEGER_CLASSES.contains(x.typeReference.typeReference().getType().getTypeName())) // + .collect(Collectors.toList()); + } + + private static boolean isNumeric(String s) { + try { + Double.parseDouble(s); + return true; + } catch (NumberFormatException e) { + return false; + } + } + + private static boolean typeIs(JavaType type, Class cls) { + return type.getRawClass().equals(cls); + } + + private static String typeNames(List> matches) { + return "[" + matches + .stream() + .map(x -> x.typeReference.typeReference().getType().getTypeName()) + .collect(Collectors.joining(", ")) + "]"; + } + + private static String typeReferenceNames(List list) { + return "[" + list + .stream() + .map(x -> x.typeReference().getType().getTypeName()) + .collect(Collectors.joining(", ")) + "]"; + } + + private static T newInstance(Class cls, Object parameter) { + try { + Constructor con = cls.getDeclaredConstructor(TypedObject.class); + con.setAccessible(true); + return con.newInstance(parameter); + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException + | NoSuchMethodException | SecurityException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Options.java b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Options.java new file mode 100644 index 00000000..8bbc0c14 --- /dev/null +++ b/src/main/java/dev/speakeasyapi/javaclientsdk/utils/Options.java @@ -0,0 +1,59 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package dev.speakeasyapi.javaclientsdk.utils; + +import java.util.Optional; +import java.util.List; + +public class Options { + + public enum Option { + RETRY_CONFIG; + } + + private Optional retryConfig = Optional.empty(); + + private Options(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + } + + public Optional retryConfig() { + return retryConfig; + } + + public final void validate(List