From 291a3fc82d342898f66d4db63167f0375b77a6c4 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 15 May 2024 22:27:38 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.291.0 --- .speakeasy/gen.lock | 610 ++-- .speakeasy/workflow.lock | 10 +- README.md | 102 +- RELEASES.md | 12 +- USAGE.md | 2 +- build.gradle | 2 +- .../operations/DeletePermissionRequest.md | 8 + .../operations/DeletePermissionResponse.md | 10 + .../operations/GetHealthCheckResponse.md | 10 + .../models/operations/GetPermissionRequest.md | 8 + .../operations/GetPermissionResponse.md | 11 + .../operations/ListPermissionsRequest.md | 8 + .../operations/ListPermissionsResponse.md | 11 + .../operations/UpdatePermissionRequest.md | 9 + .../operations/UpdatePermissionResponse.md | 11 + docs/models/shared/DestinationRedshift.md | 29 +- .../shared/DestinationSnowflakeCortex.md | 23 + .../DestinationSnowflakeCortexAzureOpenAI.md | 13 + ...tinationSnowflakeCortexByMarkdownHeader.md | 11 + ...ionSnowflakeCortexByProgrammingLanguage.md | 11 + .../DestinationSnowflakeCortexBySeparator.md | 12 + .../DestinationSnowflakeCortexCohere.md | 11 + .../DestinationSnowflakeCortexCredentials.md | 8 + .../DestinationSnowflakeCortexEmbedding.md | 4 + .../shared/DestinationSnowflakeCortexFake.md | 10 + ...wflakeCortexFieldNameMappingConfigModel.md | 9 + .../DestinationSnowflakeCortexIndexing.md | 16 + .../DestinationSnowflakeCortexLanguage.md | 25 + .../shared/DestinationSnowflakeCortexMode.md | 8 + .../DestinationSnowflakeCortexOpenAI.md | 11 + ...tinationSnowflakeCortexOpenAICompatible.md | 14 + ...ionSnowflakeCortexProcessingConfigModel.md | 13 + ...akeCortexSchemasEmbeddingEmbedding5Mode.md | 8 + ...lakeCortexSchemasEmbeddingEmbeddingMode.md | 8 + ...tionSnowflakeCortexSchemasEmbeddingMode.md | 8 + .../DestinationSnowflakeCortexSchemasMode.md | 8 + ...ionSnowflakeCortexSchemasProcessingMode.md | 8 + ...CortexSchemasProcessingTextSplitterMode.md | 8 + ...sProcessingTextSplitterTextSplitterMode.md | 8 + .../DestinationSnowflakeCortexTextSplitter.md | 4 + docs/models/shared/PermissionResponseRead.md | 14 + docs/models/shared/PermissionScope.md | 12 + docs/models/shared/PermissionUpdateRequest.md | 8 + docs/models/shared/PermissionsResponse.md | 10 + docs/models/shared/SnowflakeCortex.md | 8 + docs/models/shared/SourceInsightly.md | 2 +- docs/sdks/health/README.md | 58 + docs/sdks/permissions/README.md | 292 ++ docs/sdks/public/README.md | 2332 ------------ docs/sdks/publicconnections/README.md | 372 -- docs/sdks/publicdestinations/README.md | 470 --- docs/sdks/publicjobs/README.md | 302 -- docs/sdks/publicpermissions/README.md | 79 - docs/sdks/publicsources/README.md | 613 ---- docs/sdks/publicstreams/README.md | 78 - docs/sdks/publicworkspaces/README.md | 448 --- gen.yaml | 2 +- src/main/java/com/airbyte/api/Airbyte.java | 57 +- .../api/{PublicStreams.java => Health.java} | 68 +- .../java/com/airbyte/api/Permissions.java | 418 ++- src/main/java/com/airbyte/api/Public.java | 3219 ----------------- .../com/airbyte/api/PublicConnections.java | 562 --- .../com/airbyte/api/PublicDestinations.java | 676 ---- src/main/java/com/airbyte/api/PublicJobs.java | 462 --- .../com/airbyte/api/PublicPermissions.java | 146 - .../java/com/airbyte/api/PublicSources.java | 784 ---- .../com/airbyte/api/PublicWorkspaces.java | 666 ---- .../com/airbyte/api/SDKConfiguration.java | 6 +- .../operations/DeletePermissionRequest.java | 91 + .../DeletePermissionRequestBuilder.java | 40 + .../operations/DeletePermissionResponse.java | 182 + .../GetHealthCheckRequestBuilder.java | 32 + .../operations/GetHealthCheckResponse.java | 182 + .../operations/GetPermissionRequest.java | 91 + .../GetPermissionRequestBuilder.java | 40 + .../operations/GetPermissionResponse.java | 249 ++ .../operations/ListPermissionsRequest.java | 127 + .../ListPermissionsRequestBuilder.java | 40 + .../operations/ListPermissionsResponse.java | 249 ++ .../operations/SDKMethodInterfaces.java | 167 +- .../operations/UpdatePermissionRequest.java | 120 + .../UpdatePermissionRequestBuilder.java | 40 + .../operations/UpdatePermissionResponse.java | 249 ++ .../shared/DestinationConfiguration.java | 7 + .../models/shared/DestinationRedshift.java | 72 +- .../shared/DestinationSnowflakeCortex.java | 284 ++ ...DestinationSnowflakeCortexAzureOpenAI.java | 212 ++ ...nationSnowflakeCortexByMarkdownHeader.java | 163 + ...nSnowflakeCortexByProgrammingLanguage.java | 130 + ...DestinationSnowflakeCortexBySeparator.java | 224 ++ .../DestinationSnowflakeCortexCohere.java | 118 + ...DestinationSnowflakeCortexCredentials.java | 103 + .../DestinationSnowflakeCortexEmbedding.java | 124 + .../DestinationSnowflakeCortexFake.java | 91 + ...lakeCortexFieldNameMappingConfigModel.java | 144 + .../DestinationSnowflakeCortexIndexing.java | 340 ++ .../DestinationSnowflakeCortexLanguage.java | 49 + .../DestinationSnowflakeCortexMode.java | 31 + .../DestinationSnowflakeCortexOpenAI.java | 118 + ...nationSnowflakeCortexOpenAICompatible.java | 299 ++ ...nSnowflakeCortexProcessingConfigModel.java | 426 +++ ...eCortexSchemasEmbeddingEmbedding5Mode.java | 31 + ...keCortexSchemasEmbeddingEmbeddingMode.java | 31 + ...onSnowflakeCortexSchemasEmbeddingMode.java | 31 + ...DestinationSnowflakeCortexSchemasMode.java | 31 + ...nSnowflakeCortexSchemasProcessingMode.java | 31 + ...rtexSchemasProcessingTextSplitterMode.java | 31 + ...rocessingTextSplitterTextSplitterMode.java | 31 + ...estinationSnowflakeCortexTextSplitter.java | 110 + .../models/shared/PermissionResponseRead.java | 246 ++ .../api/models/shared/PermissionScope.java | 36 + .../shared/PermissionUpdateRequest.java | 103 + .../models/shared/PermissionsResponse.java | 94 + .../api/models/shared/SnowflakeCortex.java | 31 + .../api/models/shared/SourceInsightly.java | 21 +- 115 files changed, 7192 insertions(+), 11776 deletions(-) create mode 100644 docs/models/operations/DeletePermissionRequest.md create mode 100644 docs/models/operations/DeletePermissionResponse.md create mode 100644 docs/models/operations/GetHealthCheckResponse.md create mode 100644 docs/models/operations/GetPermissionRequest.md create mode 100644 docs/models/operations/GetPermissionResponse.md create mode 100644 docs/models/operations/ListPermissionsRequest.md create mode 100644 docs/models/operations/ListPermissionsResponse.md create mode 100644 docs/models/operations/UpdatePermissionRequest.md create mode 100644 docs/models/operations/UpdatePermissionResponse.md create mode 100644 docs/models/shared/DestinationSnowflakeCortex.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexAzureOpenAI.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexByMarkdownHeader.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexByProgrammingLanguage.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexBySeparator.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexCohere.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexCredentials.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexEmbedding.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexFake.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexFieldNameMappingConfigModel.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexIndexing.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexLanguage.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexMode.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexOpenAI.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexOpenAICompatible.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexProcessingConfigModel.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingMode.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexSchemasMode.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexSchemasProcessingMode.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterMode.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode.md create mode 100644 docs/models/shared/DestinationSnowflakeCortexTextSplitter.md create mode 100644 docs/models/shared/PermissionResponseRead.md create mode 100644 docs/models/shared/PermissionScope.md create mode 100644 docs/models/shared/PermissionUpdateRequest.md create mode 100644 docs/models/shared/PermissionsResponse.md create mode 100644 docs/models/shared/SnowflakeCortex.md create mode 100644 docs/sdks/health/README.md delete mode 100644 docs/sdks/public/README.md delete mode 100644 docs/sdks/publicconnections/README.md delete mode 100644 docs/sdks/publicdestinations/README.md delete mode 100644 docs/sdks/publicjobs/README.md delete mode 100644 docs/sdks/publicpermissions/README.md delete mode 100644 docs/sdks/publicsources/README.md delete mode 100644 docs/sdks/publicstreams/README.md delete mode 100644 docs/sdks/publicworkspaces/README.md rename src/main/java/com/airbyte/api/{PublicStreams.java => Health.java} (52%) delete mode 100644 src/main/java/com/airbyte/api/Public.java delete mode 100644 src/main/java/com/airbyte/api/PublicConnections.java delete mode 100644 src/main/java/com/airbyte/api/PublicDestinations.java delete mode 100644 src/main/java/com/airbyte/api/PublicJobs.java delete mode 100644 src/main/java/com/airbyte/api/PublicPermissions.java delete mode 100644 src/main/java/com/airbyte/api/PublicSources.java delete mode 100644 src/main/java/com/airbyte/api/PublicWorkspaces.java create mode 100644 src/main/java/com/airbyte/api/models/operations/DeletePermissionRequest.java create mode 100644 src/main/java/com/airbyte/api/models/operations/DeletePermissionRequestBuilder.java create mode 100644 src/main/java/com/airbyte/api/models/operations/DeletePermissionResponse.java create mode 100644 src/main/java/com/airbyte/api/models/operations/GetHealthCheckRequestBuilder.java create mode 100644 src/main/java/com/airbyte/api/models/operations/GetHealthCheckResponse.java create mode 100644 src/main/java/com/airbyte/api/models/operations/GetPermissionRequest.java create mode 100644 src/main/java/com/airbyte/api/models/operations/GetPermissionRequestBuilder.java create mode 100644 src/main/java/com/airbyte/api/models/operations/GetPermissionResponse.java create mode 100644 src/main/java/com/airbyte/api/models/operations/ListPermissionsRequest.java create mode 100644 src/main/java/com/airbyte/api/models/operations/ListPermissionsRequestBuilder.java create mode 100644 src/main/java/com/airbyte/api/models/operations/ListPermissionsResponse.java create mode 100644 src/main/java/com/airbyte/api/models/operations/UpdatePermissionRequest.java create mode 100644 src/main/java/com/airbyte/api/models/operations/UpdatePermissionRequestBuilder.java create mode 100644 src/main/java/com/airbyte/api/models/operations/UpdatePermissionResponse.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortex.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexAzureOpenAI.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexByMarkdownHeader.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexByProgrammingLanguage.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexBySeparator.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexCohere.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexCredentials.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexEmbedding.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexFake.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexFieldNameMappingConfigModel.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexIndexing.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexLanguage.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexMode.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexOpenAI.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexOpenAICompatible.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexProcessingConfigModel.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingMode.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasMode.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingMode.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterMode.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode.java create mode 100644 src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexTextSplitter.java create mode 100644 src/main/java/com/airbyte/api/models/shared/PermissionResponseRead.java create mode 100644 src/main/java/com/airbyte/api/models/shared/PermissionScope.java create mode 100644 src/main/java/com/airbyte/api/models/shared/PermissionUpdateRequest.java create mode 100644 src/main/java/com/airbyte/api/models/shared/PermissionsResponse.java create mode 100644 src/main/java/com/airbyte/api/models/shared/SnowflakeCortex.java diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 016f7a50b..2591b0c94 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 5b16d152-46cd-4f0b-94e9-018ca2cfe7cd management: - docChecksum: ab106dd2601bf059efdd48ec5506ba14 + docChecksum: 241d5a786e59837e86f30500836a2a90 docVersion: 1.0.0 - speakeasyVersion: 1.289.0 - generationVersion: 2.331.0 - releaseVersion: 1.1.0 - configChecksum: 23fb99a81bdff98cc99acd3191b7eff8 + speakeasyVersion: 1.291.0 + generationVersion: 2.332.4 + releaseVersion: 1.2.0 + configChecksum: b53aff002349322b6b6b122cd37a265e repoURL: https://github.com/airbytehq/airbyte-api-java-sdk.git repoSubDirectory: . published: true @@ -18,56 +18,55 @@ features: globalSecurity: 2.82.5 globalSecurityCallbacks: 0.1.0 globalServerURLs: 2.82.1 + groups: 2.81.2 nullables: 0.1.0 sdkHooks: 0.1.0 unions: 0.0.3 generatedFiles: - src/main/java/com/airbyte/api/SecuritySource.java - src/main/java/com/airbyte/api/SDKConfiguration.java - - src/main/java/com/airbyte/api/PublicConnections.java - - src/main/java/com/airbyte/api/Public.java - src/main/java/com/airbyte/api/Connections.java - - src/main/java/com/airbyte/api/PublicDestinations.java - src/main/java/com/airbyte/api/Destinations.java - - src/main/java/com/airbyte/api/PublicJobs.java + - src/main/java/com/airbyte/api/Health.java - src/main/java/com/airbyte/api/Jobs.java - - src/main/java/com/airbyte/api/PublicPermissions.java - src/main/java/com/airbyte/api/Permissions.java - - src/main/java/com/airbyte/api/PublicSources.java - src/main/java/com/airbyte/api/Sources.java - - src/main/java/com/airbyte/api/PublicStreams.java - src/main/java/com/airbyte/api/Streams.java - - src/main/java/com/airbyte/api/PublicWorkspaces.java - src/main/java/com/airbyte/api/Workspaces.java - src/main/java/com/airbyte/api/models/operations/CreateConnectionRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/DeleteConnectionRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/GetConnectionRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/ListConnectionsRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/PatchConnectionRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/CancelJobRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/CreateDestinationRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/DeleteDestinationRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/GetDestinationRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/ListDestinationsRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/PatchDestinationRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/PutDestinationRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/GetHealthCheckRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/CancelJobRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/CreateJobRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/CreateOrUpdateWorkspaceOAuthCredentialsRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/GetJobRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/ListJobsRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/CreatePermissionRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/DeletePermissionRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/GetPermissionRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/ListPermissionsRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/UpdatePermissionRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/CreateSourceRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/CreateWorkspaceRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/DeleteDestinationRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/DeleteSourceRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/DeleteWorkspaceRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/GetDestinationRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/GetJobRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/GetSourceRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/GetStreamPropertiesRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/GetWorkspaceRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/InitiateOAuthRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/ListDestinationsRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/ListJobsRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/ListSourcesRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/ListWorkspacesRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/PatchDestinationRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/PatchSourceRequestBuilder.java - - src/main/java/com/airbyte/api/models/operations/PutDestinationRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/PutSourceRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/GetStreamPropertiesRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/CreateOrUpdateWorkspaceOAuthCredentialsRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/CreateWorkspaceRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/DeleteWorkspaceRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/GetWorkspaceRequestBuilder.java + - src/main/java/com/airbyte/api/models/operations/ListWorkspacesRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/UpdateWorkspaceRequestBuilder.java - src/main/java/com/airbyte/api/models/operations/SDKMethodInterfaces.java - src/main/java/com/airbyte/api/Airbyte.java @@ -120,48 +119,57 @@ generatedFiles: - src/main/java/com/airbyte/api/models/operations/ListConnectionsResponse.java - src/main/java/com/airbyte/api/models/operations/PatchConnectionRequest.java - src/main/java/com/airbyte/api/models/operations/PatchConnectionResponse.java - - src/main/java/com/airbyte/api/models/operations/CancelJobRequest.java - - src/main/java/com/airbyte/api/models/operations/CancelJobResponse.java - src/main/java/com/airbyte/api/models/operations/CreateDestinationResponse.java - - src/main/java/com/airbyte/api/models/operations/CreateJobResponse.java - - src/main/java/com/airbyte/api/models/operations/CreateOrUpdateWorkspaceOAuthCredentialsRequest.java - - src/main/java/com/airbyte/api/models/operations/CreateOrUpdateWorkspaceOAuthCredentialsResponse.java - - src/main/java/com/airbyte/api/models/operations/CreatePermissionResponse.java - - src/main/java/com/airbyte/api/models/operations/CreateSourceResponse.java - - src/main/java/com/airbyte/api/models/operations/CreateWorkspaceResponse.java - src/main/java/com/airbyte/api/models/operations/DeleteDestinationRequest.java - src/main/java/com/airbyte/api/models/operations/DeleteDestinationResponse.java - - src/main/java/com/airbyte/api/models/operations/DeleteSourceRequest.java - - src/main/java/com/airbyte/api/models/operations/DeleteSourceResponse.java - - src/main/java/com/airbyte/api/models/operations/DeleteWorkspaceRequest.java - - src/main/java/com/airbyte/api/models/operations/DeleteWorkspaceResponse.java - src/main/java/com/airbyte/api/models/operations/GetDestinationRequest.java - src/main/java/com/airbyte/api/models/operations/GetDestinationResponse.java + - src/main/java/com/airbyte/api/models/operations/ListDestinationsRequest.java + - src/main/java/com/airbyte/api/models/operations/ListDestinationsResponse.java + - src/main/java/com/airbyte/api/models/operations/PatchDestinationRequest.java + - src/main/java/com/airbyte/api/models/operations/PatchDestinationResponse.java + - src/main/java/com/airbyte/api/models/operations/PutDestinationRequest.java + - src/main/java/com/airbyte/api/models/operations/PutDestinationResponse.java + - src/main/java/com/airbyte/api/models/operations/GetHealthCheckResponse.java + - src/main/java/com/airbyte/api/models/operations/CancelJobRequest.java + - src/main/java/com/airbyte/api/models/operations/CancelJobResponse.java + - src/main/java/com/airbyte/api/models/operations/CreateJobResponse.java - src/main/java/com/airbyte/api/models/operations/GetJobRequest.java - src/main/java/com/airbyte/api/models/operations/GetJobResponse.java + - src/main/java/com/airbyte/api/models/operations/ListJobsRequest.java + - src/main/java/com/airbyte/api/models/operations/ListJobsResponse.java + - src/main/java/com/airbyte/api/models/operations/CreatePermissionResponse.java + - src/main/java/com/airbyte/api/models/operations/DeletePermissionRequest.java + - src/main/java/com/airbyte/api/models/operations/DeletePermissionResponse.java + - src/main/java/com/airbyte/api/models/operations/GetPermissionRequest.java + - src/main/java/com/airbyte/api/models/operations/GetPermissionResponse.java + - src/main/java/com/airbyte/api/models/operations/ListPermissionsRequest.java + - src/main/java/com/airbyte/api/models/operations/ListPermissionsResponse.java + - src/main/java/com/airbyte/api/models/operations/UpdatePermissionRequest.java + - src/main/java/com/airbyte/api/models/operations/UpdatePermissionResponse.java + - src/main/java/com/airbyte/api/models/operations/CreateSourceResponse.java + - src/main/java/com/airbyte/api/models/operations/DeleteSourceRequest.java + - src/main/java/com/airbyte/api/models/operations/DeleteSourceResponse.java - src/main/java/com/airbyte/api/models/operations/GetSourceRequest.java - src/main/java/com/airbyte/api/models/operations/GetSourceResponse.java - - src/main/java/com/airbyte/api/models/operations/GetStreamPropertiesRequest.java - - src/main/java/com/airbyte/api/models/operations/GetStreamPropertiesResponse.java - - src/main/java/com/airbyte/api/models/operations/GetWorkspaceRequest.java - - src/main/java/com/airbyte/api/models/operations/GetWorkspaceResponse.java - src/main/java/com/airbyte/api/models/operations/InitiateOAuthResponse.java - - src/main/java/com/airbyte/api/models/operations/ListDestinationsRequest.java - - src/main/java/com/airbyte/api/models/operations/ListDestinationsResponse.java - - src/main/java/com/airbyte/api/models/operations/ListJobsRequest.java - - src/main/java/com/airbyte/api/models/operations/ListJobsResponse.java - src/main/java/com/airbyte/api/models/operations/ListSourcesRequest.java - src/main/java/com/airbyte/api/models/operations/ListSourcesResponse.java - - src/main/java/com/airbyte/api/models/operations/ListWorkspacesRequest.java - - src/main/java/com/airbyte/api/models/operations/ListWorkspacesResponse.java - - src/main/java/com/airbyte/api/models/operations/PatchDestinationRequest.java - - src/main/java/com/airbyte/api/models/operations/PatchDestinationResponse.java - src/main/java/com/airbyte/api/models/operations/PatchSourceRequest.java - src/main/java/com/airbyte/api/models/operations/PatchSourceResponse.java - - src/main/java/com/airbyte/api/models/operations/PutDestinationRequest.java - - src/main/java/com/airbyte/api/models/operations/PutDestinationResponse.java - src/main/java/com/airbyte/api/models/operations/PutSourceRequest.java - src/main/java/com/airbyte/api/models/operations/PutSourceResponse.java + - src/main/java/com/airbyte/api/models/operations/GetStreamPropertiesRequest.java + - src/main/java/com/airbyte/api/models/operations/GetStreamPropertiesResponse.java + - src/main/java/com/airbyte/api/models/operations/CreateOrUpdateWorkspaceOAuthCredentialsRequest.java + - src/main/java/com/airbyte/api/models/operations/CreateOrUpdateWorkspaceOAuthCredentialsResponse.java + - src/main/java/com/airbyte/api/models/operations/CreateWorkspaceResponse.java + - src/main/java/com/airbyte/api/models/operations/DeleteWorkspaceRequest.java + - src/main/java/com/airbyte/api/models/operations/DeleteWorkspaceResponse.java + - src/main/java/com/airbyte/api/models/operations/GetWorkspaceRequest.java + - src/main/java/com/airbyte/api/models/operations/GetWorkspaceResponse.java + - src/main/java/com/airbyte/api/models/operations/ListWorkspacesRequest.java + - src/main/java/com/airbyte/api/models/operations/ListWorkspacesResponse.java - src/main/java/com/airbyte/api/models/operations/UpdateWorkspaceRequest.java - src/main/java/com/airbyte/api/models/operations/UpdateWorkspaceResponse.java - src/main/java/com/airbyte/api/models/shared/ConnectionResponse.java @@ -182,9 +190,6 @@ generatedFiles: - src/main/java/com/airbyte/api/models/shared/NonBreakingSchemaUpdatesBehaviorEnumNoDefault.java - src/main/java/com/airbyte/api/models/shared/NamespaceDefinitionEnumNoDefault.java - src/main/java/com/airbyte/api/models/shared/GeographyEnumNoDefault.java - - src/main/java/com/airbyte/api/models/shared/JobResponse.java - - src/main/java/com/airbyte/api/models/shared/JobStatusEnum.java - - src/main/java/com/airbyte/api/models/shared/JobTypeEnum.java - src/main/java/com/airbyte/api/models/shared/DestinationResponse.java - src/main/java/com/airbyte/api/models/shared/DestinationConfiguration.java - src/main/java/com/airbyte/api/models/shared/AuthenticationViaGoogleOAuth.java @@ -605,6 +610,31 @@ generatedFiles: - src/main/java/com/airbyte/api/models/shared/AuthorizationMethod.java - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeSnowflake.java - src/main/java/com/airbyte/api/models/shared/DestinationSnowflake.java + - src/main/java/com/airbyte/api/models/shared/SnowflakeCortex.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexOpenAICompatible.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexAzureOpenAI.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingMode.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexFake.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasMode.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexCohere.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexMode.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexOpenAI.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexEmbedding.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexCredentials.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexIndexing.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexFieldNameMappingConfigModel.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexLanguage.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexByProgrammingLanguage.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterMode.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexByMarkdownHeader.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingMode.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexBySeparator.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexTextSplitter.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexProcessingConfigModel.java + - src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortex.java - src/main/java/com/airbyte/api/models/shared/Teradata.java - src/main/java/com/airbyte/api/models/shared/DestinationTeradataSchemasSSLModeSSLModes6Mode.java - src/main/java/com/airbyte/api/models/shared/DestinationTeradataVerifyFull.java @@ -685,91 +715,21 @@ generatedFiles: - src/main/java/com/airbyte/api/models/shared/DestinationYellowbrickSSHTunnelMethod.java - src/main/java/com/airbyte/api/models/shared/DestinationYellowbrick.java - src/main/java/com/airbyte/api/models/shared/DestinationCreateRequest.java + - src/main/java/com/airbyte/api/models/shared/DestinationsResponse.java + - src/main/java/com/airbyte/api/models/shared/DestinationPatchRequest.java + - src/main/java/com/airbyte/api/models/shared/DestinationPutRequest.java + - src/main/java/com/airbyte/api/models/shared/JobResponse.java + - src/main/java/com/airbyte/api/models/shared/JobStatusEnum.java + - src/main/java/com/airbyte/api/models/shared/JobTypeEnum.java - src/main/java/com/airbyte/api/models/shared/JobCreateRequest.java - - src/main/java/com/airbyte/api/models/shared/WorkspaceOAuthCredentialsRequest.java - - src/main/java/com/airbyte/api/models/shared/OAuthActorNames.java - - src/main/java/com/airbyte/api/models/shared/OAuthCredentialsConfiguration.java - - src/main/java/com/airbyte/api/models/shared/Credentials.java - - src/main/java/com/airbyte/api/models/shared/Airtable.java - - src/main/java/com/airbyte/api/models/shared/AmazonAds.java - - src/main/java/com/airbyte/api/models/shared/AmazonSellerPartner.java - - src/main/java/com/airbyte/api/models/shared/AsanaCredentials.java - - src/main/java/com/airbyte/api/models/shared/Asana.java - - src/main/java/com/airbyte/api/models/shared/AzureBlobStorageCredentials.java - - src/main/java/com/airbyte/api/models/shared/AzureBlobStorage.java - - src/main/java/com/airbyte/api/models/shared/BingAds.java - - src/main/java/com/airbyte/api/models/shared/FacebookMarketing.java - - src/main/java/com/airbyte/api/models/shared/GithubCredentials.java - - src/main/java/com/airbyte/api/models/shared/Github.java - - src/main/java/com/airbyte/api/models/shared/GitlabCredentials.java - - src/main/java/com/airbyte/api/models/shared/Gitlab.java - - src/main/java/com/airbyte/api/models/shared/GoogleAdsCredentials.java - - src/main/java/com/airbyte/api/models/shared/GoogleAds.java - - src/main/java/com/airbyte/api/models/shared/GoogleAnalyticsDataApiCredentials.java - - src/main/java/com/airbyte/api/models/shared/GoogleAnalyticsDataApi.java - - src/main/java/com/airbyte/api/models/shared/GoogleDriveCredentials.java - - src/main/java/com/airbyte/api/models/shared/GoogleDrive.java - - src/main/java/com/airbyte/api/models/shared/Authorization.java - - src/main/java/com/airbyte/api/models/shared/GoogleSearchConsole.java - - src/main/java/com/airbyte/api/models/shared/GoogleSheetsCredentials.java - - src/main/java/com/airbyte/api/models/shared/GoogleSheets.java - - src/main/java/com/airbyte/api/models/shared/HubspotCredentials.java - - src/main/java/com/airbyte/api/models/shared/Hubspot.java - - src/main/java/com/airbyte/api/models/shared/Instagram.java - - src/main/java/com/airbyte/api/models/shared/Intercom.java - - src/main/java/com/airbyte/api/models/shared/LeverHiringCredentials.java - - src/main/java/com/airbyte/api/models/shared/LeverHiring.java - - src/main/java/com/airbyte/api/models/shared/LinkedinAdsCredentials.java - - src/main/java/com/airbyte/api/models/shared/LinkedinAds.java - - src/main/java/com/airbyte/api/models/shared/MailchimpCredentials.java - - src/main/java/com/airbyte/api/models/shared/Mailchimp.java - - src/main/java/com/airbyte/api/models/shared/MicrosoftOnedriveCredentials.java - - src/main/java/com/airbyte/api/models/shared/MicrosoftOnedrive.java - - src/main/java/com/airbyte/api/models/shared/MicrosoftSharepointCredentials.java - - src/main/java/com/airbyte/api/models/shared/MicrosoftSharepoint.java - - src/main/java/com/airbyte/api/models/shared/MicrosoftTeamsCredentials.java - - src/main/java/com/airbyte/api/models/shared/MicrosoftTeams.java - - src/main/java/com/airbyte/api/models/shared/MondayCredentials.java - - src/main/java/com/airbyte/api/models/shared/Monday.java - - src/main/java/com/airbyte/api/models/shared/NotionCredentials.java - - src/main/java/com/airbyte/api/models/shared/Notion.java - - src/main/java/com/airbyte/api/models/shared/PinterestCredentials.java - - src/main/java/com/airbyte/api/models/shared/Pinterest.java - - src/main/java/com/airbyte/api/models/shared/RetentlyCredentials.java - - src/main/java/com/airbyte/api/models/shared/Retently.java - - src/main/java/com/airbyte/api/models/shared/Salesforce.java - - src/main/java/com/airbyte/api/models/shared/ShopifyCredentials.java - - src/main/java/com/airbyte/api/models/shared/Shopify.java - - src/main/java/com/airbyte/api/models/shared/SlackCredentials.java - - src/main/java/com/airbyte/api/models/shared/Slack.java - - src/main/java/com/airbyte/api/models/shared/SmartsheetsCredentials.java - - src/main/java/com/airbyte/api/models/shared/Smartsheets.java - - src/main/java/com/airbyte/api/models/shared/SnapchatMarketing.java - - src/main/java/com/airbyte/api/models/shared/SnowflakeCredentials.java - - src/main/java/com/airbyte/api/models/shared/Snowflake.java - - src/main/java/com/airbyte/api/models/shared/SquareCredentials.java - - src/main/java/com/airbyte/api/models/shared/Square.java - - src/main/java/com/airbyte/api/models/shared/Strava.java - - src/main/java/com/airbyte/api/models/shared/SurveymonkeyCredentials.java - - src/main/java/com/airbyte/api/models/shared/Surveymonkey.java - - src/main/java/com/airbyte/api/models/shared/TiktokMarketingCredentials.java - - src/main/java/com/airbyte/api/models/shared/TiktokMarketing.java - - src/main/java/com/airbyte/api/models/shared/TypeformCredentials.java - - src/main/java/com/airbyte/api/models/shared/Typeform.java - - src/main/java/com/airbyte/api/models/shared/YoutubeAnalyticsCredentials.java - - src/main/java/com/airbyte/api/models/shared/YoutubeAnalytics.java - - src/main/java/com/airbyte/api/models/shared/ZendeskChatCredentials.java - - src/main/java/com/airbyte/api/models/shared/ZendeskChat.java - - src/main/java/com/airbyte/api/models/shared/ZendeskSunshineCredentials.java - - src/main/java/com/airbyte/api/models/shared/ZendeskSunshine.java - - src/main/java/com/airbyte/api/models/shared/ZendeskSupportCredentials.java - - src/main/java/com/airbyte/api/models/shared/ZendeskSupport.java - - src/main/java/com/airbyte/api/models/shared/ZendeskTalkCredentials.java - - src/main/java/com/airbyte/api/models/shared/ZendeskTalk.java - - src/main/java/com/airbyte/api/models/shared/ActorTypeEnum.java + - src/main/java/com/airbyte/api/models/shared/JobsResponse.java - src/main/java/com/airbyte/api/models/shared/PermissionResponse.java - src/main/java/com/airbyte/api/models/shared/PermissionType.java - src/main/java/com/airbyte/api/models/shared/PermissionCreateRequest.java + - src/main/java/com/airbyte/api/models/shared/PermissionsResponse.java + - src/main/java/com/airbyte/api/models/shared/PermissionResponseRead.java + - src/main/java/com/airbyte/api/models/shared/PermissionScope.java + - src/main/java/com/airbyte/api/models/shared/PermissionUpdateRequest.java - src/main/java/com/airbyte/api/models/shared/SourceResponse.java - src/main/java/com/airbyte/api/models/shared/SourceConfiguration.java - src/main/java/com/airbyte/api/models/shared/Aha.java @@ -1970,18 +1930,95 @@ generatedFiles: - src/main/java/com/airbyte/api/models/shared/Zoom.java - src/main/java/com/airbyte/api/models/shared/SourceZoom.java - src/main/java/com/airbyte/api/models/shared/SourceCreateRequest.java - - src/main/java/com/airbyte/api/models/shared/WorkspaceResponse.java - - src/main/java/com/airbyte/api/models/shared/WorkspaceCreateRequest.java - - src/main/java/com/airbyte/api/models/shared/StreamProperties.java - src/main/java/com/airbyte/api/models/shared/InitiateOauthRequest.java - - src/main/java/com/airbyte/api/models/shared/DestinationsResponse.java - - src/main/java/com/airbyte/api/models/shared/JobsResponse.java + - src/main/java/com/airbyte/api/models/shared/OAuthActorNames.java - src/main/java/com/airbyte/api/models/shared/SourcesResponse.java - - src/main/java/com/airbyte/api/models/shared/WorkspacesResponse.java - - src/main/java/com/airbyte/api/models/shared/DestinationPatchRequest.java - src/main/java/com/airbyte/api/models/shared/SourcePatchRequest.java - - src/main/java/com/airbyte/api/models/shared/DestinationPutRequest.java - src/main/java/com/airbyte/api/models/shared/SourcePutRequest.java + - src/main/java/com/airbyte/api/models/shared/StreamProperties.java + - src/main/java/com/airbyte/api/models/shared/WorkspaceOAuthCredentialsRequest.java + - src/main/java/com/airbyte/api/models/shared/OAuthCredentialsConfiguration.java + - src/main/java/com/airbyte/api/models/shared/Credentials.java + - src/main/java/com/airbyte/api/models/shared/Airtable.java + - src/main/java/com/airbyte/api/models/shared/AmazonAds.java + - src/main/java/com/airbyte/api/models/shared/AmazonSellerPartner.java + - src/main/java/com/airbyte/api/models/shared/AsanaCredentials.java + - src/main/java/com/airbyte/api/models/shared/Asana.java + - src/main/java/com/airbyte/api/models/shared/AzureBlobStorageCredentials.java + - src/main/java/com/airbyte/api/models/shared/AzureBlobStorage.java + - src/main/java/com/airbyte/api/models/shared/BingAds.java + - src/main/java/com/airbyte/api/models/shared/FacebookMarketing.java + - src/main/java/com/airbyte/api/models/shared/GithubCredentials.java + - src/main/java/com/airbyte/api/models/shared/Github.java + - src/main/java/com/airbyte/api/models/shared/GitlabCredentials.java + - src/main/java/com/airbyte/api/models/shared/Gitlab.java + - src/main/java/com/airbyte/api/models/shared/GoogleAdsCredentials.java + - src/main/java/com/airbyte/api/models/shared/GoogleAds.java + - src/main/java/com/airbyte/api/models/shared/GoogleAnalyticsDataApiCredentials.java + - src/main/java/com/airbyte/api/models/shared/GoogleAnalyticsDataApi.java + - src/main/java/com/airbyte/api/models/shared/GoogleDriveCredentials.java + - src/main/java/com/airbyte/api/models/shared/GoogleDrive.java + - src/main/java/com/airbyte/api/models/shared/Authorization.java + - src/main/java/com/airbyte/api/models/shared/GoogleSearchConsole.java + - src/main/java/com/airbyte/api/models/shared/GoogleSheetsCredentials.java + - src/main/java/com/airbyte/api/models/shared/GoogleSheets.java + - src/main/java/com/airbyte/api/models/shared/HubspotCredentials.java + - src/main/java/com/airbyte/api/models/shared/Hubspot.java + - src/main/java/com/airbyte/api/models/shared/Instagram.java + - src/main/java/com/airbyte/api/models/shared/Intercom.java + - src/main/java/com/airbyte/api/models/shared/LeverHiringCredentials.java + - src/main/java/com/airbyte/api/models/shared/LeverHiring.java + - src/main/java/com/airbyte/api/models/shared/LinkedinAdsCredentials.java + - src/main/java/com/airbyte/api/models/shared/LinkedinAds.java + - src/main/java/com/airbyte/api/models/shared/MailchimpCredentials.java + - src/main/java/com/airbyte/api/models/shared/Mailchimp.java + - src/main/java/com/airbyte/api/models/shared/MicrosoftOnedriveCredentials.java + - src/main/java/com/airbyte/api/models/shared/MicrosoftOnedrive.java + - src/main/java/com/airbyte/api/models/shared/MicrosoftSharepointCredentials.java + - src/main/java/com/airbyte/api/models/shared/MicrosoftSharepoint.java + - src/main/java/com/airbyte/api/models/shared/MicrosoftTeamsCredentials.java + - src/main/java/com/airbyte/api/models/shared/MicrosoftTeams.java + - src/main/java/com/airbyte/api/models/shared/MondayCredentials.java + - src/main/java/com/airbyte/api/models/shared/Monday.java + - src/main/java/com/airbyte/api/models/shared/NotionCredentials.java + - src/main/java/com/airbyte/api/models/shared/Notion.java + - src/main/java/com/airbyte/api/models/shared/PinterestCredentials.java + - src/main/java/com/airbyte/api/models/shared/Pinterest.java + - src/main/java/com/airbyte/api/models/shared/RetentlyCredentials.java + - src/main/java/com/airbyte/api/models/shared/Retently.java + - src/main/java/com/airbyte/api/models/shared/Salesforce.java + - src/main/java/com/airbyte/api/models/shared/ShopifyCredentials.java + - src/main/java/com/airbyte/api/models/shared/Shopify.java + - src/main/java/com/airbyte/api/models/shared/SlackCredentials.java + - src/main/java/com/airbyte/api/models/shared/Slack.java + - src/main/java/com/airbyte/api/models/shared/SmartsheetsCredentials.java + - src/main/java/com/airbyte/api/models/shared/Smartsheets.java + - src/main/java/com/airbyte/api/models/shared/SnapchatMarketing.java + - src/main/java/com/airbyte/api/models/shared/SnowflakeCredentials.java + - src/main/java/com/airbyte/api/models/shared/Snowflake.java + - src/main/java/com/airbyte/api/models/shared/SquareCredentials.java + - src/main/java/com/airbyte/api/models/shared/Square.java + - src/main/java/com/airbyte/api/models/shared/Strava.java + - src/main/java/com/airbyte/api/models/shared/SurveymonkeyCredentials.java + - src/main/java/com/airbyte/api/models/shared/Surveymonkey.java + - src/main/java/com/airbyte/api/models/shared/TiktokMarketingCredentials.java + - src/main/java/com/airbyte/api/models/shared/TiktokMarketing.java + - src/main/java/com/airbyte/api/models/shared/TypeformCredentials.java + - src/main/java/com/airbyte/api/models/shared/Typeform.java + - src/main/java/com/airbyte/api/models/shared/YoutubeAnalyticsCredentials.java + - src/main/java/com/airbyte/api/models/shared/YoutubeAnalytics.java + - src/main/java/com/airbyte/api/models/shared/ZendeskChatCredentials.java + - src/main/java/com/airbyte/api/models/shared/ZendeskChat.java + - src/main/java/com/airbyte/api/models/shared/ZendeskSunshineCredentials.java + - src/main/java/com/airbyte/api/models/shared/ZendeskSunshine.java + - src/main/java/com/airbyte/api/models/shared/ZendeskSupportCredentials.java + - src/main/java/com/airbyte/api/models/shared/ZendeskSupport.java + - src/main/java/com/airbyte/api/models/shared/ZendeskTalkCredentials.java + - src/main/java/com/airbyte/api/models/shared/ZendeskTalk.java + - src/main/java/com/airbyte/api/models/shared/ActorTypeEnum.java + - src/main/java/com/airbyte/api/models/shared/WorkspaceResponse.java + - src/main/java/com/airbyte/api/models/shared/WorkspaceCreateRequest.java + - src/main/java/com/airbyte/api/models/shared/WorkspacesResponse.java - src/main/java/com/airbyte/api/models/shared/WorkspaceUpdateRequest.java - src/main/java/com/airbyte/api/models/shared/Security.java - src/main/java/com/airbyte/api/models/shared/SchemeBasicAuth.java @@ -1994,48 +2031,57 @@ generatedFiles: - docs/models/operations/ListConnectionsResponse.md - docs/models/operations/PatchConnectionRequest.md - docs/models/operations/PatchConnectionResponse.md - - docs/models/operations/CancelJobRequest.md - - docs/models/operations/CancelJobResponse.md - docs/models/operations/CreateDestinationResponse.md - - docs/models/operations/CreateJobResponse.md - - docs/models/operations/CreateOrUpdateWorkspaceOAuthCredentialsRequest.md - - docs/models/operations/CreateOrUpdateWorkspaceOAuthCredentialsResponse.md - - docs/models/operations/CreatePermissionResponse.md - - docs/models/operations/CreateSourceResponse.md - - docs/models/operations/CreateWorkspaceResponse.md - docs/models/operations/DeleteDestinationRequest.md - docs/models/operations/DeleteDestinationResponse.md - - docs/models/operations/DeleteSourceRequest.md - - docs/models/operations/DeleteSourceResponse.md - - docs/models/operations/DeleteWorkspaceRequest.md - - docs/models/operations/DeleteWorkspaceResponse.md - docs/models/operations/GetDestinationRequest.md - docs/models/operations/GetDestinationResponse.md + - docs/models/operations/ListDestinationsRequest.md + - docs/models/operations/ListDestinationsResponse.md + - docs/models/operations/PatchDestinationRequest.md + - docs/models/operations/PatchDestinationResponse.md + - docs/models/operations/PutDestinationRequest.md + - docs/models/operations/PutDestinationResponse.md + - docs/models/operations/GetHealthCheckResponse.md + - docs/models/operations/CancelJobRequest.md + - docs/models/operations/CancelJobResponse.md + - docs/models/operations/CreateJobResponse.md - docs/models/operations/GetJobRequest.md - docs/models/operations/GetJobResponse.md + - docs/models/operations/ListJobsRequest.md + - docs/models/operations/ListJobsResponse.md + - docs/models/operations/CreatePermissionResponse.md + - docs/models/operations/DeletePermissionRequest.md + - docs/models/operations/DeletePermissionResponse.md + - docs/models/operations/GetPermissionRequest.md + - docs/models/operations/GetPermissionResponse.md + - docs/models/operations/ListPermissionsRequest.md + - docs/models/operations/ListPermissionsResponse.md + - docs/models/operations/UpdatePermissionRequest.md + - docs/models/operations/UpdatePermissionResponse.md + - docs/models/operations/CreateSourceResponse.md + - docs/models/operations/DeleteSourceRequest.md + - docs/models/operations/DeleteSourceResponse.md - docs/models/operations/GetSourceRequest.md - docs/models/operations/GetSourceResponse.md - - docs/models/operations/GetStreamPropertiesRequest.md - - docs/models/operations/GetStreamPropertiesResponse.md - - docs/models/operations/GetWorkspaceRequest.md - - docs/models/operations/GetWorkspaceResponse.md - docs/models/operations/InitiateOAuthResponse.md - - docs/models/operations/ListDestinationsRequest.md - - docs/models/operations/ListDestinationsResponse.md - - docs/models/operations/ListJobsRequest.md - - docs/models/operations/ListJobsResponse.md - docs/models/operations/ListSourcesRequest.md - docs/models/operations/ListSourcesResponse.md - - docs/models/operations/ListWorkspacesRequest.md - - docs/models/operations/ListWorkspacesResponse.md - - docs/models/operations/PatchDestinationRequest.md - - docs/models/operations/PatchDestinationResponse.md - docs/models/operations/PatchSourceRequest.md - docs/models/operations/PatchSourceResponse.md - - docs/models/operations/PutDestinationRequest.md - - docs/models/operations/PutDestinationResponse.md - docs/models/operations/PutSourceRequest.md - docs/models/operations/PutSourceResponse.md + - docs/models/operations/GetStreamPropertiesRequest.md + - docs/models/operations/GetStreamPropertiesResponse.md + - docs/models/operations/CreateOrUpdateWorkspaceOAuthCredentialsRequest.md + - docs/models/operations/CreateOrUpdateWorkspaceOAuthCredentialsResponse.md + - docs/models/operations/CreateWorkspaceResponse.md + - docs/models/operations/DeleteWorkspaceRequest.md + - docs/models/operations/DeleteWorkspaceResponse.md + - docs/models/operations/GetWorkspaceRequest.md + - docs/models/operations/GetWorkspaceResponse.md + - docs/models/operations/ListWorkspacesRequest.md + - docs/models/operations/ListWorkspacesResponse.md - docs/models/operations/UpdateWorkspaceRequest.md - docs/models/operations/UpdateWorkspaceResponse.md - docs/models/shared/ConnectionResponse.md @@ -2056,9 +2102,6 @@ generatedFiles: - docs/models/shared/NonBreakingSchemaUpdatesBehaviorEnumNoDefault.md - docs/models/shared/NamespaceDefinitionEnumNoDefault.md - docs/models/shared/GeographyEnumNoDefault.md - - docs/models/shared/JobResponse.md - - docs/models/shared/JobStatusEnum.md - - docs/models/shared/JobTypeEnum.md - docs/models/shared/DestinationResponse.md - docs/models/shared/DestinationConfiguration.md - docs/models/shared/AuthenticationViaGoogleOAuth.md @@ -2479,6 +2522,31 @@ generatedFiles: - docs/models/shared/AuthorizationMethod.md - docs/models/shared/DestinationSnowflakeSnowflake.md - docs/models/shared/DestinationSnowflake.md + - docs/models/shared/SnowflakeCortex.md + - docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode.md + - docs/models/shared/DestinationSnowflakeCortexOpenAICompatible.md + - docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode.md + - docs/models/shared/DestinationSnowflakeCortexAzureOpenAI.md + - docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingMode.md + - docs/models/shared/DestinationSnowflakeCortexFake.md + - docs/models/shared/DestinationSnowflakeCortexSchemasMode.md + - docs/models/shared/DestinationSnowflakeCortexCohere.md + - docs/models/shared/DestinationSnowflakeCortexMode.md + - docs/models/shared/DestinationSnowflakeCortexOpenAI.md + - docs/models/shared/DestinationSnowflakeCortexEmbedding.md + - docs/models/shared/DestinationSnowflakeCortexCredentials.md + - docs/models/shared/DestinationSnowflakeCortexIndexing.md + - docs/models/shared/DestinationSnowflakeCortexFieldNameMappingConfigModel.md + - docs/models/shared/DestinationSnowflakeCortexLanguage.md + - docs/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode.md + - docs/models/shared/DestinationSnowflakeCortexByProgrammingLanguage.md + - docs/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterMode.md + - docs/models/shared/DestinationSnowflakeCortexByMarkdownHeader.md + - docs/models/shared/DestinationSnowflakeCortexSchemasProcessingMode.md + - docs/models/shared/DestinationSnowflakeCortexBySeparator.md + - docs/models/shared/DestinationSnowflakeCortexTextSplitter.md + - docs/models/shared/DestinationSnowflakeCortexProcessingConfigModel.md + - docs/models/shared/DestinationSnowflakeCortex.md - docs/models/shared/Teradata.md - docs/models/shared/DestinationTeradataSchemasSSLModeSSLModes6Mode.md - docs/models/shared/DestinationTeradataVerifyFull.md @@ -2559,91 +2627,21 @@ generatedFiles: - docs/models/shared/DestinationYellowbrickSSHTunnelMethod.md - docs/models/shared/DestinationYellowbrick.md - docs/models/shared/DestinationCreateRequest.md + - docs/models/shared/DestinationsResponse.md + - docs/models/shared/DestinationPatchRequest.md + - docs/models/shared/DestinationPutRequest.md + - docs/models/shared/JobResponse.md + - docs/models/shared/JobStatusEnum.md + - docs/models/shared/JobTypeEnum.md - docs/models/shared/JobCreateRequest.md - - docs/models/shared/WorkspaceOAuthCredentialsRequest.md - - docs/models/shared/OAuthActorNames.md - - docs/models/shared/OAuthCredentialsConfiguration.md - - docs/models/shared/Credentials.md - - docs/models/shared/Airtable.md - - docs/models/shared/AmazonAds.md - - docs/models/shared/AmazonSellerPartner.md - - docs/models/shared/AsanaCredentials.md - - docs/models/shared/Asana.md - - docs/models/shared/AzureBlobStorageCredentials.md - - docs/models/shared/AzureBlobStorage.md - - docs/models/shared/BingAds.md - - docs/models/shared/FacebookMarketing.md - - docs/models/shared/GithubCredentials.md - - docs/models/shared/Github.md - - docs/models/shared/GitlabCredentials.md - - docs/models/shared/Gitlab.md - - docs/models/shared/GoogleAdsCredentials.md - - docs/models/shared/GoogleAds.md - - docs/models/shared/GoogleAnalyticsDataApiCredentials.md - - docs/models/shared/GoogleAnalyticsDataApi.md - - docs/models/shared/GoogleDriveCredentials.md - - docs/models/shared/GoogleDrive.md - - docs/models/shared/Authorization.md - - docs/models/shared/GoogleSearchConsole.md - - docs/models/shared/GoogleSheetsCredentials.md - - docs/models/shared/GoogleSheets.md - - docs/models/shared/HubspotCredentials.md - - docs/models/shared/Hubspot.md - - docs/models/shared/Instagram.md - - docs/models/shared/Intercom.md - - docs/models/shared/LeverHiringCredentials.md - - docs/models/shared/LeverHiring.md - - docs/models/shared/LinkedinAdsCredentials.md - - docs/models/shared/LinkedinAds.md - - docs/models/shared/MailchimpCredentials.md - - docs/models/shared/Mailchimp.md - - docs/models/shared/MicrosoftOnedriveCredentials.md - - docs/models/shared/MicrosoftOnedrive.md - - docs/models/shared/MicrosoftSharepointCredentials.md - - docs/models/shared/MicrosoftSharepoint.md - - docs/models/shared/MicrosoftTeamsCredentials.md - - docs/models/shared/MicrosoftTeams.md - - docs/models/shared/MondayCredentials.md - - docs/models/shared/Monday.md - - docs/models/shared/NotionCredentials.md - - docs/models/shared/Notion.md - - docs/models/shared/PinterestCredentials.md - - docs/models/shared/Pinterest.md - - docs/models/shared/RetentlyCredentials.md - - docs/models/shared/Retently.md - - docs/models/shared/Salesforce.md - - docs/models/shared/ShopifyCredentials.md - - docs/models/shared/Shopify.md - - docs/models/shared/SlackCredentials.md - - docs/models/shared/Slack.md - - docs/models/shared/SmartsheetsCredentials.md - - docs/models/shared/Smartsheets.md - - docs/models/shared/SnapchatMarketing.md - - docs/models/shared/SnowflakeCredentials.md - - docs/models/shared/Snowflake.md - - docs/models/shared/SquareCredentials.md - - docs/models/shared/Square.md - - docs/models/shared/Strava.md - - docs/models/shared/SurveymonkeyCredentials.md - - docs/models/shared/Surveymonkey.md - - docs/models/shared/TiktokMarketingCredentials.md - - docs/models/shared/TiktokMarketing.md - - docs/models/shared/TypeformCredentials.md - - docs/models/shared/Typeform.md - - docs/models/shared/YoutubeAnalyticsCredentials.md - - docs/models/shared/YoutubeAnalytics.md - - docs/models/shared/ZendeskChatCredentials.md - - docs/models/shared/ZendeskChat.md - - docs/models/shared/ZendeskSunshineCredentials.md - - docs/models/shared/ZendeskSunshine.md - - docs/models/shared/ZendeskSupportCredentials.md - - docs/models/shared/ZendeskSupport.md - - docs/models/shared/ZendeskTalkCredentials.md - - docs/models/shared/ZendeskTalk.md - - docs/models/shared/ActorTypeEnum.md + - docs/models/shared/JobsResponse.md - docs/models/shared/PermissionResponse.md - docs/models/shared/PermissionType.md - docs/models/shared/PermissionCreateRequest.md + - docs/models/shared/PermissionsResponse.md + - docs/models/shared/PermissionResponseRead.md + - docs/models/shared/PermissionScope.md + - docs/models/shared/PermissionUpdateRequest.md - docs/models/shared/SourceResponse.md - docs/models/shared/SourceConfiguration.md - docs/models/shared/Aha.md @@ -3844,35 +3842,105 @@ generatedFiles: - docs/models/shared/Zoom.md - docs/models/shared/SourceZoom.md - docs/models/shared/SourceCreateRequest.md - - docs/models/shared/WorkspaceResponse.md - - docs/models/shared/WorkspaceCreateRequest.md - - docs/models/shared/StreamProperties.md - docs/models/shared/InitiateOauthRequest.md - - docs/models/shared/DestinationsResponse.md - - docs/models/shared/JobsResponse.md + - docs/models/shared/OAuthActorNames.md - docs/models/shared/SourcesResponse.md - - docs/models/shared/WorkspacesResponse.md - - docs/models/shared/DestinationPatchRequest.md - docs/models/shared/SourcePatchRequest.md - - docs/models/shared/DestinationPutRequest.md - docs/models/shared/SourcePutRequest.md + - docs/models/shared/StreamProperties.md + - docs/models/shared/WorkspaceOAuthCredentialsRequest.md + - docs/models/shared/OAuthCredentialsConfiguration.md + - docs/models/shared/Credentials.md + - docs/models/shared/Airtable.md + - docs/models/shared/AmazonAds.md + - docs/models/shared/AmazonSellerPartner.md + - docs/models/shared/AsanaCredentials.md + - docs/models/shared/Asana.md + - docs/models/shared/AzureBlobStorageCredentials.md + - docs/models/shared/AzureBlobStorage.md + - docs/models/shared/BingAds.md + - docs/models/shared/FacebookMarketing.md + - docs/models/shared/GithubCredentials.md + - docs/models/shared/Github.md + - docs/models/shared/GitlabCredentials.md + - docs/models/shared/Gitlab.md + - docs/models/shared/GoogleAdsCredentials.md + - docs/models/shared/GoogleAds.md + - docs/models/shared/GoogleAnalyticsDataApiCredentials.md + - docs/models/shared/GoogleAnalyticsDataApi.md + - docs/models/shared/GoogleDriveCredentials.md + - docs/models/shared/GoogleDrive.md + - docs/models/shared/Authorization.md + - docs/models/shared/GoogleSearchConsole.md + - docs/models/shared/GoogleSheetsCredentials.md + - docs/models/shared/GoogleSheets.md + - docs/models/shared/HubspotCredentials.md + - docs/models/shared/Hubspot.md + - docs/models/shared/Instagram.md + - docs/models/shared/Intercom.md + - docs/models/shared/LeverHiringCredentials.md + - docs/models/shared/LeverHiring.md + - docs/models/shared/LinkedinAdsCredentials.md + - docs/models/shared/LinkedinAds.md + - docs/models/shared/MailchimpCredentials.md + - docs/models/shared/Mailchimp.md + - docs/models/shared/MicrosoftOnedriveCredentials.md + - docs/models/shared/MicrosoftOnedrive.md + - docs/models/shared/MicrosoftSharepointCredentials.md + - docs/models/shared/MicrosoftSharepoint.md + - docs/models/shared/MicrosoftTeamsCredentials.md + - docs/models/shared/MicrosoftTeams.md + - docs/models/shared/MondayCredentials.md + - docs/models/shared/Monday.md + - docs/models/shared/NotionCredentials.md + - docs/models/shared/Notion.md + - docs/models/shared/PinterestCredentials.md + - docs/models/shared/Pinterest.md + - docs/models/shared/RetentlyCredentials.md + - docs/models/shared/Retently.md + - docs/models/shared/Salesforce.md + - docs/models/shared/ShopifyCredentials.md + - docs/models/shared/Shopify.md + - docs/models/shared/SlackCredentials.md + - docs/models/shared/Slack.md + - docs/models/shared/SmartsheetsCredentials.md + - docs/models/shared/Smartsheets.md + - docs/models/shared/SnapchatMarketing.md + - docs/models/shared/SnowflakeCredentials.md + - docs/models/shared/Snowflake.md + - docs/models/shared/SquareCredentials.md + - docs/models/shared/Square.md + - docs/models/shared/Strava.md + - docs/models/shared/SurveymonkeyCredentials.md + - docs/models/shared/Surveymonkey.md + - docs/models/shared/TiktokMarketingCredentials.md + - docs/models/shared/TiktokMarketing.md + - docs/models/shared/TypeformCredentials.md + - docs/models/shared/Typeform.md + - docs/models/shared/YoutubeAnalyticsCredentials.md + - docs/models/shared/YoutubeAnalytics.md + - docs/models/shared/ZendeskChatCredentials.md + - docs/models/shared/ZendeskChat.md + - docs/models/shared/ZendeskSunshineCredentials.md + - docs/models/shared/ZendeskSunshine.md + - docs/models/shared/ZendeskSupportCredentials.md + - docs/models/shared/ZendeskSupport.md + - docs/models/shared/ZendeskTalkCredentials.md + - docs/models/shared/ZendeskTalk.md + - docs/models/shared/ActorTypeEnum.md + - docs/models/shared/WorkspaceResponse.md + - docs/models/shared/WorkspaceCreateRequest.md + - docs/models/shared/WorkspacesResponse.md - docs/models/shared/WorkspaceUpdateRequest.md - docs/models/shared/Security.md - docs/models/shared/SchemeBasicAuth.md - docs/sdks/airbyte/README.md - - docs/sdks/publicconnections/README.md - - docs/sdks/public/README.md - docs/sdks/connections/README.md - - docs/sdks/publicdestinations/README.md - docs/sdks/destinations/README.md - - docs/sdks/publicjobs/README.md + - docs/sdks/health/README.md - docs/sdks/jobs/README.md - - docs/sdks/publicpermissions/README.md - docs/sdks/permissions/README.md - - docs/sdks/publicsources/README.md - docs/sdks/sources/README.md - - docs/sdks/publicstreams/README.md - docs/sdks/streams/README.md - - docs/sdks/publicworkspaces/README.md - docs/sdks/workspaces/README.md - USAGE.md diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index cbadf0f35..9536dda05 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.289.0 +speakeasyVersion: 1.291.0 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:e2938740e6abed08a354142314cefb69fcd49c3745c84c348f66eb69f0073d9d - sourceBlobDigest: sha256:3434f26a0b6a2b11edcca0817eac6ab6c26bef5c026c80e6125073a6e719933b + sourceRevisionDigest: sha256:f30dd93c1451c32647ed528bfe75a845852a4626ef075f25fef425ef5e6418c7 + sourceBlobDigest: sha256:a156e20e873eee6682ba598d7a347db8c8bb1a8d0a6116b1bb5162d6531df49b tags: - latest - main @@ -11,8 +11,8 @@ targets: airbyte-api: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:e2938740e6abed08a354142314cefb69fcd49c3745c84c348f66eb69f0073d9d - sourceBlobDigest: sha256:3434f26a0b6a2b11edcca0817eac6ab6c26bef5c026c80e6125073a6e719933b + sourceRevisionDigest: sha256:f30dd93c1451c32647ed528bfe75a845852a4626ef075f25fef425ef5e6418c7 + sourceBlobDigest: sha256:a156e20e873eee6682ba598d7a347db8c8bb1a8d0a6116b1bb5162d6531df49b outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/README.md b/README.md index ca9790625..1e22bf5e7 100755 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.airbyte.api:public-api:1.1.0' +implementation 'com.airbyte.api:public-api:1.2.0' ``` Maven: @@ -32,7 +32,7 @@ Maven: com.airbyte.api public-api - 1.1.0 + 1.2.0 ``` @@ -90,7 +90,7 @@ public class Application { .namespaceFormat("${SOURCE_NAMESPACE}") .build(); - CreateConnectionResponse res = sdk.publicConnections().createConnection() + CreateConnectionResponse res = sdk.connections().createConnection() .request(req) .call(); @@ -112,47 +112,6 @@ public class Application { ## Available Resources and Operations -### [publicConnections()](docs/sdks/publicconnections/README.md) - -* [createConnection](docs/sdks/publicconnections/README.md#createconnection) - Create a connection -* [deleteConnection](docs/sdks/publicconnections/README.md#deleteconnection) - Delete a Connection -* [getConnection](docs/sdks/publicconnections/README.md#getconnection) - Get Connection details -* [listConnections](docs/sdks/publicconnections/README.md#listconnections) - List connections -* [patchConnection](docs/sdks/publicconnections/README.md#patchconnection) - Update Connection details - -### [public_()](docs/sdks/public/README.md) - -* [cancelJob](docs/sdks/public/README.md#canceljob) - Cancel a running Job -* [createConnection](docs/sdks/public/README.md#createconnection) - Create a connection -* [createDestination](docs/sdks/public/README.md#createdestination) - Create a destination -* [createJob](docs/sdks/public/README.md#createjob) - Trigger a sync or reset job of a connection -* [createOrUpdateWorkspaceOAuthCredentials](docs/sdks/public/README.md#createorupdateworkspaceoauthcredentials) - Create OAuth override credentials for a workspace and source type. -* [createPermission](docs/sdks/public/README.md#createpermission) - Create a permission -* [createSource](docs/sdks/public/README.md#createsource) - Create a source -* [createWorkspace](docs/sdks/public/README.md#createworkspace) - Create a workspace -* [deleteConnection](docs/sdks/public/README.md#deleteconnection) - Delete a Connection -* [deleteDestination](docs/sdks/public/README.md#deletedestination) - Delete a Destination -* [deleteSource](docs/sdks/public/README.md#deletesource) - Delete a Source -* [deleteWorkspace](docs/sdks/public/README.md#deleteworkspace) - Delete a Workspace -* [getConnection](docs/sdks/public/README.md#getconnection) - Get Connection details -* [getDestination](docs/sdks/public/README.md#getdestination) - Get Destination details -* [getJob](docs/sdks/public/README.md#getjob) - Get Job status and details -* [getSource](docs/sdks/public/README.md#getsource) - Get Source details -* [getStreamProperties](docs/sdks/public/README.md#getstreamproperties) - Get stream properties -* [getWorkspace](docs/sdks/public/README.md#getworkspace) - Get Workspace details -* [initiateOAuth](docs/sdks/public/README.md#initiateoauth) - Initiate OAuth for a source -* [listConnections](docs/sdks/public/README.md#listconnections) - List connections -* [listDestinations](docs/sdks/public/README.md#listdestinations) - List destinations -* [listJobs](docs/sdks/public/README.md#listjobs) - List Jobs by sync type -* [listSources](docs/sdks/public/README.md#listsources) - List sources -* [listWorkspaces](docs/sdks/public/README.md#listworkspaces) - List workspaces -* [patchConnection](docs/sdks/public/README.md#patchconnection) - Update Connection details -* [patchDestination](docs/sdks/public/README.md#patchdestination) - Update a Destination -* [patchSource](docs/sdks/public/README.md#patchsource) - Update a Source -* [putDestination](docs/sdks/public/README.md#putdestination) - Update a Destination and fully overwrite it -* [putSource](docs/sdks/public/README.md#putsource) - Update a Source and fully overwrite it -* [updateWorkspace](docs/sdks/public/README.md#updateworkspace) - Update a workspace - ### [connections()](docs/sdks/connections/README.md) * [createConnection](docs/sdks/connections/README.md#createconnection) - Create a connection @@ -161,15 +120,6 @@ public class Application { * [listConnections](docs/sdks/connections/README.md#listconnections) - List connections * [patchConnection](docs/sdks/connections/README.md#patchconnection) - Update Connection details -### [publicDestinations()](docs/sdks/publicdestinations/README.md) - -* [createDestination](docs/sdks/publicdestinations/README.md#createdestination) - Create a destination -* [deleteDestination](docs/sdks/publicdestinations/README.md#deletedestination) - Delete a Destination -* [getDestination](docs/sdks/publicdestinations/README.md#getdestination) - Get Destination details -* [listDestinations](docs/sdks/publicdestinations/README.md#listdestinations) - List destinations -* [patchDestination](docs/sdks/publicdestinations/README.md#patchdestination) - Update a Destination -* [putDestination](docs/sdks/publicdestinations/README.md#putdestination) - Update a Destination and fully overwrite it - ### [destinations()](docs/sdks/destinations/README.md) * [createDestination](docs/sdks/destinations/README.md#createdestination) - Create a destination @@ -179,12 +129,9 @@ public class Application { * [patchDestination](docs/sdks/destinations/README.md#patchdestination) - Update a Destination * [putDestination](docs/sdks/destinations/README.md#putdestination) - Update a Destination and fully overwrite it -### [publicJobs()](docs/sdks/publicjobs/README.md) +### [health()](docs/sdks/health/README.md) -* [cancelJob](docs/sdks/publicjobs/README.md#canceljob) - Cancel a running Job -* [createJob](docs/sdks/publicjobs/README.md#createjob) - Trigger a sync or reset job of a connection -* [getJob](docs/sdks/publicjobs/README.md#getjob) - Get Job status and details -* [listJobs](docs/sdks/publicjobs/README.md#listjobs) - List Jobs by sync type +* [getHealthCheck](docs/sdks/health/README.md#gethealthcheck) - Health Check ### [jobs()](docs/sdks/jobs/README.md) @@ -193,23 +140,13 @@ public class Application { * [getJob](docs/sdks/jobs/README.md#getjob) - Get Job status and details * [listJobs](docs/sdks/jobs/README.md#listjobs) - List Jobs by sync type -### [publicPermissions()](docs/sdks/publicpermissions/README.md) - -* [createPermission](docs/sdks/publicpermissions/README.md#createpermission) - Create a permission - ### [permissions()](docs/sdks/permissions/README.md) * [createPermission](docs/sdks/permissions/README.md#createpermission) - Create a permission - -### [publicSources()](docs/sdks/publicsources/README.md) - -* [createSource](docs/sdks/publicsources/README.md#createsource) - Create a source -* [deleteSource](docs/sdks/publicsources/README.md#deletesource) - Delete a Source -* [getSource](docs/sdks/publicsources/README.md#getsource) - Get Source details -* [initiateOAuth](docs/sdks/publicsources/README.md#initiateoauth) - Initiate OAuth for a source -* [listSources](docs/sdks/publicsources/README.md#listsources) - List sources -* [patchSource](docs/sdks/publicsources/README.md#patchsource) - Update a Source -* [putSource](docs/sdks/publicsources/README.md#putsource) - Update a Source and fully overwrite it +* [deletePermission](docs/sdks/permissions/README.md#deletepermission) - Delete a Permission +* [getPermission](docs/sdks/permissions/README.md#getpermission) - Get Permission details +* [listPermissions](docs/sdks/permissions/README.md#listpermissions) - List Permissions by user id +* [updatePermission](docs/sdks/permissions/README.md#updatepermission) - Update a permission ### [sources()](docs/sdks/sources/README.md) @@ -221,23 +158,10 @@ public class Application { * [patchSource](docs/sdks/sources/README.md#patchsource) - Update a Source * [putSource](docs/sdks/sources/README.md#putsource) - Update a Source and fully overwrite it -### [publicStreams()](docs/sdks/publicstreams/README.md) - -* [getStreamProperties](docs/sdks/publicstreams/README.md#getstreamproperties) - Get stream properties - ### [streams()](docs/sdks/streams/README.md) * [getStreamProperties](docs/sdks/streams/README.md#getstreamproperties) - Get stream properties -### [publicWorkspaces()](docs/sdks/publicworkspaces/README.md) - -* [createOrUpdateWorkspaceOAuthCredentials](docs/sdks/publicworkspaces/README.md#createorupdateworkspaceoauthcredentials) - Create OAuth override credentials for a workspace and source type. -* [createWorkspace](docs/sdks/publicworkspaces/README.md#createworkspace) - Create a workspace -* [deleteWorkspace](docs/sdks/publicworkspaces/README.md#deleteworkspace) - Delete a Workspace -* [getWorkspace](docs/sdks/publicworkspaces/README.md#getworkspace) - Get Workspace details -* [listWorkspaces](docs/sdks/publicworkspaces/README.md#listworkspaces) - List workspaces -* [updateWorkspace](docs/sdks/publicworkspaces/README.md#updateworkspace) - Update a workspace - ### [workspaces()](docs/sdks/workspaces/README.md) * [createOrUpdateWorkspaceOAuthCredentials](docs/sdks/workspaces/README.md#createorupdateworkspaceoauthcredentials) - Create OAuth override credentials for a workspace and source type. @@ -298,7 +222,7 @@ public class Application { .namespaceFormat("${SOURCE_NAMESPACE}") .build(); - CreateConnectionResponse res = sdk.publicConnections().createConnection() + CreateConnectionResponse res = sdk.connections().createConnection() .request(req) .call(); @@ -355,7 +279,7 @@ public class Application { .namespaceFormat("${SOURCE_NAMESPACE}") .build(); - CreateConnectionResponse res = sdk.publicConnections().createConnection() + CreateConnectionResponse res = sdk.connections().createConnection() .request(req) .call(); @@ -419,7 +343,7 @@ public class Application { .namespaceFormat("${SOURCE_NAMESPACE}") .build(); - CreateConnectionResponse res = sdk.publicConnections().createConnection() + CreateConnectionResponse res = sdk.connections().createConnection() .request(req) .call(); @@ -486,7 +410,7 @@ public class Application { .namespaceFormat("${SOURCE_NAMESPACE}") .build(); - CreateConnectionResponse res = sdk.publicConnections().createConnection() + CreateConnectionResponse res = sdk.connections().createConnection() .request(req) .call(); diff --git a/RELEASES.md b/RELEASES.md index 641ba1d8c..8035942dd 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1031,4 +1031,14 @@ Based on: ### Generated - [java v1.1.0] . ### Releases -- [Maven Central v1.1.0] https://central.sonatype.com/artifact/com.airbyte/api/1.1.0 - . \ No newline at end of file +- [Maven Central v1.1.0] https://central.sonatype.com/artifact/com.airbyte/api/1.1.0 - . + +## 2024-05-15 22:25:49 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.291.0 (2.332.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v1.2.0] . +### Releases +- [Maven Central v1.2.0] https://central.sonatype.com/artifact/com.airbyte/api/1.2.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index e6b574738..d4efe95b5 100644 --- a/USAGE.md +++ b/USAGE.md @@ -33,7 +33,7 @@ public class Application { .namespaceFormat("${SOURCE_NAMESPACE}") .build(); - CreateConnectionResponse res = sdk.publicConnections().createConnection() + CreateConnectionResponse res = sdk.connections().createConnection() .request(req) .call(); diff --git a/build.gradle b/build.gradle index 6e27b76c8..f039cef12 100644 --- a/build.gradle +++ b/build.gradle @@ -65,7 +65,7 @@ publishing { maven(MavenPublication) { groupId = 'com.airbyte' artifactId = 'api' - version = '1.1.0' + version = '1.2.0' from components.java diff --git a/docs/models/operations/DeletePermissionRequest.md b/docs/models/operations/DeletePermissionRequest.md new file mode 100644 index 000000000..591f3e94a --- /dev/null +++ b/docs/models/operations/DeletePermissionRequest.md @@ -0,0 +1,8 @@ +# DeletePermissionRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `permissionId` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/DeletePermissionResponse.md b/docs/models/operations/DeletePermissionResponse.md new file mode 100644 index 000000000..4fe7da7e3 --- /dev/null +++ b/docs/models/operations/DeletePermissionResponse.md @@ -0,0 +1,10 @@ +# DeletePermissionResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/GetHealthCheckResponse.md b/docs/models/operations/GetHealthCheckResponse.md new file mode 100644 index 000000000..99d2c07f0 --- /dev/null +++ b/docs/models/operations/GetHealthCheckResponse.md @@ -0,0 +1,10 @@ +# GetHealthCheckResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/GetPermissionRequest.md b/docs/models/operations/GetPermissionRequest.md new file mode 100644 index 000000000..9eca4892e --- /dev/null +++ b/docs/models/operations/GetPermissionRequest.md @@ -0,0 +1,8 @@ +# GetPermissionRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `permissionId` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/GetPermissionResponse.md b/docs/models/operations/GetPermissionResponse.md new file mode 100644 index 000000000..21be692bf --- /dev/null +++ b/docs/models/operations/GetPermissionResponse.md @@ -0,0 +1,11 @@ +# GetPermissionResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `permissionResponse` | [Optional](../../models/shared/PermissionResponse.md) | :heavy_minus_sign: | Get a Permission by the id in the path. | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/ListPermissionsRequest.md b/docs/models/operations/ListPermissionsRequest.md new file mode 100644 index 000000000..747e49eda --- /dev/null +++ b/docs/models/operations/ListPermissionsRequest.md @@ -0,0 +1,8 @@ +# ListPermissionsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `userId` | *Optional* | :heavy_minus_sign: | User Id in permission. | \ No newline at end of file diff --git a/docs/models/operations/ListPermissionsResponse.md b/docs/models/operations/ListPermissionsResponse.md new file mode 100644 index 000000000..6733e8066 --- /dev/null +++ b/docs/models/operations/ListPermissionsResponse.md @@ -0,0 +1,11 @@ +# ListPermissionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `permissionsResponse` | [Optional](../../models/shared/PermissionsResponse.md) | :heavy_minus_sign: | List Permissions. | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/operations/UpdatePermissionRequest.md b/docs/models/operations/UpdatePermissionRequest.md new file mode 100644 index 000000000..5f1e0ed92 --- /dev/null +++ b/docs/models/operations/UpdatePermissionRequest.md @@ -0,0 +1,9 @@ +# UpdatePermissionRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `permissionUpdateRequest` | [com.airbyte.api.models.shared.PermissionUpdateRequest](../../models/shared/PermissionUpdateRequest.md) | :heavy_check_mark: | N/A | +| `permissionId` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/UpdatePermissionResponse.md b/docs/models/operations/UpdatePermissionResponse.md new file mode 100644 index 000000000..c7f0b0123 --- /dev/null +++ b/docs/models/operations/UpdatePermissionResponse.md @@ -0,0 +1,11 @@ +# UpdatePermissionResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `permissionResponse` | [Optional](../../models/shared/PermissionResponse.md) | :heavy_minus_sign: | Successful updated | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/shared/DestinationRedshift.md b/docs/models/shared/DestinationRedshift.md index d8e63df4a..4785e25da 100644 --- a/docs/models/shared/DestinationRedshift.md +++ b/docs/models/shared/DestinationRedshift.md @@ -3,17 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `database` | *String* | :heavy_check_mark: | Name of the database. | | -| `destinationType` | [com.airbyte.api.models.shared.Redshift](../../models/shared/Redshift.md) | :heavy_check_mark: | N/A | | -| `disableTypeDedupe` | *Optional* | :heavy_minus_sign: | Disable Writing Final Tables. WARNING! The data format in _airbyte_data is likely stable but there are no guarantees that other metadata columns will remain the same in future versions | | -| `host` | *String* | :heavy_check_mark: | Host Endpoint of the Redshift Cluster (must include the cluster-id, region and end with .redshift.amazonaws.com) | | -| `jdbcUrlParams` | *Optional* | :heavy_minus_sign: | Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3). | | -| `password` | *String* | :heavy_check_mark: | Password associated with the username. | | -| `port` | *Optional* | :heavy_minus_sign: | Port of the database. | 5439 | -| `rawDataSchema` | *Optional* | :heavy_minus_sign: | The schema to write raw tables into (default: airbyte_internal). | | -| `schema` | *Optional* | :heavy_minus_sign: | The default schema tables are written to if the source does not specify a namespace. Unless specifically configured, the usual value for this field is "public". | public | -| `tunnelMethod` | [Optional](../../models/shared/DestinationRedshiftSSHTunnelMethod.md) | :heavy_minus_sign: | Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use. | | -| `uploadingMethod` | [Optional](../../models/shared/UploadingMethod.md) | :heavy_minus_sign: | The way data will be uploaded to Redshift. | | -| `username` | *String* | :heavy_check_mark: | Username to use to access the database. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `database` | *String* | :heavy_check_mark: | Name of the database. | | +| `destinationType` | [com.airbyte.api.models.shared.Redshift](../../models/shared/Redshift.md) | :heavy_check_mark: | N/A | | +| `disableTypeDedupe` | *Optional* | :heavy_minus_sign: | Disable Writing Final Tables. WARNING! The data format in _airbyte_data is likely stable but there are no guarantees that other metadata columns will remain the same in future versions | | +| `dropCascade` | *Optional* | :heavy_minus_sign: | Drop tables with CASCADE. WARNING! This will delete all data in all dependent objects (views, etc.). Use with caution. This option is intended for usecases which can easily rebuild the dependent objects. | | +| `host` | *String* | :heavy_check_mark: | Host Endpoint of the Redshift Cluster (must include the cluster-id, region and end with .redshift.amazonaws.com) | | +| `jdbcUrlParams` | *Optional* | :heavy_minus_sign: | Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3). | | +| `password` | *String* | :heavy_check_mark: | Password associated with the username. | | +| `port` | *Optional* | :heavy_minus_sign: | Port of the database. | 5439 | +| `rawDataSchema` | *Optional* | :heavy_minus_sign: | The schema to write raw tables into (default: airbyte_internal). | | +| `schema` | *Optional* | :heavy_minus_sign: | The default schema tables are written to if the source does not specify a namespace. Unless specifically configured, the usual value for this field is "public". | public | +| `tunnelMethod` | [Optional](../../models/shared/DestinationRedshiftSSHTunnelMethod.md) | :heavy_minus_sign: | Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use. | | +| `uploadingMethod` | [Optional](../../models/shared/UploadingMethod.md) | :heavy_minus_sign: | The way data will be uploaded to Redshift. | | +| `username` | *String* | :heavy_check_mark: | Username to use to access the database. | | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortex.md b/docs/models/shared/DestinationSnowflakeCortex.md new file mode 100644 index 000000000..d0953cec7 --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortex.md @@ -0,0 +1,23 @@ +# DestinationSnowflakeCortex + +The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration, +as well as to provide type safety for the configuration passed to the destination. + +The configuration model is composed of four parts: +* Processing configuration +* Embedding configuration +* Indexing configuration +* Advanced configuration + +Processing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `destinationType` | [com.airbyte.api.models.shared.SnowflakeCortex](../../models/shared/SnowflakeCortex.md) | :heavy_check_mark: | N/A | +| `embedding` | [com.airbyte.api.models.shared.DestinationSnowflakeCortexEmbedding](../../models/shared/DestinationSnowflakeCortexEmbedding.md) | :heavy_check_mark: | Embedding configuration | +| `indexing` | [com.airbyte.api.models.shared.DestinationSnowflakeCortexIndexing](../../models/shared/DestinationSnowflakeCortexIndexing.md) | :heavy_check_mark: | Snowflake can be used to store vector data and retrieve embeddings. | +| `omitRawText` | *Optional* | :heavy_minus_sign: | Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source. | +| `processing` | [com.airbyte.api.models.shared.DestinationSnowflakeCortexProcessingConfigModel](../../models/shared/DestinationSnowflakeCortexProcessingConfigModel.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexAzureOpenAI.md b/docs/models/shared/DestinationSnowflakeCortexAzureOpenAI.md new file mode 100644 index 000000000..518b2c0f8 --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexAzureOpenAI.md @@ -0,0 +1,13 @@ +# DestinationSnowflakeCortexAzureOpenAI + +Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `apiBase` | *String* | :heavy_check_mark: | The base URL for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource | https://your-resource-name.openai.azure.com | +| `deployment` | *String* | :heavy_check_mark: | The deployment for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource | your-resource-name | +| `mode` | [Optional](../../models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode.md) | :heavy_minus_sign: | N/A | | +| `openaiKey` | *String* | :heavy_check_mark: | The API key for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource | | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexByMarkdownHeader.md b/docs/models/shared/DestinationSnowflakeCortexByMarkdownHeader.md new file mode 100644 index 000000000..f60ac6222 --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexByMarkdownHeader.md @@ -0,0 +1,11 @@ +# DestinationSnowflakeCortexByMarkdownHeader + +Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mode` | [Optional](../../models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterMode.md) | :heavy_minus_sign: | N/A | +| `splitLevel` | *Optional* | :heavy_minus_sign: | Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexByProgrammingLanguage.md b/docs/models/shared/DestinationSnowflakeCortexByProgrammingLanguage.md new file mode 100644 index 000000000..adb721b41 --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexByProgrammingLanguage.md @@ -0,0 +1,11 @@ +# DestinationSnowflakeCortexByProgrammingLanguage + +Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `language` | [com.airbyte.api.models.shared.DestinationSnowflakeCortexLanguage](../../models/shared/DestinationSnowflakeCortexLanguage.md) | :heavy_check_mark: | Split code in suitable places based on the programming language | +| `mode` | [Optional](../../models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexBySeparator.md b/docs/models/shared/DestinationSnowflakeCortexBySeparator.md new file mode 100644 index 000000000..92669149b --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexBySeparator.md @@ -0,0 +1,12 @@ +# DestinationSnowflakeCortexBySeparator + +Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `keepSeparator` | *Optional* | :heavy_minus_sign: | Whether to keep the separator in the resulting chunks | +| `mode` | [Optional](../../models/shared/DestinationSnowflakeCortexSchemasProcessingMode.md) | :heavy_minus_sign: | N/A | +| `separators` | List<*String*> | :heavy_minus_sign: | List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use ".". To split by a newline, use "\n". | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexCohere.md b/docs/models/shared/DestinationSnowflakeCortexCohere.md new file mode 100644 index 000000000..d63d4de53 --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexCohere.md @@ -0,0 +1,11 @@ +# DestinationSnowflakeCortexCohere + +Use the Cohere API to embed text. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `cohereKey` | *String* | :heavy_check_mark: | N/A | +| `mode` | [Optional](../../models/shared/DestinationSnowflakeCortexSchemasMode.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexCredentials.md b/docs/models/shared/DestinationSnowflakeCortexCredentials.md new file mode 100644 index 000000000..a23e0e55d --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexCredentials.md @@ -0,0 +1,8 @@ +# DestinationSnowflakeCortexCredentials + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `password` | *String* | :heavy_check_mark: | Enter the password you want to use to access the database | AIRBYTE_PASSWORD | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexEmbedding.md b/docs/models/shared/DestinationSnowflakeCortexEmbedding.md new file mode 100644 index 000000000..81a15386a --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexEmbedding.md @@ -0,0 +1,4 @@ +# DestinationSnowflakeCortexEmbedding + +Embedding configuration + diff --git a/docs/models/shared/DestinationSnowflakeCortexFake.md b/docs/models/shared/DestinationSnowflakeCortexFake.md new file mode 100644 index 000000000..8de92ce71 --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexFake.md @@ -0,0 +1,10 @@ +# DestinationSnowflakeCortexFake + +Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `mode` | [Optional](../../models/shared/DestinationSnowflakeCortexSchemasEmbeddingMode.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexFieldNameMappingConfigModel.md b/docs/models/shared/DestinationSnowflakeCortexFieldNameMappingConfigModel.md new file mode 100644 index 000000000..ed2c6fb5a --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexFieldNameMappingConfigModel.md @@ -0,0 +1,9 @@ +# DestinationSnowflakeCortexFieldNameMappingConfigModel + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `fromField` | *String* | :heavy_check_mark: | The field name in the source | +| `toField` | *String* | :heavy_check_mark: | The field name to use in the destination | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexIndexing.md b/docs/models/shared/DestinationSnowflakeCortexIndexing.md new file mode 100644 index 000000000..2eb925191 --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexIndexing.md @@ -0,0 +1,16 @@ +# DestinationSnowflakeCortexIndexing + +Snowflake can be used to store vector data and retrieve embeddings. + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `credentials` | [com.airbyte.api.models.shared.DestinationSnowflakeCortexCredentials](../../models/shared/DestinationSnowflakeCortexCredentials.md) | :heavy_check_mark: | N/A | | +| `database` | *String* | :heavy_check_mark: | Enter the name of the database that you want to sync data into | AIRBYTE_DATABASE | +| `defaultSchema` | *String* | :heavy_check_mark: | Enter the name of the default schema | AIRBYTE_SCHEMA | +| `host` | *String* | :heavy_check_mark: | Enter the account name you want to use to access the database. This is usually the identifier before .snowflakecomputing.com | AIRBYTE_ACCOUNT | +| `role` | *String* | :heavy_check_mark: | Enter the role that you want to use to access Snowflake | AIRBYTE_ROLE | +| `username` | *String* | :heavy_check_mark: | Enter the name of the user you want to use to access the database | AIRBYTE_USER | +| `warehouse` | *String* | :heavy_check_mark: | Enter the name of the warehouse that you want to sync data into | AIRBYTE_WAREHOUSE | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexLanguage.md b/docs/models/shared/DestinationSnowflakeCortexLanguage.md new file mode 100644 index 000000000..38c645d4f --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexLanguage.md @@ -0,0 +1,25 @@ +# DestinationSnowflakeCortexLanguage + +Split code in suitable places based on the programming language + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `CPP` | cpp | +| `GO` | go | +| `JAVA` | java | +| `JS` | js | +| `PHP` | php | +| `PROTO` | proto | +| `PYTHON` | python | +| `RST` | rst | +| `RUBY` | ruby | +| `RUST` | rust | +| `SCALA` | scala | +| `SWIFT` | swift | +| `MARKDOWN` | markdown | +| `LATEX` | latex | +| `HTML` | html | +| `SOL` | sol | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexMode.md b/docs/models/shared/DestinationSnowflakeCortexMode.md new file mode 100644 index 000000000..6d124bbaf --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexMode.md @@ -0,0 +1,8 @@ +# DestinationSnowflakeCortexMode + + +## Values + +| Name | Value | +| -------- | -------- | +| `OPENAI` | openai | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexOpenAI.md b/docs/models/shared/DestinationSnowflakeCortexOpenAI.md new file mode 100644 index 000000000..6f3ba959e --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexOpenAI.md @@ -0,0 +1,11 @@ +# DestinationSnowflakeCortexOpenAI + +Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `mode` | [Optional](../../models/shared/DestinationSnowflakeCortexMode.md) | :heavy_minus_sign: | N/A | +| `openaiKey` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexOpenAICompatible.md b/docs/models/shared/DestinationSnowflakeCortexOpenAICompatible.md new file mode 100644 index 000000000..7530c2e8e --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexOpenAICompatible.md @@ -0,0 +1,14 @@ +# DestinationSnowflakeCortexOpenAICompatible + +Use a service that's compatible with the OpenAI API to embed text. + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `apiKey` | *Optional* | :heavy_minus_sign: | N/A | | +| `baseUrl` | *String* | :heavy_check_mark: | The base URL for your OpenAI-compatible service | https://your-service-name.com | +| `dimensions` | *long* | :heavy_check_mark: | The number of dimensions the embedding model is generating | 1536 | +| `mode` | [Optional](../../models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode.md) | :heavy_minus_sign: | N/A | | +| `modelName` | *Optional* | :heavy_minus_sign: | The name of the model to use for embedding | text-embedding-ada-002 | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexProcessingConfigModel.md b/docs/models/shared/DestinationSnowflakeCortexProcessingConfigModel.md new file mode 100644 index 000000000..aa1d6ad9d --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexProcessingConfigModel.md @@ -0,0 +1,13 @@ +# DestinationSnowflakeCortexProcessingConfigModel + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `chunkOverlap` | *Optional* | :heavy_minus_sign: | Size of overlap between chunks in tokens to store in vector store to better capture relevant context | | +| `chunkSize` | *long* | :heavy_check_mark: | Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM) | | +| `fieldNameMappings` | List<[com.airbyte.api.models.shared.DestinationSnowflakeCortexFieldNameMappingConfigModel](../../models/shared/DestinationSnowflakeCortexFieldNameMappingConfigModel.md)> | :heavy_minus_sign: | List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation. | | +| `metadataFields` | List<*String*> | :heavy_minus_sign: | List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path. | age | +| `textFields` | List<*String*> | :heavy_minus_sign: | List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. | text | +| `textSplitter` | [Optional](../../models/shared/DestinationSnowflakeCortexTextSplitter.md) | :heavy_minus_sign: | Split text fields into chunks based on the specified method. | | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode.md b/docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode.md new file mode 100644 index 000000000..0eed8dcf9 --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode.md @@ -0,0 +1,8 @@ +# DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `OPENAI_COMPATIBLE` | openai_compatible | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode.md b/docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode.md new file mode 100644 index 000000000..7feceddfc --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode.md @@ -0,0 +1,8 @@ +# DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `AZURE_OPENAI` | azure_openai | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingMode.md b/docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingMode.md new file mode 100644 index 000000000..7af3b919b --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexSchemasEmbeddingMode.md @@ -0,0 +1,8 @@ +# DestinationSnowflakeCortexSchemasEmbeddingMode + + +## Values + +| Name | Value | +| ------ | ------ | +| `FAKE` | fake | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexSchemasMode.md b/docs/models/shared/DestinationSnowflakeCortexSchemasMode.md new file mode 100644 index 000000000..cc02f7daf --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexSchemasMode.md @@ -0,0 +1,8 @@ +# DestinationSnowflakeCortexSchemasMode + + +## Values + +| Name | Value | +| -------- | -------- | +| `COHERE` | cohere | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexSchemasProcessingMode.md b/docs/models/shared/DestinationSnowflakeCortexSchemasProcessingMode.md new file mode 100644 index 000000000..7214b03b1 --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexSchemasProcessingMode.md @@ -0,0 +1,8 @@ +# DestinationSnowflakeCortexSchemasProcessingMode + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `SEPARATOR` | separator | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterMode.md b/docs/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterMode.md new file mode 100644 index 000000000..b2751e7ef --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterMode.md @@ -0,0 +1,8 @@ +# DestinationSnowflakeCortexSchemasProcessingTextSplitterMode + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `MARKDOWN` | markdown | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode.md b/docs/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode.md new file mode 100644 index 000000000..1ad7e9683 --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode.md @@ -0,0 +1,8 @@ +# DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode + + +## Values + +| Name | Value | +| ------ | ------ | +| `CODE` | code | \ No newline at end of file diff --git a/docs/models/shared/DestinationSnowflakeCortexTextSplitter.md b/docs/models/shared/DestinationSnowflakeCortexTextSplitter.md new file mode 100644 index 000000000..267def4a1 --- /dev/null +++ b/docs/models/shared/DestinationSnowflakeCortexTextSplitter.md @@ -0,0 +1,4 @@ +# DestinationSnowflakeCortexTextSplitter + +Split text fields into chunks based on the specified method. + diff --git a/docs/models/shared/PermissionResponseRead.md b/docs/models/shared/PermissionResponseRead.md new file mode 100644 index 000000000..5d68e1a9b --- /dev/null +++ b/docs/models/shared/PermissionResponseRead.md @@ -0,0 +1,14 @@ +# PermissionResponseRead + +Reformat PermissionResponse with permission scope + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `permissionId` | *String* | :heavy_check_mark: | N/A | +| `permissionType` | [com.airbyte.api.models.shared.PermissionType](../../models/shared/PermissionType.md) | :heavy_check_mark: | Describes what actions/endpoints the permission entitles to | +| `scope` | [com.airbyte.api.models.shared.PermissionScope](../../models/shared/PermissionScope.md) | :heavy_check_mark: | Scope of a single permission, e.g. workspace, organization | +| `scopeId` | *String* | :heavy_check_mark: | N/A | +| `userId` | *String* | :heavy_check_mark: | Internal Airbyte user ID | \ No newline at end of file diff --git a/docs/models/shared/PermissionScope.md b/docs/models/shared/PermissionScope.md new file mode 100644 index 000000000..edce27647 --- /dev/null +++ b/docs/models/shared/PermissionScope.md @@ -0,0 +1,12 @@ +# PermissionScope + +Scope of a single permission, e.g. workspace, organization + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `WORKSPACE` | workspace | +| `ORGANIZATION` | organization | +| `NONE` | none | \ No newline at end of file diff --git a/docs/models/shared/PermissionUpdateRequest.md b/docs/models/shared/PermissionUpdateRequest.md new file mode 100644 index 000000000..9aafe4431 --- /dev/null +++ b/docs/models/shared/PermissionUpdateRequest.md @@ -0,0 +1,8 @@ +# PermissionUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `permissionType` | [com.airbyte.api.models.shared.PermissionType](../../models/shared/PermissionType.md) | :heavy_check_mark: | Describes what actions/endpoints the permission entitles to | \ No newline at end of file diff --git a/docs/models/shared/PermissionsResponse.md b/docs/models/shared/PermissionsResponse.md new file mode 100644 index 000000000..0a32d704e --- /dev/null +++ b/docs/models/shared/PermissionsResponse.md @@ -0,0 +1,10 @@ +# PermissionsResponse + +List/Array of multiple permissions + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `data` | List<[com.airbyte.api.models.shared.PermissionResponseRead](../../models/shared/PermissionResponseRead.md)> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/SnowflakeCortex.md b/docs/models/shared/SnowflakeCortex.md new file mode 100644 index 000000000..41896281f --- /dev/null +++ b/docs/models/shared/SnowflakeCortex.md @@ -0,0 +1,8 @@ +# SnowflakeCortex + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `SNOWFLAKE_CORTEX` | snowflake-cortex | \ No newline at end of file diff --git a/docs/models/shared/SourceInsightly.md b/docs/models/shared/SourceInsightly.md index 7c73b860c..224725398 100644 --- a/docs/models/shared/SourceInsightly.md +++ b/docs/models/shared/SourceInsightly.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `sourceType` | [com.airbyte.api.models.shared.Insightly](../../models/shared/Insightly.md) | :heavy_check_mark: | N/A | | -| `startDate` | *Optional* | :heavy_check_mark: | The date from which you'd like to replicate data for Insightly in the format YYYY-MM-DDT00:00:00Z. All data generated after this date will be replicated. Note that it will be used only for incremental streams. | 2021-03-01T00:00:00Z | +| `startDate` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date from which you'd like to replicate data for Insightly in the format YYYY-MM-DDT00:00:00Z. All data generated after this date will be replicated. Note that it will be used only for incremental streams. | 2021-03-01T00:00:00Z | | `token` | *Optional* | :heavy_check_mark: | Your Insightly API token. | | \ No newline at end of file diff --git a/docs/sdks/health/README.md b/docs/sdks/health/README.md new file mode 100644 index 000000000..89481c32f --- /dev/null +++ b/docs/sdks/health/README.md @@ -0,0 +1,58 @@ +# Health +(*health()*) + +### Available Operations + +* [getHealthCheck](#gethealthcheck) - Health Check + +## getHealthCheck + +Health Check + +### Example Usage + +```java +package hello.world; + +import com.airbyte.api.Airbyte; +import com.airbyte.api.models.operations.*; +import com.airbyte.api.models.shared.*; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; +import static java.util.Map.entry; + +public class Application { + + public static void main(String[] args) throws Exception { + try { + Airbyte sdk = Airbyte.builder() + .build(); + + GetHealthCheckResponse res = sdk.health().getHealthCheck() + .call(); + + // handle response + } catch (com.airbyte.api.models.errors.SDKError e) { + // handle exception + throw e; + } catch (Exception e) { + // handle exception + throw e; + } + } +} +``` + + +### Response + +**[Optional](../../models/operations/GetHealthCheckResponse.md)** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/permissions/README.md b/docs/sdks/permissions/README.md index 3cf6afc2e..0a62cbb57 100644 --- a/docs/sdks/permissions/README.md +++ b/docs/sdks/permissions/README.md @@ -4,6 +4,10 @@ ### Available Operations * [createPermission](#createpermission) - Create a permission +* [deletePermission](#deletepermission) - Delete a Permission +* [getPermission](#getpermission) - Get Permission details +* [listPermissions](#listpermissions) - List Permissions by user id +* [updatePermission](#updatepermission) - Update a permission ## createPermission @@ -77,3 +81,291 @@ public class Application { | Error Object | Status Code | Content Type | | ---------------------- | ---------------------- | ---------------------- | | models/errors/SDKError | 4xx-5xx | */* | + +## deletePermission + +Delete a Permission + +### Example Usage + +```java +package hello.world; + +import com.airbyte.api.Airbyte; +import com.airbyte.api.models.operations.*; +import com.airbyte.api.models.shared.*; +import com.airbyte.api.models.shared.Security; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; +import static java.util.Map.entry; + +public class Application { + + public static void main(String[] args) throws Exception { + try { + Airbyte sdk = Airbyte.builder() + .security(Security.builder() + .basicAuth(SchemeBasicAuth.builder() + .password("") + .username("") + .build()) + .build()) + .build(); + + DeletePermissionRequest req = DeletePermissionRequest.builder() + .permissionId("") + .build(); + + DeletePermissionResponse res = sdk.permissions().deletePermission() + .request(req) + .call(); + + // handle response + } catch (com.airbyte.api.models.errors.SDKError e) { + // handle exception + throw e; + } catch (Exception e) { + // handle exception + throw e; + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `request` | [com.airbyte.api.models.operations.DeletePermissionRequest](../../models/operations/DeletePermissionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[Optional](../../models/operations/DeletePermissionResponse.md)** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4xx-5xx | */* | + +## getPermission + +Get Permission details + +### Example Usage + +```java +package hello.world; + +import com.airbyte.api.Airbyte; +import com.airbyte.api.models.operations.*; +import com.airbyte.api.models.shared.*; +import com.airbyte.api.models.shared.Security; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; +import static java.util.Map.entry; + +public class Application { + + public static void main(String[] args) throws Exception { + try { + Airbyte sdk = Airbyte.builder() + .security(Security.builder() + .basicAuth(SchemeBasicAuth.builder() + .password("") + .username("") + .build()) + .build()) + .build(); + + GetPermissionRequest req = GetPermissionRequest.builder() + .permissionId("") + .build(); + + GetPermissionResponse res = sdk.permissions().getPermission() + .request(req) + .call(); + + if (res.permissionResponse().isPresent()) { + // handle response + } + } catch (com.airbyte.api.models.errors.SDKError e) { + // handle exception + throw e; + } catch (Exception e) { + // handle exception + throw e; + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `request` | [com.airbyte.api.models.operations.GetPermissionRequest](../../models/operations/GetPermissionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[Optional](../../models/operations/GetPermissionResponse.md)** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4xx-5xx | */* | + +## listPermissions + +List Permissions by user id + +### Example Usage + +```java +package hello.world; + +import com.airbyte.api.Airbyte; +import com.airbyte.api.models.operations.*; +import com.airbyte.api.models.shared.*; +import com.airbyte.api.models.shared.Security; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; +import static java.util.Map.entry; + +public class Application { + + public static void main(String[] args) throws Exception { + try { + Airbyte sdk = Airbyte.builder() + .security(Security.builder() + .basicAuth(SchemeBasicAuth.builder() + .password("") + .username("") + .build()) + .build()) + .build(); + + ListPermissionsRequest req = ListPermissionsRequest.builder() + .build(); + + ListPermissionsResponse res = sdk.permissions().listPermissions() + .request(req) + .call(); + + if (res.permissionsResponse().isPresent()) { + // handle response + } + } catch (com.airbyte.api.models.errors.SDKError e) { + // handle exception + throw e; + } catch (Exception e) { + // handle exception + throw e; + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `request` | [com.airbyte.api.models.operations.ListPermissionsRequest](../../models/operations/ListPermissionsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[Optional](../../models/operations/ListPermissionsResponse.md)** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4xx-5xx | */* | + +## updatePermission + +Update a permission + +### Example Usage + +```java +package hello.world; + +import com.airbyte.api.Airbyte; +import com.airbyte.api.models.operations.*; +import com.airbyte.api.models.shared.*; +import com.airbyte.api.models.shared.Security; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; +import static java.util.Map.entry; + +public class Application { + + public static void main(String[] args) throws Exception { + try { + Airbyte sdk = Airbyte.builder() + .security(Security.builder() + .basicAuth(SchemeBasicAuth.builder() + .password("") + .username("") + .build()) + .build()) + .build(); + + UpdatePermissionRequest req = UpdatePermissionRequest.builder() + .permissionUpdateRequest(PermissionUpdateRequest.builder() + .permissionType(PermissionType.ORGANIZATION_MEMBER) + .build()) + .permissionId("") + .build(); + + UpdatePermissionResponse res = sdk.permissions().updatePermission() + .request(req) + .call(); + + if (res.permissionResponse().isPresent()) { + // handle response + } + } catch (com.airbyte.api.models.errors.SDKError e) { + // handle exception + throw e; + } catch (Exception e) { + // handle exception + throw e; + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `request` | [com.airbyte.api.models.operations.UpdatePermissionRequest](../../models/operations/UpdatePermissionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[Optional](../../models/operations/UpdatePermissionResponse.md)** +### Errors + +| Error Object | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/public/README.md b/docs/sdks/public/README.md deleted file mode 100644 index 120b8d366..000000000 --- a/docs/sdks/public/README.md +++ /dev/null @@ -1,2332 +0,0 @@ -# Public -(*public_()*) - -### Available Operations - -* [cancelJob](#canceljob) - Cancel a running Job -* [createConnection](#createconnection) - Create a connection -* [createDestination](#createdestination) - Create a destination -* [createJob](#createjob) - Trigger a sync or reset job of a connection -* [createOrUpdateWorkspaceOAuthCredentials](#createorupdateworkspaceoauthcredentials) - Create OAuth override credentials for a workspace and source type. -* [createPermission](#createpermission) - Create a permission -* [createSource](#createsource) - Create a source -* [createWorkspace](#createworkspace) - Create a workspace -* [deleteConnection](#deleteconnection) - Delete a Connection -* [deleteDestination](#deletedestination) - Delete a Destination -* [deleteSource](#deletesource) - Delete a Source -* [deleteWorkspace](#deleteworkspace) - Delete a Workspace -* [getConnection](#getconnection) - Get Connection details -* [getDestination](#getdestination) - Get Destination details -* [getJob](#getjob) - Get Job status and details -* [getSource](#getsource) - Get Source details -* [getStreamProperties](#getstreamproperties) - Get stream properties -* [getWorkspace](#getworkspace) - Get Workspace details -* [initiateOAuth](#initiateoauth) - Initiate OAuth for a source -* [listConnections](#listconnections) - List connections -* [listDestinations](#listdestinations) - List destinations -* [listJobs](#listjobs) - List Jobs by sync type -* [listSources](#listsources) - List sources -* [listWorkspaces](#listworkspaces) - List workspaces -* [patchConnection](#patchconnection) - Update Connection details -* [patchDestination](#patchdestination) - Update a Destination -* [patchSource](#patchsource) - Update a Source -* [putDestination](#putdestination) - Update a Destination and fully overwrite it -* [putSource](#putsource) - Update a Source and fully overwrite it -* [updateWorkspace](#updateworkspace) - Update a workspace - -## cancelJob - -Cancel a running Job - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - CancelJobRequest req = CancelJobRequest.builder() - .jobId(801771L) - .build(); - - CancelJobResponse res = sdk.public_().cancelJob() - .request(req) - .call(); - - if (res.jobResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.CancelJobRequest](../../models/operations/CancelJobRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CancelJobResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## createConnection - -Create a connection - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - ConnectionCreateRequest req = ConnectionCreateRequest.builder() - .destinationId("c669dd1e-3620-483e-afc8-55914e0a570f") - .sourceId("6dd427d8-3a55-4584-b835-842325b6c7b3") - .namespaceFormat("${SOURCE_NAMESPACE}") - .build(); - - CreateConnectionResponse res = sdk.public_().createConnection() - .request(req) - .call(); - - if (res.connectionResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.ConnectionCreateRequest](../../models/shared/ConnectionCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreateConnectionResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## createDestination - -Creates a destination given a name, workspace id, and a json blob containing the configuration for the source. - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - DestinationCreateRequest req = DestinationCreateRequest.builder() - .configuration(DestinationConfiguration.of(DestinationGoogleSheets.builder() - .credentials(AuthenticationViaGoogleOAuth.builder() - .clientId("") - .clientSecret("") - .refreshToken("") - .build()) - .spreadsheetId("https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit") - .build())) - .name("") - .workspaceId("8360860a-d46e-48e6-af62-08e5ba5019ef") - .build(); - - CreateDestinationResponse res = sdk.public_().createDestination() - .request(req) - .call(); - - if (res.destinationResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.DestinationCreateRequest](../../models/shared/DestinationCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreateDestinationResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## createJob - -Trigger a sync or reset job of a connection - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - JobCreateRequest req = JobCreateRequest.builder() - .connectionId("") - .jobType(JobTypeEnum.SYNC) - .build(); - - CreateJobResponse res = sdk.public_().createJob() - .request(req) - .call(); - - if (res.jobResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.JobCreateRequest](../../models/shared/JobCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreateJobResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## createOrUpdateWorkspaceOAuthCredentials - -Create/update a set of OAuth credentials to override the Airbyte-provided OAuth credentials used for source/destination OAuth. -In order to determine what the credential configuration needs to be, please see the connector specification of the relevant source/destination. - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - CreateOrUpdateWorkspaceOAuthCredentialsRequest req = CreateOrUpdateWorkspaceOAuthCredentialsRequest.builder() - .workspaceOAuthCredentialsRequest(WorkspaceOAuthCredentialsRequest.builder() - .actorType(ActorTypeEnum.DESTINATION) - .configuration(OAuthCredentialsConfiguration.of(Airtable.builder() - .build())) - .name(OAuthActorNames.AMAZON_ADS) - .build()) - .workspaceId("") - .build(); - - CreateOrUpdateWorkspaceOAuthCredentialsResponse res = sdk.public_().createOrUpdateWorkspaceOAuthCredentials() - .request(req) - .call(); - - // handle response - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest](../../models/operations/CreateOrUpdateWorkspaceOAuthCredentialsRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreateOrUpdateWorkspaceOAuthCredentialsResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## createPermission - -Create a permission - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - PermissionCreateRequest req = PermissionCreateRequest.builder() - .permissionType(PermissionType.ORGANIZATION_ADMIN) - .userId("297cb6ba-4669-43f1-b750-c800e1a1986b") - .build(); - - CreatePermissionResponse res = sdk.public_().createPermission() - .request(req) - .call(); - - if (res.permissionResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.PermissionCreateRequest](../../models/shared/PermissionCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreatePermissionResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## createSource - -Creates a source given a name, workspace id, and a json blob containing the configuration for the source. - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Iterable; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - SourceCreateRequest req = SourceCreateRequest.builder() - .configuration(SourceConfiguration.of(SourceAha.builder() - .apiKey("") - .url("") - .build())) - .name("") - .workspaceId("a2cf0f31-f3dd-4c98-88c3-4bdfb109056a") - .build(); - - CreateSourceResponse res = sdk.public_().createSource() - .request(req) - .call(); - - if (res.sourceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.SourceCreateRequest](../../models/shared/SourceCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreateSourceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## createWorkspace - -Create a workspace - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - WorkspaceCreateRequest req = WorkspaceCreateRequest.builder() - .name("") - .build(); - - CreateWorkspaceResponse res = sdk.public_().createWorkspace() - .request(req) - .call(); - - if (res.workspaceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.WorkspaceCreateRequest](../../models/shared/WorkspaceCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreateWorkspaceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## deleteConnection - -Delete a Connection - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - DeleteConnectionRequest req = DeleteConnectionRequest.builder() - .connectionId("") - .build(); - - DeleteConnectionResponse res = sdk.public_().deleteConnection() - .request(req) - .call(); - - // handle response - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.DeleteConnectionRequest](../../models/operations/DeleteConnectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/DeleteConnectionResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## deleteDestination - -Delete a Destination - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - DeleteDestinationRequest req = DeleteDestinationRequest.builder() - .destinationId("") - .build(); - - DeleteDestinationResponse res = sdk.public_().deleteDestination() - .request(req) - .call(); - - // handle response - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.DeleteDestinationRequest](../../models/operations/DeleteDestinationRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/DeleteDestinationResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## deleteSource - -Delete a Source - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - DeleteSourceRequest req = DeleteSourceRequest.builder() - .sourceId("") - .build(); - - DeleteSourceResponse res = sdk.public_().deleteSource() - .request(req) - .call(); - - // handle response - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.DeleteSourceRequest](../../models/operations/DeleteSourceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/DeleteSourceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## deleteWorkspace - -Delete a Workspace - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - DeleteWorkspaceRequest req = DeleteWorkspaceRequest.builder() - .workspaceId("") - .build(); - - DeleteWorkspaceResponse res = sdk.public_().deleteWorkspace() - .request(req) - .call(); - - // handle response - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.DeleteWorkspaceRequest](../../models/operations/DeleteWorkspaceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/DeleteWorkspaceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## getConnection - -Get Connection details - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - GetConnectionRequest req = GetConnectionRequest.builder() - .connectionId("") - .build(); - - GetConnectionResponse res = sdk.public_().getConnection() - .request(req) - .call(); - - if (res.connectionResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.GetConnectionRequest](../../models/operations/GetConnectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/GetConnectionResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## getDestination - -Get Destination details - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - GetDestinationRequest req = GetDestinationRequest.builder() - .destinationId("") - .build(); - - GetDestinationResponse res = sdk.public_().getDestination() - .request(req) - .call(); - - if (res.destinationResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.GetDestinationRequest](../../models/operations/GetDestinationRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/GetDestinationResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## getJob - -Get Job status and details - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - GetJobRequest req = GetJobRequest.builder() - .jobId(131101L) - .build(); - - GetJobResponse res = sdk.public_().getJob() - .request(req) - .call(); - - if (res.jobResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.GetJobRequest](../../models/operations/GetJobRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/GetJobResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## getSource - -Get Source details - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - GetSourceRequest req = GetSourceRequest.builder() - .sourceId("") - .build(); - - GetSourceResponse res = sdk.public_().getSource() - .request(req) - .call(); - - if (res.sourceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.GetSourceRequest](../../models/operations/GetSourceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/GetSourceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## getStreamProperties - -Get stream properties - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - GetStreamPropertiesRequest req = GetStreamPropertiesRequest.builder() - .sourceId("") - .build(); - - GetStreamPropertiesResponse res = sdk.public_().getStreamProperties() - .request(req) - .call(); - - if (res.streamPropertiesResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.GetStreamPropertiesRequest](../../models/operations/GetStreamPropertiesRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/GetStreamPropertiesResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## getWorkspace - -Get Workspace details - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - GetWorkspaceRequest req = GetWorkspaceRequest.builder() - .workspaceId("") - .build(); - - GetWorkspaceResponse res = sdk.public_().getWorkspace() - .request(req) - .call(); - - if (res.workspaceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.GetWorkspaceRequest](../../models/operations/GetWorkspaceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/GetWorkspaceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## initiateOAuth - -Given a source ID, workspace ID, and redirect URL, initiates OAuth for the source. - -This returns a fully formed URL for performing user authentication against the relevant source identity provider (IdP). Once authentication has been completed, the IdP will redirect to an Airbyte endpoint which will save the access and refresh tokens off as a secret and return the secret ID to the redirect URL specified in the `secret_id` query string parameter. - -That secret ID can be used to create a source with credentials in place of actual tokens. - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - InitiateOauthRequest req = InitiateOauthRequest.builder() - .redirectUrl("") - .sourceType(OAuthActorNames.GITLAB) - .workspaceId("fd28130d-9919-4ffa-a67d-4e12eb099447") - .build(); - - InitiateOAuthResponse res = sdk.public_().initiateOAuth() - .request(req) - .call(); - - // handle response - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.InitiateOauthRequest](../../models/shared/InitiateOauthRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/InitiateOAuthResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## listConnections - -List connections - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - ListConnectionsRequest req = ListConnectionsRequest.builder() - .build(); - - ListConnectionsResponse res = sdk.public_().listConnections() - .request(req) - .call(); - - if (res.connectionsResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.ListConnectionsRequest](../../models/operations/ListConnectionsRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/ListConnectionsResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## listDestinations - -List destinations - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - ListDestinationsRequest req = ListDestinationsRequest.builder() - .build(); - - ListDestinationsResponse res = sdk.public_().listDestinations() - .request(req) - .call(); - - if (res.destinationsResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.ListDestinationsRequest](../../models/operations/ListDestinationsRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/ListDestinationsResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## listJobs - -List Jobs by sync type - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - ListJobsRequest req = ListJobsRequest.builder() - .createdAtEnd(OffsetDateTime.parse("1687450500000")) - .createdAtStart(OffsetDateTime.parse("1687450500000")) - .orderBy("updatedAt|DESC") - .updatedAtEnd(OffsetDateTime.parse("1687450500000")) - .updatedAtStart(OffsetDateTime.parse("1687450500000")) - .build(); - - ListJobsResponse res = sdk.public_().listJobs() - .request(req) - .call(); - - if (res.jobsResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.ListJobsRequest](../../models/operations/ListJobsRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/ListJobsResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## listSources - -List sources - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - ListSourcesRequest req = ListSourcesRequest.builder() - .workspaceIds(java.util.List.of( - "d", - "f", - "0", - "8", - "f", - "6", - "b", - "0", - "-", - "b", - "3", - "6", - "4", - "-", - "4", - "c", - "c", - "1", - "-", - "9", - "b", - "3", - "f", - "-", - "9", - "6", - "f", - "5", - "d", - "2", - "f", - "c", - "c", - "f", - "b", - "2", - ",", - "b", - "0", - "7", - "9", - "6", - "7", - "9", - "7", - "-", - "d", - "e", - "2", - "3", - "-", - "4", - "f", - "c", - "7", - "-", - "a", - "5", - "e", - "2", - "-", - "7", - "e", - "1", - "3", - "1", - "3", - "1", - "4", - "7", - "1", - "8", - "c")) - .build(); - - ListSourcesResponse res = sdk.public_().listSources() - .request(req) - .call(); - - if (res.sourcesResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.ListSourcesRequest](../../models/operations/ListSourcesRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/ListSourcesResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## listWorkspaces - -List workspaces - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - ListWorkspacesRequest req = ListWorkspacesRequest.builder() - .build(); - - ListWorkspacesResponse res = sdk.public_().listWorkspaces() - .request(req) - .call(); - - if (res.workspacesResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.ListWorkspacesRequest](../../models/operations/ListWorkspacesRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/ListWorkspacesResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## patchConnection - -Update Connection details - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - PatchConnectionRequest req = PatchConnectionRequest.builder() - .connectionPatchRequest(ConnectionPatchRequest.builder() - .namespaceFormat("${SOURCE_NAMESPACE}") - .build()) - .connectionId("") - .build(); - - PatchConnectionResponse res = sdk.public_().patchConnection() - .request(req) - .call(); - - if (res.connectionResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.PatchConnectionRequest](../../models/operations/PatchConnectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/PatchConnectionResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## patchDestination - -Update a Destination - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - PatchDestinationRequest req = PatchDestinationRequest.builder() - .destinationId("") - .destinationPatchRequest(DestinationPatchRequest.builder() - .configuration(DestinationConfiguration.of(DestinationGoogleSheets.builder() - .credentials(AuthenticationViaGoogleOAuth.builder() - .clientId("") - .clientSecret("") - .refreshToken("") - .build()) - .spreadsheetId("https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit") - .build())) - .build()) - .build(); - - PatchDestinationResponse res = sdk.public_().patchDestination() - .request(req) - .call(); - - if (res.destinationResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.PatchDestinationRequest](../../models/operations/PatchDestinationRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/PatchDestinationResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## patchSource - -Update a Source - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Iterable; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - PatchSourceRequest req = PatchSourceRequest.builder() - .sourceId("") - .sourcePatchRequest(SourcePatchRequest.builder() - .configuration(SourceConfiguration.of(SourceAha.builder() - .apiKey("") - .url("") - .build())) - .name("My source") - .build()) - .build(); - - PatchSourceResponse res = sdk.public_().patchSource() - .request(req) - .call(); - - if (res.sourceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.PatchSourceRequest](../../models/operations/PatchSourceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/PatchSourceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## putDestination - -Update a Destination and fully overwrite it - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - PutDestinationRequest req = PutDestinationRequest.builder() - .destinationId("") - .destinationPutRequest(DestinationPutRequest.builder() - .configuration(DestinationConfiguration.of(DestinationGoogleSheets.builder() - .credentials(AuthenticationViaGoogleOAuth.builder() - .clientId("") - .clientSecret("") - .refreshToken("") - .build()) - .spreadsheetId("https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit") - .build())) - .name("") - .build()) - .build(); - - PutDestinationResponse res = sdk.public_().putDestination() - .request(req) - .call(); - - if (res.destinationResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.PutDestinationRequest](../../models/operations/PutDestinationRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/PutDestinationResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## putSource - -Update a Source and fully overwrite it - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Iterable; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - PutSourceRequest req = PutSourceRequest.builder() - .sourceId("") - .sourcePutRequest(SourcePutRequest.builder() - .configuration(SourceConfiguration.of(SourceAha.builder() - .apiKey("") - .url("") - .build())) - .name("") - .build()) - .build(); - - PutSourceResponse res = sdk.public_().putSource() - .request(req) - .call(); - - if (res.sourceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.PutSourceRequest](../../models/operations/PutSourceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/PutSourceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## updateWorkspace - -Update a workspace - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - UpdateWorkspaceRequest req = UpdateWorkspaceRequest.builder() - .workspaceUpdateRequest(WorkspaceUpdateRequest.builder() - .name("") - .build()) - .workspaceId("") - .build(); - - UpdateWorkspaceResponse res = sdk.public_().updateWorkspace() - .request(req) - .call(); - - if (res.workspaceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.UpdateWorkspaceRequest](../../models/operations/UpdateWorkspaceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/UpdateWorkspaceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/publicconnections/README.md b/docs/sdks/publicconnections/README.md deleted file mode 100644 index b3d42ae8b..000000000 --- a/docs/sdks/publicconnections/README.md +++ /dev/null @@ -1,372 +0,0 @@ -# PublicConnections -(*publicConnections()*) - -### Available Operations - -* [createConnection](#createconnection) - Create a connection -* [deleteConnection](#deleteconnection) - Delete a Connection -* [getConnection](#getconnection) - Get Connection details -* [listConnections](#listconnections) - List connections -* [patchConnection](#patchconnection) - Update Connection details - -## createConnection - -Create a connection - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - ConnectionCreateRequest req = ConnectionCreateRequest.builder() - .destinationId("c669dd1e-3620-483e-afc8-55914e0a570f") - .sourceId("6dd427d8-3a55-4584-b835-842325b6c7b3") - .namespaceFormat("${SOURCE_NAMESPACE}") - .build(); - - CreateConnectionResponse res = sdk.publicConnections().createConnection() - .request(req) - .call(); - - if (res.connectionResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.ConnectionCreateRequest](../../models/shared/ConnectionCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreateConnectionResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## deleteConnection - -Delete a Connection - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - DeleteConnectionRequest req = DeleteConnectionRequest.builder() - .connectionId("") - .build(); - - DeleteConnectionResponse res = sdk.publicConnections().deleteConnection() - .request(req) - .call(); - - // handle response - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.DeleteConnectionRequest](../../models/operations/DeleteConnectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/DeleteConnectionResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## getConnection - -Get Connection details - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - GetConnectionRequest req = GetConnectionRequest.builder() - .connectionId("") - .build(); - - GetConnectionResponse res = sdk.publicConnections().getConnection() - .request(req) - .call(); - - if (res.connectionResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.GetConnectionRequest](../../models/operations/GetConnectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/GetConnectionResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## listConnections - -List connections - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - ListConnectionsRequest req = ListConnectionsRequest.builder() - .build(); - - ListConnectionsResponse res = sdk.publicConnections().listConnections() - .request(req) - .call(); - - if (res.connectionsResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.ListConnectionsRequest](../../models/operations/ListConnectionsRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/ListConnectionsResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## patchConnection - -Update Connection details - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - PatchConnectionRequest req = PatchConnectionRequest.builder() - .connectionPatchRequest(ConnectionPatchRequest.builder() - .namespaceFormat("${SOURCE_NAMESPACE}") - .build()) - .connectionId("") - .build(); - - PatchConnectionResponse res = sdk.publicConnections().patchConnection() - .request(req) - .call(); - - if (res.connectionResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.PatchConnectionRequest](../../models/operations/PatchConnectionRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/PatchConnectionResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/publicdestinations/README.md b/docs/sdks/publicdestinations/README.md deleted file mode 100644 index 25be2fdec..000000000 --- a/docs/sdks/publicdestinations/README.md +++ /dev/null @@ -1,470 +0,0 @@ -# PublicDestinations -(*publicDestinations()*) - -### Available Operations - -* [createDestination](#createdestination) - Create a destination -* [deleteDestination](#deletedestination) - Delete a Destination -* [getDestination](#getdestination) - Get Destination details -* [listDestinations](#listdestinations) - List destinations -* [patchDestination](#patchdestination) - Update a Destination -* [putDestination](#putdestination) - Update a Destination and fully overwrite it - -## createDestination - -Creates a destination given a name, workspace id, and a json blob containing the configuration for the source. - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - DestinationCreateRequest req = DestinationCreateRequest.builder() - .configuration(DestinationConfiguration.of(DestinationGoogleSheets.builder() - .credentials(AuthenticationViaGoogleOAuth.builder() - .clientId("") - .clientSecret("") - .refreshToken("") - .build()) - .spreadsheetId("https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit") - .build())) - .name("") - .workspaceId("8360860a-d46e-48e6-af62-08e5ba5019ef") - .build(); - - CreateDestinationResponse res = sdk.publicDestinations().createDestination() - .request(req) - .call(); - - if (res.destinationResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.DestinationCreateRequest](../../models/shared/DestinationCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreateDestinationResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## deleteDestination - -Delete a Destination - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - DeleteDestinationRequest req = DeleteDestinationRequest.builder() - .destinationId("") - .build(); - - DeleteDestinationResponse res = sdk.publicDestinations().deleteDestination() - .request(req) - .call(); - - // handle response - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.DeleteDestinationRequest](../../models/operations/DeleteDestinationRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/DeleteDestinationResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## getDestination - -Get Destination details - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - GetDestinationRequest req = GetDestinationRequest.builder() - .destinationId("") - .build(); - - GetDestinationResponse res = sdk.publicDestinations().getDestination() - .request(req) - .call(); - - if (res.destinationResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.GetDestinationRequest](../../models/operations/GetDestinationRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/GetDestinationResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## listDestinations - -List destinations - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - ListDestinationsRequest req = ListDestinationsRequest.builder() - .build(); - - ListDestinationsResponse res = sdk.publicDestinations().listDestinations() - .request(req) - .call(); - - if (res.destinationsResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.ListDestinationsRequest](../../models/operations/ListDestinationsRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/ListDestinationsResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## patchDestination - -Update a Destination - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - PatchDestinationRequest req = PatchDestinationRequest.builder() - .destinationId("") - .destinationPatchRequest(DestinationPatchRequest.builder() - .configuration(DestinationConfiguration.of(DestinationGoogleSheets.builder() - .credentials(AuthenticationViaGoogleOAuth.builder() - .clientId("") - .clientSecret("") - .refreshToken("") - .build()) - .spreadsheetId("https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit") - .build())) - .build()) - .build(); - - PatchDestinationResponse res = sdk.publicDestinations().patchDestination() - .request(req) - .call(); - - if (res.destinationResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.PatchDestinationRequest](../../models/operations/PatchDestinationRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/PatchDestinationResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## putDestination - -Update a Destination and fully overwrite it - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - PutDestinationRequest req = PutDestinationRequest.builder() - .destinationId("") - .destinationPutRequest(DestinationPutRequest.builder() - .configuration(DestinationConfiguration.of(DestinationGoogleSheets.builder() - .credentials(AuthenticationViaGoogleOAuth.builder() - .clientId("") - .clientSecret("") - .refreshToken("") - .build()) - .spreadsheetId("https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit") - .build())) - .name("") - .build()) - .build(); - - PutDestinationResponse res = sdk.publicDestinations().putDestination() - .request(req) - .call(); - - if (res.destinationResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.PutDestinationRequest](../../models/operations/PutDestinationRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/PutDestinationResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/publicjobs/README.md b/docs/sdks/publicjobs/README.md deleted file mode 100644 index 494785d09..000000000 --- a/docs/sdks/publicjobs/README.md +++ /dev/null @@ -1,302 +0,0 @@ -# PublicJobs -(*publicJobs()*) - -### Available Operations - -* [cancelJob](#canceljob) - Cancel a running Job -* [createJob](#createjob) - Trigger a sync or reset job of a connection -* [getJob](#getjob) - Get Job status and details -* [listJobs](#listjobs) - List Jobs by sync type - -## cancelJob - -Cancel a running Job - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - CancelJobRequest req = CancelJobRequest.builder() - .jobId(801771L) - .build(); - - CancelJobResponse res = sdk.publicJobs().cancelJob() - .request(req) - .call(); - - if (res.jobResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.CancelJobRequest](../../models/operations/CancelJobRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CancelJobResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## createJob - -Trigger a sync or reset job of a connection - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - JobCreateRequest req = JobCreateRequest.builder() - .connectionId("") - .jobType(JobTypeEnum.SYNC) - .build(); - - CreateJobResponse res = sdk.publicJobs().createJob() - .request(req) - .call(); - - if (res.jobResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.JobCreateRequest](../../models/shared/JobCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreateJobResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## getJob - -Get Job status and details - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - GetJobRequest req = GetJobRequest.builder() - .jobId(131101L) - .build(); - - GetJobResponse res = sdk.publicJobs().getJob() - .request(req) - .call(); - - if (res.jobResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.GetJobRequest](../../models/operations/GetJobRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/GetJobResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## listJobs - -List Jobs by sync type - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - ListJobsRequest req = ListJobsRequest.builder() - .createdAtEnd(OffsetDateTime.parse("1687450500000")) - .createdAtStart(OffsetDateTime.parse("1687450500000")) - .orderBy("updatedAt|DESC") - .updatedAtEnd(OffsetDateTime.parse("1687450500000")) - .updatedAtStart(OffsetDateTime.parse("1687450500000")) - .build(); - - ListJobsResponse res = sdk.publicJobs().listJobs() - .request(req) - .call(); - - if (res.jobsResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.ListJobsRequest](../../models/operations/ListJobsRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/ListJobsResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/publicpermissions/README.md b/docs/sdks/publicpermissions/README.md deleted file mode 100644 index 9409fd3ee..000000000 --- a/docs/sdks/publicpermissions/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# PublicPermissions -(*publicPermissions()*) - -### Available Operations - -* [createPermission](#createpermission) - Create a permission - -## createPermission - -Create a permission - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - PermissionCreateRequest req = PermissionCreateRequest.builder() - .permissionType(PermissionType.ORGANIZATION_ADMIN) - .userId("297cb6ba-4669-43f1-b750-c800e1a1986b") - .build(); - - CreatePermissionResponse res = sdk.publicPermissions().createPermission() - .request(req) - .call(); - - if (res.permissionResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.PermissionCreateRequest](../../models/shared/PermissionCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreatePermissionResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/publicsources/README.md b/docs/sdks/publicsources/README.md deleted file mode 100644 index 4443a6999..000000000 --- a/docs/sdks/publicsources/README.md +++ /dev/null @@ -1,613 +0,0 @@ -# PublicSources -(*publicSources()*) - -### Available Operations - -* [createSource](#createsource) - Create a source -* [deleteSource](#deletesource) - Delete a Source -* [getSource](#getsource) - Get Source details -* [initiateOAuth](#initiateoauth) - Initiate OAuth for a source -* [listSources](#listsources) - List sources -* [patchSource](#patchsource) - Update a Source -* [putSource](#putsource) - Update a Source and fully overwrite it - -## createSource - -Creates a source given a name, workspace id, and a json blob containing the configuration for the source. - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Iterable; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - SourceCreateRequest req = SourceCreateRequest.builder() - .configuration(SourceConfiguration.of(SourceAha.builder() - .apiKey("") - .url("") - .build())) - .name("") - .workspaceId("a2cf0f31-f3dd-4c98-88c3-4bdfb109056a") - .build(); - - CreateSourceResponse res = sdk.publicSources().createSource() - .request(req) - .call(); - - if (res.sourceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.SourceCreateRequest](../../models/shared/SourceCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreateSourceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## deleteSource - -Delete a Source - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - DeleteSourceRequest req = DeleteSourceRequest.builder() - .sourceId("") - .build(); - - DeleteSourceResponse res = sdk.publicSources().deleteSource() - .request(req) - .call(); - - // handle response - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.DeleteSourceRequest](../../models/operations/DeleteSourceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/DeleteSourceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## getSource - -Get Source details - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - GetSourceRequest req = GetSourceRequest.builder() - .sourceId("") - .build(); - - GetSourceResponse res = sdk.publicSources().getSource() - .request(req) - .call(); - - if (res.sourceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.GetSourceRequest](../../models/operations/GetSourceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/GetSourceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## initiateOAuth - -Given a source ID, workspace ID, and redirect URL, initiates OAuth for the source. - -This returns a fully formed URL for performing user authentication against the relevant source identity provider (IdP). Once authentication has been completed, the IdP will redirect to an Airbyte endpoint which will save the access and refresh tokens off as a secret and return the secret ID to the redirect URL specified in the `secret_id` query string parameter. - -That secret ID can be used to create a source with credentials in place of actual tokens. - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - InitiateOauthRequest req = InitiateOauthRequest.builder() - .redirectUrl("") - .sourceType(OAuthActorNames.GITLAB) - .workspaceId("fd28130d-9919-4ffa-a67d-4e12eb099447") - .build(); - - InitiateOAuthResponse res = sdk.publicSources().initiateOAuth() - .request(req) - .call(); - - // handle response - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.InitiateOauthRequest](../../models/shared/InitiateOauthRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/InitiateOAuthResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## listSources - -List sources - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - ListSourcesRequest req = ListSourcesRequest.builder() - .workspaceIds(java.util.List.of( - "d", - "f", - "0", - "8", - "f", - "6", - "b", - "0", - "-", - "b", - "3", - "6", - "4", - "-", - "4", - "c", - "c", - "1", - "-", - "9", - "b", - "3", - "f", - "-", - "9", - "6", - "f", - "5", - "d", - "2", - "f", - "c", - "c", - "f", - "b", - "2", - ",", - "b", - "0", - "7", - "9", - "6", - "7", - "9", - "7", - "-", - "d", - "e", - "2", - "3", - "-", - "4", - "f", - "c", - "7", - "-", - "a", - "5", - "e", - "2", - "-", - "7", - "e", - "1", - "3", - "1", - "3", - "1", - "4", - "7", - "1", - "8", - "c")) - .build(); - - ListSourcesResponse res = sdk.publicSources().listSources() - .request(req) - .call(); - - if (res.sourcesResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.ListSourcesRequest](../../models/operations/ListSourcesRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/ListSourcesResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## patchSource - -Update a Source - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Iterable; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - PatchSourceRequest req = PatchSourceRequest.builder() - .sourceId("") - .sourcePatchRequest(SourcePatchRequest.builder() - .configuration(SourceConfiguration.of(SourceAha.builder() - .apiKey("") - .url("") - .build())) - .name("My source") - .build()) - .build(); - - PatchSourceResponse res = sdk.publicSources().patchSource() - .request(req) - .call(); - - if (res.sourceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.PatchSourceRequest](../../models/operations/PatchSourceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/PatchSourceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## putSource - -Update a Source and fully overwrite it - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Iterable; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - PutSourceRequest req = PutSourceRequest.builder() - .sourceId("") - .sourcePutRequest(SourcePutRequest.builder() - .configuration(SourceConfiguration.of(SourceAha.builder() - .apiKey("") - .url("") - .build())) - .name("") - .build()) - .build(); - - PutSourceResponse res = sdk.publicSources().putSource() - .request(req) - .call(); - - if (res.sourceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.PutSourceRequest](../../models/operations/PutSourceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/PutSourceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/publicstreams/README.md b/docs/sdks/publicstreams/README.md deleted file mode 100644 index f5b5faeb8..000000000 --- a/docs/sdks/publicstreams/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# PublicStreams -(*publicStreams()*) - -### Available Operations - -* [getStreamProperties](#getstreamproperties) - Get stream properties - -## getStreamProperties - -Get stream properties - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - GetStreamPropertiesRequest req = GetStreamPropertiesRequest.builder() - .sourceId("") - .build(); - - GetStreamPropertiesResponse res = sdk.publicStreams().getStreamProperties() - .request(req) - .call(); - - if (res.streamPropertiesResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.GetStreamPropertiesRequest](../../models/operations/GetStreamPropertiesRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/GetStreamPropertiesResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/publicworkspaces/README.md b/docs/sdks/publicworkspaces/README.md deleted file mode 100644 index 8d0805248..000000000 --- a/docs/sdks/publicworkspaces/README.md +++ /dev/null @@ -1,448 +0,0 @@ -# PublicWorkspaces -(*publicWorkspaces()*) - -### Available Operations - -* [createOrUpdateWorkspaceOAuthCredentials](#createorupdateworkspaceoauthcredentials) - Create OAuth override credentials for a workspace and source type. -* [createWorkspace](#createworkspace) - Create a workspace -* [deleteWorkspace](#deleteworkspace) - Delete a Workspace -* [getWorkspace](#getworkspace) - Get Workspace details -* [listWorkspaces](#listworkspaces) - List workspaces -* [updateWorkspace](#updateworkspace) - Update a workspace - -## createOrUpdateWorkspaceOAuthCredentials - -Create/update a set of OAuth credentials to override the Airbyte-provided OAuth credentials used for source/destination OAuth. -In order to determine what the credential configuration needs to be, please see the connector specification of the relevant source/destination. - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - CreateOrUpdateWorkspaceOAuthCredentialsRequest req = CreateOrUpdateWorkspaceOAuthCredentialsRequest.builder() - .workspaceOAuthCredentialsRequest(WorkspaceOAuthCredentialsRequest.builder() - .actorType(ActorTypeEnum.DESTINATION) - .configuration(OAuthCredentialsConfiguration.of(Airtable.builder() - .build())) - .name(OAuthActorNames.AMAZON_ADS) - .build()) - .workspaceId("") - .build(); - - CreateOrUpdateWorkspaceOAuthCredentialsResponse res = sdk.publicWorkspaces().createOrUpdateWorkspaceOAuthCredentials() - .request(req) - .call(); - - // handle response - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest](../../models/operations/CreateOrUpdateWorkspaceOAuthCredentialsRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreateOrUpdateWorkspaceOAuthCredentialsResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## createWorkspace - -Create a workspace - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - WorkspaceCreateRequest req = WorkspaceCreateRequest.builder() - .name("") - .build(); - - CreateWorkspaceResponse res = sdk.publicWorkspaces().createWorkspace() - .request(req) - .call(); - - if (res.workspaceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.shared.WorkspaceCreateRequest](../../models/shared/WorkspaceCreateRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/CreateWorkspaceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## deleteWorkspace - -Delete a Workspace - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - DeleteWorkspaceRequest req = DeleteWorkspaceRequest.builder() - .workspaceId("") - .build(); - - DeleteWorkspaceResponse res = sdk.publicWorkspaces().deleteWorkspace() - .request(req) - .call(); - - // handle response - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.DeleteWorkspaceRequest](../../models/operations/DeleteWorkspaceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/DeleteWorkspaceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## getWorkspace - -Get Workspace details - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - GetWorkspaceRequest req = GetWorkspaceRequest.builder() - .workspaceId("") - .build(); - - GetWorkspaceResponse res = sdk.publicWorkspaces().getWorkspace() - .request(req) - .call(); - - if (res.workspaceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.GetWorkspaceRequest](../../models/operations/GetWorkspaceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/GetWorkspaceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## listWorkspaces - -List workspaces - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - ListWorkspacesRequest req = ListWorkspacesRequest.builder() - .build(); - - ListWorkspacesResponse res = sdk.publicWorkspaces().listWorkspaces() - .request(req) - .call(); - - if (res.workspacesResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.ListWorkspacesRequest](../../models/operations/ListWorkspacesRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/ListWorkspacesResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | - -## updateWorkspace - -Update a workspace - -### Example Usage - -```java -package hello.world; - -import com.airbyte.api.Airbyte; -import com.airbyte.api.models.operations.*; -import com.airbyte.api.models.shared.*; -import com.airbyte.api.models.shared.Security; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; -import static java.util.Map.entry; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - Airbyte sdk = Airbyte.builder() - .security(Security.builder() - .basicAuth(SchemeBasicAuth.builder() - .password("") - .username("") - .build()) - .build()) - .build(); - - UpdateWorkspaceRequest req = UpdateWorkspaceRequest.builder() - .workspaceUpdateRequest(WorkspaceUpdateRequest.builder() - .name("") - .build()) - .workspaceId("") - .build(); - - UpdateWorkspaceResponse res = sdk.publicWorkspaces().updateWorkspace() - .request(req) - .call(); - - if (res.workspaceResponse().isPresent()) { - // handle response - } - } catch (com.airbyte.api.models.errors.SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - } -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `request` | [com.airbyte.api.models.operations.UpdateWorkspaceRequest](../../models/operations/UpdateWorkspaceRequest.md) | :heavy_check_mark: | The request object to use for the request. | - - -### Response - -**[Optional](../../models/operations/UpdateWorkspaceResponse.md)** -### Errors - -| Error Object | Status Code | Content Type | -| ---------------------- | ---------------------- | ---------------------- | -| models/errors/SDKError | 4xx-5xx | */* | diff --git a/gen.yaml b/gen.yaml index f5a9a8054..37e037dce 100644 --- a/gen.yaml +++ b/gen.yaml @@ -11,7 +11,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true java: - version: 1.1.0 + version: 1.2.0 additionalDependencies: [] artifactID: api clientServerStatusCodesAsErrors: true diff --git a/src/main/java/com/airbyte/api/Airbyte.java b/src/main/java/com/airbyte/api/Airbyte.java index a5c175704..31f83bdb1 100644 --- a/src/main/java/com/airbyte/api/Airbyte.java +++ b/src/main/java/com/airbyte/api/Airbyte.java @@ -39,92 +39,50 @@ public class Airbyte { "https://api.airbyte.com/v1", }; - private final PublicConnections publicConnections; - - private final Public public_; - private final Connections connections; - private final PublicDestinations publicDestinations; - private final Destinations destinations; - private final PublicJobs publicJobs; + private final Health health; private final Jobs jobs; - private final PublicPermissions publicPermissions; - private final Permissions permissions; - private final PublicSources publicSources; - private final Sources sources; - private final PublicStreams publicStreams; - private final Streams streams; - private final PublicWorkspaces publicWorkspaces; - private final Workspaces workspaces; - public PublicConnections publicConnections() { - return publicConnections; - } - - public Public public_() { - return public_; - } - public Connections connections() { return connections; } - public PublicDestinations publicDestinations() { - return publicDestinations; - } - public Destinations destinations() { return destinations; } - public PublicJobs publicJobs() { - return publicJobs; + public Health health() { + return health; } public Jobs jobs() { return jobs; } - public PublicPermissions publicPermissions() { - return publicPermissions; - } - public Permissions permissions() { return permissions; } - public PublicSources publicSources() { - return publicSources; - } - public Sources sources() { return sources; } - public PublicStreams publicStreams() { - return publicStreams; - } - public Streams streams() { return streams; } - public PublicWorkspaces publicWorkspaces() { - return publicWorkspaces; - } - public Workspaces workspaces() { return workspaces; } @@ -255,20 +213,13 @@ public static Builder builder() { private Airbyte(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; - this.publicConnections = new PublicConnections(sdkConfiguration); - this.public_ = new Public(sdkConfiguration); this.connections = new Connections(sdkConfiguration); - this.publicDestinations = new PublicDestinations(sdkConfiguration); this.destinations = new Destinations(sdkConfiguration); - this.publicJobs = new PublicJobs(sdkConfiguration); + this.health = new Health(sdkConfiguration); this.jobs = new Jobs(sdkConfiguration); - this.publicPermissions = new PublicPermissions(sdkConfiguration); this.permissions = new Permissions(sdkConfiguration); - this.publicSources = new PublicSources(sdkConfiguration); this.sources = new Sources(sdkConfiguration); - this.publicStreams = new PublicStreams(sdkConfiguration); this.streams = new Streams(sdkConfiguration); - this.publicWorkspaces = new PublicWorkspaces(sdkConfiguration); this.workspaces = new Workspaces(sdkConfiguration); this.sdkConfiguration.initialize(); }} diff --git a/src/main/java/com/airbyte/api/PublicStreams.java b/src/main/java/com/airbyte/api/Health.java similarity index 52% rename from src/main/java/com/airbyte/api/PublicStreams.java rename to src/main/java/com/airbyte/api/Health.java index 807e3786e..01d2fa9cd 100644 --- a/src/main/java/com/airbyte/api/PublicStreams.java +++ b/src/main/java/com/airbyte/api/Health.java @@ -11,88 +11,74 @@ import com.airbyte.api.utils.Hook.AfterErrorContextImpl; import com.airbyte.api.utils.Hook.AfterSuccessContextImpl; import com.airbyte.api.utils.Hook.BeforeRequestContextImpl; -import com.airbyte.api.utils.JSON; import com.airbyte.api.utils.Retries.NonRetryableException; import com.airbyte.api.utils.Utils; import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; import java.io.InputStream; import java.math.BigDecimal; import java.math.BigInteger; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import java.nio.charset.StandardCharsets; import java.util.Optional; -import org.apache.http.NameValuePair; import org.openapitools.jackson.nullable.JsonNullable; -public class PublicStreams implements - MethodCallGetStreamProperties { +public class Health implements + MethodCallGetHealthCheck { private final SDKConfiguration sdkConfiguration; - PublicStreams(SDKConfiguration sdkConfiguration) { + Health(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } /** - * Get stream properties + * Health Check * @return The call builder */ - public com.airbyte.api.models.operations.GetStreamPropertiesRequestBuilder getStreamProperties() { - return new com.airbyte.api.models.operations.GetStreamPropertiesRequestBuilder(this); + public com.airbyte.api.models.operations.GetHealthCheckRequestBuilder getHealthCheck() { + return new com.airbyte.api.models.operations.GetHealthCheckRequestBuilder(this); } /** - * Get stream properties - * @param request The request object containing all of the parameters for the API call. + * Health Check * @return The response from the API call * @throws Exception if the API call fails */ - public com.airbyte.api.models.operations.GetStreamPropertiesResponse getStreamProperties( - com.airbyte.api.models.operations.GetStreamPropertiesRequest request) throws Exception { + public com.airbyte.api.models.operations.GetHealthCheckResponse getHealthCheckDirect() throws Exception { String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( _baseUrl, - "/streams"); + "/health"); HTTPRequest _req = new HTTPRequest(_url, "GET"); - _req.addHeader("Accept", "application/json") + _req.addHeader("Accept", "*/*") .addHeader("user-agent", this.sdkConfiguration.userAgent); - _req.addQueryParams(Utils.getQueryParams( - com.airbyte.api.models.operations.GetStreamPropertiesRequest.class, - request, - null)); - - Utils.configureSecurity(_req, - this.sdkConfiguration.securitySource.getSecurity()); - HTTPClient _client = this.sdkConfiguration.defaultClient; HttpRequest _r = sdkConfiguration.hooks() .beforeRequest( - new BeforeRequestContextImpl("getStreamProperties", sdkConfiguration.securitySource()), + new BeforeRequestContextImpl("getHealthCheck", sdkConfiguration.securitySource()), _req.build()); HttpResponse _httpRes; try { _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { _httpRes = sdkConfiguration.hooks() .afterError( - new AfterErrorContextImpl("getStreamProperties", sdkConfiguration.securitySource()), + new AfterErrorContextImpl("getHealthCheck", sdkConfiguration.securitySource()), Optional.of(_httpRes), Optional.empty()); } else { _httpRes = sdkConfiguration.hooks() .afterSuccess( - new AfterSuccessContextImpl("getStreamProperties", sdkConfiguration.securitySource()), + new AfterSuccessContextImpl("getHealthCheck", sdkConfiguration.securitySource()), _httpRes); } } catch (Exception _e) { _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("getStreamProperties", sdkConfiguration.securitySource()), + .afterError(new AfterErrorContextImpl("getHealthCheck", sdkConfiguration.securitySource()), Optional.empty(), Optional.of(_e)); } @@ -100,32 +86,20 @@ public com.airbyte.api.models.operations.GetStreamPropertiesResponse getStreamPr .headers() .firstValue("Content-Type") .orElse("application/octet-stream"); - com.airbyte.api.models.operations.GetStreamPropertiesResponse.Builder _resBuilder = - com.airbyte.api.models.operations.GetStreamPropertiesResponse + com.airbyte.api.models.operations.GetHealthCheckResponse.Builder _resBuilder = + com.airbyte.api.models.operations.GetHealthCheckResponse .builder() .contentType(_contentType) .statusCode(_httpRes.statusCode()) .rawResponse(_httpRes); - com.airbyte.api.models.operations.GetStreamPropertiesResponse _res = _resBuilder.build(); + com.airbyte.api.models.operations.GetHealthCheckResponse _res = _resBuilder.build(); if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - java.util.List _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference>() {}); - _res.withStreamPropertiesResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } + // no content + return _res; } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { + if (Utils.statusCodeMatches(_httpRes.statusCode(), "4XX", "5XX")) { // no content throw new SDKError( _httpRes, diff --git a/src/main/java/com/airbyte/api/Permissions.java b/src/main/java/com/airbyte/api/Permissions.java index 677bede97..ddb9cf4d1 100644 --- a/src/main/java/com/airbyte/api/Permissions.java +++ b/src/main/java/com/airbyte/api/Permissions.java @@ -24,10 +24,15 @@ import java.net.http.HttpResponse; import java.nio.charset.StandardCharsets; import java.util.Optional; +import org.apache.http.NameValuePair; import org.openapitools.jackson.nullable.JsonNullable; public class Permissions implements - MethodCallCreatePermission { + MethodCallCreatePermission, + MethodCallDeletePermission, + MethodCallGetPermission, + MethodCallListPermissions, + MethodCallUpdatePermission { private final SDKConfiguration sdkConfiguration; @@ -143,4 +148,415 @@ public com.airbyte.api.models.operations.CreatePermissionResponse createPermissi Utils.toByteArrayAndClose(_httpRes.body())); } + + /** + * Delete a Permission + * @return The call builder + */ + public com.airbyte.api.models.operations.DeletePermissionRequestBuilder deletePermission() { + return new com.airbyte.api.models.operations.DeletePermissionRequestBuilder(this); + } + + /** + * Delete a Permission + * @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 com.airbyte.api.models.operations.DeletePermissionResponse deletePermission( + com.airbyte.api.models.operations.DeletePermissionRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + com.airbyte.api.models.operations.DeletePermissionRequest.class, + _baseUrl, + "/permissions/{permissionId}", + request, null); + + HTTPRequest _req = new HTTPRequest(_url, "DELETE"); + _req.addHeader("Accept", "*/*") + .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("deletePermission", sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "422", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl("deletePermission", sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl("deletePermission", sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError(new AfterErrorContextImpl("deletePermission", sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.airbyte.api.models.operations.DeletePermissionResponse.Builder _resBuilder = + com.airbyte.api.models.operations.DeletePermissionResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + com.airbyte.api.models.operations.DeletePermissionResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "204")) { + // no content + return _res; + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "422", "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.toByteArrayAndClose(_httpRes.body())); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.toByteArrayAndClose(_httpRes.body())); + } + + + /** + * Get Permission details + * @return The call builder + */ + public com.airbyte.api.models.operations.GetPermissionRequestBuilder getPermission() { + return new com.airbyte.api.models.operations.GetPermissionRequestBuilder(this); + } + + /** + * Get Permission details + * @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 com.airbyte.api.models.operations.GetPermissionResponse getPermission( + com.airbyte.api.models.operations.GetPermissionRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + com.airbyte.api.models.operations.GetPermissionRequest.class, + _baseUrl, + "/permissions/{permissionId}", + request, null); + + 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("getPermission", sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "422", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl("getPermission", sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl("getPermission", sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError(new AfterErrorContextImpl("getPermission", sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.airbyte.api.models.operations.GetPermissionResponse.Builder _resBuilder = + com.airbyte.api.models.operations.GetPermissionResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + com.airbyte.api.models.operations.GetPermissionResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ObjectMapper _mapper = JSON.getMapper(); + com.airbyte.api.models.shared.PermissionResponse _out = _mapper.readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withPermissionResponse(java.util.Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.toByteArrayAndClose(_httpRes.body())); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "422", "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.toByteArrayAndClose(_httpRes.body())); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.toByteArrayAndClose(_httpRes.body())); + } + + + /** + * List Permissions by user id + * @return The call builder + */ + public com.airbyte.api.models.operations.ListPermissionsRequestBuilder listPermissions() { + return new com.airbyte.api.models.operations.ListPermissionsRequestBuilder(this); + } + + /** + * List Permissions by user id + * @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 com.airbyte.api.models.operations.ListPermissionsResponse listPermissions( + com.airbyte.api.models.operations.ListPermissionsRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + _baseUrl, + "/permissions"); + + HTTPRequest _req = new HTTPRequest(_url, "GET"); + _req.addHeader("Accept", "application/json") + .addHeader("user-agent", + this.sdkConfiguration.userAgent); + + _req.addQueryParams(Utils.getQueryParams( + com.airbyte.api.models.operations.ListPermissionsRequest.class, + request, + null)); + + Utils.configureSecurity(_req, + this.sdkConfiguration.securitySource.getSecurity()); + + HTTPClient _client = this.sdkConfiguration.defaultClient; + HttpRequest _r = + sdkConfiguration.hooks() + .beforeRequest( + new BeforeRequestContextImpl("listPermissions", sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl("listPermissions", sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl("listPermissions", sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError(new AfterErrorContextImpl("listPermissions", sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.airbyte.api.models.operations.ListPermissionsResponse.Builder _resBuilder = + com.airbyte.api.models.operations.ListPermissionsResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + com.airbyte.api.models.operations.ListPermissionsResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ObjectMapper _mapper = JSON.getMapper(); + com.airbyte.api.models.shared.PermissionsResponse _out = _mapper.readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withPermissionsResponse(java.util.Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.toByteArrayAndClose(_httpRes.body())); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.toByteArrayAndClose(_httpRes.body())); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.toByteArrayAndClose(_httpRes.body())); + } + + + /** + * Update a permission + * @return The call builder + */ + public com.airbyte.api.models.operations.UpdatePermissionRequestBuilder updatePermission() { + return new com.airbyte.api.models.operations.UpdatePermissionRequestBuilder(this); + } + + /** + * Update a permission + * @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 com.airbyte.api.models.operations.UpdatePermissionResponse updatePermission( + com.airbyte.api.models.operations.UpdatePermissionRequest request) throws Exception { + String _baseUrl = this.sdkConfiguration.serverUrl; + String _url = Utils.generateURL( + com.airbyte.api.models.operations.UpdatePermissionRequest.class, + _baseUrl, + "/permissions/{permissionId}", + request, null); + + HTTPRequest _req = new HTTPRequest(_url, "PATCH"); + Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, + new TypeReference() {}); + SerializedBody _serializedRequestBody = Utils.serializeRequestBody( + _convertedRequest, "permissionUpdateRequest", "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("updatePermission", sdkConfiguration.securitySource()), + _req.build()); + HttpResponse _httpRes; + try { + _httpRes = _client.send(_r); + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "422", "4XX", "5XX")) { + _httpRes = sdkConfiguration.hooks() + .afterError( + new AfterErrorContextImpl("updatePermission", sdkConfiguration.securitySource()), + Optional.of(_httpRes), + Optional.empty()); + } else { + _httpRes = sdkConfiguration.hooks() + .afterSuccess( + new AfterSuccessContextImpl("updatePermission", sdkConfiguration.securitySource()), + _httpRes); + } + } catch (Exception _e) { + _httpRes = sdkConfiguration.hooks() + .afterError(new AfterErrorContextImpl("updatePermission", sdkConfiguration.securitySource()), + Optional.empty(), + Optional.of(_e)); + } + String _contentType = _httpRes + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + com.airbyte.api.models.operations.UpdatePermissionResponse.Builder _resBuilder = + com.airbyte.api.models.operations.UpdatePermissionResponse + .builder() + .contentType(_contentType) + .statusCode(_httpRes.statusCode()) + .rawResponse(_httpRes); + + com.airbyte.api.models.operations.UpdatePermissionResponse _res = _resBuilder.build(); + + if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { + if (Utils.contentTypeMatches(_contentType, "application/json")) { + ObjectMapper _mapper = JSON.getMapper(); + com.airbyte.api.models.shared.PermissionResponse _out = _mapper.readValue( + Utils.toUtf8AndClose(_httpRes.body()), + new TypeReference() {}); + _res.withPermissionResponse(java.util.Optional.ofNullable(_out)); + return _res; + } else { + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected content-type received: " + _contentType, + Utils.toByteArrayAndClose(_httpRes.body())); + } + } + if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "422", "4XX", "5XX")) { + // no content + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "API error occurred", + Utils.toByteArrayAndClose(_httpRes.body())); + } + throw new SDKError( + _httpRes, + _httpRes.statusCode(), + "Unexpected status code received: " + _httpRes.statusCode(), + Utils.toByteArrayAndClose(_httpRes.body())); + } + } diff --git a/src/main/java/com/airbyte/api/Public.java b/src/main/java/com/airbyte/api/Public.java deleted file mode 100644 index b69a02fe4..000000000 --- a/src/main/java/com/airbyte/api/Public.java +++ /dev/null @@ -1,3219 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -package com.airbyte.api; - -import com.airbyte.api.models.errors.SDKError; -import com.airbyte.api.models.operations.SDKMethodInterfaces.*; -import com.airbyte.api.utils.HTTPClient; -import com.airbyte.api.utils.HTTPRequest; -import com.airbyte.api.utils.Hook.AfterErrorContextImpl; -import com.airbyte.api.utils.Hook.AfterSuccessContextImpl; -import com.airbyte.api.utils.Hook.BeforeRequestContextImpl; -import com.airbyte.api.utils.JSON; -import com.airbyte.api.utils.Retries.NonRetryableException; -import com.airbyte.api.utils.SerializedBody; -import com.airbyte.api.utils.Utils; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.InputStream; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.nio.charset.StandardCharsets; -import java.util.Optional; -import org.apache.http.NameValuePair; -import org.openapitools.jackson.nullable.JsonNullable; - -public class Public implements - MethodCallCancelJob, - MethodCallCreateConnection, - MethodCallCreateDestination, - MethodCallCreateJob, - MethodCallCreateOrUpdateWorkspaceOAuthCredentials, - MethodCallCreatePermission, - MethodCallCreateSource, - MethodCallCreateWorkspace, - MethodCallDeleteConnection, - MethodCallDeleteDestination, - MethodCallDeleteSource, - MethodCallDeleteWorkspace, - MethodCallGetConnection, - MethodCallGetDestination, - MethodCallGetJob, - MethodCallGetSource, - MethodCallGetStreamProperties, - MethodCallGetWorkspace, - MethodCallInitiateOAuth, - MethodCallListConnections, - MethodCallListDestinations, - MethodCallListJobs, - MethodCallListSources, - MethodCallListWorkspaces, - MethodCallPatchConnection, - MethodCallPatchDestination, - MethodCallPatchSource, - MethodCallPutDestination, - MethodCallPutSource, - MethodCallUpdateWorkspace { - - private final SDKConfiguration sdkConfiguration; - - Public(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - /** - * Cancel a running Job - * @return The call builder - */ - public com.airbyte.api.models.operations.CancelJobRequestBuilder cancelJob() { - return new com.airbyte.api.models.operations.CancelJobRequestBuilder(this); - } - - /** - * Cancel a running Job - * @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 com.airbyte.api.models.operations.CancelJobResponse cancelJob( - com.airbyte.api.models.operations.CancelJobRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.CancelJobRequest.class, - _baseUrl, - "/jobs/{jobId}", - request, null); - - 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("cancelJob", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("cancelJob", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("cancelJob", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("cancelJob", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CancelJobResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CancelJobResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CancelJobResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.JobResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withJobResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Create a connection - * @return The call builder - */ - public com.airbyte.api.models.operations.CreateConnectionRequestBuilder createConnection() { - return new com.airbyte.api.models.operations.CreateConnectionRequestBuilder(this); - } - - /** - * Create a connection - * @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 com.airbyte.api.models.operations.CreateConnectionResponse createConnection( - com.airbyte.api.models.shared.ConnectionCreateRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/connections"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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("createConnection", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createConnection", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createConnection", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createConnection", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreateConnectionResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreateConnectionResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreateConnectionResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.ConnectionResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withConnectionResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Create a destination - * Creates a destination given a name, workspace id, and a json blob containing the configuration for the source. - * @return The call builder - */ - public com.airbyte.api.models.operations.CreateDestinationRequestBuilder createDestination() { - return new com.airbyte.api.models.operations.CreateDestinationRequestBuilder(this); - } - - /** - * Create a destination - * Creates a destination given a name, workspace id, and a json blob containing the configuration for the source. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public com.airbyte.api.models.operations.CreateDestinationResponse createDestinationDirect() throws Exception { - return createDestination(Optional.empty()); - } - /** - * Create a destination - * Creates a destination given a name, workspace id, and a json blob containing the configuration for the source. - * @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 com.airbyte.api.models.operations.CreateDestinationResponse createDestination( - Optional request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/destinations"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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("createDestination", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createDestination", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createDestination", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createDestination", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreateDestinationResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreateDestinationResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreateDestinationResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.DestinationResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withDestinationResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Trigger a sync or reset job of a connection - * @return The call builder - */ - public com.airbyte.api.models.operations.CreateJobRequestBuilder createJob() { - return new com.airbyte.api.models.operations.CreateJobRequestBuilder(this); - } - - /** - * Trigger a sync or reset job of a connection - * @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 com.airbyte.api.models.operations.CreateJobResponse createJob( - com.airbyte.api.models.shared.JobCreateRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/jobs"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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("createJob", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createJob", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createJob", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createJob", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreateJobResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreateJobResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreateJobResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.JobResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withJobResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Create OAuth override credentials for a workspace and source type. - * Create/update a set of OAuth credentials to override the Airbyte-provided OAuth credentials used for source/destination OAuth. - * In order to determine what the credential configuration needs to be, please see the connector specification of the relevant source/destination. - * @return The call builder - */ - public com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsRequestBuilder createOrUpdateWorkspaceOAuthCredentials() { - return new com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsRequestBuilder(this); - } - - /** - * Create OAuth override credentials for a workspace and source type. - * Create/update a set of OAuth credentials to override the Airbyte-provided OAuth credentials used for source/destination OAuth. - * In order to determine what the credential configuration needs to be, please see the connector specification of the relevant source/destination. - * @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 com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse createOrUpdateWorkspaceOAuthCredentials( - com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest.class, - _baseUrl, - "/workspaces/{workspaceId}/oauthCredentials", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PUT"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "workspaceOAuthCredentialsRequest", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } - _req.setBody(Optional.ofNullable(_serializedRequestBody)); - _req.addHeader("Accept", "*/*") - .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("createOrUpdateWorkspaceOAuthCredentials", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createOrUpdateWorkspaceOAuthCredentials", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createOrUpdateWorkspaceOAuthCredentials", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createOrUpdateWorkspaceOAuthCredentials", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - // no content - return _res; - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Create a permission - * @return The call builder - */ - public com.airbyte.api.models.operations.CreatePermissionRequestBuilder createPermission() { - return new com.airbyte.api.models.operations.CreatePermissionRequestBuilder(this); - } - - /** - * Create a permission - * @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 com.airbyte.api.models.operations.CreatePermissionResponse createPermission( - com.airbyte.api.models.shared.PermissionCreateRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/permissions"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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("createPermission", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createPermission", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createPermission", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createPermission", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreatePermissionResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreatePermissionResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreatePermissionResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.PermissionResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withPermissionResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Create a source - * Creates a source given a name, workspace id, and a json blob containing the configuration for the source. - * @return The call builder - */ - public com.airbyte.api.models.operations.CreateSourceRequestBuilder createSource() { - return new com.airbyte.api.models.operations.CreateSourceRequestBuilder(this); - } - - /** - * Create a source - * Creates a source given a name, workspace id, and a json blob containing the configuration for the source. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public com.airbyte.api.models.operations.CreateSourceResponse createSourceDirect() throws Exception { - return createSource(Optional.empty()); - } - /** - * Create a source - * Creates a source given a name, workspace id, and a json blob containing the configuration for the source. - * @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 com.airbyte.api.models.operations.CreateSourceResponse createSource( - Optional request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/sources"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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("createSource", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createSource", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createSource", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createSource", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreateSourceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreateSourceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreateSourceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.SourceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withSourceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Create a workspace - * @return The call builder - */ - public com.airbyte.api.models.operations.CreateWorkspaceRequestBuilder createWorkspace() { - return new com.airbyte.api.models.operations.CreateWorkspaceRequestBuilder(this); - } - - /** - * Create a 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 com.airbyte.api.models.operations.CreateWorkspaceResponse createWorkspace( - com.airbyte.api.models.shared.WorkspaceCreateRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/workspaces"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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("createWorkspace", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createWorkspace", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createWorkspace", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createWorkspace", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreateWorkspaceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreateWorkspaceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreateWorkspaceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.WorkspaceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withWorkspaceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Delete a Connection - * @return The call builder - */ - public com.airbyte.api.models.operations.DeleteConnectionRequestBuilder deleteConnection() { - return new com.airbyte.api.models.operations.DeleteConnectionRequestBuilder(this); - } - - /** - * Delete a Connection - * @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 com.airbyte.api.models.operations.DeleteConnectionResponse deleteConnection( - com.airbyte.api.models.operations.DeleteConnectionRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.DeleteConnectionRequest.class, - _baseUrl, - "/connections/{connectionId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "DELETE"); - _req.addHeader("Accept", "*/*") - .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("deleteConnection", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("deleteConnection", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("deleteConnection", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("deleteConnection", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.DeleteConnectionResponse.Builder _resBuilder = - com.airbyte.api.models.operations.DeleteConnectionResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.DeleteConnectionResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "204")) { - // no content - return _res; - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Delete a Destination - * @return The call builder - */ - public com.airbyte.api.models.operations.DeleteDestinationRequestBuilder deleteDestination() { - return new com.airbyte.api.models.operations.DeleteDestinationRequestBuilder(this); - } - - /** - * Delete a Destination - * @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 com.airbyte.api.models.operations.DeleteDestinationResponse deleteDestination( - com.airbyte.api.models.operations.DeleteDestinationRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.DeleteDestinationRequest.class, - _baseUrl, - "/destinations/{destinationId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "DELETE"); - _req.addHeader("Accept", "*/*") - .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("deleteDestination", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("deleteDestination", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("deleteDestination", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("deleteDestination", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.DeleteDestinationResponse.Builder _resBuilder = - com.airbyte.api.models.operations.DeleteDestinationResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.DeleteDestinationResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "204")) { - // no content - return _res; - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Delete a Source - * @return The call builder - */ - public com.airbyte.api.models.operations.DeleteSourceRequestBuilder deleteSource() { - return new com.airbyte.api.models.operations.DeleteSourceRequestBuilder(this); - } - - /** - * Delete a Source - * @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 com.airbyte.api.models.operations.DeleteSourceResponse deleteSource( - com.airbyte.api.models.operations.DeleteSourceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.DeleteSourceRequest.class, - _baseUrl, - "/sources/{sourceId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "DELETE"); - _req.addHeader("Accept", "*/*") - .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("deleteSource", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("deleteSource", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("deleteSource", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("deleteSource", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.DeleteSourceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.DeleteSourceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.DeleteSourceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "204")) { - // no content - return _res; - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Delete a Workspace - * @return The call builder - */ - public com.airbyte.api.models.operations.DeleteWorkspaceRequestBuilder deleteWorkspace() { - return new com.airbyte.api.models.operations.DeleteWorkspaceRequestBuilder(this); - } - - /** - * Delete a 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 com.airbyte.api.models.operations.DeleteWorkspaceResponse deleteWorkspace( - com.airbyte.api.models.operations.DeleteWorkspaceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.DeleteWorkspaceRequest.class, - _baseUrl, - "/workspaces/{workspaceId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "DELETE"); - _req.addHeader("Accept", "*/*") - .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("deleteWorkspace", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("deleteWorkspace", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("deleteWorkspace", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("deleteWorkspace", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.DeleteWorkspaceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.DeleteWorkspaceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.DeleteWorkspaceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "204")) { - // no content - return _res; - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Get Connection details - * @return The call builder - */ - public com.airbyte.api.models.operations.GetConnectionRequestBuilder getConnection() { - return new com.airbyte.api.models.operations.GetConnectionRequestBuilder(this); - } - - /** - * Get Connection details - * @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 com.airbyte.api.models.operations.GetConnectionResponse getConnection( - com.airbyte.api.models.operations.GetConnectionRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.GetConnectionRequest.class, - _baseUrl, - "/connections/{connectionId}", - request, null); - - 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("getConnection", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("getConnection", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("getConnection", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("getConnection", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.GetConnectionResponse.Builder _resBuilder = - com.airbyte.api.models.operations.GetConnectionResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.GetConnectionResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.ConnectionResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withConnectionResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Get Destination details - * @return The call builder - */ - public com.airbyte.api.models.operations.GetDestinationRequestBuilder getDestination() { - return new com.airbyte.api.models.operations.GetDestinationRequestBuilder(this); - } - - /** - * Get Destination details - * @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 com.airbyte.api.models.operations.GetDestinationResponse getDestination( - com.airbyte.api.models.operations.GetDestinationRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.GetDestinationRequest.class, - _baseUrl, - "/destinations/{destinationId}", - request, null); - - 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("getDestination", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("getDestination", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("getDestination", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("getDestination", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.GetDestinationResponse.Builder _resBuilder = - com.airbyte.api.models.operations.GetDestinationResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.GetDestinationResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.DestinationResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withDestinationResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Get Job status and details - * @return The call builder - */ - public com.airbyte.api.models.operations.GetJobRequestBuilder getJob() { - return new com.airbyte.api.models.operations.GetJobRequestBuilder(this); - } - - /** - * Get Job status and details - * @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 com.airbyte.api.models.operations.GetJobResponse getJob( - com.airbyte.api.models.operations.GetJobRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.GetJobRequest.class, - _baseUrl, - "/jobs/{jobId}", - request, null); - - 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("getJob", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("getJob", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("getJob", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("getJob", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.GetJobResponse.Builder _resBuilder = - com.airbyte.api.models.operations.GetJobResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.GetJobResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.JobResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withJobResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Get Source details - * @return The call builder - */ - public com.airbyte.api.models.operations.GetSourceRequestBuilder getSource() { - return new com.airbyte.api.models.operations.GetSourceRequestBuilder(this); - } - - /** - * Get Source details - * @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 com.airbyte.api.models.operations.GetSourceResponse getSource( - com.airbyte.api.models.operations.GetSourceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.GetSourceRequest.class, - _baseUrl, - "/sources/{sourceId}", - request, null); - - 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("getSource", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("getSource", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("getSource", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("getSource", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.GetSourceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.GetSourceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.GetSourceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.SourceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withSourceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Get stream properties - * @return The call builder - */ - public com.airbyte.api.models.operations.GetStreamPropertiesRequestBuilder getStreamProperties() { - return new com.airbyte.api.models.operations.GetStreamPropertiesRequestBuilder(this); - } - - /** - * Get stream properties - * @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 com.airbyte.api.models.operations.GetStreamPropertiesResponse getStreamProperties( - com.airbyte.api.models.operations.GetStreamPropertiesRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/streams"); - - HTTPRequest _req = new HTTPRequest(_url, "GET"); - _req.addHeader("Accept", "application/json") - .addHeader("user-agent", - this.sdkConfiguration.userAgent); - - _req.addQueryParams(Utils.getQueryParams( - com.airbyte.api.models.operations.GetStreamPropertiesRequest.class, - request, - null)); - - Utils.configureSecurity(_req, - this.sdkConfiguration.securitySource.getSecurity()); - - HTTPClient _client = this.sdkConfiguration.defaultClient; - HttpRequest _r = - sdkConfiguration.hooks() - .beforeRequest( - new BeforeRequestContextImpl("getStreamProperties", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("getStreamProperties", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("getStreamProperties", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("getStreamProperties", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.GetStreamPropertiesResponse.Builder _resBuilder = - com.airbyte.api.models.operations.GetStreamPropertiesResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.GetStreamPropertiesResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - java.util.List _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference>() {}); - _res.withStreamPropertiesResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Get Workspace details - * @return The call builder - */ - public com.airbyte.api.models.operations.GetWorkspaceRequestBuilder getWorkspace() { - return new com.airbyte.api.models.operations.GetWorkspaceRequestBuilder(this); - } - - /** - * Get Workspace details - * @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 com.airbyte.api.models.operations.GetWorkspaceResponse getWorkspace( - com.airbyte.api.models.operations.GetWorkspaceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.GetWorkspaceRequest.class, - _baseUrl, - "/workspaces/{workspaceId}", - request, null); - - 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", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("getWorkspace", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("getWorkspace", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("getWorkspace", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.GetWorkspaceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.GetWorkspaceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.GetWorkspaceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.WorkspaceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withWorkspaceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Initiate OAuth for a source - * Given a source ID, workspace ID, and redirect URL, initiates OAuth for the source. - * - * This returns a fully formed URL for performing user authentication against the relevant source identity provider (IdP). Once authentication has been completed, the IdP will redirect to an Airbyte endpoint which will save the access and refresh tokens off as a secret and return the secret ID to the redirect URL specified in the `secret_id` query string parameter. - * - * That secret ID can be used to create a source with credentials in place of actual tokens. - * @return The call builder - */ - public com.airbyte.api.models.operations.InitiateOAuthRequestBuilder initiateOAuth() { - return new com.airbyte.api.models.operations.InitiateOAuthRequestBuilder(this); - } - - /** - * Initiate OAuth for a source - * Given a source ID, workspace ID, and redirect URL, initiates OAuth for the source. - * - * This returns a fully formed URL for performing user authentication against the relevant source identity provider (IdP). Once authentication has been completed, the IdP will redirect to an Airbyte endpoint which will save the access and refresh tokens off as a secret and return the secret ID to the redirect URL specified in the `secret_id` query string parameter. - * - * That secret ID can be used to create a source with credentials in place of actual tokens. - * @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 com.airbyte.api.models.operations.InitiateOAuthResponse initiateOAuth( - com.airbyte.api.models.shared.InitiateOauthRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/sources/initiateOAuth"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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", "*/*") - .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("initiateOAuth", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("initiateOAuth", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("initiateOAuth", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("initiateOAuth", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.InitiateOAuthResponse.Builder _resBuilder = - com.airbyte.api.models.operations.InitiateOAuthResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.InitiateOAuthResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - // no content - return _res; - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * List connections - * @return The call builder - */ - public com.airbyte.api.models.operations.ListConnectionsRequestBuilder listConnections() { - return new com.airbyte.api.models.operations.ListConnectionsRequestBuilder(this); - } - - /** - * List connections - * @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 com.airbyte.api.models.operations.ListConnectionsResponse listConnections( - com.airbyte.api.models.operations.ListConnectionsRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/connections"); - - HTTPRequest _req = new HTTPRequest(_url, "GET"); - _req.addHeader("Accept", "application/json") - .addHeader("user-agent", - this.sdkConfiguration.userAgent); - - _req.addQueryParams(Utils.getQueryParams( - com.airbyte.api.models.operations.ListConnectionsRequest.class, - request, - null)); - - Utils.configureSecurity(_req, - this.sdkConfiguration.securitySource.getSecurity()); - - HTTPClient _client = this.sdkConfiguration.defaultClient; - HttpRequest _r = - sdkConfiguration.hooks() - .beforeRequest( - new BeforeRequestContextImpl("listConnections", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("listConnections", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("listConnections", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("listConnections", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.ListConnectionsResponse.Builder _resBuilder = - com.airbyte.api.models.operations.ListConnectionsResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.ListConnectionsResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.ConnectionsResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withConnectionsResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * List destinations - * @return The call builder - */ - public com.airbyte.api.models.operations.ListDestinationsRequestBuilder listDestinations() { - return new com.airbyte.api.models.operations.ListDestinationsRequestBuilder(this); - } - - /** - * List destinations - * @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 com.airbyte.api.models.operations.ListDestinationsResponse listDestinations( - com.airbyte.api.models.operations.ListDestinationsRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/destinations"); - - HTTPRequest _req = new HTTPRequest(_url, "GET"); - _req.addHeader("Accept", "application/json") - .addHeader("user-agent", - this.sdkConfiguration.userAgent); - - _req.addQueryParams(Utils.getQueryParams( - com.airbyte.api.models.operations.ListDestinationsRequest.class, - request, - null)); - - Utils.configureSecurity(_req, - this.sdkConfiguration.securitySource.getSecurity()); - - HTTPClient _client = this.sdkConfiguration.defaultClient; - HttpRequest _r = - sdkConfiguration.hooks() - .beforeRequest( - new BeforeRequestContextImpl("listDestinations", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("listDestinations", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("listDestinations", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("listDestinations", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.ListDestinationsResponse.Builder _resBuilder = - com.airbyte.api.models.operations.ListDestinationsResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.ListDestinationsResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.DestinationsResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withDestinationsResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * List Jobs by sync type - * @return The call builder - */ - public com.airbyte.api.models.operations.ListJobsRequestBuilder listJobs() { - return new com.airbyte.api.models.operations.ListJobsRequestBuilder(this); - } - - /** - * List Jobs by sync type - * @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 com.airbyte.api.models.operations.ListJobsResponse listJobs( - com.airbyte.api.models.operations.ListJobsRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/jobs"); - - HTTPRequest _req = new HTTPRequest(_url, "GET"); - _req.addHeader("Accept", "application/json") - .addHeader("user-agent", - this.sdkConfiguration.userAgent); - - _req.addQueryParams(Utils.getQueryParams( - com.airbyte.api.models.operations.ListJobsRequest.class, - request, - null)); - - Utils.configureSecurity(_req, - this.sdkConfiguration.securitySource.getSecurity()); - - HTTPClient _client = this.sdkConfiguration.defaultClient; - HttpRequest _r = - sdkConfiguration.hooks() - .beforeRequest( - new BeforeRequestContextImpl("listJobs", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("listJobs", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("listJobs", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("listJobs", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.ListJobsResponse.Builder _resBuilder = - com.airbyte.api.models.operations.ListJobsResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.ListJobsResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.JobsResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withJobsResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * List sources - * @return The call builder - */ - public com.airbyte.api.models.operations.ListSourcesRequestBuilder listSources() { - return new com.airbyte.api.models.operations.ListSourcesRequestBuilder(this); - } - - /** - * List sources - * @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 com.airbyte.api.models.operations.ListSourcesResponse listSources( - com.airbyte.api.models.operations.ListSourcesRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/sources"); - - HTTPRequest _req = new HTTPRequest(_url, "GET"); - _req.addHeader("Accept", "application/json") - .addHeader("user-agent", - this.sdkConfiguration.userAgent); - - _req.addQueryParams(Utils.getQueryParams( - com.airbyte.api.models.operations.ListSourcesRequest.class, - request, - null)); - - Utils.configureSecurity(_req, - this.sdkConfiguration.securitySource.getSecurity()); - - HTTPClient _client = this.sdkConfiguration.defaultClient; - HttpRequest _r = - sdkConfiguration.hooks() - .beforeRequest( - new BeforeRequestContextImpl("listSources", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("listSources", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("listSources", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("listSources", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.ListSourcesResponse.Builder _resBuilder = - com.airbyte.api.models.operations.ListSourcesResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.ListSourcesResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.SourcesResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withSourcesResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * List workspaces - * @return The call builder - */ - public com.airbyte.api.models.operations.ListWorkspacesRequestBuilder listWorkspaces() { - return new com.airbyte.api.models.operations.ListWorkspacesRequestBuilder(this); - } - - /** - * List workspaces - * @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 com.airbyte.api.models.operations.ListWorkspacesResponse listWorkspaces( - com.airbyte.api.models.operations.ListWorkspacesRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/workspaces"); - - HTTPRequest _req = new HTTPRequest(_url, "GET"); - _req.addHeader("Accept", "application/json") - .addHeader("user-agent", - this.sdkConfiguration.userAgent); - - _req.addQueryParams(Utils.getQueryParams( - com.airbyte.api.models.operations.ListWorkspacesRequest.class, - request, - null)); - - Utils.configureSecurity(_req, - this.sdkConfiguration.securitySource.getSecurity()); - - HTTPClient _client = this.sdkConfiguration.defaultClient; - HttpRequest _r = - sdkConfiguration.hooks() - .beforeRequest( - new BeforeRequestContextImpl("listWorkspaces", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("listWorkspaces", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("listWorkspaces", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("listWorkspaces", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.ListWorkspacesResponse.Builder _resBuilder = - com.airbyte.api.models.operations.ListWorkspacesResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.ListWorkspacesResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.WorkspacesResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withWorkspacesResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Update Connection details - * @return The call builder - */ - public com.airbyte.api.models.operations.PatchConnectionRequestBuilder patchConnection() { - return new com.airbyte.api.models.operations.PatchConnectionRequestBuilder(this); - } - - /** - * Update Connection details - * @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 com.airbyte.api.models.operations.PatchConnectionResponse patchConnection( - com.airbyte.api.models.operations.PatchConnectionRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.PatchConnectionRequest.class, - _baseUrl, - "/connections/{connectionId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PATCH"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "connectionPatchRequest", "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("patchConnection", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("patchConnection", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("patchConnection", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("patchConnection", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.PatchConnectionResponse.Builder _resBuilder = - com.airbyte.api.models.operations.PatchConnectionResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.PatchConnectionResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.ConnectionResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withConnectionResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Update a Destination - * @return The call builder - */ - public com.airbyte.api.models.operations.PatchDestinationRequestBuilder patchDestination() { - return new com.airbyte.api.models.operations.PatchDestinationRequestBuilder(this); - } - - /** - * Update a Destination - * @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 com.airbyte.api.models.operations.PatchDestinationResponse patchDestination( - com.airbyte.api.models.operations.PatchDestinationRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.PatchDestinationRequest.class, - _baseUrl, - "/destinations/{destinationId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PATCH"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "destinationPatchRequest", "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("patchDestination", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("patchDestination", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("patchDestination", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("patchDestination", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.PatchDestinationResponse.Builder _resBuilder = - com.airbyte.api.models.operations.PatchDestinationResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.PatchDestinationResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.DestinationResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withDestinationResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Update a Source - * @return The call builder - */ - public com.airbyte.api.models.operations.PatchSourceRequestBuilder patchSource() { - return new com.airbyte.api.models.operations.PatchSourceRequestBuilder(this); - } - - /** - * Update a Source - * @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 com.airbyte.api.models.operations.PatchSourceResponse patchSource( - com.airbyte.api.models.operations.PatchSourceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.PatchSourceRequest.class, - _baseUrl, - "/sources/{sourceId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PATCH"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "sourcePatchRequest", "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("patchSource", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("patchSource", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("patchSource", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("patchSource", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.PatchSourceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.PatchSourceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.PatchSourceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.SourceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withSourceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Update a Destination and fully overwrite it - * @return The call builder - */ - public com.airbyte.api.models.operations.PutDestinationRequestBuilder putDestination() { - return new com.airbyte.api.models.operations.PutDestinationRequestBuilder(this); - } - - /** - * Update a Destination and fully overwrite it - * @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 com.airbyte.api.models.operations.PutDestinationResponse putDestination( - com.airbyte.api.models.operations.PutDestinationRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.PutDestinationRequest.class, - _baseUrl, - "/destinations/{destinationId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PUT"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "destinationPutRequest", "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("putDestination", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("putDestination", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("putDestination", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("putDestination", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.PutDestinationResponse.Builder _resBuilder = - com.airbyte.api.models.operations.PutDestinationResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.PutDestinationResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.DestinationResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withDestinationResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Update a Source and fully overwrite it - * @return The call builder - */ - public com.airbyte.api.models.operations.PutSourceRequestBuilder putSource() { - return new com.airbyte.api.models.operations.PutSourceRequestBuilder(this); - } - - /** - * Update a Source and fully overwrite it - * @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 com.airbyte.api.models.operations.PutSourceResponse putSource( - com.airbyte.api.models.operations.PutSourceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.PutSourceRequest.class, - _baseUrl, - "/sources/{sourceId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PUT"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "sourcePutRequest", "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("putSource", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("putSource", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("putSource", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("putSource", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.PutSourceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.PutSourceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.PutSourceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.SourceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withSourceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Update a workspace - * @return The call builder - */ - public com.airbyte.api.models.operations.UpdateWorkspaceRequestBuilder updateWorkspace() { - return new com.airbyte.api.models.operations.UpdateWorkspaceRequestBuilder(this); - } - - /** - * Update a 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 com.airbyte.api.models.operations.UpdateWorkspaceResponse updateWorkspace( - com.airbyte.api.models.operations.UpdateWorkspaceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.UpdateWorkspaceRequest.class, - _baseUrl, - "/workspaces/{workspaceId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PATCH"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "workspaceUpdateRequest", "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("updateWorkspace", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("updateWorkspace", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("updateWorkspace", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("updateWorkspace", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.UpdateWorkspaceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.UpdateWorkspaceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.UpdateWorkspaceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.WorkspaceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withWorkspaceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - -} diff --git a/src/main/java/com/airbyte/api/PublicConnections.java b/src/main/java/com/airbyte/api/PublicConnections.java deleted file mode 100644 index 787152387..000000000 --- a/src/main/java/com/airbyte/api/PublicConnections.java +++ /dev/null @@ -1,562 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -package com.airbyte.api; - -import com.airbyte.api.models.errors.SDKError; -import com.airbyte.api.models.operations.SDKMethodInterfaces.*; -import com.airbyte.api.utils.HTTPClient; -import com.airbyte.api.utils.HTTPRequest; -import com.airbyte.api.utils.Hook.AfterErrorContextImpl; -import com.airbyte.api.utils.Hook.AfterSuccessContextImpl; -import com.airbyte.api.utils.Hook.BeforeRequestContextImpl; -import com.airbyte.api.utils.JSON; -import com.airbyte.api.utils.Retries.NonRetryableException; -import com.airbyte.api.utils.SerializedBody; -import com.airbyte.api.utils.Utils; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.InputStream; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.nio.charset.StandardCharsets; -import java.util.Optional; -import org.apache.http.NameValuePair; -import org.openapitools.jackson.nullable.JsonNullable; - -public class PublicConnections implements - MethodCallCreateConnection, - MethodCallDeleteConnection, - MethodCallGetConnection, - MethodCallListConnections, - MethodCallPatchConnection { - - private final SDKConfiguration sdkConfiguration; - - PublicConnections(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - /** - * Create a connection - * @return The call builder - */ - public com.airbyte.api.models.operations.CreateConnectionRequestBuilder createConnection() { - return new com.airbyte.api.models.operations.CreateConnectionRequestBuilder(this); - } - - /** - * Create a connection - * @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 com.airbyte.api.models.operations.CreateConnectionResponse createConnection( - com.airbyte.api.models.shared.ConnectionCreateRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/connections"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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("createConnection", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createConnection", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createConnection", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createConnection", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreateConnectionResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreateConnectionResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreateConnectionResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.ConnectionResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withConnectionResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Delete a Connection - * @return The call builder - */ - public com.airbyte.api.models.operations.DeleteConnectionRequestBuilder deleteConnection() { - return new com.airbyte.api.models.operations.DeleteConnectionRequestBuilder(this); - } - - /** - * Delete a Connection - * @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 com.airbyte.api.models.operations.DeleteConnectionResponse deleteConnection( - com.airbyte.api.models.operations.DeleteConnectionRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.DeleteConnectionRequest.class, - _baseUrl, - "/connections/{connectionId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "DELETE"); - _req.addHeader("Accept", "*/*") - .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("deleteConnection", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("deleteConnection", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("deleteConnection", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("deleteConnection", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.DeleteConnectionResponse.Builder _resBuilder = - com.airbyte.api.models.operations.DeleteConnectionResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.DeleteConnectionResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "204")) { - // no content - return _res; - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Get Connection details - * @return The call builder - */ - public com.airbyte.api.models.operations.GetConnectionRequestBuilder getConnection() { - return new com.airbyte.api.models.operations.GetConnectionRequestBuilder(this); - } - - /** - * Get Connection details - * @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 com.airbyte.api.models.operations.GetConnectionResponse getConnection( - com.airbyte.api.models.operations.GetConnectionRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.GetConnectionRequest.class, - _baseUrl, - "/connections/{connectionId}", - request, null); - - 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("getConnection", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("getConnection", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("getConnection", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("getConnection", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.GetConnectionResponse.Builder _resBuilder = - com.airbyte.api.models.operations.GetConnectionResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.GetConnectionResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.ConnectionResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withConnectionResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * List connections - * @return The call builder - */ - public com.airbyte.api.models.operations.ListConnectionsRequestBuilder listConnections() { - return new com.airbyte.api.models.operations.ListConnectionsRequestBuilder(this); - } - - /** - * List connections - * @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 com.airbyte.api.models.operations.ListConnectionsResponse listConnections( - com.airbyte.api.models.operations.ListConnectionsRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/connections"); - - HTTPRequest _req = new HTTPRequest(_url, "GET"); - _req.addHeader("Accept", "application/json") - .addHeader("user-agent", - this.sdkConfiguration.userAgent); - - _req.addQueryParams(Utils.getQueryParams( - com.airbyte.api.models.operations.ListConnectionsRequest.class, - request, - null)); - - Utils.configureSecurity(_req, - this.sdkConfiguration.securitySource.getSecurity()); - - HTTPClient _client = this.sdkConfiguration.defaultClient; - HttpRequest _r = - sdkConfiguration.hooks() - .beforeRequest( - new BeforeRequestContextImpl("listConnections", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("listConnections", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("listConnections", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("listConnections", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.ListConnectionsResponse.Builder _resBuilder = - com.airbyte.api.models.operations.ListConnectionsResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.ListConnectionsResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.ConnectionsResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withConnectionsResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Update Connection details - * @return The call builder - */ - public com.airbyte.api.models.operations.PatchConnectionRequestBuilder patchConnection() { - return new com.airbyte.api.models.operations.PatchConnectionRequestBuilder(this); - } - - /** - * Update Connection details - * @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 com.airbyte.api.models.operations.PatchConnectionResponse patchConnection( - com.airbyte.api.models.operations.PatchConnectionRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.PatchConnectionRequest.class, - _baseUrl, - "/connections/{connectionId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PATCH"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "connectionPatchRequest", "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("patchConnection", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("patchConnection", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("patchConnection", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("patchConnection", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.PatchConnectionResponse.Builder _resBuilder = - com.airbyte.api.models.operations.PatchConnectionResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.PatchConnectionResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.ConnectionResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withConnectionResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - -} diff --git a/src/main/java/com/airbyte/api/PublicDestinations.java b/src/main/java/com/airbyte/api/PublicDestinations.java deleted file mode 100644 index e1499259f..000000000 --- a/src/main/java/com/airbyte/api/PublicDestinations.java +++ /dev/null @@ -1,676 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -package com.airbyte.api; - -import com.airbyte.api.models.errors.SDKError; -import com.airbyte.api.models.operations.SDKMethodInterfaces.*; -import com.airbyte.api.utils.HTTPClient; -import com.airbyte.api.utils.HTTPRequest; -import com.airbyte.api.utils.Hook.AfterErrorContextImpl; -import com.airbyte.api.utils.Hook.AfterSuccessContextImpl; -import com.airbyte.api.utils.Hook.BeforeRequestContextImpl; -import com.airbyte.api.utils.JSON; -import com.airbyte.api.utils.Retries.NonRetryableException; -import com.airbyte.api.utils.SerializedBody; -import com.airbyte.api.utils.Utils; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.InputStream; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.nio.charset.StandardCharsets; -import java.util.Optional; -import org.apache.http.NameValuePair; -import org.openapitools.jackson.nullable.JsonNullable; - -public class PublicDestinations implements - MethodCallCreateDestination, - MethodCallDeleteDestination, - MethodCallGetDestination, - MethodCallListDestinations, - MethodCallPatchDestination, - MethodCallPutDestination { - - private final SDKConfiguration sdkConfiguration; - - PublicDestinations(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - /** - * Create a destination - * Creates a destination given a name, workspace id, and a json blob containing the configuration for the source. - * @return The call builder - */ - public com.airbyte.api.models.operations.CreateDestinationRequestBuilder createDestination() { - return new com.airbyte.api.models.operations.CreateDestinationRequestBuilder(this); - } - - /** - * Create a destination - * Creates a destination given a name, workspace id, and a json blob containing the configuration for the source. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public com.airbyte.api.models.operations.CreateDestinationResponse createDestinationDirect() throws Exception { - return createDestination(Optional.empty()); - } - /** - * Create a destination - * Creates a destination given a name, workspace id, and a json blob containing the configuration for the source. - * @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 com.airbyte.api.models.operations.CreateDestinationResponse createDestination( - Optional request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/destinations"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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("createDestination", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createDestination", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createDestination", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createDestination", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreateDestinationResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreateDestinationResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreateDestinationResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.DestinationResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withDestinationResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Delete a Destination - * @return The call builder - */ - public com.airbyte.api.models.operations.DeleteDestinationRequestBuilder deleteDestination() { - return new com.airbyte.api.models.operations.DeleteDestinationRequestBuilder(this); - } - - /** - * Delete a Destination - * @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 com.airbyte.api.models.operations.DeleteDestinationResponse deleteDestination( - com.airbyte.api.models.operations.DeleteDestinationRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.DeleteDestinationRequest.class, - _baseUrl, - "/destinations/{destinationId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "DELETE"); - _req.addHeader("Accept", "*/*") - .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("deleteDestination", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("deleteDestination", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("deleteDestination", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("deleteDestination", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.DeleteDestinationResponse.Builder _resBuilder = - com.airbyte.api.models.operations.DeleteDestinationResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.DeleteDestinationResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "204")) { - // no content - return _res; - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Get Destination details - * @return The call builder - */ - public com.airbyte.api.models.operations.GetDestinationRequestBuilder getDestination() { - return new com.airbyte.api.models.operations.GetDestinationRequestBuilder(this); - } - - /** - * Get Destination details - * @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 com.airbyte.api.models.operations.GetDestinationResponse getDestination( - com.airbyte.api.models.operations.GetDestinationRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.GetDestinationRequest.class, - _baseUrl, - "/destinations/{destinationId}", - request, null); - - 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("getDestination", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("getDestination", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("getDestination", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("getDestination", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.GetDestinationResponse.Builder _resBuilder = - com.airbyte.api.models.operations.GetDestinationResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.GetDestinationResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.DestinationResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withDestinationResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * List destinations - * @return The call builder - */ - public com.airbyte.api.models.operations.ListDestinationsRequestBuilder listDestinations() { - return new com.airbyte.api.models.operations.ListDestinationsRequestBuilder(this); - } - - /** - * List destinations - * @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 com.airbyte.api.models.operations.ListDestinationsResponse listDestinations( - com.airbyte.api.models.operations.ListDestinationsRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/destinations"); - - HTTPRequest _req = new HTTPRequest(_url, "GET"); - _req.addHeader("Accept", "application/json") - .addHeader("user-agent", - this.sdkConfiguration.userAgent); - - _req.addQueryParams(Utils.getQueryParams( - com.airbyte.api.models.operations.ListDestinationsRequest.class, - request, - null)); - - Utils.configureSecurity(_req, - this.sdkConfiguration.securitySource.getSecurity()); - - HTTPClient _client = this.sdkConfiguration.defaultClient; - HttpRequest _r = - sdkConfiguration.hooks() - .beforeRequest( - new BeforeRequestContextImpl("listDestinations", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("listDestinations", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("listDestinations", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("listDestinations", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.ListDestinationsResponse.Builder _resBuilder = - com.airbyte.api.models.operations.ListDestinationsResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.ListDestinationsResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.DestinationsResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withDestinationsResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Update a Destination - * @return The call builder - */ - public com.airbyte.api.models.operations.PatchDestinationRequestBuilder patchDestination() { - return new com.airbyte.api.models.operations.PatchDestinationRequestBuilder(this); - } - - /** - * Update a Destination - * @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 com.airbyte.api.models.operations.PatchDestinationResponse patchDestination( - com.airbyte.api.models.operations.PatchDestinationRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.PatchDestinationRequest.class, - _baseUrl, - "/destinations/{destinationId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PATCH"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "destinationPatchRequest", "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("patchDestination", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("patchDestination", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("patchDestination", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("patchDestination", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.PatchDestinationResponse.Builder _resBuilder = - com.airbyte.api.models.operations.PatchDestinationResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.PatchDestinationResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.DestinationResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withDestinationResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Update a Destination and fully overwrite it - * @return The call builder - */ - public com.airbyte.api.models.operations.PutDestinationRequestBuilder putDestination() { - return new com.airbyte.api.models.operations.PutDestinationRequestBuilder(this); - } - - /** - * Update a Destination and fully overwrite it - * @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 com.airbyte.api.models.operations.PutDestinationResponse putDestination( - com.airbyte.api.models.operations.PutDestinationRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.PutDestinationRequest.class, - _baseUrl, - "/destinations/{destinationId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PUT"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "destinationPutRequest", "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("putDestination", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("putDestination", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("putDestination", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("putDestination", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.PutDestinationResponse.Builder _resBuilder = - com.airbyte.api.models.operations.PutDestinationResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.PutDestinationResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.DestinationResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withDestinationResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - -} diff --git a/src/main/java/com/airbyte/api/PublicJobs.java b/src/main/java/com/airbyte/api/PublicJobs.java deleted file mode 100644 index 0473681fb..000000000 --- a/src/main/java/com/airbyte/api/PublicJobs.java +++ /dev/null @@ -1,462 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -package com.airbyte.api; - -import com.airbyte.api.models.errors.SDKError; -import com.airbyte.api.models.operations.SDKMethodInterfaces.*; -import com.airbyte.api.utils.HTTPClient; -import com.airbyte.api.utils.HTTPRequest; -import com.airbyte.api.utils.Hook.AfterErrorContextImpl; -import com.airbyte.api.utils.Hook.AfterSuccessContextImpl; -import com.airbyte.api.utils.Hook.BeforeRequestContextImpl; -import com.airbyte.api.utils.JSON; -import com.airbyte.api.utils.Retries.NonRetryableException; -import com.airbyte.api.utils.SerializedBody; -import com.airbyte.api.utils.Utils; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.InputStream; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.nio.charset.StandardCharsets; -import java.util.Optional; -import org.apache.http.NameValuePair; -import org.openapitools.jackson.nullable.JsonNullable; - -public class PublicJobs implements - MethodCallCancelJob, - MethodCallCreateJob, - MethodCallGetJob, - MethodCallListJobs { - - private final SDKConfiguration sdkConfiguration; - - PublicJobs(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - /** - * Cancel a running Job - * @return The call builder - */ - public com.airbyte.api.models.operations.CancelJobRequestBuilder cancelJob() { - return new com.airbyte.api.models.operations.CancelJobRequestBuilder(this); - } - - /** - * Cancel a running Job - * @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 com.airbyte.api.models.operations.CancelJobResponse cancelJob( - com.airbyte.api.models.operations.CancelJobRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.CancelJobRequest.class, - _baseUrl, - "/jobs/{jobId}", - request, null); - - 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("cancelJob", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("cancelJob", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("cancelJob", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("cancelJob", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CancelJobResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CancelJobResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CancelJobResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.JobResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withJobResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Trigger a sync or reset job of a connection - * @return The call builder - */ - public com.airbyte.api.models.operations.CreateJobRequestBuilder createJob() { - return new com.airbyte.api.models.operations.CreateJobRequestBuilder(this); - } - - /** - * Trigger a sync or reset job of a connection - * @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 com.airbyte.api.models.operations.CreateJobResponse createJob( - com.airbyte.api.models.shared.JobCreateRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/jobs"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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("createJob", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createJob", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createJob", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createJob", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreateJobResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreateJobResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreateJobResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.JobResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withJobResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Get Job status and details - * @return The call builder - */ - public com.airbyte.api.models.operations.GetJobRequestBuilder getJob() { - return new com.airbyte.api.models.operations.GetJobRequestBuilder(this); - } - - /** - * Get Job status and details - * @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 com.airbyte.api.models.operations.GetJobResponse getJob( - com.airbyte.api.models.operations.GetJobRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.GetJobRequest.class, - _baseUrl, - "/jobs/{jobId}", - request, null); - - 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("getJob", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("getJob", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("getJob", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("getJob", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.GetJobResponse.Builder _resBuilder = - com.airbyte.api.models.operations.GetJobResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.GetJobResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.JobResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withJobResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * List Jobs by sync type - * @return The call builder - */ - public com.airbyte.api.models.operations.ListJobsRequestBuilder listJobs() { - return new com.airbyte.api.models.operations.ListJobsRequestBuilder(this); - } - - /** - * List Jobs by sync type - * @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 com.airbyte.api.models.operations.ListJobsResponse listJobs( - com.airbyte.api.models.operations.ListJobsRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/jobs"); - - HTTPRequest _req = new HTTPRequest(_url, "GET"); - _req.addHeader("Accept", "application/json") - .addHeader("user-agent", - this.sdkConfiguration.userAgent); - - _req.addQueryParams(Utils.getQueryParams( - com.airbyte.api.models.operations.ListJobsRequest.class, - request, - null)); - - Utils.configureSecurity(_req, - this.sdkConfiguration.securitySource.getSecurity()); - - HTTPClient _client = this.sdkConfiguration.defaultClient; - HttpRequest _r = - sdkConfiguration.hooks() - .beforeRequest( - new BeforeRequestContextImpl("listJobs", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("listJobs", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("listJobs", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("listJobs", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.ListJobsResponse.Builder _resBuilder = - com.airbyte.api.models.operations.ListJobsResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.ListJobsResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.JobsResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withJobsResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - -} diff --git a/src/main/java/com/airbyte/api/PublicPermissions.java b/src/main/java/com/airbyte/api/PublicPermissions.java deleted file mode 100644 index 6df9171c7..000000000 --- a/src/main/java/com/airbyte/api/PublicPermissions.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -package com.airbyte.api; - -import com.airbyte.api.models.errors.SDKError; -import com.airbyte.api.models.operations.SDKMethodInterfaces.*; -import com.airbyte.api.utils.HTTPClient; -import com.airbyte.api.utils.HTTPRequest; -import com.airbyte.api.utils.Hook.AfterErrorContextImpl; -import com.airbyte.api.utils.Hook.AfterSuccessContextImpl; -import com.airbyte.api.utils.Hook.BeforeRequestContextImpl; -import com.airbyte.api.utils.JSON; -import com.airbyte.api.utils.Retries.NonRetryableException; -import com.airbyte.api.utils.SerializedBody; -import com.airbyte.api.utils.Utils; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.InputStream; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.nio.charset.StandardCharsets; -import java.util.Optional; -import org.openapitools.jackson.nullable.JsonNullable; - -public class PublicPermissions implements - MethodCallCreatePermission { - - private final SDKConfiguration sdkConfiguration; - - PublicPermissions(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - /** - * Create a permission - * @return The call builder - */ - public com.airbyte.api.models.operations.CreatePermissionRequestBuilder createPermission() { - return new com.airbyte.api.models.operations.CreatePermissionRequestBuilder(this); - } - - /** - * Create a permission - * @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 com.airbyte.api.models.operations.CreatePermissionResponse createPermission( - com.airbyte.api.models.shared.PermissionCreateRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/permissions"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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("createPermission", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createPermission", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createPermission", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createPermission", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreatePermissionResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreatePermissionResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreatePermissionResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.PermissionResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withPermissionResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - -} diff --git a/src/main/java/com/airbyte/api/PublicSources.java b/src/main/java/com/airbyte/api/PublicSources.java deleted file mode 100644 index 03c2c2f23..000000000 --- a/src/main/java/com/airbyte/api/PublicSources.java +++ /dev/null @@ -1,784 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -package com.airbyte.api; - -import com.airbyte.api.models.errors.SDKError; -import com.airbyte.api.models.operations.SDKMethodInterfaces.*; -import com.airbyte.api.utils.HTTPClient; -import com.airbyte.api.utils.HTTPRequest; -import com.airbyte.api.utils.Hook.AfterErrorContextImpl; -import com.airbyte.api.utils.Hook.AfterSuccessContextImpl; -import com.airbyte.api.utils.Hook.BeforeRequestContextImpl; -import com.airbyte.api.utils.JSON; -import com.airbyte.api.utils.Retries.NonRetryableException; -import com.airbyte.api.utils.SerializedBody; -import com.airbyte.api.utils.Utils; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.InputStream; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.nio.charset.StandardCharsets; -import java.util.Optional; -import org.apache.http.NameValuePair; -import org.openapitools.jackson.nullable.JsonNullable; - -public class PublicSources implements - MethodCallCreateSource, - MethodCallDeleteSource, - MethodCallGetSource, - MethodCallInitiateOAuth, - MethodCallListSources, - MethodCallPatchSource, - MethodCallPutSource { - - private final SDKConfiguration sdkConfiguration; - - PublicSources(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - /** - * Create a source - * Creates a source given a name, workspace id, and a json blob containing the configuration for the source. - * @return The call builder - */ - public com.airbyte.api.models.operations.CreateSourceRequestBuilder createSource() { - return new com.airbyte.api.models.operations.CreateSourceRequestBuilder(this); - } - - /** - * Create a source - * Creates a source given a name, workspace id, and a json blob containing the configuration for the source. - * @return The response from the API call - * @throws Exception if the API call fails - */ - public com.airbyte.api.models.operations.CreateSourceResponse createSourceDirect() throws Exception { - return createSource(Optional.empty()); - } - /** - * Create a source - * Creates a source given a name, workspace id, and a json blob containing the configuration for the source. - * @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 com.airbyte.api.models.operations.CreateSourceResponse createSource( - Optional request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/sources"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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("createSource", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createSource", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createSource", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createSource", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreateSourceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreateSourceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreateSourceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.SourceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withSourceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Delete a Source - * @return The call builder - */ - public com.airbyte.api.models.operations.DeleteSourceRequestBuilder deleteSource() { - return new com.airbyte.api.models.operations.DeleteSourceRequestBuilder(this); - } - - /** - * Delete a Source - * @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 com.airbyte.api.models.operations.DeleteSourceResponse deleteSource( - com.airbyte.api.models.operations.DeleteSourceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.DeleteSourceRequest.class, - _baseUrl, - "/sources/{sourceId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "DELETE"); - _req.addHeader("Accept", "*/*") - .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("deleteSource", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("deleteSource", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("deleteSource", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("deleteSource", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.DeleteSourceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.DeleteSourceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.DeleteSourceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "204")) { - // no content - return _res; - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Get Source details - * @return The call builder - */ - public com.airbyte.api.models.operations.GetSourceRequestBuilder getSource() { - return new com.airbyte.api.models.operations.GetSourceRequestBuilder(this); - } - - /** - * Get Source details - * @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 com.airbyte.api.models.operations.GetSourceResponse getSource( - com.airbyte.api.models.operations.GetSourceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.GetSourceRequest.class, - _baseUrl, - "/sources/{sourceId}", - request, null); - - 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("getSource", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("getSource", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("getSource", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("getSource", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.GetSourceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.GetSourceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.GetSourceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.SourceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withSourceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Initiate OAuth for a source - * Given a source ID, workspace ID, and redirect URL, initiates OAuth for the source. - * - * This returns a fully formed URL for performing user authentication against the relevant source identity provider (IdP). Once authentication has been completed, the IdP will redirect to an Airbyte endpoint which will save the access and refresh tokens off as a secret and return the secret ID to the redirect URL specified in the `secret_id` query string parameter. - * - * That secret ID can be used to create a source with credentials in place of actual tokens. - * @return The call builder - */ - public com.airbyte.api.models.operations.InitiateOAuthRequestBuilder initiateOAuth() { - return new com.airbyte.api.models.operations.InitiateOAuthRequestBuilder(this); - } - - /** - * Initiate OAuth for a source - * Given a source ID, workspace ID, and redirect URL, initiates OAuth for the source. - * - * This returns a fully formed URL for performing user authentication against the relevant source identity provider (IdP). Once authentication has been completed, the IdP will redirect to an Airbyte endpoint which will save the access and refresh tokens off as a secret and return the secret ID to the redirect URL specified in the `secret_id` query string parameter. - * - * That secret ID can be used to create a source with credentials in place of actual tokens. - * @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 com.airbyte.api.models.operations.InitiateOAuthResponse initiateOAuth( - com.airbyte.api.models.shared.InitiateOauthRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/sources/initiateOAuth"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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", "*/*") - .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("initiateOAuth", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("initiateOAuth", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("initiateOAuth", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("initiateOAuth", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.InitiateOAuthResponse.Builder _resBuilder = - com.airbyte.api.models.operations.InitiateOAuthResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.InitiateOAuthResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - // no content - return _res; - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * List sources - * @return The call builder - */ - public com.airbyte.api.models.operations.ListSourcesRequestBuilder listSources() { - return new com.airbyte.api.models.operations.ListSourcesRequestBuilder(this); - } - - /** - * List sources - * @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 com.airbyte.api.models.operations.ListSourcesResponse listSources( - com.airbyte.api.models.operations.ListSourcesRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/sources"); - - HTTPRequest _req = new HTTPRequest(_url, "GET"); - _req.addHeader("Accept", "application/json") - .addHeader("user-agent", - this.sdkConfiguration.userAgent); - - _req.addQueryParams(Utils.getQueryParams( - com.airbyte.api.models.operations.ListSourcesRequest.class, - request, - null)); - - Utils.configureSecurity(_req, - this.sdkConfiguration.securitySource.getSecurity()); - - HTTPClient _client = this.sdkConfiguration.defaultClient; - HttpRequest _r = - sdkConfiguration.hooks() - .beforeRequest( - new BeforeRequestContextImpl("listSources", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("listSources", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("listSources", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("listSources", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.ListSourcesResponse.Builder _resBuilder = - com.airbyte.api.models.operations.ListSourcesResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.ListSourcesResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.SourcesResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withSourcesResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Update a Source - * @return The call builder - */ - public com.airbyte.api.models.operations.PatchSourceRequestBuilder patchSource() { - return new com.airbyte.api.models.operations.PatchSourceRequestBuilder(this); - } - - /** - * Update a Source - * @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 com.airbyte.api.models.operations.PatchSourceResponse patchSource( - com.airbyte.api.models.operations.PatchSourceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.PatchSourceRequest.class, - _baseUrl, - "/sources/{sourceId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PATCH"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "sourcePatchRequest", "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("patchSource", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("patchSource", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("patchSource", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("patchSource", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.PatchSourceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.PatchSourceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.PatchSourceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.SourceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withSourceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Update a Source and fully overwrite it - * @return The call builder - */ - public com.airbyte.api.models.operations.PutSourceRequestBuilder putSource() { - return new com.airbyte.api.models.operations.PutSourceRequestBuilder(this); - } - - /** - * Update a Source and fully overwrite it - * @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 com.airbyte.api.models.operations.PutSourceResponse putSource( - com.airbyte.api.models.operations.PutSourceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.PutSourceRequest.class, - _baseUrl, - "/sources/{sourceId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PUT"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "sourcePutRequest", "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("putSource", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("putSource", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("putSource", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("putSource", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.PutSourceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.PutSourceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.PutSourceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.SourceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withSourceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - -} diff --git a/src/main/java/com/airbyte/api/PublicWorkspaces.java b/src/main/java/com/airbyte/api/PublicWorkspaces.java deleted file mode 100644 index a57beb17d..000000000 --- a/src/main/java/com/airbyte/api/PublicWorkspaces.java +++ /dev/null @@ -1,666 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -package com.airbyte.api; - -import com.airbyte.api.models.errors.SDKError; -import com.airbyte.api.models.operations.SDKMethodInterfaces.*; -import com.airbyte.api.utils.HTTPClient; -import com.airbyte.api.utils.HTTPRequest; -import com.airbyte.api.utils.Hook.AfterErrorContextImpl; -import com.airbyte.api.utils.Hook.AfterSuccessContextImpl; -import com.airbyte.api.utils.Hook.BeforeRequestContextImpl; -import com.airbyte.api.utils.JSON; -import com.airbyte.api.utils.Retries.NonRetryableException; -import com.airbyte.api.utils.SerializedBody; -import com.airbyte.api.utils.Utils; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.InputStream; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.net.http.HttpRequest; -import java.net.http.HttpResponse; -import java.nio.charset.StandardCharsets; -import java.util.Optional; -import org.apache.http.NameValuePair; -import org.openapitools.jackson.nullable.JsonNullable; - -public class PublicWorkspaces implements - MethodCallCreateOrUpdateWorkspaceOAuthCredentials, - MethodCallCreateWorkspace, - MethodCallDeleteWorkspace, - MethodCallGetWorkspace, - MethodCallListWorkspaces, - MethodCallUpdateWorkspace { - - private final SDKConfiguration sdkConfiguration; - - PublicWorkspaces(SDKConfiguration sdkConfiguration) { - this.sdkConfiguration = sdkConfiguration; - } - - /** - * Create OAuth override credentials for a workspace and source type. - * Create/update a set of OAuth credentials to override the Airbyte-provided OAuth credentials used for source/destination OAuth. - * In order to determine what the credential configuration needs to be, please see the connector specification of the relevant source/destination. - * @return The call builder - */ - public com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsRequestBuilder createOrUpdateWorkspaceOAuthCredentials() { - return new com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsRequestBuilder(this); - } - - /** - * Create OAuth override credentials for a workspace and source type. - * Create/update a set of OAuth credentials to override the Airbyte-provided OAuth credentials used for source/destination OAuth. - * In order to determine what the credential configuration needs to be, please see the connector specification of the relevant source/destination. - * @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 com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse createOrUpdateWorkspaceOAuthCredentials( - com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest.class, - _baseUrl, - "/workspaces/{workspaceId}/oauthCredentials", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PUT"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "workspaceOAuthCredentialsRequest", "json", false); - if (_serializedRequestBody == null) { - throw new Exception("Request body is required"); - } - _req.setBody(Optional.ofNullable(_serializedRequestBody)); - _req.addHeader("Accept", "*/*") - .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("createOrUpdateWorkspaceOAuthCredentials", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createOrUpdateWorkspaceOAuthCredentials", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createOrUpdateWorkspaceOAuthCredentials", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createOrUpdateWorkspaceOAuthCredentials", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - // no content - return _res; - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Create a workspace - * @return The call builder - */ - public com.airbyte.api.models.operations.CreateWorkspaceRequestBuilder createWorkspace() { - return new com.airbyte.api.models.operations.CreateWorkspaceRequestBuilder(this); - } - - /** - * Create a 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 com.airbyte.api.models.operations.CreateWorkspaceResponse createWorkspace( - com.airbyte.api.models.shared.WorkspaceCreateRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/workspaces"); - - HTTPRequest _req = new HTTPRequest(_url, "POST"); - Object _convertedRequest = Utils.convertToShape(request, Utils.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("createWorkspace", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("createWorkspace", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("createWorkspace", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("createWorkspace", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.CreateWorkspaceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.CreateWorkspaceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.CreateWorkspaceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.WorkspaceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withWorkspaceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Delete a Workspace - * @return The call builder - */ - public com.airbyte.api.models.operations.DeleteWorkspaceRequestBuilder deleteWorkspace() { - return new com.airbyte.api.models.operations.DeleteWorkspaceRequestBuilder(this); - } - - /** - * Delete a 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 com.airbyte.api.models.operations.DeleteWorkspaceResponse deleteWorkspace( - com.airbyte.api.models.operations.DeleteWorkspaceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.DeleteWorkspaceRequest.class, - _baseUrl, - "/workspaces/{workspaceId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "DELETE"); - _req.addHeader("Accept", "*/*") - .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("deleteWorkspace", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("deleteWorkspace", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("deleteWorkspace", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("deleteWorkspace", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.DeleteWorkspaceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.DeleteWorkspaceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.DeleteWorkspaceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "204")) { - // no content - return _res; - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Get Workspace details - * @return The call builder - */ - public com.airbyte.api.models.operations.GetWorkspaceRequestBuilder getWorkspace() { - return new com.airbyte.api.models.operations.GetWorkspaceRequestBuilder(this); - } - - /** - * Get Workspace details - * @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 com.airbyte.api.models.operations.GetWorkspaceResponse getWorkspace( - com.airbyte.api.models.operations.GetWorkspaceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.GetWorkspaceRequest.class, - _baseUrl, - "/workspaces/{workspaceId}", - request, null); - - 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", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("getWorkspace", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("getWorkspace", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("getWorkspace", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.GetWorkspaceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.GetWorkspaceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.GetWorkspaceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.WorkspaceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withWorkspaceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * List workspaces - * @return The call builder - */ - public com.airbyte.api.models.operations.ListWorkspacesRequestBuilder listWorkspaces() { - return new com.airbyte.api.models.operations.ListWorkspacesRequestBuilder(this); - } - - /** - * List workspaces - * @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 com.airbyte.api.models.operations.ListWorkspacesResponse listWorkspaces( - com.airbyte.api.models.operations.ListWorkspacesRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - _baseUrl, - "/workspaces"); - - HTTPRequest _req = new HTTPRequest(_url, "GET"); - _req.addHeader("Accept", "application/json") - .addHeader("user-agent", - this.sdkConfiguration.userAgent); - - _req.addQueryParams(Utils.getQueryParams( - com.airbyte.api.models.operations.ListWorkspacesRequest.class, - request, - null)); - - Utils.configureSecurity(_req, - this.sdkConfiguration.securitySource.getSecurity()); - - HTTPClient _client = this.sdkConfiguration.defaultClient; - HttpRequest _r = - sdkConfiguration.hooks() - .beforeRequest( - new BeforeRequestContextImpl("listWorkspaces", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("listWorkspaces", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("listWorkspaces", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("listWorkspaces", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.ListWorkspacesResponse.Builder _resBuilder = - com.airbyte.api.models.operations.ListWorkspacesResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.ListWorkspacesResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.WorkspacesResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withWorkspacesResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "403", "404", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - - - /** - * Update a workspace - * @return The call builder - */ - public com.airbyte.api.models.operations.UpdateWorkspaceRequestBuilder updateWorkspace() { - return new com.airbyte.api.models.operations.UpdateWorkspaceRequestBuilder(this); - } - - /** - * Update a 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 com.airbyte.api.models.operations.UpdateWorkspaceResponse updateWorkspace( - com.airbyte.api.models.operations.UpdateWorkspaceRequest request) throws Exception { - String _baseUrl = this.sdkConfiguration.serverUrl; - String _url = Utils.generateURL( - com.airbyte.api.models.operations.UpdateWorkspaceRequest.class, - _baseUrl, - "/workspaces/{workspaceId}", - request, null); - - HTTPRequest _req = new HTTPRequest(_url, "PATCH"); - Object _convertedRequest = Utils.convertToShape(request, Utils.JsonShape.DEFAULT, - new TypeReference() {}); - SerializedBody _serializedRequestBody = Utils.serializeRequestBody( - _convertedRequest, "workspaceUpdateRequest", "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("updateWorkspace", sdkConfiguration.securitySource()), - _req.build()); - HttpResponse _httpRes; - try { - _httpRes = _client.send(_r); - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - _httpRes = sdkConfiguration.hooks() - .afterError( - new AfterErrorContextImpl("updateWorkspace", sdkConfiguration.securitySource()), - Optional.of(_httpRes), - Optional.empty()); - } else { - _httpRes = sdkConfiguration.hooks() - .afterSuccess( - new AfterSuccessContextImpl("updateWorkspace", sdkConfiguration.securitySource()), - _httpRes); - } - } catch (Exception _e) { - _httpRes = sdkConfiguration.hooks() - .afterError(new AfterErrorContextImpl("updateWorkspace", sdkConfiguration.securitySource()), - Optional.empty(), - Optional.of(_e)); - } - String _contentType = _httpRes - .headers() - .firstValue("Content-Type") - .orElse("application/octet-stream"); - com.airbyte.api.models.operations.UpdateWorkspaceResponse.Builder _resBuilder = - com.airbyte.api.models.operations.UpdateWorkspaceResponse - .builder() - .contentType(_contentType) - .statusCode(_httpRes.statusCode()) - .rawResponse(_httpRes); - - com.airbyte.api.models.operations.UpdateWorkspaceResponse _res = _resBuilder.build(); - - if (Utils.statusCodeMatches(_httpRes.statusCode(), "200")) { - if (Utils.contentTypeMatches(_contentType, "application/json")) { - ObjectMapper _mapper = JSON.getMapper(); - com.airbyte.api.models.shared.WorkspaceResponse _out = _mapper.readValue( - Utils.toUtf8AndClose(_httpRes.body()), - new TypeReference() {}); - _res.withWorkspaceResponse(java.util.Optional.ofNullable(_out)); - return _res; - } else { - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected content-type received: " + _contentType, - Utils.toByteArrayAndClose(_httpRes.body())); - } - } - if (Utils.statusCodeMatches(_httpRes.statusCode(), "400", "403", "4XX", "5XX")) { - // no content - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "API error occurred", - Utils.toByteArrayAndClose(_httpRes.body())); - } - throw new SDKError( - _httpRes, - _httpRes.statusCode(), - "Unexpected status code received: " + _httpRes.statusCode(), - Utils.toByteArrayAndClose(_httpRes.body())); - } - -} diff --git a/src/main/java/com/airbyte/api/SDKConfiguration.java b/src/main/java/com/airbyte/api/SDKConfiguration.java index 3ce0540c9..6e0850b87 100644 --- a/src/main/java/com/airbyte/api/SDKConfiguration.java +++ b/src/main/java/com/airbyte/api/SDKConfiguration.java @@ -21,9 +21,9 @@ public Optional securitySource() { public int serverIdx = 0; public String language = "java"; public String openapiDocVersion = "1.0.0"; - public String sdkVersion = "1.1.0"; - public String genVersion = "2.331.0"; - public String userAgent = "speakeasy-sdk/java 1.1.0 2.331.0 1.0.0 com.airbyte.api"; + public String sdkVersion = "1.2.0"; + public String genVersion = "2.332.4"; + public String userAgent = "speakeasy-sdk/java 1.2.0 2.332.4 1.0.0 com.airbyte.api"; private com.airbyte.api.utils.Hooks _hooks = new com.airbyte.api.utils.Hooks(); diff --git a/src/main/java/com/airbyte/api/models/operations/DeletePermissionRequest.java b/src/main/java/com/airbyte/api/models/operations/DeletePermissionRequest.java new file mode 100644 index 000000000..1f2cd1daa --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/DeletePermissionRequest.java @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.utils.SpeakeasyMetadata; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + + +public class DeletePermissionRequest { + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=permissionId") + private String permissionId; + + @JsonCreator + public DeletePermissionRequest( + String permissionId) { + Utils.checkNotNull(permissionId, "permissionId"); + this.permissionId = permissionId; + } + + @JsonIgnore + public String permissionId() { + return permissionId; + } + + public final static Builder builder() { + return new Builder(); + } + + public DeletePermissionRequest withPermissionId(String permissionId) { + Utils.checkNotNull(permissionId, "permissionId"); + this.permissionId = permissionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletePermissionRequest other = (DeletePermissionRequest) o; + return + java.util.Objects.deepEquals(this.permissionId, other.permissionId); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + permissionId); + } + + @Override + public String toString() { + return Utils.toString(DeletePermissionRequest.class, + "permissionId", permissionId); + } + + public final static class Builder { + + private String permissionId; + + private Builder() { + // force use of static builder() method + } + + public Builder permissionId(String permissionId) { + Utils.checkNotNull(permissionId, "permissionId"); + this.permissionId = permissionId; + return this; + } + + public DeletePermissionRequest build() { + return new DeletePermissionRequest( + permissionId); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/operations/DeletePermissionRequestBuilder.java b/src/main/java/com/airbyte/api/models/operations/DeletePermissionRequestBuilder.java new file mode 100644 index 000000000..c3c1b1ad0 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/DeletePermissionRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.models.errors.SDKError; +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class DeletePermissionRequestBuilder { + + private DeletePermissionRequest request; + private final SDKMethodInterfaces.MethodCallDeletePermission sdk; + + public DeletePermissionRequestBuilder(SDKMethodInterfaces.MethodCallDeletePermission sdk) { + this.sdk = sdk; + } + + public DeletePermissionRequestBuilder request(DeletePermissionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public DeletePermissionResponse call() throws Exception { + + return sdk.deletePermission( + request); + } +} diff --git a/src/main/java/com/airbyte/api/models/operations/DeletePermissionResponse.java b/src/main/java/com/airbyte/api/models/operations/DeletePermissionResponse.java new file mode 100644 index 000000000..b15f21580 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/DeletePermissionResponse.java @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; + + +public class DeletePermissionResponse implements com.airbyte.api.utils.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 DeletePermissionResponse( + 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 DeletePermissionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public DeletePermissionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public DeletePermissionResponse 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; + } + DeletePermissionResponse other = (DeletePermissionResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(DeletePermissionResponse.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 DeletePermissionResponse build() { + return new DeletePermissionResponse( + contentType, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/operations/GetHealthCheckRequestBuilder.java b/src/main/java/com/airbyte/api/models/operations/GetHealthCheckRequestBuilder.java new file mode 100644 index 000000000..58c273378 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/GetHealthCheckRequestBuilder.java @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.models.errors.SDKError; +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetHealthCheckRequestBuilder { + + private final SDKMethodInterfaces.MethodCallGetHealthCheck sdk; + + public GetHealthCheckRequestBuilder(SDKMethodInterfaces.MethodCallGetHealthCheck sdk) { + this.sdk = sdk; + } + + public GetHealthCheckResponse call() throws Exception { + + return sdk.getHealthCheckDirect(); + } +} diff --git a/src/main/java/com/airbyte/api/models/operations/GetHealthCheckResponse.java b/src/main/java/com/airbyte/api/models/operations/GetHealthCheckResponse.java new file mode 100644 index 000000000..9e7ac2b00 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/GetHealthCheckResponse.java @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; + + +public class GetHealthCheckResponse implements com.airbyte.api.utils.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 GetHealthCheckResponse( + 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 GetHealthCheckResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetHealthCheckResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetHealthCheckResponse 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; + } + GetHealthCheckResponse other = (GetHealthCheckResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetHealthCheckResponse.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 GetHealthCheckResponse build() { + return new GetHealthCheckResponse( + contentType, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/operations/GetPermissionRequest.java b/src/main/java/com/airbyte/api/models/operations/GetPermissionRequest.java new file mode 100644 index 000000000..b7b5d1730 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/GetPermissionRequest.java @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.utils.SpeakeasyMetadata; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + + +public class GetPermissionRequest { + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=permissionId") + private String permissionId; + + @JsonCreator + public GetPermissionRequest( + String permissionId) { + Utils.checkNotNull(permissionId, "permissionId"); + this.permissionId = permissionId; + } + + @JsonIgnore + public String permissionId() { + return permissionId; + } + + public final static Builder builder() { + return new Builder(); + } + + public GetPermissionRequest withPermissionId(String permissionId) { + Utils.checkNotNull(permissionId, "permissionId"); + this.permissionId = permissionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetPermissionRequest other = (GetPermissionRequest) o; + return + java.util.Objects.deepEquals(this.permissionId, other.permissionId); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + permissionId); + } + + @Override + public String toString() { + return Utils.toString(GetPermissionRequest.class, + "permissionId", permissionId); + } + + public final static class Builder { + + private String permissionId; + + private Builder() { + // force use of static builder() method + } + + public Builder permissionId(String permissionId) { + Utils.checkNotNull(permissionId, "permissionId"); + this.permissionId = permissionId; + return this; + } + + public GetPermissionRequest build() { + return new GetPermissionRequest( + permissionId); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/operations/GetPermissionRequestBuilder.java b/src/main/java/com/airbyte/api/models/operations/GetPermissionRequestBuilder.java new file mode 100644 index 000000000..0c64acc3f --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/GetPermissionRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.models.errors.SDKError; +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GetPermissionRequestBuilder { + + private GetPermissionRequest request; + private final SDKMethodInterfaces.MethodCallGetPermission sdk; + + public GetPermissionRequestBuilder(SDKMethodInterfaces.MethodCallGetPermission sdk) { + this.sdk = sdk; + } + + public GetPermissionRequestBuilder request(GetPermissionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public GetPermissionResponse call() throws Exception { + + return sdk.getPermission( + request); + } +} diff --git a/src/main/java/com/airbyte/api/models/operations/GetPermissionResponse.java b/src/main/java/com/airbyte/api/models/operations/GetPermissionResponse.java new file mode 100644 index 000000000..465c6b011 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/GetPermissionResponse.java @@ -0,0 +1,249 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetPermissionResponse implements com.airbyte.api.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Get a Permission by the id in the path. + */ + private Optional permissionResponse; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public GetPermissionResponse( + String contentType, + Optional permissionResponse, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(permissionResponse, "permissionResponse"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.permissionResponse = permissionResponse; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public GetPermissionResponse( + 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; + } + + /** + * Get a Permission by the id in the path. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional permissionResponse() { + return (Optional) permissionResponse; + } + + /** + * 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 GetPermissionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Get a Permission by the id in the path. + */ + public GetPermissionResponse withPermissionResponse(com.airbyte.api.models.shared.PermissionResponse permissionResponse) { + Utils.checkNotNull(permissionResponse, "permissionResponse"); + this.permissionResponse = Optional.ofNullable(permissionResponse); + return this; + } + + /** + * Get a Permission by the id in the path. + */ + public GetPermissionResponse withPermissionResponse(Optional permissionResponse) { + Utils.checkNotNull(permissionResponse, "permissionResponse"); + this.permissionResponse = permissionResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetPermissionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetPermissionResponse 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; + } + GetPermissionResponse other = (GetPermissionResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.permissionResponse, other.permissionResponse) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + permissionResponse, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(GetPermissionResponse.class, + "contentType", contentType, + "permissionResponse", permissionResponse, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional permissionResponse = 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; + } + + /** + * Get a Permission by the id in the path. + */ + public Builder permissionResponse(com.airbyte.api.models.shared.PermissionResponse permissionResponse) { + Utils.checkNotNull(permissionResponse, "permissionResponse"); + this.permissionResponse = Optional.ofNullable(permissionResponse); + return this; + } + + /** + * Get a Permission by the id in the path. + */ + public Builder permissionResponse(Optional permissionResponse) { + Utils.checkNotNull(permissionResponse, "permissionResponse"); + this.permissionResponse = permissionResponse; + 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 GetPermissionResponse build() { + return new GetPermissionResponse( + contentType, + permissionResponse, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/operations/ListPermissionsRequest.java b/src/main/java/com/airbyte/api/models/operations/ListPermissionsRequest.java new file mode 100644 index 000000000..74be2a894 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/ListPermissionsRequest.java @@ -0,0 +1,127 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.utils.SpeakeasyMetadata; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; + + +public class ListPermissionsRequest { + + /** + * User Id in permission. + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=userId") + private Optional userId; + + @JsonCreator + public ListPermissionsRequest( + Optional userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + } + + public ListPermissionsRequest() { + this(Optional.empty()); + } + + /** + * User Id in permission. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional userId() { + return (Optional) userId; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * User Id in permission. + */ + public ListPermissionsRequest withUserId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = Optional.ofNullable(userId); + return this; + } + + /** + * User Id in permission. + */ + public ListPermissionsRequest withUserId(Optional userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListPermissionsRequest other = (ListPermissionsRequest) o; + return + java.util.Objects.deepEquals(this.userId, other.userId); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + userId); + } + + @Override + public String toString() { + return Utils.toString(ListPermissionsRequest.class, + "userId", userId); + } + + public final static class Builder { + + private Optional userId = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * User Id in permission. + */ + public Builder userId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = Optional.ofNullable(userId); + return this; + } + + /** + * User Id in permission. + */ + public Builder userId(Optional userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + public ListPermissionsRequest build() { + return new ListPermissionsRequest( + userId); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/operations/ListPermissionsRequestBuilder.java b/src/main/java/com/airbyte/api/models/operations/ListPermissionsRequestBuilder.java new file mode 100644 index 000000000..406b29010 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/ListPermissionsRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.models.errors.SDKError; +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class ListPermissionsRequestBuilder { + + private ListPermissionsRequest request; + private final SDKMethodInterfaces.MethodCallListPermissions sdk; + + public ListPermissionsRequestBuilder(SDKMethodInterfaces.MethodCallListPermissions sdk) { + this.sdk = sdk; + } + + public ListPermissionsRequestBuilder request(ListPermissionsRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public ListPermissionsResponse call() throws Exception { + + return sdk.listPermissions( + request); + } +} diff --git a/src/main/java/com/airbyte/api/models/operations/ListPermissionsResponse.java b/src/main/java/com/airbyte/api/models/operations/ListPermissionsResponse.java new file mode 100644 index 000000000..c89de4616 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/ListPermissionsResponse.java @@ -0,0 +1,249 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class ListPermissionsResponse implements com.airbyte.api.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * List Permissions. + */ + private Optional permissionsResponse; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public ListPermissionsResponse( + String contentType, + Optional permissionsResponse, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(permissionsResponse, "permissionsResponse"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.permissionsResponse = permissionsResponse; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public ListPermissionsResponse( + 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; + } + + /** + * List Permissions. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional permissionsResponse() { + return (Optional) permissionsResponse; + } + + /** + * 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 ListPermissionsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * List Permissions. + */ + public ListPermissionsResponse withPermissionsResponse(com.airbyte.api.models.shared.PermissionsResponse permissionsResponse) { + Utils.checkNotNull(permissionsResponse, "permissionsResponse"); + this.permissionsResponse = Optional.ofNullable(permissionsResponse); + return this; + } + + /** + * List Permissions. + */ + public ListPermissionsResponse withPermissionsResponse(Optional permissionsResponse) { + Utils.checkNotNull(permissionsResponse, "permissionsResponse"); + this.permissionsResponse = permissionsResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ListPermissionsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ListPermissionsResponse 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; + } + ListPermissionsResponse other = (ListPermissionsResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.permissionsResponse, other.permissionsResponse) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + permissionsResponse, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(ListPermissionsResponse.class, + "contentType", contentType, + "permissionsResponse", permissionsResponse, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional permissionsResponse = 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; + } + + /** + * List Permissions. + */ + public Builder permissionsResponse(com.airbyte.api.models.shared.PermissionsResponse permissionsResponse) { + Utils.checkNotNull(permissionsResponse, "permissionsResponse"); + this.permissionsResponse = Optional.ofNullable(permissionsResponse); + return this; + } + + /** + * List Permissions. + */ + public Builder permissionsResponse(Optional permissionsResponse) { + Utils.checkNotNull(permissionsResponse, "permissionsResponse"); + this.permissionsResponse = permissionsResponse; + 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 ListPermissionsResponse build() { + return new ListPermissionsResponse( + contentType, + permissionsResponse, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/operations/SDKMethodInterfaces.java b/src/main/java/com/airbyte/api/models/operations/SDKMethodInterfaces.java index 7c2e7dcd1..92d6f1199 100644 --- a/src/main/java/com/airbyte/api/models/operations/SDKMethodInterfaces.java +++ b/src/main/java/com/airbyte/api/models/operations/SDKMethodInterfaces.java @@ -44,69 +44,56 @@ com.airbyte.api.models.operations.PatchConnectionResponse patchConnection( } - public interface MethodCallCancelJob { - com.airbyte.api.models.operations.CancelJobResponse cancelJob( - com.airbyte.api.models.operations.CancelJobRequest request) throws Exception; - } - - public interface MethodCallCreateDestination { com.airbyte.api.models.operations.CreateDestinationResponse createDestination( Optional request) throws Exception; } - public interface MethodCallCreateJob { - com.airbyte.api.models.operations.CreateJobResponse createJob( - com.airbyte.api.models.shared.JobCreateRequest request) throws Exception; - } - - - public interface MethodCallCreateOrUpdateWorkspaceOAuthCredentials { - com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse createOrUpdateWorkspaceOAuthCredentials( - com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest request) throws Exception; + public interface MethodCallDeleteDestination { + com.airbyte.api.models.operations.DeleteDestinationResponse deleteDestination( + com.airbyte.api.models.operations.DeleteDestinationRequest request) throws Exception; } - public interface MethodCallCreatePermission { - com.airbyte.api.models.operations.CreatePermissionResponse createPermission( - com.airbyte.api.models.shared.PermissionCreateRequest request) throws Exception; + public interface MethodCallGetDestination { + com.airbyte.api.models.operations.GetDestinationResponse getDestination( + com.airbyte.api.models.operations.GetDestinationRequest request) throws Exception; } - public interface MethodCallCreateSource { - com.airbyte.api.models.operations.CreateSourceResponse createSource( - Optional request) throws Exception; + public interface MethodCallListDestinations { + com.airbyte.api.models.operations.ListDestinationsResponse listDestinations( + com.airbyte.api.models.operations.ListDestinationsRequest request) throws Exception; } - public interface MethodCallCreateWorkspace { - com.airbyte.api.models.operations.CreateWorkspaceResponse createWorkspace( - com.airbyte.api.models.shared.WorkspaceCreateRequest request) throws Exception; + public interface MethodCallPatchDestination { + com.airbyte.api.models.operations.PatchDestinationResponse patchDestination( + com.airbyte.api.models.operations.PatchDestinationRequest request) throws Exception; } - public interface MethodCallDeleteDestination { - com.airbyte.api.models.operations.DeleteDestinationResponse deleteDestination( - com.airbyte.api.models.operations.DeleteDestinationRequest request) throws Exception; + public interface MethodCallPutDestination { + com.airbyte.api.models.operations.PutDestinationResponse putDestination( + com.airbyte.api.models.operations.PutDestinationRequest request) throws Exception; } - public interface MethodCallDeleteSource { - com.airbyte.api.models.operations.DeleteSourceResponse deleteSource( - com.airbyte.api.models.operations.DeleteSourceRequest request) throws Exception; + public interface MethodCallGetHealthCheck { + com.airbyte.api.models.operations.GetHealthCheckResponse getHealthCheckDirect() throws Exception; } - public interface MethodCallDeleteWorkspace { - com.airbyte.api.models.operations.DeleteWorkspaceResponse deleteWorkspace( - com.airbyte.api.models.operations.DeleteWorkspaceRequest request) throws Exception; + public interface MethodCallCancelJob { + com.airbyte.api.models.operations.CancelJobResponse cancelJob( + com.airbyte.api.models.operations.CancelJobRequest request) throws Exception; } - public interface MethodCallGetDestination { - com.airbyte.api.models.operations.GetDestinationResponse getDestination( - com.airbyte.api.models.operations.GetDestinationRequest request) throws Exception; + public interface MethodCallCreateJob { + com.airbyte.api.models.operations.CreateJobResponse createJob( + com.airbyte.api.models.shared.JobCreateRequest request) throws Exception; } @@ -116,69 +103,75 @@ com.airbyte.api.models.operations.GetJobResponse getJob( } - public interface MethodCallGetSource { - com.airbyte.api.models.operations.GetSourceResponse getSource( - com.airbyte.api.models.operations.GetSourceRequest request) throws Exception; + public interface MethodCallListJobs { + com.airbyte.api.models.operations.ListJobsResponse listJobs( + com.airbyte.api.models.operations.ListJobsRequest request) throws Exception; } - public interface MethodCallGetStreamProperties { - com.airbyte.api.models.operations.GetStreamPropertiesResponse getStreamProperties( - com.airbyte.api.models.operations.GetStreamPropertiesRequest request) throws Exception; + public interface MethodCallCreatePermission { + com.airbyte.api.models.operations.CreatePermissionResponse createPermission( + com.airbyte.api.models.shared.PermissionCreateRequest request) throws Exception; } - public interface MethodCallGetWorkspace { - com.airbyte.api.models.operations.GetWorkspaceResponse getWorkspace( - com.airbyte.api.models.operations.GetWorkspaceRequest request) throws Exception; + public interface MethodCallDeletePermission { + com.airbyte.api.models.operations.DeletePermissionResponse deletePermission( + com.airbyte.api.models.operations.DeletePermissionRequest request) throws Exception; } - public interface MethodCallInitiateOAuth { - com.airbyte.api.models.operations.InitiateOAuthResponse initiateOAuth( - com.airbyte.api.models.shared.InitiateOauthRequest request) throws Exception; + public interface MethodCallGetPermission { + com.airbyte.api.models.operations.GetPermissionResponse getPermission( + com.airbyte.api.models.operations.GetPermissionRequest request) throws Exception; } - public interface MethodCallListDestinations { - com.airbyte.api.models.operations.ListDestinationsResponse listDestinations( - com.airbyte.api.models.operations.ListDestinationsRequest request) throws Exception; + public interface MethodCallListPermissions { + com.airbyte.api.models.operations.ListPermissionsResponse listPermissions( + com.airbyte.api.models.operations.ListPermissionsRequest request) throws Exception; } - public interface MethodCallListJobs { - com.airbyte.api.models.operations.ListJobsResponse listJobs( - com.airbyte.api.models.operations.ListJobsRequest request) throws Exception; + public interface MethodCallUpdatePermission { + com.airbyte.api.models.operations.UpdatePermissionResponse updatePermission( + com.airbyte.api.models.operations.UpdatePermissionRequest request) throws Exception; } - public interface MethodCallListSources { - com.airbyte.api.models.operations.ListSourcesResponse listSources( - com.airbyte.api.models.operations.ListSourcesRequest request) throws Exception; + public interface MethodCallCreateSource { + com.airbyte.api.models.operations.CreateSourceResponse createSource( + Optional request) throws Exception; } - public interface MethodCallListWorkspaces { - com.airbyte.api.models.operations.ListWorkspacesResponse listWorkspaces( - com.airbyte.api.models.operations.ListWorkspacesRequest request) throws Exception; + public interface MethodCallDeleteSource { + com.airbyte.api.models.operations.DeleteSourceResponse deleteSource( + com.airbyte.api.models.operations.DeleteSourceRequest request) throws Exception; } - public interface MethodCallPatchDestination { - com.airbyte.api.models.operations.PatchDestinationResponse patchDestination( - com.airbyte.api.models.operations.PatchDestinationRequest request) throws Exception; + public interface MethodCallGetSource { + com.airbyte.api.models.operations.GetSourceResponse getSource( + com.airbyte.api.models.operations.GetSourceRequest request) throws Exception; } - public interface MethodCallPatchSource { - com.airbyte.api.models.operations.PatchSourceResponse patchSource( - com.airbyte.api.models.operations.PatchSourceRequest request) throws Exception; + public interface MethodCallInitiateOAuth { + com.airbyte.api.models.operations.InitiateOAuthResponse initiateOAuth( + com.airbyte.api.models.shared.InitiateOauthRequest request) throws Exception; } - public interface MethodCallPutDestination { - com.airbyte.api.models.operations.PutDestinationResponse putDestination( - com.airbyte.api.models.operations.PutDestinationRequest request) throws Exception; + public interface MethodCallListSources { + com.airbyte.api.models.operations.ListSourcesResponse listSources( + com.airbyte.api.models.operations.ListSourcesRequest request) throws Exception; + } + + + public interface MethodCallPatchSource { + com.airbyte.api.models.operations.PatchSourceResponse patchSource( + com.airbyte.api.models.operations.PatchSourceRequest request) throws Exception; } @@ -188,6 +181,42 @@ com.airbyte.api.models.operations.PutSourceResponse putSource( } + public interface MethodCallGetStreamProperties { + com.airbyte.api.models.operations.GetStreamPropertiesResponse getStreamProperties( + com.airbyte.api.models.operations.GetStreamPropertiesRequest request) throws Exception; + } + + + public interface MethodCallCreateOrUpdateWorkspaceOAuthCredentials { + com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse createOrUpdateWorkspaceOAuthCredentials( + com.airbyte.api.models.operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest request) throws Exception; + } + + + public interface MethodCallCreateWorkspace { + com.airbyte.api.models.operations.CreateWorkspaceResponse createWorkspace( + com.airbyte.api.models.shared.WorkspaceCreateRequest request) throws Exception; + } + + + public interface MethodCallDeleteWorkspace { + com.airbyte.api.models.operations.DeleteWorkspaceResponse deleteWorkspace( + com.airbyte.api.models.operations.DeleteWorkspaceRequest request) throws Exception; + } + + + public interface MethodCallGetWorkspace { + com.airbyte.api.models.operations.GetWorkspaceResponse getWorkspace( + com.airbyte.api.models.operations.GetWorkspaceRequest request) throws Exception; + } + + + public interface MethodCallListWorkspaces { + com.airbyte.api.models.operations.ListWorkspacesResponse listWorkspaces( + com.airbyte.api.models.operations.ListWorkspacesRequest request) throws Exception; + } + + public interface MethodCallUpdateWorkspace { com.airbyte.api.models.operations.UpdateWorkspaceResponse updateWorkspace( com.airbyte.api.models.operations.UpdateWorkspaceRequest request) throws Exception; diff --git a/src/main/java/com/airbyte/api/models/operations/UpdatePermissionRequest.java b/src/main/java/com/airbyte/api/models/operations/UpdatePermissionRequest.java new file mode 100644 index 000000000..18e019105 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/UpdatePermissionRequest.java @@ -0,0 +1,120 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.utils.SpeakeasyMetadata; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + + +public class UpdatePermissionRequest { + + @SpeakeasyMetadata("request:mediaType=application/json") + private com.airbyte.api.models.shared.PermissionUpdateRequest permissionUpdateRequest; + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=permissionId") + private String permissionId; + + @JsonCreator + public UpdatePermissionRequest( + com.airbyte.api.models.shared.PermissionUpdateRequest permissionUpdateRequest, + String permissionId) { + Utils.checkNotNull(permissionUpdateRequest, "permissionUpdateRequest"); + Utils.checkNotNull(permissionId, "permissionId"); + this.permissionUpdateRequest = permissionUpdateRequest; + this.permissionId = permissionId; + } + + @JsonIgnore + public com.airbyte.api.models.shared.PermissionUpdateRequest permissionUpdateRequest() { + return permissionUpdateRequest; + } + + @JsonIgnore + public String permissionId() { + return permissionId; + } + + public final static Builder builder() { + return new Builder(); + } + + public UpdatePermissionRequest withPermissionUpdateRequest(com.airbyte.api.models.shared.PermissionUpdateRequest permissionUpdateRequest) { + Utils.checkNotNull(permissionUpdateRequest, "permissionUpdateRequest"); + this.permissionUpdateRequest = permissionUpdateRequest; + return this; + } + + public UpdatePermissionRequest withPermissionId(String permissionId) { + Utils.checkNotNull(permissionId, "permissionId"); + this.permissionId = permissionId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdatePermissionRequest other = (UpdatePermissionRequest) o; + return + java.util.Objects.deepEquals(this.permissionUpdateRequest, other.permissionUpdateRequest) && + java.util.Objects.deepEquals(this.permissionId, other.permissionId); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + permissionUpdateRequest, + permissionId); + } + + @Override + public String toString() { + return Utils.toString(UpdatePermissionRequest.class, + "permissionUpdateRequest", permissionUpdateRequest, + "permissionId", permissionId); + } + + public final static class Builder { + + private com.airbyte.api.models.shared.PermissionUpdateRequest permissionUpdateRequest; + + private String permissionId; + + private Builder() { + // force use of static builder() method + } + + public Builder permissionUpdateRequest(com.airbyte.api.models.shared.PermissionUpdateRequest permissionUpdateRequest) { + Utils.checkNotNull(permissionUpdateRequest, "permissionUpdateRequest"); + this.permissionUpdateRequest = permissionUpdateRequest; + return this; + } + + public Builder permissionId(String permissionId) { + Utils.checkNotNull(permissionId, "permissionId"); + this.permissionId = permissionId; + return this; + } + + public UpdatePermissionRequest build() { + return new UpdatePermissionRequest( + permissionUpdateRequest, + permissionId); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/operations/UpdatePermissionRequestBuilder.java b/src/main/java/com/airbyte/api/models/operations/UpdatePermissionRequestBuilder.java new file mode 100644 index 000000000..0f586884b --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/UpdatePermissionRequestBuilder.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.models.errors.SDKError; +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.Optional; +import java.util.stream.Stream; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class UpdatePermissionRequestBuilder { + + private UpdatePermissionRequest request; + private final SDKMethodInterfaces.MethodCallUpdatePermission sdk; + + public UpdatePermissionRequestBuilder(SDKMethodInterfaces.MethodCallUpdatePermission sdk) { + this.sdk = sdk; + } + + public UpdatePermissionRequestBuilder request(UpdatePermissionRequest request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public UpdatePermissionResponse call() throws Exception { + + return sdk.updatePermission( + request); + } +} diff --git a/src/main/java/com/airbyte/api/models/operations/UpdatePermissionResponse.java b/src/main/java/com/airbyte/api/models/operations/UpdatePermissionResponse.java new file mode 100644 index 000000000..7084ead9f --- /dev/null +++ b/src/main/java/com/airbyte/api/models/operations/UpdatePermissionResponse.java @@ -0,0 +1,249 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.operations; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class UpdatePermissionResponse implements com.airbyte.api.utils.Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * Successful updated + */ + private Optional permissionResponse; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public UpdatePermissionResponse( + String contentType, + Optional permissionResponse, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(permissionResponse, "permissionResponse"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.permissionResponse = permissionResponse; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + public UpdatePermissionResponse( + 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; + } + + /** + * Successful updated + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional permissionResponse() { + return (Optional) permissionResponse; + } + + /** + * 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 UpdatePermissionResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * Successful updated + */ + public UpdatePermissionResponse withPermissionResponse(com.airbyte.api.models.shared.PermissionResponse permissionResponse) { + Utils.checkNotNull(permissionResponse, "permissionResponse"); + this.permissionResponse = Optional.ofNullable(permissionResponse); + return this; + } + + /** + * Successful updated + */ + public UpdatePermissionResponse withPermissionResponse(Optional permissionResponse) { + Utils.checkNotNull(permissionResponse, "permissionResponse"); + this.permissionResponse = permissionResponse; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdatePermissionResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdatePermissionResponse 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; + } + UpdatePermissionResponse other = (UpdatePermissionResponse) o; + return + java.util.Objects.deepEquals(this.contentType, other.contentType) && + java.util.Objects.deepEquals(this.permissionResponse, other.permissionResponse) && + java.util.Objects.deepEquals(this.statusCode, other.statusCode) && + java.util.Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + contentType, + permissionResponse, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(UpdatePermissionResponse.class, + "contentType", contentType, + "permissionResponse", permissionResponse, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Optional permissionResponse = 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; + } + + /** + * Successful updated + */ + public Builder permissionResponse(com.airbyte.api.models.shared.PermissionResponse permissionResponse) { + Utils.checkNotNull(permissionResponse, "permissionResponse"); + this.permissionResponse = Optional.ofNullable(permissionResponse); + return this; + } + + /** + * Successful updated + */ + public Builder permissionResponse(Optional permissionResponse) { + Utils.checkNotNull(permissionResponse, "permissionResponse"); + this.permissionResponse = permissionResponse; + 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 UpdatePermissionResponse build() { + return new UpdatePermissionResponse( + contentType, + permissionResponse, + statusCode, + rawResponse); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationConfiguration.java b/src/main/java/com/airbyte/api/models/shared/DestinationConfiguration.java index b6666a810..288541afb 100644 --- a/src/main/java/com/airbyte/api/models/shared/DestinationConfiguration.java +++ b/src/main/java/com/airbyte/api/models/shared/DestinationConfiguration.java @@ -185,6 +185,11 @@ public static DestinationConfiguration of(DestinationSnowflake value) { return new DestinationConfiguration(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); } + public static DestinationConfiguration of(DestinationSnowflakeCortex value) { + Utils.checkNotNull(value, "value"); + return new DestinationConfiguration(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + public static DestinationConfiguration of(DestinationTeradata value) { Utils.checkNotNull(value, "value"); return new DestinationConfiguration(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); @@ -243,6 +248,7 @@ public static DestinationConfiguration of(DestinationYellowbrick value) { *
  • {@code DestinationS3Glue}
  • *
  • {@code DestinationSftpJson}
  • *
  • {@code DestinationSnowflake}
  • + *
  • {@code DestinationSnowflakeCortex}
  • *
  • {@code DestinationTeradata}
  • *
  • {@code DestinationTypesense}
  • *
  • {@code DestinationVectara}
  • @@ -317,6 +323,7 @@ public _Deserializer() { Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), + Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationRedshift.java b/src/main/java/com/airbyte/api/models/shared/DestinationRedshift.java index d59acf58a..d1ff9b2a6 100644 --- a/src/main/java/com/airbyte/api/models/shared/DestinationRedshift.java +++ b/src/main/java/com/airbyte/api/models/shared/DestinationRedshift.java @@ -38,6 +38,13 @@ public class DestinationRedshift { @JsonProperty("disable_type_dedupe") private Optional disableTypeDedupe; + /** + * Drop tables with CASCADE. WARNING! This will delete all data in all dependent objects (views, etc.). Use with caution. This option is intended for usecases which can easily rebuild the dependent objects. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("drop_cascade") + private Optional dropCascade; + /** * Host Endpoint of the Redshift Cluster (must include the cluster-id, region and end with .redshift.amazonaws.com) */ @@ -102,6 +109,7 @@ public class DestinationRedshift { public DestinationRedshift( @JsonProperty("database") String database, @JsonProperty("disable_type_dedupe") Optional disableTypeDedupe, + @JsonProperty("drop_cascade") Optional dropCascade, @JsonProperty("host") String host, @JsonProperty("jdbc_url_params") Optional jdbcUrlParams, @JsonProperty("password") String password, @@ -113,6 +121,7 @@ public DestinationRedshift( @JsonProperty("username") String username) { Utils.checkNotNull(database, "database"); Utils.checkNotNull(disableTypeDedupe, "disableTypeDedupe"); + Utils.checkNotNull(dropCascade, "dropCascade"); Utils.checkNotNull(host, "host"); Utils.checkNotNull(jdbcUrlParams, "jdbcUrlParams"); Utils.checkNotNull(password, "password"); @@ -125,6 +134,7 @@ public DestinationRedshift( this.database = database; this.destinationType = Builder._SINGLETON_VALUE_DestinationType.value(); this.disableTypeDedupe = disableTypeDedupe; + this.dropCascade = dropCascade; this.host = host; this.jdbcUrlParams = jdbcUrlParams; this.password = password; @@ -141,7 +151,7 @@ public DestinationRedshift( String host, String password, String username) { - this(database, Optional.empty(), host, Optional.empty(), password, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), username); + this(database, Optional.empty(), Optional.empty(), host, Optional.empty(), password, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), username); } /** @@ -166,6 +176,15 @@ public Optional disableTypeDedupe() { return (Optional) disableTypeDedupe; } + /** + * Drop tables with CASCADE. WARNING! This will delete all data in all dependent objects (views, etc.). Use with caution. This option is intended for usecases which can easily rebuild the dependent objects. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional dropCascade() { + return (Optional) dropCascade; + } + /** * Host Endpoint of the Redshift Cluster (must include the cluster-id, region and end with .redshift.amazonaws.com) */ @@ -275,6 +294,24 @@ public DestinationRedshift withDisableTypeDedupe(Optional dis return this; } + /** + * Drop tables with CASCADE. WARNING! This will delete all data in all dependent objects (views, etc.). Use with caution. This option is intended for usecases which can easily rebuild the dependent objects. + */ + public DestinationRedshift withDropCascade(boolean dropCascade) { + Utils.checkNotNull(dropCascade, "dropCascade"); + this.dropCascade = Optional.ofNullable(dropCascade); + return this; + } + + /** + * Drop tables with CASCADE. WARNING! This will delete all data in all dependent objects (views, etc.). Use with caution. This option is intended for usecases which can easily rebuild the dependent objects. + */ + public DestinationRedshift withDropCascade(Optional dropCascade) { + Utils.checkNotNull(dropCascade, "dropCascade"); + this.dropCascade = dropCascade; + return this; + } + /** * Host Endpoint of the Redshift Cluster (must include the cluster-id, region and end with .redshift.amazonaws.com) */ @@ -423,6 +460,7 @@ public boolean equals(java.lang.Object o) { java.util.Objects.deepEquals(this.database, other.database) && java.util.Objects.deepEquals(this.destinationType, other.destinationType) && java.util.Objects.deepEquals(this.disableTypeDedupe, other.disableTypeDedupe) && + java.util.Objects.deepEquals(this.dropCascade, other.dropCascade) && java.util.Objects.deepEquals(this.host, other.host) && java.util.Objects.deepEquals(this.jdbcUrlParams, other.jdbcUrlParams) && java.util.Objects.deepEquals(this.password, other.password) && @@ -440,6 +478,7 @@ public int hashCode() { database, destinationType, disableTypeDedupe, + dropCascade, host, jdbcUrlParams, password, @@ -457,6 +496,7 @@ public String toString() { "database", database, "destinationType", destinationType, "disableTypeDedupe", disableTypeDedupe, + "dropCascade", dropCascade, "host", host, "jdbcUrlParams", jdbcUrlParams, "password", password, @@ -474,6 +514,8 @@ public final static class Builder { private Optional disableTypeDedupe; + private Optional dropCascade; + private String host; private Optional jdbcUrlParams = Optional.empty(); @@ -523,6 +565,24 @@ public Builder disableTypeDedupe(Optional disableTypeDedupe) return this; } + /** + * Drop tables with CASCADE. WARNING! This will delete all data in all dependent objects (views, etc.). Use with caution. This option is intended for usecases which can easily rebuild the dependent objects. + */ + public Builder dropCascade(boolean dropCascade) { + Utils.checkNotNull(dropCascade, "dropCascade"); + this.dropCascade = Optional.ofNullable(dropCascade); + return this; + } + + /** + * Drop tables with CASCADE. WARNING! This will delete all data in all dependent objects (views, etc.). Use with caution. This option is intended for usecases which can easily rebuild the dependent objects. + */ + public Builder dropCascade(Optional dropCascade) { + Utils.checkNotNull(dropCascade, "dropCascade"); + this.dropCascade = dropCascade; + return this; + } + /** * Host Endpoint of the Redshift Cluster (must include the cluster-id, region and end with .redshift.amazonaws.com) */ @@ -662,6 +722,9 @@ public DestinationRedshift build() { if (disableTypeDedupe == null) { disableTypeDedupe = _SINGLETON_VALUE_DisableTypeDedupe.value(); } + if (dropCascade == null) { + dropCascade = _SINGLETON_VALUE_DropCascade.value(); + } if (port == null) { port = _SINGLETON_VALUE_Port.value(); } @@ -671,6 +734,7 @@ public DestinationRedshift build() { return new DestinationRedshift( database, disableTypeDedupe, + dropCascade, host, jdbcUrlParams, password, @@ -694,6 +758,12 @@ public DestinationRedshift build() { "false", new TypeReference>() {}); + private static final LazySingletonValue> _SINGLETON_VALUE_DropCascade = + new LazySingletonValue<>( + "drop_cascade", + "false", + new TypeReference>() {}); + private static final LazySingletonValue> _SINGLETON_VALUE_Port = new LazySingletonValue<>( "port", diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortex.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortex.java new file mode 100644 index 000000000..6ac6e5510 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortex.java @@ -0,0 +1,284 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +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 com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; + +/** + * DestinationSnowflakeCortex - The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration, + * as well as to provide type safety for the configuration passed to the destination. + * + * The configuration model is composed of four parts: + * * Processing configuration + * * Embedding configuration + * * Indexing configuration + * * Advanced configuration + * + * Processing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class. + */ + +public class DestinationSnowflakeCortex { + + @JsonProperty("destinationType") + private SnowflakeCortex destinationType; + + /** + * Embedding configuration + */ + @JsonProperty("embedding") + private DestinationSnowflakeCortexEmbedding embedding; + + /** + * Snowflake can be used to store vector data and retrieve embeddings. + */ + @JsonProperty("indexing") + private DestinationSnowflakeCortexIndexing indexing; + + /** + * Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("omit_raw_text") + private Optional omitRawText; + + @JsonProperty("processing") + private DestinationSnowflakeCortexProcessingConfigModel processing; + + @JsonCreator + public DestinationSnowflakeCortex( + @JsonProperty("embedding") DestinationSnowflakeCortexEmbedding embedding, + @JsonProperty("indexing") DestinationSnowflakeCortexIndexing indexing, + @JsonProperty("omit_raw_text") Optional omitRawText, + @JsonProperty("processing") DestinationSnowflakeCortexProcessingConfigModel processing) { + Utils.checkNotNull(embedding, "embedding"); + Utils.checkNotNull(indexing, "indexing"); + Utils.checkNotNull(omitRawText, "omitRawText"); + Utils.checkNotNull(processing, "processing"); + this.destinationType = Builder._SINGLETON_VALUE_DestinationType.value(); + this.embedding = embedding; + this.indexing = indexing; + this.omitRawText = omitRawText; + this.processing = processing; + } + + public DestinationSnowflakeCortex( + DestinationSnowflakeCortexEmbedding embedding, + DestinationSnowflakeCortexIndexing indexing, + DestinationSnowflakeCortexProcessingConfigModel processing) { + this(embedding, indexing, Optional.empty(), processing); + } + + @JsonIgnore + public SnowflakeCortex destinationType() { + return destinationType; + } + + /** + * Embedding configuration + */ + @JsonIgnore + public DestinationSnowflakeCortexEmbedding embedding() { + return embedding; + } + + /** + * Snowflake can be used to store vector data and retrieve embeddings. + */ + @JsonIgnore + public DestinationSnowflakeCortexIndexing indexing() { + return indexing; + } + + /** + * Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional omitRawText() { + return (Optional) omitRawText; + } + + @JsonIgnore + public DestinationSnowflakeCortexProcessingConfigModel processing() { + return processing; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Embedding configuration + */ + public DestinationSnowflakeCortex withEmbedding(DestinationSnowflakeCortexEmbedding embedding) { + Utils.checkNotNull(embedding, "embedding"); + this.embedding = embedding; + return this; + } + + /** + * Snowflake can be used to store vector data and retrieve embeddings. + */ + public DestinationSnowflakeCortex withIndexing(DestinationSnowflakeCortexIndexing indexing) { + Utils.checkNotNull(indexing, "indexing"); + this.indexing = indexing; + return this; + } + + /** + * Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source. + */ + public DestinationSnowflakeCortex withOmitRawText(boolean omitRawText) { + Utils.checkNotNull(omitRawText, "omitRawText"); + this.omitRawText = Optional.ofNullable(omitRawText); + return this; + } + + /** + * Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source. + */ + public DestinationSnowflakeCortex withOmitRawText(Optional omitRawText) { + Utils.checkNotNull(omitRawText, "omitRawText"); + this.omitRawText = omitRawText; + return this; + } + + public DestinationSnowflakeCortex withProcessing(DestinationSnowflakeCortexProcessingConfigModel processing) { + Utils.checkNotNull(processing, "processing"); + this.processing = processing; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortex other = (DestinationSnowflakeCortex) o; + return + java.util.Objects.deepEquals(this.destinationType, other.destinationType) && + java.util.Objects.deepEquals(this.embedding, other.embedding) && + java.util.Objects.deepEquals(this.indexing, other.indexing) && + java.util.Objects.deepEquals(this.omitRawText, other.omitRawText) && + java.util.Objects.deepEquals(this.processing, other.processing); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + destinationType, + embedding, + indexing, + omitRawText, + processing); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortex.class, + "destinationType", destinationType, + "embedding", embedding, + "indexing", indexing, + "omitRawText", omitRawText, + "processing", processing); + } + + public final static class Builder { + + private DestinationSnowflakeCortexEmbedding embedding; + + private DestinationSnowflakeCortexIndexing indexing; + + private Optional omitRawText; + + private DestinationSnowflakeCortexProcessingConfigModel processing; + + private Builder() { + // force use of static builder() method + } + + /** + * Embedding configuration + */ + public Builder embedding(DestinationSnowflakeCortexEmbedding embedding) { + Utils.checkNotNull(embedding, "embedding"); + this.embedding = embedding; + return this; + } + + /** + * Snowflake can be used to store vector data and retrieve embeddings. + */ + public Builder indexing(DestinationSnowflakeCortexIndexing indexing) { + Utils.checkNotNull(indexing, "indexing"); + this.indexing = indexing; + return this; + } + + /** + * Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source. + */ + public Builder omitRawText(boolean omitRawText) { + Utils.checkNotNull(omitRawText, "omitRawText"); + this.omitRawText = Optional.ofNullable(omitRawText); + return this; + } + + /** + * Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source. + */ + public Builder omitRawText(Optional omitRawText) { + Utils.checkNotNull(omitRawText, "omitRawText"); + this.omitRawText = omitRawText; + return this; + } + + public Builder processing(DestinationSnowflakeCortexProcessingConfigModel processing) { + Utils.checkNotNull(processing, "processing"); + this.processing = processing; + return this; + } + + public DestinationSnowflakeCortex build() { + if (omitRawText == null) { + omitRawText = _SINGLETON_VALUE_OmitRawText.value(); + } + return new DestinationSnowflakeCortex( + embedding, + indexing, + omitRawText, + processing); + } + + private static final LazySingletonValue _SINGLETON_VALUE_DestinationType = + new LazySingletonValue<>( + "destinationType", + "\"snowflake-cortex\"", + new TypeReference() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_OmitRawText = + new LazySingletonValue<>( + "omit_raw_text", + "false", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexAzureOpenAI.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexAzureOpenAI.java new file mode 100644 index 000000000..4e4ff436e --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexAzureOpenAI.java @@ -0,0 +1,212 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +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 com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; + +/** + * DestinationSnowflakeCortexAzureOpenAI - Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + */ + +public class DestinationSnowflakeCortexAzureOpenAI { + + /** + * The base URL for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource + */ + @JsonProperty("api_base") + private String apiBase; + + /** + * The deployment for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource + */ + @JsonProperty("deployment") + private String deployment; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mode") + private Optional mode; + + /** + * The API key for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource + */ + @JsonProperty("openai_key") + private String openaiKey; + + @JsonCreator + public DestinationSnowflakeCortexAzureOpenAI( + @JsonProperty("api_base") String apiBase, + @JsonProperty("deployment") String deployment, + @JsonProperty("openai_key") String openaiKey) { + Utils.checkNotNull(apiBase, "apiBase"); + Utils.checkNotNull(deployment, "deployment"); + Utils.checkNotNull(openaiKey, "openaiKey"); + this.apiBase = apiBase; + this.deployment = deployment; + this.mode = Builder._SINGLETON_VALUE_Mode.value(); + this.openaiKey = openaiKey; + } + + /** + * The base URL for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource + */ + @JsonIgnore + public String apiBase() { + return apiBase; + } + + /** + * The deployment for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource + */ + @JsonIgnore + public String deployment() { + return deployment; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mode() { + return (Optional) mode; + } + + /** + * The API key for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource + */ + @JsonIgnore + public String openaiKey() { + return openaiKey; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The base URL for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource + */ + public DestinationSnowflakeCortexAzureOpenAI withApiBase(String apiBase) { + Utils.checkNotNull(apiBase, "apiBase"); + this.apiBase = apiBase; + return this; + } + + /** + * The deployment for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource + */ + public DestinationSnowflakeCortexAzureOpenAI withDeployment(String deployment) { + Utils.checkNotNull(deployment, "deployment"); + this.deployment = deployment; + return this; + } + + /** + * The API key for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource + */ + public DestinationSnowflakeCortexAzureOpenAI withOpenaiKey(String openaiKey) { + Utils.checkNotNull(openaiKey, "openaiKey"); + this.openaiKey = openaiKey; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexAzureOpenAI other = (DestinationSnowflakeCortexAzureOpenAI) o; + return + java.util.Objects.deepEquals(this.apiBase, other.apiBase) && + java.util.Objects.deepEquals(this.deployment, other.deployment) && + java.util.Objects.deepEquals(this.mode, other.mode) && + java.util.Objects.deepEquals(this.openaiKey, other.openaiKey); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + apiBase, + deployment, + mode, + openaiKey); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexAzureOpenAI.class, + "apiBase", apiBase, + "deployment", deployment, + "mode", mode, + "openaiKey", openaiKey); + } + + public final static class Builder { + + private String apiBase; + + private String deployment; + + private String openaiKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The base URL for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource + */ + public Builder apiBase(String apiBase) { + Utils.checkNotNull(apiBase, "apiBase"); + this.apiBase = apiBase; + return this; + } + + /** + * The deployment for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource + */ + public Builder deployment(String deployment) { + Utils.checkNotNull(deployment, "deployment"); + this.deployment = deployment; + return this; + } + + /** + * The API key for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource + */ + public Builder openaiKey(String openaiKey) { + Utils.checkNotNull(openaiKey, "openaiKey"); + this.openaiKey = openaiKey; + return this; + } + + public DestinationSnowflakeCortexAzureOpenAI build() { + return new DestinationSnowflakeCortexAzureOpenAI( + apiBase, + deployment, + openaiKey); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Mode = + new LazySingletonValue<>( + "mode", + "\"azure_openai\"", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexByMarkdownHeader.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexByMarkdownHeader.java new file mode 100644 index 000000000..68acdc25c --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexByMarkdownHeader.java @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +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 com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; + +/** + * DestinationSnowflakeCortexByMarkdownHeader - Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk. + */ + +public class DestinationSnowflakeCortexByMarkdownHeader { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mode") + private Optional mode; + + /** + * Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("split_level") + private Optional splitLevel; + + @JsonCreator + public DestinationSnowflakeCortexByMarkdownHeader( + @JsonProperty("split_level") Optional splitLevel) { + Utils.checkNotNull(splitLevel, "splitLevel"); + this.mode = Builder._SINGLETON_VALUE_Mode.value(); + this.splitLevel = splitLevel; + } + + public DestinationSnowflakeCortexByMarkdownHeader() { + this(Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mode() { + return (Optional) mode; + } + + /** + * Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional splitLevel() { + return (Optional) splitLevel; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points + */ + public DestinationSnowflakeCortexByMarkdownHeader withSplitLevel(long splitLevel) { + Utils.checkNotNull(splitLevel, "splitLevel"); + this.splitLevel = Optional.ofNullable(splitLevel); + return this; + } + + /** + * Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points + */ + public DestinationSnowflakeCortexByMarkdownHeader withSplitLevel(Optional splitLevel) { + Utils.checkNotNull(splitLevel, "splitLevel"); + this.splitLevel = splitLevel; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexByMarkdownHeader other = (DestinationSnowflakeCortexByMarkdownHeader) o; + return + java.util.Objects.deepEquals(this.mode, other.mode) && + java.util.Objects.deepEquals(this.splitLevel, other.splitLevel); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mode, + splitLevel); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexByMarkdownHeader.class, + "mode", mode, + "splitLevel", splitLevel); + } + + public final static class Builder { + + private Optional splitLevel; + + private Builder() { + // force use of static builder() method + } + + /** + * Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points + */ + public Builder splitLevel(long splitLevel) { + Utils.checkNotNull(splitLevel, "splitLevel"); + this.splitLevel = Optional.ofNullable(splitLevel); + return this; + } + + /** + * Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points + */ + public Builder splitLevel(Optional splitLevel) { + Utils.checkNotNull(splitLevel, "splitLevel"); + this.splitLevel = splitLevel; + return this; + } + + public DestinationSnowflakeCortexByMarkdownHeader build() { + if (splitLevel == null) { + splitLevel = _SINGLETON_VALUE_SplitLevel.value(); + } + return new DestinationSnowflakeCortexByMarkdownHeader( + splitLevel); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Mode = + new LazySingletonValue<>( + "mode", + "\"markdown\"", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_SplitLevel = + new LazySingletonValue<>( + "split_level", + "1", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexByProgrammingLanguage.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexByProgrammingLanguage.java new file mode 100644 index 000000000..7f6814042 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexByProgrammingLanguage.java @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +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 com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; + +/** + * DestinationSnowflakeCortexByProgrammingLanguage - Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks. + */ + +public class DestinationSnowflakeCortexByProgrammingLanguage { + + /** + * Split code in suitable places based on the programming language + */ + @JsonProperty("language") + private DestinationSnowflakeCortexLanguage language; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mode") + private Optional mode; + + @JsonCreator + public DestinationSnowflakeCortexByProgrammingLanguage( + @JsonProperty("language") DestinationSnowflakeCortexLanguage language) { + Utils.checkNotNull(language, "language"); + this.language = language; + this.mode = Builder._SINGLETON_VALUE_Mode.value(); + } + + /** + * Split code in suitable places based on the programming language + */ + @JsonIgnore + public DestinationSnowflakeCortexLanguage language() { + return language; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mode() { + return (Optional) mode; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Split code in suitable places based on the programming language + */ + public DestinationSnowflakeCortexByProgrammingLanguage withLanguage(DestinationSnowflakeCortexLanguage language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexByProgrammingLanguage other = (DestinationSnowflakeCortexByProgrammingLanguage) o; + return + java.util.Objects.deepEquals(this.language, other.language) && + java.util.Objects.deepEquals(this.mode, other.mode); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + language, + mode); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexByProgrammingLanguage.class, + "language", language, + "mode", mode); + } + + public final static class Builder { + + private DestinationSnowflakeCortexLanguage language; + + private Builder() { + // force use of static builder() method + } + + /** + * Split code in suitable places based on the programming language + */ + public Builder language(DestinationSnowflakeCortexLanguage language) { + Utils.checkNotNull(language, "language"); + this.language = language; + return this; + } + + public DestinationSnowflakeCortexByProgrammingLanguage build() { + return new DestinationSnowflakeCortexByProgrammingLanguage( + language); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Mode = + new LazySingletonValue<>( + "mode", + "\"code\"", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexBySeparator.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexBySeparator.java new file mode 100644 index 000000000..99aafa675 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexBySeparator.java @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +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 com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; + +/** + * DestinationSnowflakeCortexBySeparator - Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc. + */ + +public class DestinationSnowflakeCortexBySeparator { + + /** + * Whether to keep the separator in the resulting chunks + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("keep_separator") + private Optional keepSeparator; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mode") + private Optional mode; + + /** + * List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use ".". To split by a newline, use "\n". + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("separators") + private Optional> separators; + + @JsonCreator + public DestinationSnowflakeCortexBySeparator( + @JsonProperty("keep_separator") Optional keepSeparator, + @JsonProperty("separators") Optional> separators) { + Utils.checkNotNull(keepSeparator, "keepSeparator"); + Utils.checkNotNull(separators, "separators"); + this.keepSeparator = keepSeparator; + this.mode = Builder._SINGLETON_VALUE_Mode.value(); + this.separators = separators; + } + + public DestinationSnowflakeCortexBySeparator() { + this(Optional.empty(), Optional.empty()); + } + + /** + * Whether to keep the separator in the resulting chunks + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional keepSeparator() { + return (Optional) keepSeparator; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mode() { + return (Optional) mode; + } + + /** + * List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use ".". To split by a newline, use "\n". + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> separators() { + return (Optional>) separators; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Whether to keep the separator in the resulting chunks + */ + public DestinationSnowflakeCortexBySeparator withKeepSeparator(boolean keepSeparator) { + Utils.checkNotNull(keepSeparator, "keepSeparator"); + this.keepSeparator = Optional.ofNullable(keepSeparator); + return this; + } + + /** + * Whether to keep the separator in the resulting chunks + */ + public DestinationSnowflakeCortexBySeparator withKeepSeparator(Optional keepSeparator) { + Utils.checkNotNull(keepSeparator, "keepSeparator"); + this.keepSeparator = keepSeparator; + return this; + } + + /** + * List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use ".". To split by a newline, use "\n". + */ + public DestinationSnowflakeCortexBySeparator withSeparators(java.util.List separators) { + Utils.checkNotNull(separators, "separators"); + this.separators = Optional.ofNullable(separators); + return this; + } + + /** + * List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use ".". To split by a newline, use "\n". + */ + public DestinationSnowflakeCortexBySeparator withSeparators(Optional> separators) { + Utils.checkNotNull(separators, "separators"); + this.separators = separators; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexBySeparator other = (DestinationSnowflakeCortexBySeparator) o; + return + java.util.Objects.deepEquals(this.keepSeparator, other.keepSeparator) && + java.util.Objects.deepEquals(this.mode, other.mode) && + java.util.Objects.deepEquals(this.separators, other.separators); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + keepSeparator, + mode, + separators); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexBySeparator.class, + "keepSeparator", keepSeparator, + "mode", mode, + "separators", separators); + } + + public final static class Builder { + + private Optional keepSeparator; + + private Optional> separators = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Whether to keep the separator in the resulting chunks + */ + public Builder keepSeparator(boolean keepSeparator) { + Utils.checkNotNull(keepSeparator, "keepSeparator"); + this.keepSeparator = Optional.ofNullable(keepSeparator); + return this; + } + + /** + * Whether to keep the separator in the resulting chunks + */ + public Builder keepSeparator(Optional keepSeparator) { + Utils.checkNotNull(keepSeparator, "keepSeparator"); + this.keepSeparator = keepSeparator; + return this; + } + + /** + * List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use ".". To split by a newline, use "\n". + */ + public Builder separators(java.util.List separators) { + Utils.checkNotNull(separators, "separators"); + this.separators = Optional.ofNullable(separators); + return this; + } + + /** + * List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use ".". To split by a newline, use "\n". + */ + public Builder separators(Optional> separators) { + Utils.checkNotNull(separators, "separators"); + this.separators = separators; + return this; + } + + public DestinationSnowflakeCortexBySeparator build() { + if (keepSeparator == null) { + keepSeparator = _SINGLETON_VALUE_KeepSeparator.value(); + } + return new DestinationSnowflakeCortexBySeparator( + keepSeparator, + separators); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_KeepSeparator = + new LazySingletonValue<>( + "keep_separator", + "false", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_Mode = + new LazySingletonValue<>( + "mode", + "\"separator\"", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexCohere.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexCohere.java new file mode 100644 index 000000000..43782c29f --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexCohere.java @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +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 com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; + +/** + * DestinationSnowflakeCortexCohere - Use the Cohere API to embed text. + */ + +public class DestinationSnowflakeCortexCohere { + + @JsonProperty("cohere_key") + private String cohereKey; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mode") + private Optional mode; + + @JsonCreator + public DestinationSnowflakeCortexCohere( + @JsonProperty("cohere_key") String cohereKey) { + Utils.checkNotNull(cohereKey, "cohereKey"); + this.cohereKey = cohereKey; + this.mode = Builder._SINGLETON_VALUE_Mode.value(); + } + + @JsonIgnore + public String cohereKey() { + return cohereKey; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mode() { + return (Optional) mode; + } + + public final static Builder builder() { + return new Builder(); + } + + public DestinationSnowflakeCortexCohere withCohereKey(String cohereKey) { + Utils.checkNotNull(cohereKey, "cohereKey"); + this.cohereKey = cohereKey; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexCohere other = (DestinationSnowflakeCortexCohere) o; + return + java.util.Objects.deepEquals(this.cohereKey, other.cohereKey) && + java.util.Objects.deepEquals(this.mode, other.mode); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + cohereKey, + mode); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexCohere.class, + "cohereKey", cohereKey, + "mode", mode); + } + + public final static class Builder { + + private String cohereKey; + + private Builder() { + // force use of static builder() method + } + + public Builder cohereKey(String cohereKey) { + Utils.checkNotNull(cohereKey, "cohereKey"); + this.cohereKey = cohereKey; + return this; + } + + public DestinationSnowflakeCortexCohere build() { + return new DestinationSnowflakeCortexCohere( + cohereKey); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Mode = + new LazySingletonValue<>( + "mode", + "\"cohere\"", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexCredentials.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexCredentials.java new file mode 100644 index 000000000..89135a431 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexCredentials.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + + +public class DestinationSnowflakeCortexCredentials { + + /** + * Enter the password you want to use to access the database + */ + @JsonProperty("password") + private String password; + + @JsonCreator + public DestinationSnowflakeCortexCredentials( + @JsonProperty("password") String password) { + Utils.checkNotNull(password, "password"); + this.password = password; + } + + /** + * Enter the password you want to use to access the database + */ + @JsonIgnore + public String password() { + return password; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Enter the password you want to use to access the database + */ + public DestinationSnowflakeCortexCredentials withPassword(String password) { + Utils.checkNotNull(password, "password"); + this.password = password; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexCredentials other = (DestinationSnowflakeCortexCredentials) o; + return + java.util.Objects.deepEquals(this.password, other.password); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + password); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexCredentials.class, + "password", password); + } + + public final static class Builder { + + private String password; + + private Builder() { + // force use of static builder() method + } + + /** + * Enter the password you want to use to access the database + */ + public Builder password(String password) { + Utils.checkNotNull(password, "password"); + this.password = password; + return this; + } + + public DestinationSnowflakeCortexCredentials build() { + return new DestinationSnowflakeCortexCredentials( + password); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexEmbedding.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexEmbedding.java new file mode 100644 index 000000000..9b511cb1d --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexEmbedding.java @@ -0,0 +1,124 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +import java.time.OffsetDateTime; +import java.time.LocalDate; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.airbyte.api.utils.TypedObject; +import com.airbyte.api.utils.Utils.JsonShape; + +/** + * DestinationSnowflakeCortexEmbedding - Embedding configuration + */ + +@JsonDeserialize(using = DestinationSnowflakeCortexEmbedding._Deserializer.class) +public class DestinationSnowflakeCortexEmbedding { + + @com.fasterxml.jackson.annotation.JsonValue + private TypedObject value; + + private DestinationSnowflakeCortexEmbedding(TypedObject value) { + this.value = value; + } + + public static DestinationSnowflakeCortexEmbedding of(DestinationSnowflakeCortexOpenAI value) { + Utils.checkNotNull(value, "value"); + return new DestinationSnowflakeCortexEmbedding(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static DestinationSnowflakeCortexEmbedding of(DestinationSnowflakeCortexCohere value) { + Utils.checkNotNull(value, "value"); + return new DestinationSnowflakeCortexEmbedding(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static DestinationSnowflakeCortexEmbedding of(DestinationSnowflakeCortexFake value) { + Utils.checkNotNull(value, "value"); + return new DestinationSnowflakeCortexEmbedding(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static DestinationSnowflakeCortexEmbedding of(DestinationSnowflakeCortexAzureOpenAI value) { + Utils.checkNotNull(value, "value"); + return new DestinationSnowflakeCortexEmbedding(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static DestinationSnowflakeCortexEmbedding of(DestinationSnowflakeCortexOpenAICompatible value) { + Utils.checkNotNull(value, "value"); + return new DestinationSnowflakeCortexEmbedding(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + /** + * Returns an instance of one of these types: + *
      + *
    • {@code DestinationSnowflakeCortexOpenAI}
    • + *
    • {@code DestinationSnowflakeCortexCohere}
    • + *
    • {@code DestinationSnowflakeCortexFake}
    • + *
    • {@code DestinationSnowflakeCortexAzureOpenAI}
    • + *
    • {@code DestinationSnowflakeCortexOpenAICompatible}
    • + *
    + * + *

    Use {@code instanceof} to determine what type is returned. For example: + * + *

    +     * if (obj.value() instanceof String) {
    +     *     String answer = (String) obj.value();
    +     *     System.out.println("answer=" + answer);
    +     * }
    +     * 
    + * + * @return value of oneOf type + **/ + public java.lang.Object value() { + return value.value(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexEmbedding other = (DestinationSnowflakeCortexEmbedding) o; + return java.util.Objects.deepEquals(this.value.value(), other.value.value()); + } + + @Override + public int hashCode() { + return java.util.Objects.hash(value.value()); + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends com.airbyte.api.utils.OneOfDeserializer { + + public _Deserializer() { + super(DestinationSnowflakeCortexEmbedding.class, + Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), + Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), + Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), + Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), + Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT)); + } + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexEmbedding.class, + "value", value); + } + +} diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexFake.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexFake.java new file mode 100644 index 000000000..f6f4a7e67 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexFake.java @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +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 com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; + +/** + * DestinationSnowflakeCortexFake - Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs. + */ + +public class DestinationSnowflakeCortexFake { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mode") + private Optional mode; + + @JsonCreator + public DestinationSnowflakeCortexFake() { + + this.mode = Builder._SINGLETON_VALUE_Mode.value(); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mode() { + return (Optional) mode; + } + + 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; + } + DestinationSnowflakeCortexFake other = (DestinationSnowflakeCortexFake) o; + return + java.util.Objects.deepEquals(this.mode, other.mode); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mode); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexFake.class, + "mode", mode); + } + + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public DestinationSnowflakeCortexFake build() { + return new DestinationSnowflakeCortexFake( + ); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Mode = + new LazySingletonValue<>( + "mode", + "\"fake\"", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexFieldNameMappingConfigModel.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexFieldNameMappingConfigModel.java new file mode 100644 index 000000000..8dabcd4c3 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexFieldNameMappingConfigModel.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + + +public class DestinationSnowflakeCortexFieldNameMappingConfigModel { + + /** + * The field name in the source + */ + @JsonProperty("from_field") + private String fromField; + + /** + * The field name to use in the destination + */ + @JsonProperty("to_field") + private String toField; + + @JsonCreator + public DestinationSnowflakeCortexFieldNameMappingConfigModel( + @JsonProperty("from_field") String fromField, + @JsonProperty("to_field") String toField) { + Utils.checkNotNull(fromField, "fromField"); + Utils.checkNotNull(toField, "toField"); + this.fromField = fromField; + this.toField = toField; + } + + /** + * The field name in the source + */ + @JsonIgnore + public String fromField() { + return fromField; + } + + /** + * The field name to use in the destination + */ + @JsonIgnore + public String toField() { + return toField; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The field name in the source + */ + public DestinationSnowflakeCortexFieldNameMappingConfigModel withFromField(String fromField) { + Utils.checkNotNull(fromField, "fromField"); + this.fromField = fromField; + return this; + } + + /** + * The field name to use in the destination + */ + public DestinationSnowflakeCortexFieldNameMappingConfigModel withToField(String toField) { + Utils.checkNotNull(toField, "toField"); + this.toField = toField; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexFieldNameMappingConfigModel other = (DestinationSnowflakeCortexFieldNameMappingConfigModel) o; + return + java.util.Objects.deepEquals(this.fromField, other.fromField) && + java.util.Objects.deepEquals(this.toField, other.toField); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + fromField, + toField); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexFieldNameMappingConfigModel.class, + "fromField", fromField, + "toField", toField); + } + + public final static class Builder { + + private String fromField; + + private String toField; + + private Builder() { + // force use of static builder() method + } + + /** + * The field name in the source + */ + public Builder fromField(String fromField) { + Utils.checkNotNull(fromField, "fromField"); + this.fromField = fromField; + return this; + } + + /** + * The field name to use in the destination + */ + public Builder toField(String toField) { + Utils.checkNotNull(toField, "toField"); + this.toField = toField; + return this; + } + + public DestinationSnowflakeCortexFieldNameMappingConfigModel build() { + return new DestinationSnowflakeCortexFieldNameMappingConfigModel( + fromField, + toField); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexIndexing.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexIndexing.java new file mode 100644 index 000000000..a2979fb6a --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexIndexing.java @@ -0,0 +1,340 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +/** + * DestinationSnowflakeCortexIndexing - Snowflake can be used to store vector data and retrieve embeddings. + */ + +public class DestinationSnowflakeCortexIndexing { + + @JsonProperty("credentials") + private DestinationSnowflakeCortexCredentials credentials; + + /** + * Enter the name of the database that you want to sync data into + */ + @JsonProperty("database") + private String database; + + /** + * Enter the name of the default schema + */ + @JsonProperty("default_schema") + private String defaultSchema; + + /** + * Enter the account name you want to use to access the database. This is usually the identifier before .snowflakecomputing.com + */ + @JsonProperty("host") + private String host; + + /** + * Enter the role that you want to use to access Snowflake + */ + @JsonProperty("role") + private String role; + + /** + * Enter the name of the user you want to use to access the database + */ + @JsonProperty("username") + private String username; + + /** + * Enter the name of the warehouse that you want to sync data into + */ + @JsonProperty("warehouse") + private String warehouse; + + @JsonCreator + public DestinationSnowflakeCortexIndexing( + @JsonProperty("credentials") DestinationSnowflakeCortexCredentials credentials, + @JsonProperty("database") String database, + @JsonProperty("default_schema") String defaultSchema, + @JsonProperty("host") String host, + @JsonProperty("role") String role, + @JsonProperty("username") String username, + @JsonProperty("warehouse") String warehouse) { + Utils.checkNotNull(credentials, "credentials"); + Utils.checkNotNull(database, "database"); + Utils.checkNotNull(defaultSchema, "defaultSchema"); + Utils.checkNotNull(host, "host"); + Utils.checkNotNull(role, "role"); + Utils.checkNotNull(username, "username"); + Utils.checkNotNull(warehouse, "warehouse"); + this.credentials = credentials; + this.database = database; + this.defaultSchema = defaultSchema; + this.host = host; + this.role = role; + this.username = username; + this.warehouse = warehouse; + } + + @JsonIgnore + public DestinationSnowflakeCortexCredentials credentials() { + return credentials; + } + + /** + * Enter the name of the database that you want to sync data into + */ + @JsonIgnore + public String database() { + return database; + } + + /** + * Enter the name of the default schema + */ + @JsonIgnore + public String defaultSchema() { + return defaultSchema; + } + + /** + * Enter the account name you want to use to access the database. This is usually the identifier before .snowflakecomputing.com + */ + @JsonIgnore + public String host() { + return host; + } + + /** + * Enter the role that you want to use to access Snowflake + */ + @JsonIgnore + public String role() { + return role; + } + + /** + * Enter the name of the user you want to use to access the database + */ + @JsonIgnore + public String username() { + return username; + } + + /** + * Enter the name of the warehouse that you want to sync data into + */ + @JsonIgnore + public String warehouse() { + return warehouse; + } + + public final static Builder builder() { + return new Builder(); + } + + public DestinationSnowflakeCortexIndexing withCredentials(DestinationSnowflakeCortexCredentials credentials) { + Utils.checkNotNull(credentials, "credentials"); + this.credentials = credentials; + return this; + } + + /** + * Enter the name of the database that you want to sync data into + */ + public DestinationSnowflakeCortexIndexing withDatabase(String database) { + Utils.checkNotNull(database, "database"); + this.database = database; + return this; + } + + /** + * Enter the name of the default schema + */ + public DestinationSnowflakeCortexIndexing withDefaultSchema(String defaultSchema) { + Utils.checkNotNull(defaultSchema, "defaultSchema"); + this.defaultSchema = defaultSchema; + return this; + } + + /** + * Enter the account name you want to use to access the database. This is usually the identifier before .snowflakecomputing.com + */ + public DestinationSnowflakeCortexIndexing withHost(String host) { + Utils.checkNotNull(host, "host"); + this.host = host; + return this; + } + + /** + * Enter the role that you want to use to access Snowflake + */ + public DestinationSnowflakeCortexIndexing withRole(String role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * Enter the name of the user you want to use to access the database + */ + public DestinationSnowflakeCortexIndexing withUsername(String username) { + Utils.checkNotNull(username, "username"); + this.username = username; + return this; + } + + /** + * Enter the name of the warehouse that you want to sync data into + */ + public DestinationSnowflakeCortexIndexing withWarehouse(String warehouse) { + Utils.checkNotNull(warehouse, "warehouse"); + this.warehouse = warehouse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexIndexing other = (DestinationSnowflakeCortexIndexing) o; + return + java.util.Objects.deepEquals(this.credentials, other.credentials) && + java.util.Objects.deepEquals(this.database, other.database) && + java.util.Objects.deepEquals(this.defaultSchema, other.defaultSchema) && + java.util.Objects.deepEquals(this.host, other.host) && + java.util.Objects.deepEquals(this.role, other.role) && + java.util.Objects.deepEquals(this.username, other.username) && + java.util.Objects.deepEquals(this.warehouse, other.warehouse); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + credentials, + database, + defaultSchema, + host, + role, + username, + warehouse); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexIndexing.class, + "credentials", credentials, + "database", database, + "defaultSchema", defaultSchema, + "host", host, + "role", role, + "username", username, + "warehouse", warehouse); + } + + public final static class Builder { + + private DestinationSnowflakeCortexCredentials credentials; + + private String database; + + private String defaultSchema; + + private String host; + + private String role; + + private String username; + + private String warehouse; + + private Builder() { + // force use of static builder() method + } + + public Builder credentials(DestinationSnowflakeCortexCredentials credentials) { + Utils.checkNotNull(credentials, "credentials"); + this.credentials = credentials; + return this; + } + + /** + * Enter the name of the database that you want to sync data into + */ + public Builder database(String database) { + Utils.checkNotNull(database, "database"); + this.database = database; + return this; + } + + /** + * Enter the name of the default schema + */ + public Builder defaultSchema(String defaultSchema) { + Utils.checkNotNull(defaultSchema, "defaultSchema"); + this.defaultSchema = defaultSchema; + return this; + } + + /** + * Enter the account name you want to use to access the database. This is usually the identifier before .snowflakecomputing.com + */ + public Builder host(String host) { + Utils.checkNotNull(host, "host"); + this.host = host; + return this; + } + + /** + * Enter the role that you want to use to access Snowflake + */ + public Builder role(String role) { + Utils.checkNotNull(role, "role"); + this.role = role; + return this; + } + + /** + * Enter the name of the user you want to use to access the database + */ + public Builder username(String username) { + Utils.checkNotNull(username, "username"); + this.username = username; + return this; + } + + /** + * Enter the name of the warehouse that you want to sync data into + */ + public Builder warehouse(String warehouse) { + Utils.checkNotNull(warehouse, "warehouse"); + this.warehouse = warehouse; + return this; + } + + public DestinationSnowflakeCortexIndexing build() { + return new DestinationSnowflakeCortexIndexing( + credentials, + database, + defaultSchema, + host, + role, + username, + warehouse); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexLanguage.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexLanguage.java new file mode 100644 index 000000000..0ac3a30a3 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexLanguage.java @@ -0,0 +1,49 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +/** + * DestinationSnowflakeCortexLanguage - Split code in suitable places based on the programming language + */ +public enum DestinationSnowflakeCortexLanguage { + CPP("cpp"), + GO("go"), + JAVA("java"), + JS("js"), + PHP("php"), + PROTO("proto"), + PYTHON("python"), + RST("rst"), + RUBY("ruby"), + RUST("rust"), + SCALA("scala"), + SWIFT("swift"), + MARKDOWN("markdown"), + LATEX("latex"), + HTML("html"), + SOL("sol"); + + @JsonValue + private final String value; + + private DestinationSnowflakeCortexLanguage(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexMode.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexMode.java new file mode 100644 index 000000000..777b57f2c --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexMode.java @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +public enum DestinationSnowflakeCortexMode { + OPENAI("openai"); + + @JsonValue + private final String value; + + private DestinationSnowflakeCortexMode(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexOpenAI.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexOpenAI.java new file mode 100644 index 000000000..cf42c7e0c --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexOpenAI.java @@ -0,0 +1,118 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +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 com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; + +/** + * DestinationSnowflakeCortexOpenAI - Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + */ + +public class DestinationSnowflakeCortexOpenAI { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mode") + private Optional mode; + + @JsonProperty("openai_key") + private String openaiKey; + + @JsonCreator + public DestinationSnowflakeCortexOpenAI( + @JsonProperty("openai_key") String openaiKey) { + Utils.checkNotNull(openaiKey, "openaiKey"); + this.mode = Builder._SINGLETON_VALUE_Mode.value(); + this.openaiKey = openaiKey; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mode() { + return (Optional) mode; + } + + @JsonIgnore + public String openaiKey() { + return openaiKey; + } + + public final static Builder builder() { + return new Builder(); + } + + public DestinationSnowflakeCortexOpenAI withOpenaiKey(String openaiKey) { + Utils.checkNotNull(openaiKey, "openaiKey"); + this.openaiKey = openaiKey; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexOpenAI other = (DestinationSnowflakeCortexOpenAI) o; + return + java.util.Objects.deepEquals(this.mode, other.mode) && + java.util.Objects.deepEquals(this.openaiKey, other.openaiKey); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + mode, + openaiKey); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexOpenAI.class, + "mode", mode, + "openaiKey", openaiKey); + } + + public final static class Builder { + + private String openaiKey; + + private Builder() { + // force use of static builder() method + } + + public Builder openaiKey(String openaiKey) { + Utils.checkNotNull(openaiKey, "openaiKey"); + this.openaiKey = openaiKey; + return this; + } + + public DestinationSnowflakeCortexOpenAI build() { + return new DestinationSnowflakeCortexOpenAI( + openaiKey); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_Mode = + new LazySingletonValue<>( + "mode", + "\"openai\"", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexOpenAICompatible.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexOpenAICompatible.java new file mode 100644 index 000000000..b46625d86 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexOpenAICompatible.java @@ -0,0 +1,299 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +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 com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; + +/** + * DestinationSnowflakeCortexOpenAICompatible - Use a service that's compatible with the OpenAI API to embed text. + */ + +public class DestinationSnowflakeCortexOpenAICompatible { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("api_key") + private Optional apiKey; + + /** + * The base URL for your OpenAI-compatible service + */ + @JsonProperty("base_url") + private String baseUrl; + + /** + * The number of dimensions the embedding model is generating + */ + @JsonProperty("dimensions") + private long dimensions; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("mode") + private Optional mode; + + /** + * The name of the model to use for embedding + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("model_name") + private Optional modelName; + + @JsonCreator + public DestinationSnowflakeCortexOpenAICompatible( + @JsonProperty("api_key") Optional apiKey, + @JsonProperty("base_url") String baseUrl, + @JsonProperty("dimensions") long dimensions, + @JsonProperty("model_name") Optional modelName) { + Utils.checkNotNull(apiKey, "apiKey"); + Utils.checkNotNull(baseUrl, "baseUrl"); + Utils.checkNotNull(dimensions, "dimensions"); + Utils.checkNotNull(modelName, "modelName"); + this.apiKey = apiKey; + this.baseUrl = baseUrl; + this.dimensions = dimensions; + this.mode = Builder._SINGLETON_VALUE_Mode.value(); + this.modelName = modelName; + } + + public DestinationSnowflakeCortexOpenAICompatible( + String baseUrl, + long dimensions) { + this(Optional.empty(), baseUrl, dimensions, Optional.empty()); + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional apiKey() { + return (Optional) apiKey; + } + + /** + * The base URL for your OpenAI-compatible service + */ + @JsonIgnore + public String baseUrl() { + return baseUrl; + } + + /** + * The number of dimensions the embedding model is generating + */ + @JsonIgnore + public long dimensions() { + return dimensions; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional mode() { + return (Optional) mode; + } + + /** + * The name of the model to use for embedding + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional modelName() { + return (Optional) modelName; + } + + public final static Builder builder() { + return new Builder(); + } + + public DestinationSnowflakeCortexOpenAICompatible withApiKey(String apiKey) { + Utils.checkNotNull(apiKey, "apiKey"); + this.apiKey = Optional.ofNullable(apiKey); + return this; + } + + public DestinationSnowflakeCortexOpenAICompatible withApiKey(Optional apiKey) { + Utils.checkNotNull(apiKey, "apiKey"); + this.apiKey = apiKey; + return this; + } + + /** + * The base URL for your OpenAI-compatible service + */ + public DestinationSnowflakeCortexOpenAICompatible withBaseUrl(String baseUrl) { + Utils.checkNotNull(baseUrl, "baseUrl"); + this.baseUrl = baseUrl; + return this; + } + + /** + * The number of dimensions the embedding model is generating + */ + public DestinationSnowflakeCortexOpenAICompatible withDimensions(long dimensions) { + Utils.checkNotNull(dimensions, "dimensions"); + this.dimensions = dimensions; + return this; + } + + /** + * The name of the model to use for embedding + */ + public DestinationSnowflakeCortexOpenAICompatible withModelName(String modelName) { + Utils.checkNotNull(modelName, "modelName"); + this.modelName = Optional.ofNullable(modelName); + return this; + } + + /** + * The name of the model to use for embedding + */ + public DestinationSnowflakeCortexOpenAICompatible withModelName(Optional modelName) { + Utils.checkNotNull(modelName, "modelName"); + this.modelName = modelName; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexOpenAICompatible other = (DestinationSnowflakeCortexOpenAICompatible) o; + return + java.util.Objects.deepEquals(this.apiKey, other.apiKey) && + java.util.Objects.deepEquals(this.baseUrl, other.baseUrl) && + java.util.Objects.deepEquals(this.dimensions, other.dimensions) && + java.util.Objects.deepEquals(this.mode, other.mode) && + java.util.Objects.deepEquals(this.modelName, other.modelName); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + apiKey, + baseUrl, + dimensions, + mode, + modelName); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexOpenAICompatible.class, + "apiKey", apiKey, + "baseUrl", baseUrl, + "dimensions", dimensions, + "mode", mode, + "modelName", modelName); + } + + public final static class Builder { + + private Optional apiKey; + + private String baseUrl; + + private Long dimensions; + + private Optional modelName; + + 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; + } + + /** + * The base URL for your OpenAI-compatible service + */ + public Builder baseUrl(String baseUrl) { + Utils.checkNotNull(baseUrl, "baseUrl"); + this.baseUrl = baseUrl; + return this; + } + + /** + * The number of dimensions the embedding model is generating + */ + public Builder dimensions(long dimensions) { + Utils.checkNotNull(dimensions, "dimensions"); + this.dimensions = dimensions; + return this; + } + + /** + * The name of the model to use for embedding + */ + public Builder modelName(String modelName) { + Utils.checkNotNull(modelName, "modelName"); + this.modelName = Optional.ofNullable(modelName); + return this; + } + + /** + * The name of the model to use for embedding + */ + public Builder modelName(Optional modelName) { + Utils.checkNotNull(modelName, "modelName"); + this.modelName = modelName; + return this; + } + + public DestinationSnowflakeCortexOpenAICompatible build() { + if (apiKey == null) { + apiKey = _SINGLETON_VALUE_ApiKey.value(); + } + if (modelName == null) { + modelName = _SINGLETON_VALUE_ModelName.value(); + } + return new DestinationSnowflakeCortexOpenAICompatible( + apiKey, + baseUrl, + dimensions, + modelName); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_ApiKey = + new LazySingletonValue<>( + "api_key", + "\"\"", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_Mode = + new LazySingletonValue<>( + "mode", + "\"openai_compatible\"", + new TypeReference>() {}); + + private static final LazySingletonValue> _SINGLETON_VALUE_ModelName = + new LazySingletonValue<>( + "model_name", + "\"text-embedding-ada-002\"", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexProcessingConfigModel.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexProcessingConfigModel.java new file mode 100644 index 000000000..701aa03bc --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexProcessingConfigModel.java @@ -0,0 +1,426 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.LazySingletonValue; +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +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 com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Optional; + + +public class DestinationSnowflakeCortexProcessingConfigModel { + + /** + * Size of overlap between chunks in tokens to store in vector store to better capture relevant context + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("chunk_overlap") + private Optional chunkOverlap; + + /** + * Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM) + */ + @JsonProperty("chunk_size") + private long chunkSize; + + /** + * List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("field_name_mappings") + private Optional> fieldNameMappings; + + /** + * List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("metadata_fields") + private Optional> metadataFields; + + /** + * List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("text_fields") + private Optional> textFields; + + /** + * Split text fields into chunks based on the specified method. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("text_splitter") + private Optional textSplitter; + + @JsonCreator + public DestinationSnowflakeCortexProcessingConfigModel( + @JsonProperty("chunk_overlap") Optional chunkOverlap, + @JsonProperty("chunk_size") long chunkSize, + @JsonProperty("field_name_mappings") Optional> fieldNameMappings, + @JsonProperty("metadata_fields") Optional> metadataFields, + @JsonProperty("text_fields") Optional> textFields, + @JsonProperty("text_splitter") Optional textSplitter) { + Utils.checkNotNull(chunkOverlap, "chunkOverlap"); + Utils.checkNotNull(chunkSize, "chunkSize"); + Utils.checkNotNull(fieldNameMappings, "fieldNameMappings"); + Utils.checkNotNull(metadataFields, "metadataFields"); + Utils.checkNotNull(textFields, "textFields"); + Utils.checkNotNull(textSplitter, "textSplitter"); + this.chunkOverlap = chunkOverlap; + this.chunkSize = chunkSize; + this.fieldNameMappings = fieldNameMappings; + this.metadataFields = metadataFields; + this.textFields = textFields; + this.textSplitter = textSplitter; + } + + public DestinationSnowflakeCortexProcessingConfigModel( + long chunkSize) { + this(Optional.empty(), chunkSize, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Size of overlap between chunks in tokens to store in vector store to better capture relevant context + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional chunkOverlap() { + return (Optional) chunkOverlap; + } + + /** + * Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM) + */ + @JsonIgnore + public long chunkSize() { + return chunkSize; + } + + /** + * List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> fieldNameMappings() { + return (Optional>) fieldNameMappings; + } + + /** + * List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> metadataFields() { + return (Optional>) metadataFields; + } + + /** + * List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> textFields() { + return (Optional>) textFields; + } + + /** + * Split text fields into chunks based on the specified method. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional textSplitter() { + return (Optional) textSplitter; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Size of overlap between chunks in tokens to store in vector store to better capture relevant context + */ + public DestinationSnowflakeCortexProcessingConfigModel withChunkOverlap(long chunkOverlap) { + Utils.checkNotNull(chunkOverlap, "chunkOverlap"); + this.chunkOverlap = Optional.ofNullable(chunkOverlap); + return this; + } + + /** + * Size of overlap between chunks in tokens to store in vector store to better capture relevant context + */ + public DestinationSnowflakeCortexProcessingConfigModel withChunkOverlap(Optional chunkOverlap) { + Utils.checkNotNull(chunkOverlap, "chunkOverlap"); + this.chunkOverlap = chunkOverlap; + return this; + } + + /** + * Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM) + */ + public DestinationSnowflakeCortexProcessingConfigModel withChunkSize(long chunkSize) { + Utils.checkNotNull(chunkSize, "chunkSize"); + this.chunkSize = chunkSize; + return this; + } + + /** + * List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation. + */ + public DestinationSnowflakeCortexProcessingConfigModel withFieldNameMappings(java.util.List fieldNameMappings) { + Utils.checkNotNull(fieldNameMappings, "fieldNameMappings"); + this.fieldNameMappings = Optional.ofNullable(fieldNameMappings); + return this; + } + + /** + * List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation. + */ + public DestinationSnowflakeCortexProcessingConfigModel withFieldNameMappings(Optional> fieldNameMappings) { + Utils.checkNotNull(fieldNameMappings, "fieldNameMappings"); + this.fieldNameMappings = fieldNameMappings; + return this; + } + + /** + * List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path. + */ + public DestinationSnowflakeCortexProcessingConfigModel withMetadataFields(java.util.List metadataFields) { + Utils.checkNotNull(metadataFields, "metadataFields"); + this.metadataFields = Optional.ofNullable(metadataFields); + return this; + } + + /** + * List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path. + */ + public DestinationSnowflakeCortexProcessingConfigModel withMetadataFields(Optional> metadataFields) { + Utils.checkNotNull(metadataFields, "metadataFields"); + this.metadataFields = metadataFields; + return this; + } + + /** + * List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. + */ + public DestinationSnowflakeCortexProcessingConfigModel withTextFields(java.util.List textFields) { + Utils.checkNotNull(textFields, "textFields"); + this.textFields = Optional.ofNullable(textFields); + return this; + } + + /** + * List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. + */ + public DestinationSnowflakeCortexProcessingConfigModel withTextFields(Optional> textFields) { + Utils.checkNotNull(textFields, "textFields"); + this.textFields = textFields; + return this; + } + + /** + * Split text fields into chunks based on the specified method. + */ + public DestinationSnowflakeCortexProcessingConfigModel withTextSplitter(DestinationSnowflakeCortexTextSplitter textSplitter) { + Utils.checkNotNull(textSplitter, "textSplitter"); + this.textSplitter = Optional.ofNullable(textSplitter); + return this; + } + + /** + * Split text fields into chunks based on the specified method. + */ + public DestinationSnowflakeCortexProcessingConfigModel withTextSplitter(Optional textSplitter) { + Utils.checkNotNull(textSplitter, "textSplitter"); + this.textSplitter = textSplitter; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexProcessingConfigModel other = (DestinationSnowflakeCortexProcessingConfigModel) o; + return + java.util.Objects.deepEquals(this.chunkOverlap, other.chunkOverlap) && + java.util.Objects.deepEquals(this.chunkSize, other.chunkSize) && + java.util.Objects.deepEquals(this.fieldNameMappings, other.fieldNameMappings) && + java.util.Objects.deepEquals(this.metadataFields, other.metadataFields) && + java.util.Objects.deepEquals(this.textFields, other.textFields) && + java.util.Objects.deepEquals(this.textSplitter, other.textSplitter); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + chunkOverlap, + chunkSize, + fieldNameMappings, + metadataFields, + textFields, + textSplitter); + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexProcessingConfigModel.class, + "chunkOverlap", chunkOverlap, + "chunkSize", chunkSize, + "fieldNameMappings", fieldNameMappings, + "metadataFields", metadataFields, + "textFields", textFields, + "textSplitter", textSplitter); + } + + public final static class Builder { + + private Optional chunkOverlap; + + private Long chunkSize; + + private Optional> fieldNameMappings = Optional.empty(); + + private Optional> metadataFields = Optional.empty(); + + private Optional> textFields = Optional.empty(); + + private Optional textSplitter = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Size of overlap between chunks in tokens to store in vector store to better capture relevant context + */ + public Builder chunkOverlap(long chunkOverlap) { + Utils.checkNotNull(chunkOverlap, "chunkOverlap"); + this.chunkOverlap = Optional.ofNullable(chunkOverlap); + return this; + } + + /** + * Size of overlap between chunks in tokens to store in vector store to better capture relevant context + */ + public Builder chunkOverlap(Optional chunkOverlap) { + Utils.checkNotNull(chunkOverlap, "chunkOverlap"); + this.chunkOverlap = chunkOverlap; + return this; + } + + /** + * Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM) + */ + public Builder chunkSize(long chunkSize) { + Utils.checkNotNull(chunkSize, "chunkSize"); + this.chunkSize = chunkSize; + return this; + } + + /** + * List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation. + */ + public Builder fieldNameMappings(java.util.List fieldNameMappings) { + Utils.checkNotNull(fieldNameMappings, "fieldNameMappings"); + this.fieldNameMappings = Optional.ofNullable(fieldNameMappings); + return this; + } + + /** + * List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation. + */ + public Builder fieldNameMappings(Optional> fieldNameMappings) { + Utils.checkNotNull(fieldNameMappings, "fieldNameMappings"); + this.fieldNameMappings = fieldNameMappings; + return this; + } + + /** + * List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path. + */ + public Builder metadataFields(java.util.List metadataFields) { + Utils.checkNotNull(metadataFields, "metadataFields"); + this.metadataFields = Optional.ofNullable(metadataFields); + return this; + } + + /** + * List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path. + */ + public Builder metadataFields(Optional> metadataFields) { + Utils.checkNotNull(metadataFields, "metadataFields"); + this.metadataFields = metadataFields; + return this; + } + + /** + * List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. + */ + public Builder textFields(java.util.List textFields) { + Utils.checkNotNull(textFields, "textFields"); + this.textFields = Optional.ofNullable(textFields); + return this; + } + + /** + * List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. + */ + public Builder textFields(Optional> textFields) { + Utils.checkNotNull(textFields, "textFields"); + this.textFields = textFields; + return this; + } + + /** + * Split text fields into chunks based on the specified method. + */ + public Builder textSplitter(DestinationSnowflakeCortexTextSplitter textSplitter) { + Utils.checkNotNull(textSplitter, "textSplitter"); + this.textSplitter = Optional.ofNullable(textSplitter); + return this; + } + + /** + * Split text fields into chunks based on the specified method. + */ + public Builder textSplitter(Optional textSplitter) { + Utils.checkNotNull(textSplitter, "textSplitter"); + this.textSplitter = textSplitter; + return this; + } + + public DestinationSnowflakeCortexProcessingConfigModel build() { + if (chunkOverlap == null) { + chunkOverlap = _SINGLETON_VALUE_ChunkOverlap.value(); + } + return new DestinationSnowflakeCortexProcessingConfigModel( + chunkOverlap, + chunkSize, + fieldNameMappings, + metadataFields, + textFields, + textSplitter); + } + + private static final LazySingletonValue> _SINGLETON_VALUE_ChunkOverlap = + new LazySingletonValue<>( + "chunk_overlap", + "0", + new TypeReference>() {}); + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode.java new file mode 100644 index 000000000..f10c7f521 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode.java @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +public enum DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode { + OPENAI_COMPATIBLE("openai_compatible"); + + @JsonValue + private final String value; + + private DestinationSnowflakeCortexSchemasEmbeddingEmbedding5Mode(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode.java new file mode 100644 index 000000000..ed2b97197 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode.java @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +public enum DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode { + AZURE_OPENAI("azure_openai"); + + @JsonValue + private final String value; + + private DestinationSnowflakeCortexSchemasEmbeddingEmbeddingMode(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingMode.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingMode.java new file mode 100644 index 000000000..cd9c421e1 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasEmbeddingMode.java @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +public enum DestinationSnowflakeCortexSchemasEmbeddingMode { + FAKE("fake"); + + @JsonValue + private final String value; + + private DestinationSnowflakeCortexSchemasEmbeddingMode(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasMode.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasMode.java new file mode 100644 index 000000000..3e156499b --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasMode.java @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +public enum DestinationSnowflakeCortexSchemasMode { + COHERE("cohere"); + + @JsonValue + private final String value; + + private DestinationSnowflakeCortexSchemasMode(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingMode.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingMode.java new file mode 100644 index 000000000..4ad000b27 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingMode.java @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +public enum DestinationSnowflakeCortexSchemasProcessingMode { + SEPARATOR("separator"); + + @JsonValue + private final String value; + + private DestinationSnowflakeCortexSchemasProcessingMode(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterMode.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterMode.java new file mode 100644 index 000000000..b04d1c3fd --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterMode.java @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +public enum DestinationSnowflakeCortexSchemasProcessingTextSplitterMode { + MARKDOWN("markdown"); + + @JsonValue + private final String value; + + private DestinationSnowflakeCortexSchemasProcessingTextSplitterMode(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode.java new file mode 100644 index 000000000..2aa039d47 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode.java @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +public enum DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode { + CODE("code"); + + @JsonValue + private final String value; + + private DestinationSnowflakeCortexSchemasProcessingTextSplitterTextSplitterMode(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexTextSplitter.java b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexTextSplitter.java new file mode 100644 index 000000000..5aca5bd18 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/DestinationSnowflakeCortexTextSplitter.java @@ -0,0 +1,110 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +import java.time.OffsetDateTime; +import java.time.LocalDate; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.airbyte.api.utils.TypedObject; +import com.airbyte.api.utils.Utils.JsonShape; + +/** + * DestinationSnowflakeCortexTextSplitter - Split text fields into chunks based on the specified method. + */ + +@JsonDeserialize(using = DestinationSnowflakeCortexTextSplitter._Deserializer.class) +public class DestinationSnowflakeCortexTextSplitter { + + @com.fasterxml.jackson.annotation.JsonValue + private TypedObject value; + + private DestinationSnowflakeCortexTextSplitter(TypedObject value) { + this.value = value; + } + + public static DestinationSnowflakeCortexTextSplitter of(DestinationSnowflakeCortexBySeparator value) { + Utils.checkNotNull(value, "value"); + return new DestinationSnowflakeCortexTextSplitter(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static DestinationSnowflakeCortexTextSplitter of(DestinationSnowflakeCortexByMarkdownHeader value) { + Utils.checkNotNull(value, "value"); + return new DestinationSnowflakeCortexTextSplitter(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + public static DestinationSnowflakeCortexTextSplitter of(DestinationSnowflakeCortexByProgrammingLanguage value) { + Utils.checkNotNull(value, "value"); + return new DestinationSnowflakeCortexTextSplitter(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){})); + } + + /** + * Returns an instance of one of these types: + *
      + *
    • {@code DestinationSnowflakeCortexBySeparator}
    • + *
    • {@code DestinationSnowflakeCortexByMarkdownHeader}
    • + *
    • {@code DestinationSnowflakeCortexByProgrammingLanguage}
    • + *
    + * + *

    Use {@code instanceof} to determine what type is returned. For example: + * + *

    +     * if (obj.value() instanceof String) {
    +     *     String answer = (String) obj.value();
    +     *     System.out.println("answer=" + answer);
    +     * }
    +     * 
    + * + * @return value of oneOf type + **/ + public java.lang.Object value() { + return value.value(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DestinationSnowflakeCortexTextSplitter other = (DestinationSnowflakeCortexTextSplitter) o; + return java.util.Objects.deepEquals(this.value.value(), other.value.value()); + } + + @Override + public int hashCode() { + return java.util.Objects.hash(value.value()); + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends com.airbyte.api.utils.OneOfDeserializer { + + public _Deserializer() { + super(DestinationSnowflakeCortexTextSplitter.class, + Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), + Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT), + Utils.TypeReferenceWithShape.of(new TypeReference() {}, Utils.JsonShape.DEFAULT)); + } + } + + @Override + public String toString() { + return Utils.toString(DestinationSnowflakeCortexTextSplitter.class, + "value", value); + } + +} diff --git a/src/main/java/com/airbyte/api/models/shared/PermissionResponseRead.java b/src/main/java/com/airbyte/api/models/shared/PermissionResponseRead.java new file mode 100644 index 000000000..ec8ac72ec --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/PermissionResponseRead.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +/** + * PermissionResponseRead - Reformat PermissionResponse with permission scope + */ + +public class PermissionResponseRead { + + @JsonProperty("permissionId") + private String permissionId; + + /** + * Describes what actions/endpoints the permission entitles to + */ + @JsonProperty("permissionType") + private PermissionType permissionType; + + /** + * Scope of a single permission, e.g. workspace, organization + */ + @JsonProperty("scope") + private PermissionScope scope; + + @JsonProperty("scopeId") + private String scopeId; + + /** + * Internal Airbyte user ID + */ + @JsonProperty("userId") + private String userId; + + @JsonCreator + public PermissionResponseRead( + @JsonProperty("permissionId") String permissionId, + @JsonProperty("permissionType") PermissionType permissionType, + @JsonProperty("scope") PermissionScope scope, + @JsonProperty("scopeId") String scopeId, + @JsonProperty("userId") String userId) { + Utils.checkNotNull(permissionId, "permissionId"); + Utils.checkNotNull(permissionType, "permissionType"); + Utils.checkNotNull(scope, "scope"); + Utils.checkNotNull(scopeId, "scopeId"); + Utils.checkNotNull(userId, "userId"); + this.permissionId = permissionId; + this.permissionType = permissionType; + this.scope = scope; + this.scopeId = scopeId; + this.userId = userId; + } + + @JsonIgnore + public String permissionId() { + return permissionId; + } + + /** + * Describes what actions/endpoints the permission entitles to + */ + @JsonIgnore + public PermissionType permissionType() { + return permissionType; + } + + /** + * Scope of a single permission, e.g. workspace, organization + */ + @JsonIgnore + public PermissionScope scope() { + return scope; + } + + @JsonIgnore + public String scopeId() { + return scopeId; + } + + /** + * Internal Airbyte user ID + */ + @JsonIgnore + public String userId() { + return userId; + } + + public final static Builder builder() { + return new Builder(); + } + + public PermissionResponseRead withPermissionId(String permissionId) { + Utils.checkNotNull(permissionId, "permissionId"); + this.permissionId = permissionId; + return this; + } + + /** + * Describes what actions/endpoints the permission entitles to + */ + public PermissionResponseRead withPermissionType(PermissionType permissionType) { + Utils.checkNotNull(permissionType, "permissionType"); + this.permissionType = permissionType; + return this; + } + + /** + * Scope of a single permission, e.g. workspace, organization + */ + public PermissionResponseRead withScope(PermissionScope scope) { + Utils.checkNotNull(scope, "scope"); + this.scope = scope; + return this; + } + + public PermissionResponseRead withScopeId(String scopeId) { + Utils.checkNotNull(scopeId, "scopeId"); + this.scopeId = scopeId; + return this; + } + + /** + * Internal Airbyte user ID + */ + public PermissionResponseRead withUserId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PermissionResponseRead other = (PermissionResponseRead) o; + return + java.util.Objects.deepEquals(this.permissionId, other.permissionId) && + java.util.Objects.deepEquals(this.permissionType, other.permissionType) && + java.util.Objects.deepEquals(this.scope, other.scope) && + java.util.Objects.deepEquals(this.scopeId, other.scopeId) && + java.util.Objects.deepEquals(this.userId, other.userId); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + permissionId, + permissionType, + scope, + scopeId, + userId); + } + + @Override + public String toString() { + return Utils.toString(PermissionResponseRead.class, + "permissionId", permissionId, + "permissionType", permissionType, + "scope", scope, + "scopeId", scopeId, + "userId", userId); + } + + public final static class Builder { + + private String permissionId; + + private PermissionType permissionType; + + private PermissionScope scope; + + private String scopeId; + + private String userId; + + private Builder() { + // force use of static builder() method + } + + public Builder permissionId(String permissionId) { + Utils.checkNotNull(permissionId, "permissionId"); + this.permissionId = permissionId; + return this; + } + + /** + * Describes what actions/endpoints the permission entitles to + */ + public Builder permissionType(PermissionType permissionType) { + Utils.checkNotNull(permissionType, "permissionType"); + this.permissionType = permissionType; + return this; + } + + /** + * Scope of a single permission, e.g. workspace, organization + */ + public Builder scope(PermissionScope scope) { + Utils.checkNotNull(scope, "scope"); + this.scope = scope; + return this; + } + + public Builder scopeId(String scopeId) { + Utils.checkNotNull(scopeId, "scopeId"); + this.scopeId = scopeId; + return this; + } + + /** + * Internal Airbyte user ID + */ + public Builder userId(String userId) { + Utils.checkNotNull(userId, "userId"); + this.userId = userId; + return this; + } + + public PermissionResponseRead build() { + return new PermissionResponseRead( + permissionId, + permissionType, + scope, + scopeId, + userId); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/PermissionScope.java b/src/main/java/com/airbyte/api/models/shared/PermissionScope.java new file mode 100644 index 000000000..1261bc3aa --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/PermissionScope.java @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +/** + * PermissionScope - Scope of a single permission, e.g. workspace, organization + */ +public enum PermissionScope { + WORKSPACE("workspace"), + ORGANIZATION("organization"), + NONE("none"); + + @JsonValue + private final String value; + + private PermissionScope(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/com/airbyte/api/models/shared/PermissionUpdateRequest.java b/src/main/java/com/airbyte/api/models/shared/PermissionUpdateRequest.java new file mode 100644 index 000000000..f414118b2 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/PermissionUpdateRequest.java @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + + +public class PermissionUpdateRequest { + + /** + * Describes what actions/endpoints the permission entitles to + */ + @JsonProperty("permissionType") + private PermissionType permissionType; + + @JsonCreator + public PermissionUpdateRequest( + @JsonProperty("permissionType") PermissionType permissionType) { + Utils.checkNotNull(permissionType, "permissionType"); + this.permissionType = permissionType; + } + + /** + * Describes what actions/endpoints the permission entitles to + */ + @JsonIgnore + public PermissionType permissionType() { + return permissionType; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Describes what actions/endpoints the permission entitles to + */ + public PermissionUpdateRequest withPermissionType(PermissionType permissionType) { + Utils.checkNotNull(permissionType, "permissionType"); + this.permissionType = permissionType; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PermissionUpdateRequest other = (PermissionUpdateRequest) o; + return + java.util.Objects.deepEquals(this.permissionType, other.permissionType); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + permissionType); + } + + @Override + public String toString() { + return Utils.toString(PermissionUpdateRequest.class, + "permissionType", permissionType); + } + + public final static class Builder { + + private PermissionType permissionType; + + private Builder() { + // force use of static builder() method + } + + /** + * Describes what actions/endpoints the permission entitles to + */ + public Builder permissionType(PermissionType permissionType) { + Utils.checkNotNull(permissionType, "permissionType"); + this.permissionType = permissionType; + return this; + } + + public PermissionUpdateRequest build() { + return new PermissionUpdateRequest( + permissionType); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/PermissionsResponse.java b/src/main/java/com/airbyte/api/models/shared/PermissionsResponse.java new file mode 100644 index 000000000..10a0d0de7 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/PermissionsResponse.java @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +/** + * PermissionsResponse - List/Array of multiple permissions + */ + +public class PermissionsResponse { + + @JsonProperty("data") + private java.util.List data; + + @JsonCreator + public PermissionsResponse( + @JsonProperty("data") java.util.List data) { + Utils.checkNotNull(data, "data"); + this.data = data; + } + + @JsonIgnore + public java.util.List data() { + return data; + } + + public final static Builder builder() { + return new Builder(); + } + + public PermissionsResponse withData(java.util.List data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PermissionsResponse other = (PermissionsResponse) o; + return + java.util.Objects.deepEquals(this.data, other.data); + } + + @Override + public int hashCode() { + return java.util.Objects.hash( + data); + } + + @Override + public String toString() { + return Utils.toString(PermissionsResponse.class, + "data", data); + } + + public final static class Builder { + + private java.util.List data; + + private Builder() { + // force use of static builder() method + } + + public Builder data(java.util.List data) { + Utils.checkNotNull(data, "data"); + this.data = data; + return this; + } + + public PermissionsResponse build() { + return new PermissionsResponse( + data); + } + } +} + diff --git a/src/main/java/com/airbyte/api/models/shared/SnowflakeCortex.java b/src/main/java/com/airbyte/api/models/shared/SnowflakeCortex.java new file mode 100644 index 000000000..0f3f9e0d2 --- /dev/null +++ b/src/main/java/com/airbyte/api/models/shared/SnowflakeCortex.java @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.airbyte.api.models.shared; + +import com.airbyte.api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Deprecated; +import java.math.BigDecimal; +import java.math.BigInteger; + +public enum SnowflakeCortex { + SNOWFLAKE_CORTEX("snowflake-cortex"); + + @JsonValue + private final String value; + + private SnowflakeCortex(String value) { + this.value = value; + } + + public String value() { + return value; + } +} diff --git a/src/main/java/com/airbyte/api/models/shared/SourceInsightly.java b/src/main/java/com/airbyte/api/models/shared/SourceInsightly.java index acf42f324..259f32f16 100644 --- a/src/main/java/com/airbyte/api/models/shared/SourceInsightly.java +++ b/src/main/java/com/airbyte/api/models/shared/SourceInsightly.java @@ -13,10 +13,13 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import java.io.InputStream; import java.lang.Deprecated; import java.math.BigDecimal; import java.math.BigInteger; +import java.time.OffsetDateTime; import java.util.Optional; @@ -30,7 +33,7 @@ public class SourceInsightly { */ @JsonInclude(Include.ALWAYS) @JsonProperty("start_date") - private Optional startDate; + private Optional startDate; /** * Your Insightly API token. @@ -41,7 +44,7 @@ public class SourceInsightly { @JsonCreator public SourceInsightly( - @JsonProperty("start_date") Optional startDate, + @JsonProperty("start_date") Optional startDate, @JsonProperty("token") Optional token) { Utils.checkNotNull(startDate, "startDate"); Utils.checkNotNull(token, "token"); @@ -64,8 +67,8 @@ public Insightly sourceType() { */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional startDate() { - return (Optional) startDate; + public Optional startDate() { + return (Optional) startDate; } /** @@ -84,7 +87,7 @@ public final static Builder builder() { /** * The date from which you'd like to replicate data for Insightly in the format YYYY-MM-DDT00:00:00Z. All data generated after this date will be replicated. Note that it will be used only for incremental streams. */ - public SourceInsightly withStartDate(String startDate) { + public SourceInsightly withStartDate(OffsetDateTime startDate) { Utils.checkNotNull(startDate, "startDate"); this.startDate = Optional.ofNullable(startDate); return this; @@ -93,7 +96,7 @@ public SourceInsightly withStartDate(String startDate) { /** * The date from which you'd like to replicate data for Insightly in the format YYYY-MM-DDT00:00:00Z. All data generated after this date will be replicated. Note that it will be used only for incremental streams. */ - public SourceInsightly withStartDate(Optional startDate) { + public SourceInsightly withStartDate(Optional startDate) { Utils.checkNotNull(startDate, "startDate"); this.startDate = startDate; return this; @@ -150,7 +153,7 @@ public String toString() { public final static class Builder { - private Optional startDate = Optional.empty(); + private Optional startDate = Optional.empty(); private Optional token = Optional.empty(); @@ -161,7 +164,7 @@ private Builder() { /** * The date from which you'd like to replicate data for Insightly in the format YYYY-MM-DDT00:00:00Z. All data generated after this date will be replicated. Note that it will be used only for incremental streams. */ - public Builder startDate(String startDate) { + public Builder startDate(OffsetDateTime startDate) { Utils.checkNotNull(startDate, "startDate"); this.startDate = Optional.ofNullable(startDate); return this; @@ -170,7 +173,7 @@ public Builder startDate(String startDate) { /** * The date from which you'd like to replicate data for Insightly in the format YYYY-MM-DDT00:00:00Z. All data generated after this date will be replicated. Note that it will be used only for incremental streams. */ - public Builder startDate(Optional startDate) { + public Builder startDate(Optional startDate) { Utils.checkNotNull(startDate, "startDate"); this.startDate = startDate; return this;